|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.ucm.fdi.disia.ontobridge.OntoBridge
public class OntoBridge
Main OntoBridge Class
This class provides a simple wrapper for JENA.
It allows connecting to PELLET reasoner or any other that supports the DIG protocol.
Instead of using JENA classes this class returns strings containing the URIs
of the elements in the ontology.
Input parameters of the methods use URIs (or the qualified short representation) for
pointing to the ontology elements.
Conversion between URIs and JENA objects is managed automatically
Constructor Summary | |
---|---|
OntoBridge()
Creates an OntoBridge object. |
Method Summary | |
---|---|
java.lang.String |
getShortName(java.lang.String URI)
Returns the short form of an URI. |
java.lang.String |
getURI(java.lang.String shortName)
Returns the long URI form of a short name |
void |
initWithDIGReasoner(java.lang.String reasonerHost,
int reasonerPort)
Inits the OntoBridge with a DIG reasoner. |
void |
initWithOutReasoner()
Inits the OntoBridge without reasoner. |
void |
initWithPelletReasoner()
Inits the OntoBridge with the PELLET Reasoner |
boolean |
isInstanceOf(java.lang.String instance,
java.lang.String ontclass)
Checks if an instance belongs to a class |
boolean |
isSubClassOf(java.lang.String subclass,
java.lang.String superclass)
Checks if a class is subclass of other |
java.util.Iterator<java.lang.String> |
listAllandAnonClasses()
Lists all the classes of the framework including anonymous classes |
java.util.Iterator<java.lang.String> |
listAllClasses()
Lists all the no anonymous classes of the ontology |
java.util.Iterator<java.lang.String> |
listBelongingClasses(java.lang.String instance)
Lists the classes that an instance belongs to |
java.util.Iterator<java.lang.String> |
listComplementClasses()
Lists the complement classes of the ontology |
java.util.Iterator<java.lang.String> |
listEnumeratedClasses()
Lists the enumerated classes of the ontology |
java.util.Iterator<java.lang.String> |
listInstances(java.lang.String ontClass)
List the instances of a class |
java.util.Iterator<java.lang.String> |
listIntersectionClasses()
Lists the intersection classes of the ontology |
java.util.Iterator<java.lang.String> |
listProperties(java.lang.String ontClass)
|
java.util.Iterator<java.lang.String> |
listPropertyRange(java.lang.String property)
Lists the classes on the range of a property |
java.util.Iterator<java.lang.String> |
listPropertyValue(java.lang.String instance,
java.lang.String property)
Lists the instances that are the values of a property of an instance. |
java.util.Iterator<java.lang.String> |
listRestrictions()
Lists the restrictions of the ontology |
java.util.Iterator<java.lang.String> |
listRootClasses()
Lists the hierarchy root classes of the ontology |
java.util.Iterator<java.lang.String> |
listSpecificProperties(java.lang.String ontClass)
Lists the specific properties of class. |
java.util.Iterator<java.lang.String> |
listSubClasses(java.lang.String ontClass,
boolean direct)
Lists the subclasses of a class. |
java.util.Iterator<java.lang.String> |
listSuperClasses(java.lang.String ontClass,
boolean direct)
Lists the superclasses (parents) of a class. |
java.util.Iterator<java.lang.String> |
listUnionClasses()
Lists the union classes of the ontology |
void |
loadOntology(es.ucm.fdi.disia.ontobridge.OntologyDocument mainOntology,
java.util.Collection<es.ucm.fdi.disia.ontobridge.OntologyDocument> subOntologies,
boolean loadSubOntologies)
Loads an ontology using the initialized reasoner |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OntoBridge()
Method Detail |
---|
public void initWithPelletReasoner()
public void initWithDIGReasoner(java.lang.String reasonerHost, int reasonerPort)
reasonerHost
- Host where the reasoner is running.reasonerPort
- Port that the reasoner listens to.public void initWithOutReasoner()
public void loadOntology(es.ucm.fdi.disia.ontobridge.OntologyDocument mainOntology, java.util.Collection<es.ucm.fdi.disia.ontobridge.OntologyDocument> subOntologies, boolean loadSubOntologies)
mainOntology
- Main ontology documentsubOntologies
- Collection of ontology documents used by the main ontologyloadSubOntologies
- Indicates if the reasoner must load the subOntologies.
If loaded, their content is included in the reasoning graph of the main ontology graph.public java.util.Iterator<java.lang.String> listAllClasses()
public java.util.Iterator<java.lang.String> listAllandAnonClasses()
public java.util.Iterator<java.lang.String> listEnumeratedClasses()
public java.util.Iterator<java.lang.String> listUnionClasses()
public java.util.Iterator<java.lang.String> listComplementClasses()
public java.util.Iterator<java.lang.String> listIntersectionClasses()
public java.util.Iterator<java.lang.String> listRestrictions()
public java.util.Iterator<java.lang.String> listRootClasses()
public java.util.Iterator<java.lang.String> listSubClasses(java.lang.String ontClass, boolean direct)
ontClass
- class parent of the classes user is asking fordirect
- return only direct subclassespublic java.util.Iterator<java.lang.String> listSuperClasses(java.lang.String ontClass, boolean direct)
ontClass
- subclass of the classes user is asking fordirect
- return only direct subclassespublic java.util.Iterator<java.lang.String> listInstances(java.lang.String ontClass)
ontClass
- class that instances belong topublic java.util.Iterator<java.lang.String> listBelongingClasses(java.lang.String instance)
instance
- instance asked for belonging classespublic boolean isSubClassOf(java.lang.String subclass, java.lang.String superclass)
subclass
- subclassssuperclass
- superclasspublic boolean isInstanceOf(java.lang.String instance, java.lang.String ontclass)
instance
- instanceontclass
- class
public java.util.Iterator<java.lang.String> listProperties(java.lang.String ontClass)
public java.util.Iterator<java.lang.String> listSpecificProperties(java.lang.String ontClass)
ontClass
- class in the domain of the listed propertiespublic java.util.Iterator<java.lang.String> listPropertyRange(java.lang.String property)
property
- property user is asking for its rangepublic java.util.Iterator<java.lang.String> listPropertyValue(java.lang.String instance, java.lang.String property)
instance
- instance origin of the propertyproperty
- property
public java.lang.String getShortName(java.lang.String URI)
public java.lang.String getURI(java.lang.String shortName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |