|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.fluxion.runcible.graph.utils.OWLRestrictionEvaluator
public class OWLRestrictionEvaluator
A utils class that provides functionality to evaluate the possible set of
restrictions that can be applied to any class held in a reaonser. To use
this class, you should pass an OWLReasoner
that has been loaded and
classified with the set of required ontologies. Calling the evaluate(org.semanticweb.owl.inference.OWLReasoner)
method will then calculate the possible restrictions that can be
applied to the defined classes in the reasoner.
Constructor Summary | |
---|---|
OWLRestrictionEvaluator()
|
Method Summary | |
---|---|
static java.util.Map<org.semanticweb.owl.model.OWLClass,java.util.Set<org.semanticweb.owl.model.OWLRestriction>> |
evaluate(org.semanticweb.owl.inference.OWLReasoner reasoner)
Evaluates the possible set of existential relationships that can be applied to every defined class that has been classified by the reasoner. |
static org.semanticweb.owl.model.OWLClass |
getMostSpecificCommonClass(org.semanticweb.owl.inference.OWLReasoner reasoner,
java.util.Set<org.semanticweb.owl.model.OWLClass> classes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OWLRestrictionEvaluator()
Method Detail |
---|
public static java.util.Map<org.semanticweb.owl.model.OWLClass,java.util.Set<org.semanticweb.owl.model.OWLRestriction>> evaluate(org.semanticweb.owl.inference.OWLReasoner reasoner) throws org.semanticweb.owl.inference.OWLReasonerException
In effect, this means that for each defined class, this method inspects
every declared property - which will be termed "Property P" - and
determines if the intersection of all its domains and the defined class is
non-empty. If this evaluates to true, it constructs a "some" restriction
on the inverse of this property with a value of the defined class - in
other words, a restriction that describes the set of individuals that have
some value for the inverse property that is an instance of the defined
class. It then determines the most specific single superclass of this
restriction, which will be termed "Class C". Finally, a creates a new
OWLObjectSomeRestriction
or OWLDataSomeRestriction
, depending on the
property type, where the property is Property P and the class is Class C.
This restriction is added to the map.
The result of this is that a client can call the evaluate method, and then lookup the possible set of all inferrable "Some" restrictions in an ontology, by the class they can possibly be applied to. This enables the construction of mapping rules - every "some" restriction represents a possible walk operation. Of course, once walks are combined many levels down a tree, other more specific inferances might be possible, and these will not be considered by this method. This means callers should be aware that if building rules that contain deep trees, some nodes may represent empty sets.
reasoner
- the reasoner that contains the ontologies being used
org.semanticweb.owl.inference.OWLReasonerException
- if the reasoner failspublic static org.semanticweb.owl.model.OWLClass getMostSpecificCommonClass(org.semanticweb.owl.inference.OWLReasoner reasoner, java.util.Set<org.semanticweb.owl.model.OWLClass> classes) throws org.semanticweb.owl.inference.OWLReasonerException
org.semanticweb.owl.inference.OWLReasonerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |