Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.5 alpha
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.smi.protegex.owl.model.framestore
Class OWLFrameStore

    java.lang.Object
      edu.stanford.smi.protege.model.framestore.AbstractFrameStore
          edu.stanford.smi.protege.model.framestore.FrameStoreAdapter
              edu.stanford.smi.protegex.owl.model.framestore.OWLFrameStore

All Implemented Interfaces:
  edu.stanford.smi.protege.model.framestore.FrameStore

    public class OWLFrameStore

extends edu.stanford.smi.protege.model.framestore.FrameStoreAdapter

A FrameStore with specific support for OWL ontologies. While most calls simply forward to their default implementation, some calls are intercepted to do some extra work:

- Deleting depending anonymous classes when their host is deleted
- Synchronizing facet overrides and restriction superclasses (RestrictionUpdaters)
- Ensuring that equivalent classes and superclasses are synchronized

The goal of this architecture is to make sure that there a no unused anonymous classes around. This cannot be done through a garbage collection because then components such as the Jena synchronizers could not be able to delete a class when it should be deleted.
Normally, all anonymous classes are used only in one place (their host class). The host can be a restriction (as facet override in the all and some restrictions), a slot (e.g. via domain and range), or a named class (e.g. as superclass or disjoint class). Much of the logic for this deleting of depending classes is encapsulated in the subtypes of RDFSClass. Some extra cases, however (especially restrictions) must be handled with care.
With restrictions, the rule that anonymous classes are only attached to a single host is no longer valid. Restrictions store their filler as a facet override. In the case of all and some restrictions, these overrides can be (anonymous) classes. The same classes are mapped into facet overrides in the host class -- they are not cloned because there is only one representation in the corresponding Jena/OWL model.
These anonymous classes have the restriction as host, and they are deleted when the restriction is deleted or changes its filler. As a consequence, the following actions are performed by this FrameStore:

- If the filler of a restriction changes, then the filler is also assigned to the (named) subclass of the restriction as facet override
- If the facet override changes in the named subclass, then the old restriction is replaced with a new one that has the override value as filler (i.e. also as override)
- If the named class is deleted, then the depending restrictions are deleted
- If the restriction is deleted, then the facet override is removed from the named class

Finally, the OWLFrameStore also makes sure that if a named class has an intersection as equivalent class, then all named operands of these intersections are also superclasses of the host class. Note that this is maintained in both direction, i.e. if someone removes an intersection, then the named operands are also automatically removed, no matter whether the user intended to also add the class as a superclass. These side effects need to be considered by OWL API users.

Author:
  Holger Knublauch

Field Summary
`static boolean` | `autoDeleteOfAnonymousClses` An ugly trick to prevent anonymous classes from being deleted as a side effect
`static String` | `IGNORE_PREFIXES_IN_SEARCH`

Fields inherited from interface edu.stanford.smi.protege.model.framestore.FrameStore
`UNLIMITED_MATCHES`

Constructor Summary
`OWLFrameStore(AbstractOWLModel owlModel)`

Method Summary
`edu.stanford.smi.protege.model.Cls` | `createCls(edu.stanford.smi.protege.model.FrameID id, Collection directTypes, Collection directSuperclasses, boolean loadDefaults)`
`void` | `deleteCls(edu.stanford.smi.protege.model.Cls cls)`
`void` | `deleteQuantifierRestrictions(OWLProperty property)` Deletes all QuantifierRestrictions (and the expressions where they are used) which restrict a given propertyerty.
`void` | `deleteSimpleInstance(edu.stanford.smi.protege.model.SimpleInstance simpleInstance)`
`void` | `deleteSlot(edu.stanford.smi.protege.model.Slot slot)` Deletes the depending classes (anonymous domains and ranges) of the slot being deleted.
`Collection` | `getClsesToDelete(edu.stanford.smi.protege.model.Cls cls)` A slighly adjusted version of DeleteSimplificationFrameStore that ignores links through the anonymous root class.
`Set` | `getClsesWithMatchingBrowserText(String value, Collection superclasses, int maxMatches)`
`Set` | `getFramesWithMatchingDirectOwnSlotValue(edu.stanford.smi.protege.model.Slot slot, String value, int maxMatches)`
`List` | `getLiteralValues(List values)` Deprecated. This method was moved into AbstractOWLModel
`Set` | `getMatchingReferences(String value, int maxMatches)`
`static boolean` | `isIgnorePrefixesInSearch(OWLModel owlModel)`
`void` | `removeDirectSuperclass(edu.stanford.smi.protege.model.Cls cls, edu.stanford.smi.protege.model.Cls superCls)`
`void` | `setDirectOwnSlotValues(edu.stanford.smi.protege.model.Frame frame, edu.stanford.smi.protege.model.Slot slot, Collection values)`

Methods inherited from class edu.stanford.smi.protege.model.framestore.FrameStoreAdapter
`addDirectSuperclass, addDirectSuperslot, addDirectTemplateSlot, addDirectType, beginTransaction, beginTransaction, commitTransaction, createFacet, createSimpleInstance, createSlot, deleteFacet, executeQuery, getClsCount, getClses, getClsesWithAnyDirectTemplateSlotValue, getClsesWithDirectTemplateFacetValue, getClsesWithDirectTemplateSlotValue, getClsesWithMatchingDirectTemplateFacetValue, getClsesWithMatchingDirectTemplateSlotValue, getDirectDomain, getDirectInstances, getDirectlyOverriddenTemplateFacets, getDirectlyOverriddenTemplateSlots, getDirectOwnSlotValues, getDirectOwnSlotValuesClosure, getDirectOwnSlotValuesCount, getDirectSubclasses, getDirectSubslots, getDirectSuperclasses, getDirectSuperslots, getDirectTemplateFacetValues, getDirectTemplateSlots, getDirectTemplateSlotValues, getDirectTypes, getDomain, getEvents, getFacetCount, getFacets, getFrame, getFrame, getFrameCount, getFrameName, getFrames, getFramesWithAnyDirectOwnSlotValue, getFramesWithDirectOwnSlotValue, getInstances, getOverriddenTemplateFacets, getOverriddenTemplateSlots, getOwnFacets, getOwnFacetValues, getOwnSlots, getOwnSlotValues, getReferences, getSimpleInstanceCount, getSlotCount, getSlots, getSubclasses, getSubslots, getSuperclasses, getSuperslots, getTemplateFacets, getTemplateFacetValues, getTemplateSlots, getTemplateSlotValues, getTransactionStatusMonitor, getTypes, moveDirectOwnSlotValue, moveDirectSubclass, moveDirectSubslot, moveDirectTemplateSlot, moveDirectType, reinitialize, removeDirectSuperslot, removeDirectTemplateFacetOverrides, removeDirectTemplateSlot, removeDirectType, replaceFrame, rollbackTransaction, setDirectTemplateFacetValues, setDirectTemplateSlotValues`

Methods inherited from class edu.stanford.smi.protege.model.framestore.AbstractFrameStore
`close, getDelegate, getName, onSetDelegate, setDelegate, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### IGNORE_PREFIXES_IN_SEARCH

    public static final String IGNORE_PREFIXES_IN_SEARCH

See Also:
  Constant Field Values

### autoDeleteOfAnonymousClses

    public static boolean autoDeleteOfAnonymousClses

  An ugly trick to prevent anonymous classes from being deleted as a side effect

Constructor Detail

### OWLFrameStore

    public OWLFrameStore(AbstractOWLModel owlModel)

Method Detail

### deleteQuantifierRestrictions

    public void deleteQuantifierRestrictions(OWLProperty property)

  Deletes all QuantifierRestrictions (and the expressions where they are used) which restrict a given propertyerty. This is needed when a property changes its type.

  Parameters:
    `property` - the restricted property

### getClsesToDelete

    public Collection getClsesToDelete(edu.stanford.smi.protege.model.Cls cls)

  A slighly adjusted version of DeleteSimplificationFrameStore that ignores links through the anonymous root class.

  Parameters:
    `cls` -
  Returns:
    see the super method

### getLiteralValues

    @Deprecated
    public List getLiteralValues(List values)

  Deprecated. This method was moved into AbstractOWLModel

### isIgnorePrefixesInSearch

    public static boolean isIgnorePrefixesInSearch(OWLModel owlModel)

### setDirectOwnSlotValues

    public void setDirectOwnSlotValues(edu.stanford.smi.protege.model.Frame frame,
                                       edu.stanford.smi.protege.model.Slot slot,
                                       Collection values)

  Specified by:
    `setDirectOwnSlotValues` in interface `edu.stanford.smi.protege.model.framestore.FrameStore`
  Overrides:
    `setDirectOwnSlotValues` in class `edu.stanford.smi.protege.model.framestore.FrameStoreAdapter`

### createCls

    public edu.stanford.smi.protege.model.Cls createCls(edu.stanford.smi.protege.model.FrameID id,
                                                        Collection directTypes,
                                                        Collection directSuperclasses,
                                                        boolean loadDefaults)

  Specified by:
    `createCls` in interface `edu.stanford.smi.protege.model.framestore.FrameStore`
  Overrides:
    `createCls` in class `edu.stanford.smi.protege.model.framestore.FrameStoreAdapter`

### deleteCls

    public void deleteCls(edu.stanford.smi.protege.model.Cls cls)

  Specified by:
    `deleteCls` in interface `edu.stanford.smi.protege.model.framestore.FrameStore`
  Overrides:
    `deleteCls` in class `edu.stanford.smi.protege.model.framestore.FrameStoreAdapter`

### deleteSlot

    public void deleteSlot(edu.stanford.smi.protege.model.Slot slot)

  Deletes the depending classes (anonymous domains and ranges) of the slot being deleted.

  Specified by:
    `deleteSlot` in interface `edu.stanford.smi.protege.model.framestore.FrameStore`
  Overrides:
    `deleteSlot` in class `edu.stanford.smi.protege.model.framestore.FrameStoreAdapter`
  Parameters:
    `slot` - the Slot being deleted

### deleteSimpleInstance

    public void deleteSimpleInstance(edu.stanford.smi.protege.model.SimpleInstance simpleInstance)

  Specified by:
    `deleteSimpleInstance` in interface `edu.stanford.smi.protege.model.framestore.FrameStore`
  Overrides:
    `deleteSimpleInstance` in class `edu.stanford.smi.protege.model.framestore.FrameStoreAdapter`

### getClsesWithMatchingBrowserText

    public Set getClsesWithMatchingBrowserText(String value,
                                               Collection superclasses,
                                               int maxMatches)

  Specified by:
    `getClsesWithMatchingBrowserText` in interface `edu.stanford.smi.protege.model.framestore.FrameStore`
  Overrides:
    `getClsesWithMatchingBrowserText` in class `edu.stanford.smi.protege.model.framestore.FrameStoreAdapter`

### getFramesWithMatchingDirectOwnSlotValue

    public Set getFramesWithMatchingDirectOwnSlotValue(edu.stanford.smi.protege.model.Slot slot,
                                                       String value,
                                                       int maxMatches)

  Specified by:
    `getFramesWithMatchingDirectOwnSlotValue` in interface `edu.stanford.smi.protege.model.framestore.FrameStore`
  Overrides:
    `getFramesWithMatchingDirectOwnSlotValue` in class `edu.stanford.smi.protege.model.framestore.FrameStoreAdapter`

### getMatchingReferences

    public Set getMatchingReferences(String value,
                                     int maxMatches)

  Specified by:
    `getMatchingReferences` in interface `edu.stanford.smi.protege.model.framestore.FrameStore`
  Overrides:
    `getMatchingReferences` in class `edu.stanford.smi.protege.model.framestore.FrameStoreAdapter`

### removeDirectSuperclass

    public void removeDirectSuperclass(edu.stanford.smi.protege.model.Cls cls,
                                       edu.stanford.smi.protege.model.Cls superCls)

  Specified by:
    `removeDirectSuperclass` in interface `edu.stanford.smi.protege.model.framestore.FrameStore`
  Overrides:
    `removeDirectSuperclass` in class `edu.stanford.smi.protege.model.framestore.FrameStoreAdapter`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protégé-OWL 3.5 alpha
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug report or feature request
Copyright (c) 1998-2012 Stanford University.