Protege-2000 1.7

edu.stanford.smi.protege.model
Interface Frame

All Superinterfaces:
Comparable
All Known Subinterfaces:
Cls, Facet, Instance, SimpleInstance, Slot
All Known Implementing Classes:
DefaultFrame

public interface Frame
extends Comparable

A container for slot and facet values. This definition of a Frame is roughly consistent with the OKBC notion. OKBC introduces a notion of a slot being attached to a frame as either an "own-slot" or as a "template-slot". A "templates-slot" is a slot on a class which is automatically attached to subclasses and is automatically attached at all instances of the class. An "own-slot" is a slot on any frame (either a class or not) which is not automatically inherited to subclasses and is not automatically attached to instances of the frame. Note that the difference between these two things is only relavent for class frames and we only support template slots on class frames. Own-slot values, even on a class, are not inherited to subclasses and do not occur on instances of the class. Template-slot values are inherited to subclasses and appear on instances of the class. get/set slot and facet value methods return/take a collection of objects. The type of object returned or required depends on the value-type of the slot. The mapping between protege value-types and object type is given below:

 Boolean    --> java.lang.Boolean
 Class      --> edu.stanford.smi.protege.model.Cls
 Float      --> java.lang.Float
 Instance   --> edu.stanford.smi.protege.model.Instance
 Integer    --> java.lang.Integer
 Symbol     --> java.lang.String
 String     --> java.lang.String
 

Author:
Ray Fergerson

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 values)
           
 Frame deepCopy(KnowledgeBase kb, Map valueMap)
           
 void delete()
           
 String getBrowserText()
           
 Collection getDocumentation()
           
 FrameID getFrameID()
           
 String getInvalidOwnSlotValuesText(Slot slot, Collection values)
           
 String getInvalidOwnSlotValueText(Slot slot, Object value)
           
 KnowledgeBase getKnowledgeBase()
           
 String getName()
           
 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
 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()
           
 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)
           
 boolean hasOwnSlot(Slot slot)
           
 boolean isEditable()
           
 boolean isIncluded()
           
 boolean isSystem()
           
 boolean isValid()
           
 boolean isValidOwnSlotValue(Slot slot, Object item)
           
 boolean isVisible()
           
 void moveOwnSlotValue(Slot slot, int fromIndex, int toIndex)
           
 void removeFrameListener(FrameListener listener)
           
 void removeOwnSlotValue(Slot slot, Object value)
          remove _all_ occurrances of this value
 void setDocumentation(Collection documentation)
           
 void setDocumentation(String documentation)
           
 void setEditable(boolean b)
           
 void setIncluded(boolean b)
           
 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 This method set the value of an own slot at a frame to a single value.
 void setOwnSlotValues(Slot slot, Collection values)
          see Frame for a description of the value type This method set the value of an own slot at a frame to a collection of values.
 void setVisible(boolean b)
           
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

addFrameListener

public void addFrameListener(FrameListener listener)

addOwnFacetValue

public boolean addOwnFacetValue(Slot slot,
                                Facet facet,
                                Object value)

addOwnSlotValue

public void addOwnSlotValue(Slot slot,
                            Object value)

areValidOwnSlotValues

public boolean areValidOwnSlotValues(Slot slot,
                                     Collection values)

deepCopy

public Frame deepCopy(KnowledgeBase kb,
                      Map valueMap)

delete

public void delete()

getBrowserText

public String getBrowserText()

getDocumentation

public Collection getDocumentation()

getFrameID

public FrameID getFrameID()

getInvalidOwnSlotValuesText

public String getInvalidOwnSlotValuesText(Slot slot,
                                          Collection values)

getInvalidOwnSlotValueText

public String getInvalidOwnSlotValueText(Slot slot,
                                         Object value)

getKnowledgeBase

public KnowledgeBase getKnowledgeBase()

getName

public String getName()

getOwnFacetValue

public Object getOwnFacetValue(Slot slot,
                               Facet facet)
see Frame for a description of the return type

getOwnFacetValues

public Collection getOwnFacetValues(Slot slot,
                                    Facet facet)
see Frame for a description of the return type

getOwnSlotAllowsMultipleValues

public boolean getOwnSlotAllowsMultipleValues(Slot slot)

getOwnSlotAndSubslotValues

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

getOwnSlotDefaultValues

public Collection getOwnSlotDefaultValues(Slot slot)
see Frame for a description of the return type

getOwnSlotFacets

public Collection getOwnSlotFacets(Slot slot)

getOwnSlotFacetValues

public Collection getOwnSlotFacetValues(Slot slot,
                                        Facet facet)

getOwnSlots

public Collection getOwnSlots()

getOwnSlotValue

public Object getOwnSlotValue(Slot slot)
see Frame for a description of the return type

getOwnSlotValueCount

public int getOwnSlotValueCount(Slot slot)

getOwnSlotValues

public Collection getOwnSlotValues(Slot slot)
see Frame for a description of the return type

getOwnSlotValueType

public ValueType getOwnSlotValueType(Slot slot)

getProject

public Project getProject()

getReferences

public Collection getReferences()

getReferences

public Collection getReferences(int maxReferences)

hasOwnSlot

public boolean hasOwnSlot(Slot slot)

isEditable

public boolean isEditable()

isIncluded

public boolean isIncluded()

isSystem

public boolean isSystem()

isValid

public boolean isValid()

isValidOwnSlotValue

public boolean isValidOwnSlotValue(Slot slot,
                                   Object item)

isVisible

public boolean isVisible()

moveOwnSlotValue

public void moveOwnSlotValue(Slot slot,
                             int fromIndex,
                             int toIndex)

removeFrameListener

public void removeFrameListener(FrameListener listener)

removeOwnSlotValue

public void removeOwnSlotValue(Slot slot,
                               Object value)
remove _all_ occurrances of this value

setDocumentation

public void setDocumentation(String documentation)

setDocumentation

public void setDocumentation(Collection documentation)

setEditable

public void setEditable(boolean b)

setIncluded

public void setIncluded(boolean b)

setName

public void setName(String newName)

setOwnFacetValue

public void setOwnFacetValue(Slot slot,
                             Facet facet,
                             Object value)
see Frame for a description of the value type

setOwnFacetValues

public void setOwnFacetValues(Slot slot,
                              Facet facet,
                              Collection values)
see Frame for a description of the value type

setOwnSlotValue

public void setOwnSlotValue(Slot slot,
                            Object value)
see Frame for a description of the value type This method set 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 #setOwnSlotValues (note the final "s"). This method can be called for either cardinality-single slots or cardinality-multiple slots. For a cardinality multiple slot the result is a collection with a single element.

setOwnSlotValues

public void setOwnSlotValues(Slot slot,
                             Collection values)
see Frame for a description of the value type This method set 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 be have no more than one element.

setVisible

public void setVisible(boolean b)

Protege-2000 1.7

Submit a bug report or feature request
Protege-2000 is a trademark of Stanford University.
Copyright (c) 1998-2002 Stanford University.