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

Public Member Functions

 set_actual_kb ($kb_uri)
 
 set_abbreviatedIRIs ($boolean)
 
 __construct ()
 
 insert_prefix ($prefixes)
 
 begin_mincardinality_dataproperty ($cardinality)
 
 end_mincardinality_dataproperty ()
 
 begin_maxcardinality_dataproperty ($cardinality)
 
 end_maxcardinality_dataproperty ()
 
 begin_somevaluesfrom_dataproperty ()
 
 end_somevaluesfrom_dataproperty ()
 
 begin_allvaluesfrom_dataproperty ()
 
 end_allvaluesfrom_dataproperty ()
 
 begin_datapropertydomain ()
 
 end_datapropertydomain ()
 
 begin_datapropertyrange ()
 
 end_datapropertyrange ()
 
 begin_intersectionof_dataproperty ()
 
 end_intersectionof_dataproperty ()
 
 begin_unionof_dataproperty ()
 
 end_unionof_dataproperty ()
 
 begin_complementof_dataproperty ()
 
 end_complementof_dataproperty ()
 
 insert_datatype ($name, $is_abbreviated=null)
 
Starting and Ending the document
 insert_startdocument ()
 
 insert_request ($ontologyIRI, $reqiris=[])
 
 start_document ($ontologyIRI=[], $req=[])
 
 end_document ()
 
KB Management Messages

These messages is used for insert OWLlink's primitives for manage Knowldege Bases.

 insert_create_kb ($ontologyIRI, $prefixes=[])
 
 insert_release_kb ($uri=null)
 
Ask

Messages for the Ask section.

 insert_satisfiable ()
 
 insert_getPrefixes ()
 
 insert_satisfiable_class ($classname)
 
 insert_satisfiable_objectProperty ($opname)
 
 insert_satisfiable_dataProperty ($dpname)
 
 insert_isEntailed_query ($array)
 
 insert_isEntailedDirectSubClasses_query ($array)
 
 insert_isEntailedDirectDisjointClasses_query ($array)
 
 insert_get_all_object_properties_query ()
 
 insert_get_all_classes_query ()
 
 insert_get_subClasses_query ($classname)
 
 insert_get_superClasses_query ($classname)
 
 insert_get_equivalentClasses_query ($classname)
 
 insert_getSubClassHierarchy_query ()
 
 insert_getSubObjectPropertyHierarchy_query ()
 
 insert_get_disjointClasses_query ($classname)
 
 insert_owllink ($text)
 
 to_string ()
 
- Public Member Functions inherited from Document
 to_string ()
 
 end_document ()
 

Protected Attributes

 $content = null
 
 $firstKBElement = "Tell"
 
 $actual_kb = null
 
 $current_prefixes = []
 
 $in_tell = false
 
 $in_queries = false
 
 $default_header
 
 $default_prefixes
 
 $owllink_text = ""
 

Tell

Messages for adding Tell queries into the OWLlink document.

 get_in_tell ()
 
 set_in_tell ($bool=false)
 
 get_firstElementKB ()
 
 start_tell ()
 
 end_tell ()
 
 insert_subclassof ($child_class, $father_class, $child_abbrev=false, $father_abbrev=false)
 
 insert_subobjectpropertyof ($child_op, $father_op)
 
 insert_subdatapropertyof ($child_dp, $father_dp)
 
 insert_class ($name, $is_abbreviated=null)
 
 insert_class_declaration ($class)
 
 insert_objectproperty_declaration ($objprop)
 
 insert_dataproperty_declaration ($dprop)
 
 insert_dataproperty ($name, $is_abbreviated=null)
 
 insert_objectproperty ($name, $is_abbreviated=null)
 
 begin_inverseof ()
 
 end_inverseof ()
 
 begin_subclassof ()
 
 end_subclassof ()
 
 begin_intersectionof ()
 
 end_intersectionof ()
 
 begin_unionof ()
 
 end_unionof ()
 
 begin_complementof ()
 
 end_complementof ()
 
 begin_somevaluesfrom ()
 
 end_somevaluesfrom ()
 
 begin_allvaluesfrom ()
 
 end_allvaluesfrom ()
 
 begin_mincardinality ($cardinality)
 
 end_mincardinality ()
 
 begin_maxcardinality ($cardinality)
 
 end_maxcardinality ()
 
 begin_objectpropertydomain ()
 
 end_objectpropertydomain ()
 
 begin_objectpropertyrange ()
 
 end_objectpropertyrange ()
 
 begin_equivalentclasses ()
 
 end_equivalentclasses ()
 
 begin_disjointclasses ()
 
 end_disjointclasses ()
 
 prefix_exists ($prefix)
 
 check_prefixes ($name)
 
 name_has_namespace ($name)
 
 name_full_expanded ($name)
 
 remove_prefixExpansion ($fullname)
 

Detailed Description

Example

$d = new OWLlinkDocument();
$d->insert_startdocument();
$d->insert_request();
// ...
$d->end_document();
$d->to_string();

Constructor & Destructor Documentation

__construct ( )

Member Function Documentation

begin_allvaluesfrom ( )
begin_allvaluesfrom_dataproperty ( )
begin_complementof ( )
begin_complementof_dataproperty ( )
begin_datapropertydomain ( )
begin_datapropertyrange ( )
begin_disjointclasses ( )
begin_equivalentclasses ( )
begin_intersectionof ( )
begin_intersectionof_dataproperty ( )
begin_inverseof ( )
begin_maxcardinality (   $cardinality)
begin_maxcardinality_dataproperty (   $cardinality)
begin_mincardinality (   $cardinality)
begin_mincardinality_dataproperty (   $cardinality)
begin_objectpropertydomain ( )
begin_objectpropertyrange ( )
begin_somevaluesfrom ( )
begin_somevaluesfrom_dataproperty ( )
begin_subclassof ( )
begin_unionof ( )
begin_unionof_dataproperty ( )
check_prefixes (   $name)
protected
end_allvaluesfrom ( )
end_allvaluesfrom_dataproperty ( )
end_complementof ( )
end_complementof_dataproperty ( )
end_datapropertydomain ( )
end_datapropertyrange ( )
end_disjointclasses ( )
end_document ( )
end_equivalentclasses ( )
end_intersectionof ( )
end_intersectionof_dataproperty ( )
end_inverseof ( )
end_maxcardinality ( )
end_maxcardinality_dataproperty ( )
end_mincardinality ( )
end_mincardinality_dataproperty ( )
end_objectpropertydomain ( )
end_objectpropertyrange ( )
end_somevaluesfrom ( )
end_somevaluesfrom_dataproperty ( )
end_subclassof ( )
end_tell ( )
end_unionof ( )
end_unionof_dataproperty ( )
get_firstElementKB ( )
get_in_tell ( )
insert_class (   $name,
  $is_abbreviated = null 
)

Add a class DL element.

Abbreviated IRI's are recognized automatically by name_has_namespace() function. var_dump($prefixes);

Note
crowd expands every name when ontology is written in OWLlink. if name does not contain prefixes nor IRIs, crowd appends its default or given IRI base. if name is abbreviated, crowd checks that such prefix had been declarated and expands the name with the respective IRI. if name is already expanded, crowd uses this full name.
Parameters
nameString the name or IRI of the new concept.
is_abbreviatedBoolean (Optional) force that the given IRI is or is not an abreviated like owl:class.
insert_class_declaration (   $class)
insert_create_kb (   $ontologyIRI,
  $prefixes = [] 
)

Insert a "CreateKB" OWLlink primitive. After that, set the actual_kb to the given URI.

Parameters
$ontologyIRIAn IRI for the current ontology. The name or the URI of the KB.
$prefixesAn Array of namespaces and IRIs for the ontology.
insert_dataproperty (   $name,
  $is_abbreviated = null 
)
insert_dataproperty_declaration (   $dprop)
insert_datatype (   $name,
  $is_abbreviated = null 
)
insert_get_all_classes_query ( )

Insert a query denominated GetAllClasses for the current kb.

OWLlink query: <GetAllClasses kb="http://localhost/kb1">

insert_get_all_object_properties_query ( )

Insert a query denominated GetAllObjectProperties for the current kb.

OWLlink query: <GetAllObjectProperties kb="http://localhost/kb1">

insert_get_disjointClasses_query (   $classname)

Insert a query denominated GetDisjointClasses for all the classes in the array.

OWLlink query:

<GetDisjointClasses kb=""> <owl:Class IRI="Person"/> </GetDisjointClasses>

Parameters
$classnamean Object Type.
Note
not supported by konclude reasoner
insert_get_equivalentClasses_query (   $classname)

Insert a query denominated GetEquivalentClasses for all the classes in the array.

OWLlink query:

<GetEquivalentClasses kb="http://localhost/kb1"> <owl:Class IRI="Person"/> </GetEquivalentClasses>

Parameters
$arrayAn array of Strings with classnames.
insert_get_subClasses_query (   $classname)

Insert a query denominated GetSubClasses for all the classes in the array.

OWLlink query:

<GetSubClasses kb="http://localhost/kb1"> <owl:Class IRI="PhoneCall"/> </GetSubClasses>

Parameters
$classnamean Object Type.
insert_get_superClasses_query (   $classname)

Insert a query denominated GetSuperClasses for all the classes in the array.

OWLlink query:

<GetSuperClasses kb="http://localhost/kb1"> <owl:Class IRI="PhoneCall"/> </GetSuperClasses>

Parameters
$classnamean Object Type.
insert_getPrefixes ( )
insert_getSubClassHierarchy_query ( )

Insert a query denominated GetSubClassHierarchy for the current kb.

OWLlink query: <GetSubClassHierarchy kb="http://localhost/kb1">

insert_getSubObjectPropertyHierarchy_query ( )

Insert a query denominated GetObjectPropertiesHierarchy for the current kb.

OWLlink query: <GetSubObjectPropertyHierarchy kb="http://localhost/kb1">

insert_isEntailed_query (   $array)

Insert an ASK query denominated IsEntailed for all the classes in the array.

OWLlink query:

<IsEntailed kb="http://localhost/kb1"> <owl:EquivalentClasses> <owl:Class IRI="PhoneCall"/> <owl:Class IRI="MobileCall"/> </owl:EquivalentClasses> </IsEntailed>

Parameters
$arrayAn array of Strings with classnames.
insert_isEntailedDirectDisjointClasses_query (   $array)

Insert an ASK query denominated IsEntailedDirect for all the classes in the array.

OWLlink query:

<IsEntailedDirect kb="http://localhost/kb1"> <owl:DisjointClasses> <owl:Class IRI="PhoneCall"/> <owl:Class IRI="MobileCall"/> </owl:DisjointClasses> </IsEntailedDirect>

Parameters
$arrayAn array of Strings with classnames.
insert_isEntailedDirectSubClasses_query (   $array)

Insert an ASK query denominated IsEntailedDirect for all the classes in the array.

OWLlink query:

<IsEntailedDirect kb="http://localhost/kb1"> <owl:SubClassOf> <owl:Class IRI="PhoneCall"/> <owl:Class IRI="MobileCall"/> </owl:SubClassOf> </IsEntailedDirect>

Parameters
$arrayAn array of Strings with classnames.
insert_objectproperty (   $name,
  $is_abbreviated = null 
)
insert_objectproperty_declaration (   $objprop)
insert_owllink (   $text)
insert_prefix (   $prefixes)
insert_release_kb (   $uri = null)

Insert a "ReleaseKB" OWLlink primitive.

If the URI corresponds to the actual_kb one, set it to null.

Parameters
uriString (Optional). The name or the URI of the database to release. If not given, use the actual_kb one.
insert_request (   $ontologyIRI,
  $reqiris = [] 
)
insert_satisfiable ( )
insert_satisfiable_class (   $classname)
insert_satisfiable_dataProperty (   $dpname)

Insert a query denominated IsDataPropertySatisfiable for all the data properties in the array.

OWLlink query:

<IsDataPropertySatisfiable kb=""> <owl:DataProperty IRI="r2"/> </IsDataPropertySatisfiable>

Parameters
$arrayAn array of Strings with data property names.
Note
not supported by konclude reasoner
insert_satisfiable_objectProperty (   $opname)

Insert a query denominated IsObjectPropertySatisfiable for all the object properties in the array.

OWLlink query:

<IsObjectPropertySatisfiable kb=""> <owl:ObjectProperty IRI="r2"/> </IsObjectPropertySatisfiable>

Parameters
$arrayAn array of Strings with objectspropnames.
Note
not supported by konclude reasoner
insert_startdocument ( )
insert_subclassof (   $child_class,
  $father_class,
  $child_abbrev = false,
  $father_abbrev = false 
)

Insert a DL subclass-of operator.

Abbreviated IRIs are recognized automatically.

Parameters
child_classA String with the child's name class.
father_classSame as $child_class parameter but for the $father_class.
child_abbrevIf true, force the abbreviated IRI for the child class; if false, force the (not abbreviated) IRI; if null check it automatically.
father_abbrevsame as $child_abbrev but for the $father_class.
insert_subdatapropertyof (   $child_dp,
  $father_dp 
)

Insert a DL subdataproperty-of operator.

Abbreviated IRIs are recognized automatically.

Parameters
child_classA String with the child's name class.
father_classSame as $child_class parameter but for the $father_class.
child_abbrevIf true, force the abbreviated IRI for the child class; if false, force the (not abbreviated) IRI; if null check it automatically.
father_abbrevsame as $child_abbrev but for the $father_class.
insert_subobjectpropertyof (   $child_op,
  $father_op 
)

Insert a DL subobjectproperty-of operator.

Abbreviated IRIs are recognized automatically.

Parameters
child_classA String with the child's name class.
father_classSame as $child_class parameter but for the $father_class.
child_abbrevIf true, force the abbreviated IRI for the child class; if false, force the (not abbreviated) IRI; if null check it automatically.
father_abbrevsame as $child_abbrev but for the $father_class.
name_full_expanded (   $name)
protected

Check if class names are full-expanded (i.e.: "http://crowd.fi.uncoma.edu.ar/Class").

Parameters
namea String with the IRI.
Returns
True if the name is full expanded. False otherwise.
name_has_namespace (   $name)
protected

Check if this IRI has a namespace, (i.e.: is an abbreviated IRI).

Like in "owl:Thing" which its namespace is "owl" here.

Parameters
namea String with the IRI.
Returns
True if the name has an XML Namespace. False otherwise.
prefix_exists (   $prefix)
protected
remove_prefixExpansion (   $fullname)
protected

This function returns a short name for a OWL 2 entity removing prefix expansions

set_abbreviatedIRIs (   $boolean)
set_actual_kb (   $kb_uri)
set_in_tell (   $bool = false)
start_document (   $ontologyIRI = [],
  $req = [] 
)

Abbreviation of:

$d->insert_startdocument();
$d->insert_request();
start_tell ( )

Open e Tell query.

The KB is setted according to actual_kb.

Example:

$owllink_document->start_tell();
$owllink_document->insert_concept("Person");
$owllink_document->insert_concept("OtherPerson");
$owllink_document->end_tell();
to_string ( )

Field Documentation

$actual_kb = null
protected

The current KB URI as . of String.

This can be changed by creating a new KB (see insert_create_kb()) or by using the setter.

$content = null
protected
$current_prefixes = []
protected
$default_header
protected
Initial value:
= [
["attr" => "xmlns", "value" => "http://www.owllink.org/owllink#"],
["attr" => "xmlns:owl", "value" => "http://www.w3.org/2002/07/owl#"],
["attr" => "xmlns:xsi", "value" => "http://www.w3.org/2001/XMLSchema-instance"],
["attr" => "xsi:schemaLocation", "value" => "http://www.owllink.org/owllink# http://www.owllink.org/owllink-20091116.xsd"]
]
$default_prefixes
protected
Initial value:
= [
["prefix" => "rdf", "value" => "http://www.w3.org/1999/02/22-rdf-syntax-ns#"],
["prefix" => "rdfs", "value" => "http://www.w3.org/2000/01/rdf-schema#"],
["prefix" => "xsd", "value" => "http://www.w3.org/2001/XMLSchema#"],
["prefix" => "owl", "value" => "http://www.w3.org/2002/07/owl#"]
]
$firstKBElement = "Tell"
protected
$in_queries = false
protected
$in_tell = false
protected

I'm inserting Tell's queries?

$owllink_text = ""
protected

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