|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstory.dbcore.nodes.GenericNode
public class GenericNode
GenericNode is an abstract class that provides common functionality for all types of Nodes. No actual types of Nodes are a part of the db-core. The applications on top (flashback, scheherazade, etc) have classes that extend GenericNode.
Field Summary | |
---|---|
static AttributeID |
ATT_EXPANSION
|
static AttributeID |
ATT_SUBNODETYPE_ID
|
Constructor Summary | |
---|---|
GenericNode(Document doc,
NodeRepository parentRepository,
NodeConfig config,
LinkRepository linkRepository)
|
Method Summary | |
---|---|
NodeAddress |
address()
Make a new NodeAddress with the node |
boolean |
attributeEquals(AttributeID attribute,
AttributeValue other,
boolean overrideInheritance)
Determine whether an attribute is equal to some constant value. |
boolean |
attributeGreaterThan(AttributeID attribute,
AttributeValue other,
boolean overrideInheritance)
Determine whether an attribute is greater than to some constant value. |
boolean |
attributeModified(AttributeID attribute)
Determine whether an attribute has been modified from its default value. |
boolean |
directlyLinkedFrom(GenericNode from,
LinkType linkType)
Get the number of nodes this one is linked from. |
boolean |
directlyLinkedFrom(GenericNode from,
LinkType linkType,
LinkLabelAddress label)
Get the number of nodes this one is linked from. |
boolean |
directlyLinksTo(GenericNode to,
LinkType linkType)
Test whether this node directly links to another node by a certain link type by any label. |
boolean |
directlyLinksTo(GenericNode to,
LinkType linkType,
LinkLabelAddress label)
Test whether this node directly links to another node by a certain link type and a certain label. |
void |
enableAttributeInheritance(Document doc,
LinkProperties linkProperties)
Set pointers to the Document and the LinkProperties objects in the AttributeSet so it can implement attribute inheritance. |
java.util.Iterator |
getAttributeIDs()
Return an iterator over all the AttributeIDs of the node's attributes. |
AttributeValue |
getAttributeValue(AttributeID attribute,
boolean overrideInheritance)
Retrieve the value of a particular attribute of the node. |
DocumentID |
getDocument()
Retrieve the ID of this node's Document. |
NodeID |
getID()
Return the node's identifier. |
int |
getMaxAttributeLength(AttributeID attribute)
Returns the "maximum" length of the acceptable value for an attribute. |
NodeProxy |
getProxy()
|
WritableRelatedNodes |
getRelatedNodes(LinkType linkType,
LinkDirection linkDirection)
Get the WritableRelatedNodes for this node's outward links to all other nodes. |
NodeRepositoryID |
getRepository()
Retrieve the ID of this node's repository. |
NodeType |
getType()
Return the node's type. |
boolean |
isRelatedTo(GenericNode to,
LinkType linkType)
Tests for inferred relatedness -- this is very slow compared to directlyLinkedTo and directlyLinkedFrom. |
int |
numNodesLinkedFrom(LinkType linkType)
Test whether this node is directly linked to by another node by a certain link type by any label. |
int |
numNodesLinksTo(LinkType linkType)
Get the number of nodes this one links to. |
java.lang.StringBuffer |
render()
|
java.lang.StringBuffer |
renderAllInformation()
Render all the information about this node. |
java.lang.StringBuffer |
renderAttributes()
Render as a table all the attributes of the node. |
AttributeValue |
setAttribute(AttributeID ID,
AttributeValue value)
Set an attribute of the node |
void |
setRepository(NodeRepository parentRepository)
Set the repository in which this node now resides |
void |
unlinkLinkFrom(GenericNode from,
LinkType linkType,
LinkLabelAddress label)
Unlink a particular incoming link from another node to this one. |
void |
unlinkLinksFrom(GenericNode from,
LinkType linkType)
Unlink all incoming links from another node to this one. |
void |
unlinkLinksTo(GenericNode to,
LinkType linkType)
Unlink all outgoing links from this node to another. |
void |
unlinkLinkTo(GenericNode to,
LinkType linkType,
LinkLabelAddress label)
Unlink a particular outgoing link from this node to another. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final AttributeID ATT_EXPANSION
public static final AttributeID ATT_SUBNODETYPE_ID
Constructor Detail |
---|
public GenericNode(Document doc, NodeRepository parentRepository, NodeConfig config, LinkRepository linkRepository) throws Scheherexception
Scheherexception
Method Detail |
---|
public WritableRelatedNodes getRelatedNodes(LinkType linkType, LinkDirection linkDirection) throws Scheherexception
Scheherexception
public NodeProxy getProxy() throws Scheherexception
Scheherexception
public boolean directlyLinksTo(GenericNode to, LinkType linkType) throws Scheherexception
Scheherexception
public boolean directlyLinksTo(GenericNode to, LinkType linkType, LinkLabelAddress label) throws Scheherexception
Scheherexception
public boolean isRelatedTo(GenericNode to, LinkType linkType) throws Scheherexception
Scheherexception
public int numNodesLinksTo(LinkType linkType) throws Scheherexception
Scheherexception
public boolean directlyLinkedFrom(GenericNode from, LinkType linkType) throws Scheherexception
Scheherexception
public boolean directlyLinkedFrom(GenericNode from, LinkType linkType, LinkLabelAddress label) throws Scheherexception
Scheherexception
public int numNodesLinkedFrom(LinkType linkType) throws Scheherexception
Scheherexception
public void unlinkLinkTo(GenericNode to, LinkType linkType, LinkLabelAddress label) throws Scheherexception
Scheherexception
public void unlinkLinkFrom(GenericNode from, LinkType linkType, LinkLabelAddress label) throws Scheherexception
Scheherexception
public void unlinkLinksTo(GenericNode to, LinkType linkType) throws Scheherexception
Scheherexception
public void unlinkLinksFrom(GenericNode from, LinkType linkType) throws Scheherexception
Scheherexception
public void setRepository(NodeRepository parentRepository) throws Scheherexception
Scheherexception
public void enableAttributeInheritance(Document doc, LinkProperties linkProperties)
public NodeType getType()
public NodeID getID() throws Scheherexception
Scheherexception
public NodeRepositoryID getRepository() throws Scheherexception
Scheherexception
public NodeAddress address() throws Scheherexception
Scheherexception
public DocumentID getDocument()
public AttributeValue setAttribute(AttributeID ID, AttributeValue value) throws Scheherexception
Scheherexception
public AttributeValue getAttributeValue(AttributeID attribute, boolean overrideInheritance) throws Scheherexception
Scheherexception
public java.util.Iterator getAttributeIDs() throws Scheherexception
Scheherexception
public boolean attributeEquals(AttributeID attribute, AttributeValue other, boolean overrideInheritance) throws Scheherexception
Scheherexception
public boolean attributeModified(AttributeID attribute) throws Scheherexception
Scheherexception
public int getMaxAttributeLength(AttributeID attribute) throws Scheherexception
Scheherexception
public boolean attributeGreaterThan(AttributeID attribute, AttributeValue other, boolean overrideInheritance) throws Scheherexception
Scheherexception
public java.lang.StringBuffer render() throws Scheherexception
render
in interface RenderableObject
Scheherexception
public java.lang.StringBuffer renderAllInformation() throws Scheherexception
Scheherexception
public java.lang.StringBuffer renderAttributes() throws Scheherexception
Scheherexception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |