|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstory.dbcore.admin.DBCAccessor
public class DBCAccessor
Accessor functions for a DBCoreInterface. Provides syntactic sugar for calling applications to use to avoid run-time class cast exceptions and other inconveniences of the manual creation of Command objects required by DBCoreInterface.
Constructor Summary | |
---|---|
DBCAccessor(DBCoreInterface dbci)
|
Method Summary | |
---|---|
boolean |
areRelatedDirectly(java.lang.Object node1,
java.lang.Object linkType,
java.lang.Object node2)
Test whether two nodes are related directly. |
boolean |
areRelatedIndirectly(java.lang.Object node1,
java.lang.Object linkType,
java.lang.Object node2)
Test whether two nodes are related indirectly. |
void |
closeDocument()
Returns nothing |
HistoryFrameID |
currentStateID()
Return the current state of the db-core. |
java.lang.Object |
execute(Command command)
Interpret and execute a command. |
void |
execute(CommandSequence sequence)
Execute all the commands in a CommandSequence. |
NodeAddress |
findNode(NodeID nodeID)
Find the full address of a node by its ID. |
CommandSequence |
getCommandHistory()
Gets the command history at the moment |
HistoryFrameID |
getCurrentStateID()
GetCurrentStateID. |
DBCoreInterface |
getDBCoreInterface()
|
NodeAddress |
getFirstNodeLinkedFromNode(NodeAddress node,
LinkType linkType)
Syntactic sugar for getting the first directly linked node from a node. |
NodeAddress |
getFirstNodeLinkedToNode(LinkType linkType,
NodeAddress node)
Syntactic sugar for getting the first directly linked node to a node. |
int |
getHistoryFrameRelationship(HistoryFrameID historyFrame)
GetHistoryFrameRelationship. |
Command |
getLastCommand()
Returns the last successfully-executed command issued to the DBCore, or throws an exception if this is the first command |
LinkSet |
getLinksFromNode(NodeAddress node,
LinkType linkType,
boolean directOnly)
Compile a set of nodes that are linked from a particular node by a particular type of link. |
LinkSet |
getLinksOfNode(LinkType linkType,
LinkDirection linkDirection,
NodeAddress node,
boolean directOnly)
Compile a set of nodes that are linked to or from a particular node by a particular type of link. |
LinkSet |
getLinksToNode(LinkType linkType,
NodeAddress node,
boolean directOnly)
Compile a set of nodes that are linked to a particular node by a particular type of link. |
ViaSet |
getLinkVias(NodeAddress fromNode,
LinkType linkType,
NodeAddress toNode)
Get the Via(s) of a link between two nodes. |
int |
getMaxAttributeLength(java.lang.Object nodeAddress,
java.lang.Object attributeID)
Returns the maximum allowable length of an attribute. |
AttributeValue |
getNodeAttribute(java.lang.Object node,
java.lang.Object attribute)
Get a node attribute's value with no inheritance. |
AttributeValue |
getNodeAttribute(java.lang.Object node,
java.lang.Object attribute,
boolean overrideInheritance)
Get a node attribute's value. |
java.util.Iterator |
getNodeAttributeIDs(java.lang.Object node)
Return an iterator over all the AttributeIDs of a node's attributes. |
NodeInstancing |
getNodeDefinition(NodeAddress node)
Get the definition of an instance node. |
NodeInstancing |
getNodeDefinition(java.lang.Object node)
Get an instance node's definition (NodeInstancing). |
NodeProxy |
getNodeProxy(NodeAddress node)
Get a node's proxy. |
NodeType |
getNodeType(java.lang.Object node)
Get a node's type. |
DocumentID |
getOpenDocument()
Returns the DocumentID of the currently open document, or null if no document is currently open. |
SymbolTable |
getSymbolTable()
Retrieve the symbol table. |
void |
launchCoreBrowser()
Launch a CoreBrowser |
void |
link(java.lang.Object node1,
java.lang.Object linkType,
java.lang.Object node2)
Link two nodes with no label. |
void |
link(java.lang.Object node1,
java.lang.Object linkType,
java.lang.Object node2,
java.lang.Object label)
Link two nodes with a label. |
LinkLabel |
linkInstancing(java.lang.Object node1,
NodeInstancing instancing,
java.lang.Object linkType,
java.lang.Object linkDirection)
Link a node to an instancing with no label (packaged input) |
LinkLabel |
linkInstancing(java.lang.Object node1,
NodeInstancing instancing,
java.lang.Object linkType,
java.lang.Object linkDirection,
java.lang.Object linkLabel)
Link a node to an instancing with a label (packaged input) |
LinkLabel |
linkInstancing(java.lang.Object node1,
java.lang.Object prototypeNode,
java.lang.Object arguments,
java.lang.Object linkType,
java.lang.Object linkDirection)
Link a node to an instancing with no label (unpackaged input) |
LinkLabel |
linkInstancing(java.lang.Object node1,
java.lang.Object prototypeNode,
java.lang.Object arguments,
java.lang.Object linkType,
java.lang.Object linkDirection,
java.lang.Object linkLabel)
Link a node to an instancing with a label (unpackaged input) |
java.util.HashSet |
listRepositories()
Returns a list of repositories |
NodeAddress |
moveNode(NodeAddress node,
NodeRepositoryID newRepository)
Move a node to a differenct repository. |
DocumentID |
newDocument(java.lang.Object documentID)
Returns DocumentID on success |
NodeInstancing |
newExpansion(java.lang.Object node,
java.lang.Object args)
Create a new NodeInstancing on a node's "expansion" parameter |
NodeAddress |
newInstanceNode(java.lang.Object repository,
java.lang.Object nodeID,
NodeInstancing instancing)
Alternate way to add an instance node that takes a NodeInstancing (from newExpansion()). |
NodeAddress |
newInstanceNode(java.lang.Object repository,
java.lang.Object nodeID,
java.lang.Object prototypeNode)
Easy way to add a new instance node with no arguments. |
NodeAddress |
newInstanceNode(java.lang.Object repository,
java.lang.Object nodeID,
java.lang.Object prototypeNode,
java.lang.Object arguments)
Add a new instance node. |
NodeAddress |
newNode(java.lang.Object repository,
NodeType type,
java.lang.Object nodeID)
Add a new node. |
NodeRepositoryID |
newRepository(RepositoryType type,
java.lang.Object repositoryID)
Add a new repository. |
NodeAddress |
newSubtypeNode(NodeAddress newNode,
java.lang.Object prototypeNode)
Easy way to add a node that is a subtype of another node. |
NodeAddress |
newSubtypeNode(NodeRepositoryID repository,
NodeID nodeID,
java.lang.Object prototypeNode)
Easy way to add a node that is a subtype of another node. |
NodeAddress |
newSubtypeNode(java.lang.Object repository,
NodeType type,
java.lang.Object nodeID,
java.lang.Object parent,
java.lang.Object linkLabel)
Add a node that is a subtype of another node. |
boolean |
nodeExists(NodeAddress node)
Check whether a node exists. |
boolean |
nodeRepositoryExists(NodeRepositoryID repositoryID)
Check whether a node repository exists. |
java.lang.StringBuffer |
printState()
Render the current state of the db-core. |
QueryResultSet |
query(ParameterSet params)
Execute a query over the open Document. |
HistoryFrameID |
reconstruct(HistoryFrameID targetFrame)
Reconstruct a prior state of the db-core from the command history. |
void |
redefineNode(java.lang.Object nodeAddress,
NodeInstancing newDefinition)
Redefine an instance node. |
void |
redo()
Redo. |
void |
redoTo(java.lang.Object historyFrameID)
RedoTo. |
boolean |
removeNode(java.lang.Object nodeAddress)
Remove a node. |
boolean |
removeRepository(java.lang.Object nodeRepository)
Remove a repository. |
NodeID |
renameNode(NodeAddress node,
NodeID newNodeID)
Rename a node. |
NodeRepositoryID |
renameRepository(NodeRepositoryID currentName,
NodeRepositoryID newName)
Rename a repository. |
java.lang.StringBuffer |
renderNode(java.lang.Object node)
Render node |
void |
reset()
Returns nothing |
AttributeValue |
setNodeAttribute(java.lang.Object nodeAddress,
java.lang.Object attributeID,
java.lang.Object attributeValue)
Set a node attribute |
void |
setSymbolTable(SymbolTable st)
Set the symbol table. |
void |
undo()
Undo. |
void |
undoTo(java.lang.Object historyFrameID)
UndoTo. |
void |
unlink(java.lang.Object from,
java.lang.Object linkType,
java.lang.Object to)
Unlink all links of a certain type between two nodes. |
void |
unlink(java.lang.Object from,
java.lang.Object linkType,
java.lang.Object to,
java.lang.Object label)
Unlink a particular link between two nodes. |
SatisfactionResult |
validateNodeInstancing(NodeInstancing instancing)
Validates a NodeInstancing. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBCAccessor(DBCoreInterface dbci) throws Scheherexception
Scheherexception
Method Detail |
---|
public DBCoreInterface getDBCoreInterface()
public NodeAddress findNode(NodeID nodeID) throws Scheherexception
Scheherexception
public LinkSet getLinksOfNode(LinkType linkType, LinkDirection linkDirection, NodeAddress node, boolean directOnly) throws Scheherexception
linkType
- The type of link.linkDirection
- The direction of the link.node
- The address node.directOnly
- Set true to include nodes that are
linked directly to the parameterized node. Set false
to employ inference and find nodes that are indirectly
linked.
Scheherexception
public ViaSet getLinkVias(NodeAddress fromNode, LinkType linkType, NodeAddress toNode) throws Scheherexception
fromNode
- The node on the "from" end of the link.linkType
- Type type of link.toNode
- The node on the "to" end of the link.
Scheherexception
- Throws exception if there is no such link between the two nodes.public LinkSet getLinksFromNode(NodeAddress node, LinkType linkType, boolean directOnly) throws Scheherexception
linkType
- The type of link.linkDirection
- The direction of the link.node
- The address node.directOnly
- Set true to include nodes that are
linked directly to the parameterized node. Set false
to employ inference and find nodes that are indirectly
linked.
Scheherexception
public LinkSet getLinksToNode(LinkType linkType, NodeAddress node, boolean directOnly) throws Scheherexception
linkType
- The type of link.linkDirection
- The direction of the link.node
- The address node.directOnly
- Set true to include nodes that are
linked directly to the parameterized node. Set false
to employ inference and find nodes that are indirectly
linked.
Scheherexception
public AttributeValue getNodeAttribute(java.lang.Object node, java.lang.Object attribute, boolean overrideInheritance) throws Scheherexception
Scheherexception
public NodeInstancing getNodeDefinition(java.lang.Object node) throws Scheherexception
Scheherexception
public AttributeValue getNodeAttribute(java.lang.Object node, java.lang.Object attribute) throws Scheherexception
Scheherexception
public NodeType getNodeType(java.lang.Object node) throws Scheherexception
Scheherexception
public NodeProxy getNodeProxy(NodeAddress node) throws Scheherexception
Scheherexception
public NodeInstancing getNodeDefinition(NodeAddress node) throws Scheherexception
Scheherexception
public QueryResultSet query(ParameterSet params) throws Scheherexception
Scheherexception
public SymbolTable getSymbolTable()
public void setSymbolTable(SymbolTable st)
public void execute(CommandSequence sequence) throws Scheherexception
Scheherexception
public java.lang.Object execute(Command command) throws Scheherexception
Scheherexception
public NodeInstancing newExpansion(java.lang.Object node, java.lang.Object args) throws Scheherexception
Scheherexception
public java.lang.StringBuffer printState() throws Scheherexception
Scheherexception
public HistoryFrameID currentStateID() throws Scheherexception
Scheherexception
public HistoryFrameID reconstruct(HistoryFrameID targetFrame) throws Scheherexception
Scheherexception
public NodeAddress moveNode(NodeAddress node, NodeRepositoryID newRepository) throws Scheherexception
Scheherexception
public NodeAddress newNode(java.lang.Object repository, NodeType type, java.lang.Object nodeID) throws Scheherexception
Scheherexception
public NodeAddress newSubtypeNode(NodeAddress newNode, java.lang.Object prototypeNode) throws Scheherexception
Scheherexception
public NodeAddress newSubtypeNode(NodeRepositoryID repository, NodeID nodeID, java.lang.Object prototypeNode) throws Scheherexception
Scheherexception
public NodeAddress newSubtypeNode(java.lang.Object repository, NodeType type, java.lang.Object nodeID, java.lang.Object parent, java.lang.Object linkLabel) throws Scheherexception
Scheherexception
public NodeRepositoryID newRepository(RepositoryType type, java.lang.Object repositoryID) throws Scheherexception
Scheherexception
public AttributeValue setNodeAttribute(java.lang.Object nodeAddress, java.lang.Object attributeID, java.lang.Object attributeValue) throws Scheherexception
Scheherexception
public NodeAddress newInstanceNode(java.lang.Object repository, java.lang.Object nodeID, java.lang.Object prototypeNode, java.lang.Object arguments) throws Scheherexception
Scheherexception
public NodeAddress newInstanceNode(java.lang.Object repository, java.lang.Object nodeID, NodeInstancing instancing) throws Scheherexception
Scheherexception
public NodeAddress newInstanceNode(java.lang.Object repository, java.lang.Object nodeID, java.lang.Object prototypeNode) throws Scheherexception
Scheherexception
public void redefineNode(java.lang.Object nodeAddress, NodeInstancing newDefinition) throws Scheherexception
Scheherexception
public void link(java.lang.Object node1, java.lang.Object linkType, java.lang.Object node2) throws Scheherexception
Scheherexception
public void link(java.lang.Object node1, java.lang.Object linkType, java.lang.Object node2, java.lang.Object label) throws Scheherexception
Scheherexception
public void unlink(java.lang.Object from, java.lang.Object linkType, java.lang.Object to) throws Scheherexception
Scheherexception
public void unlink(java.lang.Object from, java.lang.Object linkType, java.lang.Object to, java.lang.Object label) throws Scheherexception
Scheherexception
public LinkLabel linkInstancing(java.lang.Object node1, java.lang.Object prototypeNode, java.lang.Object arguments, java.lang.Object linkType, java.lang.Object linkDirection, java.lang.Object linkLabel) throws Scheherexception
Scheherexception
public LinkLabel linkInstancing(java.lang.Object node1, java.lang.Object prototypeNode, java.lang.Object arguments, java.lang.Object linkType, java.lang.Object linkDirection) throws Scheherexception
Scheherexception
public LinkLabel linkInstancing(java.lang.Object node1, NodeInstancing instancing, java.lang.Object linkType, java.lang.Object linkDirection, java.lang.Object linkLabel) throws Scheherexception
Scheherexception
public LinkLabel linkInstancing(java.lang.Object node1, NodeInstancing instancing, java.lang.Object linkType, java.lang.Object linkDirection) throws Scheherexception
Scheherexception
public boolean areRelatedDirectly(java.lang.Object node1, java.lang.Object linkType, java.lang.Object node2) throws Scheherexception
Scheherexception
public boolean areRelatedIndirectly(java.lang.Object node1, java.lang.Object linkType, java.lang.Object node2) throws Scheherexception
Scheherexception
public void undo() throws Scheherexception
Scheherexception
public void undoTo(java.lang.Object historyFrameID) throws Scheherexception
Scheherexception
public void redo() throws Scheherexception
Scheherexception
public void redoTo(java.lang.Object historyFrameID) throws Scheherexception
Scheherexception
public java.lang.StringBuffer renderNode(java.lang.Object node) throws Scheherexception
Scheherexception
public boolean nodeExists(NodeAddress node) throws Scheherexception
Scheherexception
public boolean nodeRepositoryExists(NodeRepositoryID repositoryID) throws Scheherexception
Scheherexception
public NodeAddress getFirstNodeLinkedFromNode(NodeAddress node, LinkType linkType) throws Scheherexception
NoLinkedNode
Scheherexception
public NodeAddress getFirstNodeLinkedToNode(LinkType linkType, NodeAddress node) throws Scheherexception
NoLinkedNode
Scheherexception
public SatisfactionResult validateNodeInstancing(NodeInstancing instancing) throws Scheherexception
Scheherexception
public void launchCoreBrowser() throws Scheherexception
Scheherexception
public java.util.Iterator getNodeAttributeIDs(java.lang.Object node) throws Scheherexception
Scheherexception
public DocumentID getOpenDocument()
public DocumentID newDocument(java.lang.Object documentID) throws Scheherexception
Scheherexception
public void closeDocument() throws Scheherexception
Scheherexception
public void reset() throws Scheherexception
Scheherexception
public CommandSequence getCommandHistory() throws Scheherexception
Scheherexception
public Command getLastCommand() throws Scheherexception
Scheherexception
public int getMaxAttributeLength(java.lang.Object nodeAddress, java.lang.Object attributeID) throws Scheherexception
Scheherexception
public java.util.HashSet listRepositories() throws Scheherexception
Scheherexception
public boolean removeNode(java.lang.Object nodeAddress) throws Scheherexception
Scheherexception
public boolean removeRepository(java.lang.Object nodeRepository) throws Scheherexception
Scheherexception
public HistoryFrameID getCurrentStateID() throws Scheherexception
Scheherexception
public int getHistoryFrameRelationship(HistoryFrameID historyFrame) throws Scheherexception
Scheherexception
public NodeRepositoryID renameRepository(NodeRepositoryID currentName, NodeRepositoryID newName) throws Scheherexception
Scheherexception
public NodeID renameNode(NodeAddress node, NodeID newNodeID) throws Scheherexception
Scheherexception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |