|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstory.dbcore.links.LinkLabel
public class LinkLabel
An object that represents a collection of all the attributes
attached to a certain link, serving as the link label.
It is primarily driven by AttributeSet, as the attributes with
which we annotate nodes are similar to those with which we annotate
links.
A LinkLabel is meant to be passed around only within db-core, and
never revealed to calling applications or users. This is because
they support write operations. Users who want to read or alter
LinkLabels should go through the proper DBCoreInterface channel.
However, calling applications are allowed to create new
LinkLabels and pass them to the db-core. They just will never see
the label again and any changes they make to the label object will
be ignored. The label is cloned when it is brought into the
db-core.
Field Summary | |
---|---|
static LinkLabel |
EMPTY_LABEL
|
Constructor Summary | |
---|---|
LinkLabel()
Constructor |
|
LinkLabel(AttributeID ID,
Attribute attribute)
Constructor with first attribute to initiate. |
|
LinkLabel(boolean overrider)
Private constructor for a strictly empty label. |
|
LinkLabel(NodeAddress concreteAddress,
NodeInstancing instancing,
LinkDirection instancing_direction)
Constructor that you must use iff this is a LinkLabel for a linkInstancing (e.g., [ex1] = exampleOf(provision(health))). |
|
LinkLabel(java.lang.String comment)
Super-duper-easy constructor that takes a string, assumes it is a free-text comment, and sets up a single "comment" attribute for the label with the parameter |
Method Summary | |
---|---|
boolean |
containsAttribute(AttributeID ID)
Determines whether the label has an attribute of a certain name. |
boolean |
equivalent(LinkLabel other)
Determines whether two LinkLables are equivalent. |
void |
finalize()
Finalize this LinkLabel. |
LinkLabelAddress |
getAddress()
Get the address of this LinkLabel. |
java.lang.Class |
getAttributeClass(AttributeID ID)
Get an existing attribute's class. |
java.util.Iterator |
getAttributeIDs()
Get an Iterator over all the AttributeIDs in the LinkLabel. |
AttributeValue |
getAttributeValue(AttributeID ID)
|
NodeInstancing |
getInstancing()
Return the NodeInstancing of the instancing of the link for which this is a label, or null if this is not such a label. |
NodeAddress |
getInstancingAddress()
Return the NodeAddress of the concrete node for the linkInstancing for which this is a label, or null if this is not such a label. |
LinkDirection |
getInstancingDirection()
Return the LinkDirection of the instancing of the link for which this is a label, or null if this is not such a label. |
void |
initAttribute(AttributeID ID,
Attribute attribute)
Initializes an attribute in the LinkLabel. |
boolean |
isFinalized()
Determine whether this LinkLabel is finalized. |
java.lang.StringBuffer |
render()
Renders the entire link label (all attributes) as a single string, in the syntax the command interpreter can understand. |
java.lang.StringBuffer |
renderForHumans()
Renders the entire link label (all attributes) as a single string, in a way that is NOT interpretable by the command interpreter, but is nicer for humans to read. |
java.lang.StringBuffer |
renderInstancing(LinkType linkType)
Renders the linkInstancing of the label, if any. |
AttributeValue |
setAttribute(AttributeID ID,
AttributeValue value)
Sets an attribute in the LinkLabel. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final LinkLabel EMPTY_LABEL
Constructor Detail |
---|
public LinkLabel(NodeAddress concreteAddress, NodeInstancing instancing, LinkDirection instancing_direction)
public LinkLabel()
public LinkLabel(boolean overrider)
public LinkLabel(AttributeID ID, Attribute attribute) throws Scheherexception
Scheherexception
public LinkLabel(java.lang.String comment) throws Scheherexception
Scheherexception
Method Detail |
---|
public boolean isFinalized()
public void finalize()
finalize
in class java.lang.Object
public void initAttribute(AttributeID ID, Attribute attribute) throws Scheherexception
Scheherexception
public AttributeValue setAttribute(AttributeID ID, AttributeValue value) throws Scheherexception
Scheherexception
public boolean equivalent(LinkLabel other) throws Scheherexception
Scheherexception
public java.lang.StringBuffer renderInstancing(LinkType linkType) throws Scheherexception
Scheherexception
public java.lang.StringBuffer renderForHumans() throws Scheherexception
Scheherexception
public java.lang.StringBuffer render() throws Scheherexception
Scheherexception
public java.util.Iterator getAttributeIDs() throws Scheherexception
Scheherexception
public AttributeValue getAttributeValue(AttributeID ID) throws Scheherexception
Scheherexception
public java.lang.Class getAttributeClass(AttributeID ID) throws Scheherexception
ID
- The AttributeID for the attribute.
Scheherexception
public boolean containsAttribute(AttributeID ID) throws Scheherexception
Scheherexception
public LinkLabelAddress getAddress() throws Scheherexception
Scheherexception
public NodeAddress getInstancingAddress()
public NodeInstancing getInstancing()
public LinkDirection getInstancingDirection()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |