|
Protege 2.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 "template-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 attached 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. OKBC ascribes no meaning to template slots on non-classes. Own-slot values, even on a class, are not inherited to subclasses and do not occur on instances of the class. If a template slot has a value, this value is necessarily inherited to subclasses and appears 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 Java 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
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 |
copy(KnowledgeBase kb,
Map valueMap,
boolean isDeep)
|
Frame |
deepCopy(KnowledgeBase kb,
Map valueMap)
Create a "deep copy" of the frame. |
void |
delete()
|
String |
getBrowserText()
|
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 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()
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)
|
boolean |
hasOwnSlot(Slot slot)
|
boolean |
isDeleted()
|
boolean |
isEditable()
|
boolean |
isIncluded()
|
boolean |
isSystem()
|
boolean |
isValid()
Deprecated. Use #isDeleted() |
boolean |
isValidOwnSlotValue(Slot slot,
Object item)
|
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 |
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 |
setVisible(boolean b)
|
Frame |
shallowCopy(KnowledgeBase kb,
Map valueMap)
|
Methods inherited from interface java.lang.Comparable |
compareTo |
Method Detail |
public void addFrameListener(FrameListener listener)
public boolean addOwnFacetValue(Slot slot, Facet facet, Object value)
public void addOwnSlotValue(Slot slot, Object value)
public boolean areValidOwnSlotValues(Slot slot, Collection values)
public Frame deepCopy(KnowledgeBase kb, Map valueMap)
public Frame shallowCopy(KnowledgeBase kb, Map valueMap)
public Frame copy(KnowledgeBase kb, Map valueMap, boolean isDeep)
public void delete()
public String getBrowserText()
public Icon getIcon()
public Collection getDocumentation()
public FrameID getFrameID()
public String getInvalidOwnSlotValuesText(Slot slot, Collection values)
public String getInvalidOwnSlotValueText(Slot slot, Object value)
public KnowledgeBase getKnowledgeBase()
public String getName()
public Object getOwnFacetValue(Slot slot, Facet facet)
Frame
for a description of the return type
public Collection getOwnFacetValues(Slot slot, Facet facet)
Frame
for a description of the return type
public boolean getOwnSlotAllowsMultipleValues(Slot slot)
public Collection getOwnSlotAndSubslotValues(Slot slot)
Frame
for a description of the return type
public Collection getOwnSlotDefaultValues(Slot slot)
Frame
for a description of the return type
public Collection getOwnSlotFacets(Slot slot)
public Collection getOwnSlotFacetValues(Slot slot, Facet facet)
public Collection getOwnSlots()
public Object getDirectOwnSlotValue(Slot slot)
Frame
for a description of the return type
public Object getOwnSlotValue(Slot slot)
Frame
for a description of the return type
public int getOwnSlotValueCount(Slot slot)
public Collection getOwnSlotValues(Slot slot)
Frame
for a description of the return type
public List getDirectOwnSlotValues(Slot slot)
Frame
for a description of the return type.
public ValueType getOwnSlotValueType(Slot slot)
public Project getProject()
public Collection getReferences()
public Collection getReferences(int maxReferences)
public boolean hasOwnSlot(Slot slot)
public boolean isEditable()
public boolean isIncluded()
public URI getDefiningProjectURI()
public boolean isSystem()
public boolean isValid()
public void markDeleted(boolean deleted)
public boolean isDeleted()
public boolean isValidOwnSlotValue(Slot slot, Object item)
public boolean isVisible()
public void moveOwnSlotValue(Slot slot, int fromIndex, int toIndex)
public void removeFrameListener(FrameListener listener)
public void removeOwnSlotValue(Slot slot, Object value)
public void setDocumentation(String documentation)
public void setDocumentation(Collection documentation)
public void setEditable(boolean b)
public void setIncluded(boolean b)
public void setName(String newName)
public void setOwnFacetValue(Slot slot, Facet facet, Object value)
Frame
for a description of the value type.
public void setOwnFacetValues(Slot slot, Facet facet, Collection values)
Frame
for a description of the value type.
public void setOwnSlotValue(Slot slot, Object value)
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 setOwnSlotValues(Slot, Collection)
(note the final "s").
This method can be called for
either cardinality-single slots or cardinality-multiple slots.
public void setDirectOwnSlotValue(Slot slot, Object value)
public void setOwnSlotValues(Slot slot, Collection values)
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.
public void setDirectOwnSlotValues(Slot slot, Collection values)
public void setVisible(boolean b)
|
Protege 2.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |