Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.5 alpha
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.stanford.smi.protege.model
Class DefaultInstance

    java.lang.Object
      edu.stanford.smi.protege.model.DefaultFrame
          edu.stanford.smi.protege.model.DefaultInstance

All Implemented Interfaces:
  Frame, Instance, Localizable, Serializable, Comparable<Frame>

Direct Known Subclasses:
  DefaultCls, DefaultFacet, DefaultSimpleInstance, DefaultSlot

    public abstract class DefaultInstance

extends DefaultFrame
implements Instance

Default implementation of Instance interface. Forwards all method calls to its DefaultKnowledgeBase. This is the base class of all of the concrete frame classes such as those for slot, class, etc.

Author:
  Ray Fergerson
See Also:
  Serialized Form

Constructor Summary
`protected` | `DefaultInstance()`

Method Summary
`void` | `addDirectType(Cls type)`
`void` | `addInstanceListener(InstanceListener listener)`
`Frame` | `copy(KnowledgeBase targetKB, Map valueMap, boolean isDeep)`
`Frame` | `deepCopy(KnowledgeBase targetKB, Map valueMap)` Create a "deep copy" of the frame.
`String` | `getBrowserText()`
`Cls` | `getDirectType()` return the "first" direct type
`Collection` | `getDirectTypes()`
`Object` | `getOwnFacetValue(Slot slot, Facet facet)` see `Frame`for a description of the return type
`Collection` | `getOwnFacetValues(Slot slot, Facet facet)` see `Frame`for a description of the return type
`Collection` | `getReachableSimpleInstances()`
`boolean` | `hasDirectType(Cls cls)`
`boolean` | `hasType(Cls cls)`
`void` | `moveDirectType(Cls type, int index)`
`void` | `removeDirectType(Cls type)`
`void` | `removeInstanceListener(InstanceListener listener)`
`Instance` | `setDirectType(Cls type)`
`Instance` | `setDirectTypes(Collection types)`
`Frame` | `shallowCopy(KnowledgeBase targetKB, Map valueMap)`

Methods inherited from class edu.stanford.smi.protege.model.DefaultFrame
`addFrameListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, assertFrameName, compareTo, delete, equals, equals, getDefaultKnowledgeBase, getDefiningProjectURI, getDirectOwnSlotValue, getDirectOwnSlotValues, getDocumentation, getFrameID, getIcon, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getName, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReferences, getReferences, hashCode, hasOwnSlot, isBeingDeleted, isDeleted, isEditable, isIncluded, isSystem, isValid, isValidOwnSlotValue, isVisible, localize, markDeleted, markDeleting, moveDirectOwnSlotValue, removeFrameListener, removeOwnSlotValue, rename, setDirectOwnSlotValue, setDirectOwnSlotValues, setDocumentation, setDocumentation, setEditable, setIncluded, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, setSystem, setVisible`

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

Methods inherited from interface edu.stanford.smi.protege.model.Frame
`addFrameListener, addOwnFacetValue, addOwnSlotValue, areValidOwnSlotValues, assertFrameName, delete, getDirectOwnSlotValue, getDirectOwnSlotValues, getDocumentation, getFrameID, getIcon, getInvalidOwnSlotValuesText, getInvalidOwnSlotValueText, getKnowledgeBase, getName, getOwnSlotAllowsMultipleValues, getOwnSlotAndSubslotValues, getOwnSlotDefaultValues, getOwnSlotFacets, getOwnSlotFacetValues, getOwnSlots, getOwnSlotValue, getOwnSlotValueCount, getOwnSlotValues, getOwnSlotValueType, getProject, getReferences, getReferences, hasOwnSlot, isBeingDeleted, isDeleted, isEditable, isIncluded, isSystem, isValid, isValidOwnSlotValue, isVisible, markDeleted, markDeleting, moveDirectOwnSlotValue, removeFrameListener, removeOwnSlotValue, rename, setDirectOwnSlotValue, setDirectOwnSlotValues, setDocumentation, setDocumentation, setEditable, setIncluded, setOwnFacetValue, setOwnFacetValues, setOwnSlotValue, setOwnSlotValues, setVisible`

Methods inherited from interface java.lang.Comparable
`compareTo`

Constructor Detail

### DefaultInstance

    protected DefaultInstance()

Method Detail

### addInstanceListener

    public void addInstanceListener(InstanceListener listener)

  Specified by:
    `addInstanceListener` in interface `Instance`

### deepCopy

    public Frame deepCopy(KnowledgeBase targetKB,
                          Map valueMap)

  Description copied from interface: `Frame`
  Create a "deep copy" of the frame. If a frame has slot values that refer to SimpleInstances then these instances are duplicated as well. References to classes, slots, and facets are not duplicated. The copy of the frame is placed in the "kb" KnowledgeBase. To duplicate an instance into its own knowledgeBase you can pass in null for the kb. Always pass in null for the valueMap argument.

  Specified by:
    `deepCopy` in interface `Frame`

### shallowCopy

    public Frame shallowCopy(KnowledgeBase targetKB,
                             Map valueMap)

  Specified by:
    `shallowCopy` in interface `Frame`

### copy

    public Frame copy(KnowledgeBase targetKB,
                      Map valueMap,
                      boolean isDeep)

  Specified by:
    `copy` in interface `Frame`
  Overrides:
    `copy` in class `DefaultFrame`

### getBrowserText

    public String getBrowserText()

  Specified by:
    `getBrowserText` in interface `Frame`

### getDirectType

    public Cls getDirectType()

  Description copied from interface: `Instance`
  return the "first" direct type

  Specified by:
    `getDirectType` in interface `Instance`

### getDirectTypes

    public Collection getDirectTypes()

  Specified by:
    `getDirectTypes` in interface `Instance`

### getOwnFacetValue

    public Object getOwnFacetValue(Slot slot,
                                   Facet facet)

  Description copied from interface: `Frame`
  see `Frame`for a description of the return type

  Specified by:
    `getOwnFacetValue` in interface `Frame`

### getOwnFacetValues

    public Collection getOwnFacetValues(Slot slot,
                                        Facet facet)

  Description copied from interface: `Frame`
  see `Frame`for a description of the return type

  Specified by:
    `getOwnFacetValues` in interface `Frame`

### getReachableSimpleInstances

    public Collection getReachableSimpleInstances()

  Specified by:
    `getReachableSimpleInstances` in interface `Instance`

### hasDirectType

    public boolean hasDirectType(Cls cls)

  Specified by:
    `hasDirectType` in interface `Instance`

### hasType

    public boolean hasType(Cls cls)

  Specified by:
    `hasType` in interface `Instance`

### removeInstanceListener

    public void removeInstanceListener(InstanceListener listener)

  Specified by:
    `removeInstanceListener` in interface `Instance`

### setDirectType

    public Instance setDirectType(Cls type)

  Specified by:
    `setDirectType` in interface `Instance`

### setDirectTypes

    public Instance setDirectTypes(Collection types)

  Specified by:
    `setDirectTypes` in interface `Instance`

### addDirectType

    public void addDirectType(Cls type)

  Specified by:
    `addDirectType` in interface `Instance`

### removeDirectType

    public void removeDirectType(Cls type)

  Specified by:
    `removeDirectType` in interface `Instance`

### moveDirectType

    public void moveDirectType(Cls type,
                               int index)

  Specified by:
    `moveDirectType` in interface `Instance`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 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
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2012 Stanford University.