|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnectec.semantic.web.knowledge.application.framework.ontologyprocessing.OntologyProcessing
public class OntologyProcessing
Contains convenient methods for ontology processing. Make use of JENA to provide easy-to-use functions for the users.
Constructor Summary | |
---|---|
OntologyProcessing(String filename,
String defaultNamespace)
Constructor method. |
Method Summary | |
---|---|
ArrayList<String> |
getAllDatatypeProperties(String classname)
Get list of all datatype properties of the given class. |
Map<String,String> |
getAllNamespacesMap()
Get all the available namespace map(prefix and namespace). |
ArrayList<String> |
getAllObjecttypeProperties(String classname)
Get list of all objecttype properties of the given class. |
ArrayList<String> |
getAllProperties(String classname)
Get list of all properties of the given class. |
String |
getDefaultNamespace()
Get the default namespace of the model. |
String |
getDifferentFrom(String classname)
Get the class that is different from given class name (as described in the ontology). |
ArrayList<String> |
getDirectProperties(String classname)
Get list of direct properties of the given class. |
String |
getDisjointWith(String classname)
Get the class that is disjoint with given class name (as described in the ontology). |
ArrayList<String> |
getDomainOf(String propertyName)
Get the domain of given property. |
String |
getLabelOf(String resourcename)
Get label of the given resource. |
ArrayList<String> |
getListOfAllClasses()
Get list of all classes which are available in the whole model. |
ArrayList<String> |
getListOfAllDatatypeProperties()
Get list of all datatype properties which are available in the whole model. |
ArrayList<String> |
getListOfAllFirstLevelClasses()
Get list of first-level classes (roots) in terms of class hierarchy. |
ArrayList<String> |
getListOfAllObjecttypeProperties()
Get list of all objecttype properties which are available in the whole model. |
ArrayList<String> |
getListOfAllProperties()
Get list of all properties which are available in the whole model. |
ArrayList<String> |
getListOfAllSubClasses(String classname)
Get list of sub classes of the given class. |
ArrayList<String> |
getListOfAllSubProperties(String propertyName)
Get list of all sub properties of the given property. |
ArrayList<String> |
getListOfAllSuperClasses(String classname)
Get list of all super classes of the given class. |
ArrayList<String> |
getListOfAllSuperProperties(String propertyName)
Get list of all super properties of the given property. |
ArrayList<String> |
getListOfDirectSubClasses(String classname)
Get list of direct sub classes of the given class. |
ArrayList<String> |
getListOfDirectSubProperties(String propertyName)
Get list of direct sub properties of the given property. |
ArrayList<String> |
getListOfDirectSuperClasses(String classname)
Get list of direct super classes of the given class. |
ArrayList<String> |
getListOfDirectSuperProperties(String propertyName)
Get list of direct super properties of the given property. |
ArrayList<String> |
getListOfSiblingClasses(String classname)
Get list of sibling classes of the given class. |
com.hp.hpl.jena.ontology.OntModel |
getModel()
Get the ontology model used. |
String |
getOntologyFilePath()
Get the path containing the file from which current ontology comes from. |
String |
getRangeOf(String propertyName)
Get the range of given property. |
String |
getSameAs(String classname)
Get the class that is same as given class name (as described in the ontology). |
boolean |
isDataTypeProperty(String propertyName)
Check whether given property is Data type property or not. |
boolean |
isDifferentFrom(String classname1,
String classname2)
Check the two given classes are described as different in ontology. |
boolean |
isDisjointWith(String classname1,
String classname2)
Check the two given classes are described as disjoint in ontology. |
boolean |
isObjectTypeProperty(String propertyName)
Check whether given property is Object type property or not. |
boolean |
isResource(String resource)
Check whether the given resource is a valid ontology resource in the model, or not. |
boolean |
isSameAs(String classname1,
String classname2)
Check the two given classes are described as same in ontology. |
void |
setModel(com.hp.hpl.jena.ontology.OntModel model)
Set Internal model which represents the ontology data parsed. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OntologyProcessing(String filename, String defaultNamespace)
filename
- Location of the ontology file on system (or) URL that provides ontology file.defaultNamespace
- Default namespace of the ontology (If this is null, base namespace of the ontology is used).Method Detail |
---|
public boolean isResource(String resource)
resource
- Resource to be checked.
public ArrayList<String> getListOfAllClasses()
public ArrayList<String> getListOfAllDatatypeProperties()
public ArrayList<String> getListOfAllObjecttypeProperties()
public ArrayList<String> getListOfAllProperties()
public ArrayList<String> getAllDatatypeProperties(String classname)
classname
- Class of interest.
public ArrayList<String> getAllObjecttypeProperties(String classname)
classname
- Class of interest.
public ArrayList<String> getAllProperties(String classname)
classname
- Class of interest.
public ArrayList<String> getDirectProperties(String classname)
classname
- Class of interest.
public ArrayList<String> getListOfAllSubClasses(String classname)
classname
- Class of interest.
public ArrayList<String> getListOfAllFirstLevelClasses()
public ArrayList<String> getListOfDirectSubClasses(String classname)
classname
- Class of interest.
public ArrayList<String> getListOfAllSuperClasses(String classname)
classname
- Class of interest.
public ArrayList<String> getListOfDirectSuperClasses(String classname)
classname
- Class of interest.
public ArrayList<String> getListOfSiblingClasses(String classname)
classname
- Class of interest.
public ArrayList<String> getListOfAllSubProperties(String propertyName)
propertyName
- Property of interest.
public ArrayList<String> getListOfDirectSubProperties(String propertyName)
propertyName
- Property of interest.
public ArrayList<String> getListOfAllSuperProperties(String propertyName)
propertyName
- Property of interest.
public ArrayList<String> getListOfDirectSuperProperties(String propertyName)
property
- Property of interest.
public String getLabelOf(String resourcename)
resourcename
- Resource of interest.
public ArrayList<String> getDomainOf(String propertyName)
propertyName
- Property of interest.
public String getRangeOf(String propertyName)
propertyName
- Property of interest.
public void setModel(com.hp.hpl.jena.ontology.OntModel model)
model
- Model which contains ontology data.public String getDefaultNamespace()
public String getOntologyFilePath()
public boolean isObjectTypeProperty(String propertyName)
property
- Property of interest.
public boolean isDataTypeProperty(String propertyName)
propertyName
- Property of interest.
public Map<String,String> getAllNamespacesMap()
public boolean isSameAs(String classname1, String classname2)
classname1
- Class 1.classname2
- Class 2.
public boolean isDifferentFrom(String classname1, String classname2)
classname1
- Class 1.classname2
- Class 2.
public boolean isDisjointWith(String classname1, String classname2)
classname1
- Class 1.classname2
- Class 2.
public String getSameAs(String classname)
classname
- Given class of interest.
public String getDifferentFrom(String classname)
classname
- Given class of interest.
public String getDisjointWith(String classname)
classname
- Given class of interest.
public com.hp.hpl.jena.ontology.OntModel getModel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |