Protege 4.1.0

org.protege.editor.owl.model.util
Class ObjectSomeValuesFromFillerExtractor

java.lang.Object
  extended by org.semanticweb.owlapi.util.OWLClassExpressionVisitorAdapter
      extended by org.protege.editor.owl.model.util.ObjectSomeValuesFromFillerExtractor
All Implemented Interfaces:
org.semanticweb.owlapi.model.OWLClassExpressionVisitor
Direct Known Subclasses:
ClosureAxiomFactory

public class ObjectSomeValuesFromFillerExtractor
extends org.semanticweb.owlapi.util.OWLClassExpressionVisitorAdapter

Author: Matthew Horridge
The University Of Manchester
Medical Informatics Group
Date: 14-Jun-2006

matthew.horridge@cs.man.ac.uk
www.cs.man.ac.uk/~horridgm

A utility class that can be used to extract the fillers of existential (OWLObjectSomeValuesFroms) that restrict a specified property. This class is a visitor and should be used to visit OWLClassExpressions - only existential (and hasValue) restrictions are processed.

Visiting the following descriptions, A p some B C p some (C and D) p only E would return the set {B, (C and D)}.


Field Summary
protected  Set<org.semanticweb.owlapi.model.OWLClassExpression> fillers
           
 
Constructor Summary
ObjectSomeValuesFromFillerExtractor(org.semanticweb.owlapi.model.OWLDataFactory dataFactory, org.semanticweb.owlapi.model.OWLObjectProperty objectProperty)
          Creates a filler extractor that will extract the fillers of existential restrictions that restrict the specified object property.
 
Method Summary
 Set<org.semanticweb.owlapi.model.OWLClassExpression> getFillers()
          Gets a set of descriptions that correspond to the fillers of existential restrictions that this visitor has visited.
 org.semanticweb.owlapi.model.OWLObjectProperty getObjectProperty()
           
 void reset()
          Resets the extractor and clears the set of fillers that have been accumulated over the course of a series of visits.
 void visit(org.semanticweb.owlapi.model.OWLObjectHasValue node)
           
 void visit(org.semanticweb.owlapi.model.OWLObjectSomeValuesFrom node)
           
 
Methods inherited from class org.semanticweb.owlapi.util.OWLClassExpressionVisitorAdapter
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fillers

protected Set<org.semanticweb.owlapi.model.OWLClassExpression> fillers
Constructor Detail

ObjectSomeValuesFromFillerExtractor

public ObjectSomeValuesFromFillerExtractor(org.semanticweb.owlapi.model.OWLDataFactory dataFactory,
                                           org.semanticweb.owlapi.model.OWLObjectProperty objectProperty)
Creates a filler extractor that will extract the fillers of existential restrictions that restrict the specified object property.

Parameters:
objectProperty - The object property.
Method Detail

getObjectProperty

public org.semanticweb.owlapi.model.OWLObjectProperty getObjectProperty()

reset

public void reset()
Resets the extractor and clears the set of fillers that have been accumulated over the course of a series of visits.


getFillers

public Set<org.semanticweb.owlapi.model.OWLClassExpression> getFillers()
Gets a set of descriptions that correspond to the fillers of existential restrictions that this visitor has visited. Note that the set returned also includes nominals (i.e. singleton enumerations) containing the the individual used in an OWLObjectHasValue, since these are really syntactic sugar for existential restrictions with a nominal filler.

Returns:
A Set of OWLClassExpressions that corresponds to the fillers of the existential restrictions that were processed.

visit

public void visit(org.semanticweb.owlapi.model.OWLObjectSomeValuesFrom node)
Specified by:
visit in interface org.semanticweb.owlapi.model.OWLClassExpressionVisitor
Overrides:
visit in class org.semanticweb.owlapi.util.OWLClassExpressionVisitorAdapter

visit

public void visit(org.semanticweb.owlapi.model.OWLObjectHasValue node)
Specified by:
visit in interface org.semanticweb.owlapi.model.OWLClassExpressionVisitor
Overrides:
visit in class org.semanticweb.owlapi.util.OWLClassExpressionVisitorAdapter

Protege 4.1.0

Submit a bug report or feature request

For further API reference and developer documentation, see Protege 4 Developer Documentation.

Copyright © 2010 Stanford Center for Biomedical Informatics Research