edu.stanford.smi.protegex.owl.model.framestore
Class AllValuesFromRestrictionUpdater

java.lang.Object
  extended byedu.stanford.smi.protegex.owl.model.framestore.AbstractRestrictionUpdater
      extended byedu.stanford.smi.protegex.owl.model.framestore.QuantifierRestrictionUpdater
          extended byedu.stanford.smi.protegex.owl.model.framestore.AllValuesFromRestrictionUpdater
All Implemented Interfaces:
RestrictionUpdater

class AllValuesFromRestrictionUpdater
extends QuantifierRestrictionUpdater


Field Summary
private  edu.stanford.smi.protege.model.Cls metaCls
           
protected  AbstractOWLModel owlModel
          The OWLModel this operates on
private  edu.stanford.smi.protege.model.Facet valueTypeFacet
           
 
Constructor Summary
(package private) AllValuesFromRestrictionUpdater(AbstractOWLModel owlModel)
           
 
Method Summary
private  void addAllRestriction(edu.stanford.smi.protege.model.Cls cls, RDFProperty property, edu.stanford.smi.protege.model.Cls allCls)
           
protected  void clearFiller(OWLQuantifierRestriction restriction)
           
 void copyFacetValuesIntoNamedClass(RDFSNamedClass cls, OWLRestriction restriction)
           
protected  void ensureNoSurvivingClsesAreDeleted(edu.stanford.smi.protege.model.Cls cls, edu.stanford.smi.protege.model.Slot slot, Collection clses, edu.stanford.smi.protege.model.Cls metaCls)
           
protected  edu.stanford.smi.protege.model.Cls getDirectRestriction(edu.stanford.smi.protege.model.Cls cls, edu.stanford.smi.protege.model.Slot slot, Class metaClass)
           
protected  Collection getDirectRestrictions(edu.stanford.smi.protege.model.Cls cls, edu.stanford.smi.protege.model.Slot slot, Class metaClass)
           
protected  Collection getQuantifierClsClses(RDFSClass quantifierClass)
           
protected  Collection getSafeClses(Collection base)
           
protected  void log(String message)
           
protected  void removeRestrictions(edu.stanford.smi.protege.model.Cls cls, edu.stanford.smi.protege.model.Slot slot, edu.stanford.smi.protege.model.Cls metaCls)
           
private  void removeValueTypeOverride(RDFSNamedClass cls, edu.stanford.smi.protege.model.Slot slot)
           
private  void setAllowedClses(RDFSNamedClass cls, edu.stanford.smi.protege.model.Slot slot, Collection newAllowedClses)
           
private  void setAllowedValues(RDFSNamedClass cls, edu.stanford.smi.protege.model.Slot slot, Collection newAllowedValues)
           
protected  void updateAllRestrictions(edu.stanford.smi.protege.model.Cls cls, RDFProperty property)
           
 void updateRestrictions(OWLNamedClass cls, RDFProperty property, edu.stanford.smi.protege.model.Facet facet)
           
(package private)  void updateValueTypeFacet(RDFSNamedClass cls, edu.stanford.smi.protege.model.Slot slot)
          Called when the superclasses have changed for a given Cls.
private  void updateValueTypeFacet(RDFSNamedClass cls, edu.stanford.smi.protege.model.Slot slot, OWLQuantifierRestriction restriction)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metaCls

private edu.stanford.smi.protege.model.Cls metaCls

valueTypeFacet

private edu.stanford.smi.protege.model.Facet valueTypeFacet

owlModel

protected AbstractOWLModel owlModel
The OWLModel this operates on

Constructor Detail

AllValuesFromRestrictionUpdater

AllValuesFromRestrictionUpdater(AbstractOWLModel owlModel)
Method Detail

addAllRestriction

private void addAllRestriction(edu.stanford.smi.protege.model.Cls cls,
                               RDFProperty property,
                               edu.stanford.smi.protege.model.Cls allCls)

clearFiller

protected void clearFiller(OWLQuantifierRestriction restriction)
Specified by:
clearFiller in class QuantifierRestrictionUpdater

copyFacetValuesIntoNamedClass

public void copyFacetValuesIntoNamedClass(RDFSNamedClass cls,
                                          OWLRestriction restriction)

removeValueTypeOverride

private void removeValueTypeOverride(RDFSNamedClass cls,
                                     edu.stanford.smi.protege.model.Slot slot)

setAllowedClses

private void setAllowedClses(RDFSNamedClass cls,
                             edu.stanford.smi.protege.model.Slot slot,
                             Collection newAllowedClses)

setAllowedValues

private void setAllowedValues(RDFSNamedClass cls,
                              edu.stanford.smi.protege.model.Slot slot,
                              Collection newAllowedValues)

updateAllRestrictions

protected void updateAllRestrictions(edu.stanford.smi.protege.model.Cls cls,
                                     RDFProperty property)

updateRestrictions

public void updateRestrictions(OWLNamedClass cls,
                               RDFProperty property,
                               edu.stanford.smi.protege.model.Facet facet)

updateValueTypeFacet

void updateValueTypeFacet(RDFSNamedClass cls,
                          edu.stanford.smi.protege.model.Slot slot)
Called when the superclasses have changed for a given Cls. This makes sure that the :VALUE-TYPE facet is overridden to contain all the "all" values from the current restrictions and union superclasses.

Parameters:
cls - the Cls where the restrictions have changed
slot - the Slot that the restrictions restrict

updateValueTypeFacet

private void updateValueTypeFacet(RDFSNamedClass cls,
                                  edu.stanford.smi.protege.model.Slot slot,
                                  OWLQuantifierRestriction restriction)

ensureNoSurvivingClsesAreDeleted

protected void ensureNoSurvivingClsesAreDeleted(edu.stanford.smi.protege.model.Cls cls,
                                                edu.stanford.smi.protege.model.Slot slot,
                                                Collection clses,
                                                edu.stanford.smi.protege.model.Cls metaCls)

getQuantifierClsClses

protected Collection getQuantifierClsClses(RDFSClass quantifierClass)

getSafeClses

protected Collection getSafeClses(Collection base)

getDirectRestriction

protected edu.stanford.smi.protege.model.Cls getDirectRestriction(edu.stanford.smi.protege.model.Cls cls,
                                                                  edu.stanford.smi.protege.model.Slot slot,
                                                                  Class metaClass)

getDirectRestrictions

protected Collection getDirectRestrictions(edu.stanford.smi.protege.model.Cls cls,
                                           edu.stanford.smi.protege.model.Slot slot,
                                           Class metaClass)

log

protected void log(String message)

removeRestrictions

protected void removeRestrictions(edu.stanford.smi.protege.model.Cls cls,
                                  edu.stanford.smi.protege.model.Slot slot,
                                  edu.stanford.smi.protege.model.Cls metaCls)