|
Protege 3.4.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Frame
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)
|
void |
assertFrameName()
This call ensures that the name slot for the frame has the frame name as its value. |
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()
|
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<Slot> |
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<Reference> |
getReferences()
|
Collection |
getReferences(int maxReferences)
|
boolean |
hasOwnSlot(Slot slot)
|
boolean |
isBeingDeleted()
|
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 |
markDeleting()
|
void |
moveDirectOwnSlotValue(Slot slot,
int fromIndex,
int toIndex)
|
void |
removeFrameListener(FrameListener listener)
|
void |
removeOwnSlotValue(Slot slot,
Object value)
Remove _all_ occurrences of this value. |
Frame |
rename(String name)
This is as close as we come to renaming a frame. |
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 |
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 |
---|
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)
Frame shallowCopy(KnowledgeBase kb, Map valueMap)
Frame copy(KnowledgeBase kb, Map valueMap, boolean isDeep)
void delete()
String getBrowserText()
Icon getIcon()
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)
Frame
for a description of the return type
Collection getOwnFacetValues(Slot slot, Facet facet)
Frame
for a description of the return type
boolean getOwnSlotAllowsMultipleValues(Slot slot)
Collection getOwnSlotAndSubslotValues(Slot slot)
Frame
for a description of the
return type.
Collection getOwnSlotDefaultValues(Slot slot)
Frame
for a description of the return type
Collection getOwnSlotFacets(Slot slot)
Collection getOwnSlotFacetValues(Slot slot, Facet facet)
Collection<Slot> getOwnSlots()
Object getDirectOwnSlotValue(Slot slot)
Frame
for a description of the return type
Object getOwnSlotValue(Slot slot)
Frame
for a description of the return type
int getOwnSlotValueCount(Slot slot)
Collection getOwnSlotValues(Slot slot)
Frame
for a description of the return type
List getDirectOwnSlotValues(Slot slot)
Frame
for a description of the return type.
ValueType getOwnSlotValueType(Slot slot)
Project getProject()
Collection<Reference> getReferences()
Collection getReferences(int maxReferences)
boolean hasOwnSlot(Slot slot)
boolean isEditable()
boolean isIncluded()
boolean isSystem()
boolean isValid()
void markDeleting()
void markDeleted(boolean deleted)
boolean isDeleted()
boolean isBeingDeleted()
boolean isValidOwnSlotValue(Slot slot, Object item)
boolean isVisible()
void moveDirectOwnSlotValue(Slot slot, int fromIndex, int toIndex)
void removeFrameListener(FrameListener listener)
void removeOwnSlotValue(Slot slot, Object value)
void setDocumentation(String documentation)
void setDocumentation(Collection documentation)
void setEditable(boolean b)
void setIncluded(boolean b)
void setOwnFacetValue(Slot slot, Facet facet, Object value)
Frame
for a description of the value type.
void setOwnFacetValues(Slot slot, Facet facet, Collection values)
Frame
for a description of the value type.
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.
void setDirectOwnSlotValue(Slot slot, Object value)
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.
void setDirectOwnSlotValues(Slot slot, Collection values)
void setVisible(boolean b)
Frame rename(String name)
void assertFrameName()
|
Protege 3.4.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |