edu.stanford.smi.protegex.owl.model.framestore
Class CardinalityRestrictionUpdater
java.lang.Object
edu.stanford.smi.protegex.owl.model.framestore.AbstractRestrictionUpdater
edu.stanford.smi.protegex.owl.model.framestore.CardinalityRestrictionUpdater
- All Implemented Interfaces:
- RestrictionUpdater
- class CardinalityRestrictionUpdater
- extends AbstractRestrictionUpdater
Method Summary |
void |
copyFacetValuesIntoNamedClass(RDFSNamedClass cls,
OWLRestriction restriction)
|
private OWLCardinalityBase |
createCardinalityRestriction(RDFProperty property,
edu.stanford.smi.protege.model.Facet facet,
int cardinality)
|
private void |
ensureCardinalityRestriction(edu.stanford.smi.protege.model.Cls cls,
RDFProperty property,
edu.stanford.smi.protege.model.Facet facet)
|
private edu.stanford.smi.protege.model.Cls |
getCardinalityRestrictionCls(edu.stanford.smi.protege.model.Facet facet)
|
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)
|
private boolean |
hasCardinalityRestriction(edu.stanford.smi.protege.model.Cls cls,
edu.stanford.smi.protege.model.Slot slot,
edu.stanford.smi.protege.model.Cls metaCls,
int cardinality)
|
private boolean |
hasCardinalityRestriction(edu.stanford.smi.protege.model.Cls cls,
edu.stanford.smi.protege.model.Slot slot,
edu.stanford.smi.protege.model.Facet facet,
int cardinality)
|
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 |
updateBothCardinalityFacets(RDFSNamedClass cls,
edu.stanford.smi.protege.model.Slot slot)
|
private void |
updateCardinalityRestrictions(edu.stanford.smi.protege.model.Cls cls,
RDFProperty slot,
edu.stanford.smi.protege.model.Facet changedFacet,
edu.stanford.smi.protege.model.Facet otherFacet)
Updates or creates CardinalityRestrictions in response to a change in either max or min
cardinality facet. |
protected void |
updateMaximumCardinalityFacet(RDFSNamedClass cls,
edu.stanford.smi.protege.model.Slot slot)
|
protected void |
updateMinimumCardinalityFacet(RDFSNamedClass cls,
edu.stanford.smi.protege.model.Slot slot)
|
void |
updateRestrictions(OWLNamedClass cls,
RDFProperty property,
edu.stanford.smi.protege.model.Facet facet)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
maxCardinalityFacet
private edu.stanford.smi.protege.model.Facet maxCardinalityFacet
minCardinalityFacet
private edu.stanford.smi.protege.model.Facet minCardinalityFacet
owlModel
protected AbstractOWLModel owlModel
- The OWLModel this operates on
CardinalityRestrictionUpdater
CardinalityRestrictionUpdater(AbstractOWLModel owlModel)
createCardinalityRestriction
private OWLCardinalityBase createCardinalityRestriction(RDFProperty property,
edu.stanford.smi.protege.model.Facet facet,
int cardinality)
ensureCardinalityRestriction
private void ensureCardinalityRestriction(edu.stanford.smi.protege.model.Cls cls,
RDFProperty property,
edu.stanford.smi.protege.model.Facet facet)
getCardinalityRestrictionCls
private edu.stanford.smi.protege.model.Cls getCardinalityRestrictionCls(edu.stanford.smi.protege.model.Facet facet)
hasCardinalityRestriction
private boolean hasCardinalityRestriction(edu.stanford.smi.protege.model.Cls cls,
edu.stanford.smi.protege.model.Slot slot,
edu.stanford.smi.protege.model.Facet facet,
int cardinality)
hasCardinalityRestriction
private boolean hasCardinalityRestriction(edu.stanford.smi.protege.model.Cls cls,
edu.stanford.smi.protege.model.Slot slot,
edu.stanford.smi.protege.model.Cls metaCls,
int cardinality)
updateBothCardinalityFacets
private void updateBothCardinalityFacets(RDFSNamedClass cls,
edu.stanford.smi.protege.model.Slot slot)
updateCardinalityRestrictions
private void updateCardinalityRestrictions(edu.stanford.smi.protege.model.Cls cls,
RDFProperty slot,
edu.stanford.smi.protege.model.Facet changedFacet,
edu.stanford.smi.protege.model.Facet otherFacet)
- Updates or creates CardinalityRestrictions in response to a change in either max or min
cardinality facet. Depending on the situation this does the following:
a) MAX has changed and MAX != MIN:
- Replace MaxCardiRestrictions
- Remove CardiRestrictions
- If defined then replace MinCardiRestrictions
b) MAX has changed and MAX == MIN
- Remove MaxCardiRestrictions
- Remove MinCardiRestrictions
- Replace CardiRestrictions
c) MAX was deleted
- Remove MaxCardiRestrictions
- Remove CardiRestrictions
- If defined then replace MinCardiRestrictions
- Parameters:
cls
- the Cls where the facet has changedslot
- the Slot that has changedchangedFacet
- the Facet that has changedotherFacet
- the inverse Facet to changedFacet (unchanged)
updateMaximumCardinalityFacet
protected void updateMaximumCardinalityFacet(RDFSNamedClass cls,
edu.stanford.smi.protege.model.Slot slot)
updateMinimumCardinalityFacet
protected void updateMinimumCardinalityFacet(RDFSNamedClass cls,
edu.stanford.smi.protege.model.Slot slot)
copyFacetValuesIntoNamedClass
public void copyFacetValuesIntoNamedClass(RDFSNamedClass cls,
OWLRestriction restriction)
updateRestrictions
public void updateRestrictions(OWLNamedClass cls,
RDFProperty property,
edu.stanford.smi.protege.model.Facet facet)
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)