WICOM
 All Data Structures Namespaces Files Functions Variables Pages
Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
BerardiAnalizer Class Reference
Inheritance diagram for BerardiAnalizer:
AnsAnalizer

Public Member Functions

 generate_answer ($query, $answer)
 
 get_responses ()
 
 filter_xml ()
 
 analize ()
 
- Public Member Functions inherited from AnsAnalizer
 __construct ()
 
 generate_answer ($query, $owl_answer, $owl2)
 
 get_answer ()
 
 get_owl2_from_answer ()
 
 analize ()
 
 get_responses ()
 

Data Fields

const ANSWERS_MAP
 
const IsClassSatisfiable
 

Protected Member Functions

 find_classname ()
 
 next_tag ($in_query=true)
 
 next_important_tag ($in_query=true)
 

Protected Attributes

 $query_reader = null
 
 $answer_reader = null
 
- Protected Attributes inherited from AnsAnalizer
 $answer = null
 
 $owllink_responses = null
 
 $owllink_queries = null
 

Member Function Documentation

analize ( )
filter_xml ( )

Remove comments and other tags, and create an array with the most important tags and its answer.

Returns
An Asociated Array with most important tags and its answer. Example:
[
"IsKBSatisfiable" => "true",
"IsClassSatisfiable" => "true"
]
find_classname ( )
protected

Search for the next owl:Class tag and return its class IRI.

Returns
false If there's no Class tag.
String The IRI of the founded tag.
generate_answer (   $query,
  $answer 
)
get_responses ( )

This function starts parsing OWLlink responses file using an Concrete Iterator and outs a new array of responses to be inserted in the new ontology. It delegates to SimpleXMLIterator and OWLlinkBuilder

next_important_tag (   $in_query = true)
protected
Parameters
in_queryA Boolean indicating if it must advance the $this->query_reader XMLReader instance (true) or the $this->answer_reader one (false).
Returns
false if the EOF has been reached. True otherwise.
next_tag (   $in_query = true)
protected

Simply, go to the next initial tag.

Parameters
in_queryA boolean, if true advance the query_reader, if false, advance the answer_reader.
Returns
false if the EOF has been reached.

Field Documentation

$answer_reader = null
protected

XMLReader instance for parsing the reasoner answer.

$query_reader = null
protected

XMLReader instance for parsing the query given to the reasoner.

const ANSWERS_MAP
Initial value:
= [
"IsKBSatisfiable" => "BooleanResponse"

Map between Queries and propper correct answers.

Used for filtering XML tags to the ones we care.

const IsClassSatisfiable
Initial value:
=> "BooleanResponse",
"GetSubClassHierarchy" => "ClassHierarchy",
"GetDisjointClasses" => "ClassSynsets",
"GetEquivalentClasses" => "ClassSynsets",
"IsObjectPropertySatisfiable" => "BooleanResponse",
"GetSubObjectPropertyHierarchy" => "ObjectPropertyHierarchy",
"GetDisjointObjectProperties" => "ObjectPropertySynsets",
"GetEquivalentObjectProperties" => "SetOfObjectProperties",
]

The documentation for this class was generated from the following file: