|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.polito.elite.ontology.OntologyAbstraction
public abstract class OntologyAbstraction
Field Summary | |
---|---|
protected java.util.logging.Logger |
log
|
Constructor Summary | |
---|---|
protected |
OntologyAbstraction()
|
Method Summary | |
---|---|
abstract boolean |
addAnnotationProperty4URI(java.lang.String uri,
java.lang.String property,
java.lang.Object value)
Adds an annotation property of type property, having object as value, referred to a given concept (OWL class) |
abstract boolean |
canQuery()
|
abstract void |
confirmLogicViewSupport()
|
abstract NodeTypeAbstraction |
createNodeTypeAbstraction(NodeTypesEnum t,
java.lang.String expression)
It is sufficient that it handles NamedClasses and NamedInstances |
static OntologyAbstraction |
createOntologyAbstraction(edu.stanford.smi.protege.model.KnowledgeBase kb)
|
abstract java.util.HashSet<java.lang.String> |
getAllClasses(boolean listImportedClasses)
Returns all the classes (concepts) in a knowldge base |
abstract java.util.HashSet<java.lang.String> |
getAllInstances()
A method for getting all the instances in the ontology (for a RDF/RDFS model) |
abstract java.util.Hashtable<java.lang.String,RelationType> |
getAllRelations(boolean listImported)
Lists all the slots declared in a protege knowledge base, excluding the imported slots if listImported is true. |
abstract java.util.Hashtable<java.lang.String,java.lang.Object> |
getAnnotationProperties(java.lang.String resourceURI,
boolean isNamedClass)
A method that returns an hashtable containing all the annotations relative to the input class |
abstract java.util.Hashtable<java.lang.String,java.util.HashSet<RelationData>> |
getDatatypeProperties(java.lang.String concept)
A method that, given the name of a concept, provides as result a Hastable containing the couples datatype property, xsd type for each datatype property which has the given concept as domain. |
abstract java.util.Hashtable<java.lang.String,java.util.HashSet<NodeTypeAbstraction>> |
getInstancesDatatypeProperties(java.lang.String instance)
A method that, given the name of a concept, provides as result a Hastable containing the couples datatype property, value for each datatype property which has the given concept as domain. |
abstract java.util.Hashtable<java.lang.String,java.util.HashSet<NodeTypeAbstraction>> |
getInstancesObjectProperties(java.lang.String instance)
Returns an Hashtable containing for each instance "linked" to the instance i, a Set of objectProperties that start from i and reach the "linked" instance (usually such set is composed by only one objectProperty). |
abstract java.util.HashSet<java.lang.String> |
getInstancesOfConcept(java.lang.String concept)
A method for getting all the instances of a concept in the ontology (for a RDF/RDFS model) |
abstract int |
getNumberOfSubClasses(java.lang.String clsName)
A method that provides the number of direct subclasses for a given class (identified by its name) |
abstract java.util.Hashtable<java.lang.String,java.util.HashSet<RelationData>> |
getObjectProperties(java.lang.String uri,
boolean direct,
boolean listImportedClass)
Give the uri of a class, returns an hashtable of relations starting from the class together with an Hashset of endnodes for each relations (relationUri, EndNodes) |
abstract NodeTypeAbstraction |
getPropertyRange(java.lang.String uri)
|
abstract RelationType |
getRelationType(java.lang.String relURI)
A method that tells if a relation is towards a literal |
abstract java.util.Hashtable<java.lang.String,java.util.HashSet<NodeTypeAbstraction>> |
getRestrictions(java.lang.String clsURI)
Retrieves restrictions specified for the concept identified by a given URI |
abstract java.util.HashSet<java.lang.String> |
getRoots(boolean listImportedClasses)
Lists all the root classes of the ontology (leaved here for backward compatibility) |
abstract java.util.HashSet<java.lang.String> |
getSubClasses(java.lang.String clsName)
A method for retrieving all the subclasses of a given class given its name |
abstract java.util.HashSet<java.lang.String> |
getSuperClasses(java.lang.String clsName)
A method for retrieving all the superclasses of a given class given its name |
abstract boolean |
hasInstances(java.lang.String concept)
A method for checking if a given concept c has some instances or not |
abstract boolean |
removeAnnotationProperty4URI(java.lang.String clsURI,
java.lang.String property,
java.lang.Object value)
Remove an annotation property of type property, having object as value, referred to a given concept (OWL class) |
void |
setLoggingLevel(java.lang.String lv)
Sets the logging level for the OntologyAbstraction class, allowed levels include: INFO (default)OFFFINE FINESTWARNINGSEVERE |
abstract void |
setLogicalConstraints(java.lang.String clsURI,
ConceptData data)
|
abstract void |
setLogicalConstraints(java.lang.String instanceURI,
InstanceData data)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.logging.Logger log
Constructor Detail |
---|
protected OntologyAbstraction()
Method Detail |
---|
public abstract boolean addAnnotationProperty4URI(java.lang.String uri, java.lang.String property, java.lang.Object value)
uri
- the URI of the conceptproperty
- The name of the annotation property we want to addvalue
- The value of the annotation
public abstract boolean canQuery()
public abstract void confirmLogicViewSupport()
public abstract NodeTypeAbstraction createNodeTypeAbstraction(NodeTypesEnum t, java.lang.String expression)
t
- typeexpression
- the expression (at now the URI of concept/individual)
public static OntologyAbstraction createOntologyAbstraction(edu.stanford.smi.protege.model.KnowledgeBase kb)
public abstract java.util.HashSet<java.lang.String> getAllClasses(boolean listImportedClasses)
listImportedClasses
- true if also imported classes should be shown
public abstract java.util.HashSet<java.lang.String> getAllInstances()
public abstract java.util.Hashtable<java.lang.String,RelationType> getAllRelations(boolean listImported)
listImported
- true if slots coming from imported classes shall be shown
public abstract java.util.Hashtable<java.lang.String,java.lang.Object> getAnnotationProperties(java.lang.String resourceURI, boolean isNamedClass)
resourceURI
- the class or the property we want to extract annotation properties from
public abstract java.util.Hashtable<java.lang.String,java.util.HashSet<RelationData>> getDatatypeProperties(java.lang.String concept)
concept
-
public abstract java.util.Hashtable<java.lang.String,java.util.HashSet<NodeTypeAbstraction>> getInstancesDatatypeProperties(java.lang.String instance)
instance
- A String representing the instance URI
public abstract java.util.Hashtable<java.lang.String,java.util.HashSet<NodeTypeAbstraction>> getInstancesObjectProperties(java.lang.String instance)
instance
- the instance i
public abstract java.util.HashSet<java.lang.String> getInstancesOfConcept(java.lang.String concept)
concept
- The concept URI
public abstract int getNumberOfSubClasses(java.lang.String clsName)
clsName
- the name of the class
public abstract java.util.Hashtable<java.lang.String,java.util.HashSet<RelationData>> getObjectProperties(java.lang.String uri, boolean direct, boolean listImportedClass)
uri
- the uri of the starting classdirect
- --direct relations only (currently ignored)listImportedClass
- -- show system classes or not (to be deprecated)
public abstract NodeTypeAbstraction getPropertyRange(java.lang.String uri)
public abstract RelationType getRelationType(java.lang.String relURI)
public abstract java.util.Hashtable<java.lang.String,java.util.HashSet<NodeTypeAbstraction>> getRestrictions(java.lang.String clsURI)
clsURI
- The URI of the concept
public abstract java.util.HashSet<java.lang.String> getRoots(boolean listImportedClasses)
listImportedClasses
- true if also imported classes should be shown
public abstract java.util.HashSet<java.lang.String> getSubClasses(java.lang.String clsName)
clsName
- the class name
public abstract java.util.HashSet<java.lang.String> getSuperClasses(java.lang.String clsName)
clsName
- the class name
public abstract boolean hasInstances(java.lang.String concept)
concept
- the concept for which instances might exist
public abstract boolean removeAnnotationProperty4URI(java.lang.String clsURI, java.lang.String property, java.lang.Object value)
clsURI
- the URI of the conceptproperty
- The name of the annotation property we want to removevalue
- The value of the annotation
public void setLoggingLevel(java.lang.String lv)
lv
- - The logging levelpublic abstract void setLogicalConstraints(java.lang.String clsURI, ConceptData data)
public abstract void setLogicalConstraints(java.lang.String instanceURI, InstanceData data)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |