net.sourceforge.fluxion.runcible.graph.utils
Class OWLRestrictionEvaluator
java.lang.Object
net.sourceforge.fluxion.runcible.graph.utils.OWLRestrictionEvaluator
public class OWLRestrictionEvaluator
- extends java.lang.Object
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.
- Author:
- Tony Burdett
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 |
OWLRestrictionEvaluator
public OWLRestrictionEvaluator()
evaluate
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
- Evaluates the possible set of existential relationships that can be applied
to every defined class that has been classified by the reasoner. This will
populate a map, with the keys being each classified defined class in the
reasoner and the values being the set of restrictions it is possible to
make on this class.
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.
- Parameters:
reasoner
- the reasoner that contains the ontologies being used
- Returns:
- a map of owl classes to restrictions that represent the possible
walk operations
- Throws:
org.semanticweb.owl.inference.OWLReasonerException
- if the reasoner fails
getMostSpecificCommonClass
public 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
- Throws:
org.semanticweb.owl.inference.OWLReasonerException
Copyright © 2010. All Rights Reserved.