Protege 2.1

edu.stanford.smi.protege.model
Class DefaultFrame

java.lang.Object
  extended byedu.stanford.smi.protege.model.DefaultFrame
All Implemented Interfaces:
Comparable, Frame, Serializable
Direct Known Subclasses:
DefaultInstance

public abstract class DefaultFrame
extends Object
implements Frame

Default implementation of Frame interface. Forwards all method calls to its DefaultKnowledgeBase.

Author:
Ray Fergerson
See Also:
Serialized Form

Method Summary
 void addFrameListener(FrameListener listener)
           
 boolean addOwnFacetValue(Slot slot, Facet facet, Object value)
           
 void addOwnSlotValue(Slot slot, Object value)
           
 boolean areValidOwnSlotValues(Slot slot, Collection c)
           
 int compareTo(Object o)
           
 Frame copy(KnowledgeBase kb, Map valueMap, boolean isDeep)
           
 void delete()
           
 boolean equals(Object o)
           
static boolean equals(Object o1, Object o2)
           
protected  KnowledgeBase getDefaultKnowledgeBase()
           
 URI getDefiningProjectURI()
           
 Object getDirectOwnSlotValue(Slot slot)
          see Frame for a description of the return type
 List getDirectOwnSlotValues(Slot slot)
          See Frame for a description of the return type.
 Collection getDocumentation()
           
 FrameID getFrameID()
           
 Icon getIcon()
           
 String getInvalidOwnSlotValuesText(Slot slot, Collection c)
           
 String getInvalidOwnSlotValueText(Slot slot, Object o)
           
 KnowledgeBase getKnowledgeBase()
           
 String getName()
           
 boolean getOwnSlotAllowsMultipleValues(Slot slot)
           
 Collection getOwnSlotAndSubslotValues(Slot slot)
          Returns the own slot values for this slot and all of its subslots.
 Collection getOwnSlotDefaultValues(Slot slot)
          see Frame for a description of the return type
 Collection getOwnSlotFacets(Slot slot)
           
 Collection getOwnSlotFacetValues(Slot slot, Facet facet)
           
 Collection getOwnSlots()
          Gets the collection of own slots for a frame.
 Object getOwnSlotValue(Slot slot)
          see Frame for a description of the return type
 int getOwnSlotValueCount(Slot slot)
           
 Collection getOwnSlotValues(Slot slot)
          see Frame for a description of the return type
 ValueType getOwnSlotValueType(Slot slot)
           
 Project getProject()
           
 Collection getReferences()
           
 Collection getReferences(int maxReferences)
           
 int hashCode()
           
 boolean hasOwnSlot(Slot slot)
           
 boolean isDeleted()
           
 boolean isEditable()
           
 boolean isIncluded()
           
 boolean isSystem()
           
 boolean isValid()
          Deprecated.  
 boolean isValidOwnSlotValue(Slot slot, Object o)
           
 boolean isVisible()
           
 void markDeleted(boolean deleted)
           
 void moveOwnSlotValue(Slot slot, int fromIndex, int toIndex)
           
 void removeFrameListener(FrameListener listener)
           
 void removeOwnSlotValue(Slot slot, Object value)
          Remove _all_ occurrences of this value.
 void setDirectOwnSlotValue(Slot slot, Object value)
          Same as #setOwnSlotValue(Slot, Object)
 void setDirectOwnSlotValues(Slot slot, Collection values)
          Same as #setOwnSlotValues(Slot, Collection)
 void setDocumentation(Collection documentation)
           
 void setDocumentation(String documentation)
           
 void setEditable(boolean b)
           
 void setIncluded(boolean b)
           
 void setKnowledgeBase(KnowledgeBase kb)
           
 void setName(String newName)
           
 void setOwnFacetValue(Slot slot, Facet facet, Object value)
          See Frame for a description of the value type.
 void setOwnFacetValues(Slot slot, Facet facet, Collection values)
          See Frame for a description of the value type.
 void setOwnSlotValue(Slot slot, Object value)
          See Frame for a description of the value type.
 void setOwnSlotValues(Slot slot, Collection values)
          See Frame for a description of the value type.
 void setSystem(boolean b)
           
 void setVisible(boolean v)
           
abstract  String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.stanford.smi.protege.model.Frame
deepCopy, getBrowserText, getOwnFacetValue, getOwnFacetValues, shallowCopy
 

Method Detail

getFrameID

public FrameID getFrameID()
Specified by:
getFrameID in interface Frame

isDeleted

public boolean isDeleted()
Specified by:
isDeleted in interface Frame

markDeleted

public void markDeleted(boolean deleted)
Specified by:
markDeleted in interface Frame

isValid

public boolean isValid()
Deprecated.  

Specified by:
isValid in interface Frame

equals

public boolean equals(Object o)

hashCode

public final int hashCode()

addFrameListener

public void addFrameListener(FrameListener listener)
Specified by:
addFrameListener in interface Frame

addOwnFacetValue

public boolean addOwnFacetValue(Slot slot,
                                Facet facet,
                                Object value)
Specified by:
addOwnFacetValue in interface Frame

addOwnSlotValue

public void addOwnSlotValue(Slot slot,
                            Object value)
Specified by:
addOwnSlotValue in interface Frame

areValidOwnSlotValues

public boolean areValidOwnSlotValues(Slot slot,
                                     Collection c)
Specified by:
areValidOwnSlotValues in interface Frame

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

equals

public static boolean equals(Object o1,
                             Object o2)

copy

public Frame copy(KnowledgeBase kb,
                  Map valueMap,
                  boolean isDeep)
Specified by:
copy in interface Frame

delete

public void delete()
Specified by:
delete in interface Frame

getDefaultKnowledgeBase

protected KnowledgeBase getDefaultKnowledgeBase()

getDocumentation

public Collection getDocumentation()
Specified by:
getDocumentation in interface Frame

getInvalidOwnSlotValuesText

public String getInvalidOwnSlotValuesText(Slot slot,
                                          Collection c)
Specified by:
getInvalidOwnSlotValuesText in interface Frame

getInvalidOwnSlotValueText

public String getInvalidOwnSlotValueText(Slot slot,
                                         Object o)
Specified by:
getInvalidOwnSlotValueText in interface Frame

getKnowledgeBase

public final KnowledgeBase getKnowledgeBase()
Specified by:
getKnowledgeBase in interface Frame

setKnowledgeBase

public void setKnowledgeBase(KnowledgeBase kb)

getName

public String getName()
Specified by:
getName in interface Frame

getOwnSlotAllowsMultipleValues

public boolean getOwnSlotAllowsMultipleValues(Slot slot)
Specified by:
getOwnSlotAllowsMultipleValues in interface Frame

getOwnSlotAndSubslotValues

public Collection getOwnSlotAndSubslotValues(Slot slot)
Description copied from interface: Frame
Returns the own slot values for this slot and all of its subslots. see Frame for a description of the return type

Specified by:
getOwnSlotAndSubslotValues in interface Frame

getOwnSlotDefaultValues

public Collection getOwnSlotDefaultValues(Slot slot)
Description copied from interface: Frame
see Frame for a description of the return type

Specified by:
getOwnSlotDefaultValues in interface Frame

getOwnSlotFacets

public Collection getOwnSlotFacets(Slot slot)
Specified by:
getOwnSlotFacets in interface Frame

getOwnSlotFacetValues

public Collection getOwnSlotFacetValues(Slot slot,
                                        Facet facet)
Specified by:
getOwnSlotFacetValues in interface Frame

getOwnSlots

public Collection getOwnSlots()
Description copied from interface: Frame
Gets the collection of own slots for a frame. These consist of the template slots of all of its direct types as well as the slots :NAME and :DIRECT-TYPE. See the Protege documentation (or the OKBC spec) for additional information about "own" and "template" slots.

Specified by:
getOwnSlots in interface Frame
Returns:
a collection of #Slot for this frame

getDirectOwnSlotValue

public Object getDirectOwnSlotValue(Slot slot)
Description copied from interface: Frame
see Frame for a description of the return type

Specified by:
getDirectOwnSlotValue in interface Frame

getDirectOwnSlotValues

public List getDirectOwnSlotValues(Slot slot)
Description copied from interface: Frame
See Frame for a description of the return type.

Specified by:
getDirectOwnSlotValues in interface Frame

getOwnSlotValue

public Object getOwnSlotValue(Slot slot)
Description copied from interface: Frame
see Frame for a description of the return type

Specified by:
getOwnSlotValue in interface Frame

getOwnSlotValueCount

public int getOwnSlotValueCount(Slot slot)
Specified by:
getOwnSlotValueCount in interface Frame

getOwnSlotValues

public Collection getOwnSlotValues(Slot slot)
Description copied from interface: Frame
see Frame for a description of the return type

Specified by:
getOwnSlotValues in interface Frame

getOwnSlotValueType

public ValueType getOwnSlotValueType(Slot slot)
Specified by:
getOwnSlotValueType in interface Frame

getProject

public Project getProject()
Specified by:
getProject in interface Frame

getReferences

public Collection getReferences()
Specified by:
getReferences in interface Frame

getReferences

public Collection getReferences(int maxReferences)
Specified by:
getReferences in interface Frame

hasOwnSlot

public boolean hasOwnSlot(Slot slot)
Specified by:
hasOwnSlot in interface Frame

isEditable

public boolean isEditable()
Specified by:
isEditable in interface Frame

isIncluded

public boolean isIncluded()
Specified by:
isIncluded in interface Frame

getDefiningProjectURI

public URI getDefiningProjectURI()
Specified by:
getDefiningProjectURI in interface Frame

isSystem

public boolean isSystem()
Specified by:
isSystem in interface Frame

isValidOwnSlotValue

public boolean isValidOwnSlotValue(Slot slot,
                                   Object o)
Specified by:
isValidOwnSlotValue in interface Frame

isVisible

public boolean isVisible()
Specified by:
isVisible in interface Frame

moveOwnSlotValue

public void moveOwnSlotValue(Slot slot,
                             int fromIndex,
                             int toIndex)
Specified by:
moveOwnSlotValue in interface Frame

removeFrameListener

public void removeFrameListener(FrameListener listener)
Specified by:
removeFrameListener in interface Frame

removeOwnSlotValue

public void removeOwnSlotValue(Slot slot,
                               Object value)
Description copied from interface: Frame
Remove _all_ occurrences of this value.

Specified by:
removeOwnSlotValue in interface Frame

setDocumentation

public void setDocumentation(String documentation)
Specified by:
setDocumentation in interface Frame

setDocumentation

public void setDocumentation(Collection documentation)
Specified by:
setDocumentation in interface Frame

setEditable

public void setEditable(boolean b)
Specified by:
setEditable in interface Frame

setIncluded

public void setIncluded(boolean b)
Specified by:
setIncluded in interface Frame

setName

public void setName(String newName)
Specified by:
setName in interface Frame

setOwnFacetValue

public void setOwnFacetValue(Slot slot,
                             Facet facet,
                             Object value)
Description copied from interface: Frame
See Frame for a description of the value type.

Specified by:
setOwnFacetValue in interface Frame

setOwnFacetValues

public void setOwnFacetValues(Slot slot,
                              Facet facet,
                              Collection values)
Description copied from interface: Frame
See Frame for a description of the value type.

Specified by:
setOwnFacetValues in interface Frame

setOwnSlotValue

public void setOwnSlotValue(Slot slot,
                            Object value)
Description copied from interface: Frame
See Frame for a description of the value type. This method sets the value of an own slot at a frame to a single value. The value passed in cannot be a Collection. To pass in a collection instead use Frame.setOwnSlotValues(Slot, Collection) (note the final "s"). This method can be called for either cardinality-single slots or cardinality-multiple slots.

Specified by:
setOwnSlotValue in interface Frame

setDirectOwnSlotValue

public void setDirectOwnSlotValue(Slot slot,
                                  Object value)
Description copied from interface: Frame
Same as #setOwnSlotValue(Slot, Object)

Specified by:
setDirectOwnSlotValue in interface Frame

setDirectOwnSlotValues

public void setDirectOwnSlotValues(Slot slot,
                                   Collection values)
Description copied from interface: Frame
Same as #setOwnSlotValues(Slot, Collection)

Specified by:
setDirectOwnSlotValues in interface Frame

setOwnSlotValues

public void setOwnSlotValues(Slot slot,
                             Collection values)
Description copied from interface: Frame
See Frame for a description of the value type. This method sets the value of an own slot at a frame to a collection of values. This method can be called for either cardinality-single slots or cardinality-multiple slots. For a cardinality single slot the collection passed in must have no more than one element.

Specified by:
setOwnSlotValues in interface Frame

setSystem

public void setSystem(boolean b)

setVisible

public void setVisible(boolean v)
Specified by:
setVisible in interface Frame

toString

public abstract String toString()

getIcon

public Icon getIcon()
Specified by:
getIcon in interface Frame

Protege 2.1

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2004 Stanford University.