|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nodal.util.NodeFilter
storage.memory.BareContent.Editor
Nested Class Summary |
Nested classes inherited from class org.nodal.model.NodeContent |
NodeContent.Editor |
Field Summary | |
protected BareContent |
content
|
protected storage.memory.NodeManager |
nodeMgr
|
Fields inherited from class org.nodal.util.NodeFilter |
node |
Constructor Summary | |
protected |
BareContent.Editor(BareContent content)
|
Method Summary | |
void |
addTxnHandler(TxnHandler handler)
Add a TxnHandler to be invoked when this object changes. |
NodeContent.Editor |
apply(Operator op)
Apply an Operator to modify this Node, or create a new Node. |
MapNode |
asMapNode()
The Node's contents expressed as a Map. |
RecordNode |
asRecordNode()
The Node's contents expressed as a Record. |
SequenceNode |
asSequenceNode()
The Node's contents expressed as a Sequence. |
NodeContent.Editor |
cloneNode(Node node)
Create a clone of an existing Node using this factory as context. |
NodeContent.Editor |
cloneNode(Node node,
Node context)
Create a clone of an existing Node. |
boolean |
commit()
Commit the current transaction to permanent storage. |
NodeContent |
content()
The Node's contents. |
NodeContent.Editor |
createNode(NodeType type)
Create a new Node of the given type using this factory as context. |
NodeContent.Editor |
createNode(NodeType type,
Node context)
Create a new Node of the given type. |
NodeContent.Editor |
edit()
An Editor for changing the Content of this Node. |
MapNode.Editor |
editMap()
This NodeEditor as a MapEditor. |
RecordNode.Editor |
editRecord()
This NodeEditor as a RecordEditor. |
SequenceNode.Editor |
editSequence()
This NodeEditor as a SequenceEditor. |
java.lang.Object |
getValue(java.lang.Object obj)
Access the property value, given a property. |
Operator |
invert(Operator op)
Produce an Operator that would undo the application of op
on this Content. |
boolean |
isValidProperty(java.lang.Object property)
Check for the validity of a given property value. |
void |
modify(Operator op)
Apply an Operator to modify this Content object. |
java.util.Iterator |
properties()
A sequence of all of the properties currently indexing the contents if this Content. |
void |
removeTxnHandler(TxnHandler handler)
Remove a previously added TxnHandler. |
abstract Setter |
setValue(java.lang.Object key)
Return a Setter that will change the value of the specified property. |
int |
size()
The number of properties contained in this Content object. |
abstract java.lang.String |
toString()
|
Txn |
txn()
Return the current Txn being managed by this Editor. |
NodeType |
type()
The data Type of the Node's contents. |
Getter |
value(java.lang.Object obj)
A generic Getter for property values, given a property. |
Methods inherited from class org.nodal.util.NodeFilter |
asAnchor, bareNode, capability, history, id, path, repository |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.nodal.model.Node |
asAnchor, bareNode, capability, history, id, path, repository |
Field Detail |
protected final BareContent content
protected final storage.memory.NodeManager nodeMgr
Constructor Detail |
protected BareContent.Editor(BareContent content)
Method Detail |
public NodeContent content()
Node
If the Capability does not provide read access, then this will return null.
content
in interface Node
content
in class NodeFilter
public final NodeType type()
Node
type
in interface Node
type
in class NodeFilter
public final int size()
Content
size
in interface Content
public final java.util.Iterator properties()
Content
properties
in interface Content
public boolean isValidProperty(java.lang.Object property)
Content
isValidProperty
in interface Content
property
- the property to be checked
public Getter value(java.lang.Object obj) throws PropertyConstraintFailure
Content
Will throw an exception if the property type is invalid, but not if the property is not available in this Node's content. This way, a value Getter can be established in anticipation of the addition of a property.
value
in interface Content
obj
- the Object that identifies this property
PropertyConstraintFailure
public final java.lang.Object getValue(java.lang.Object obj) throws PropertyConstraintFailure
Content
Will throw an exception if the property type is invalid, but not if the property is not available in this Node's content. This way, a value Getter can be established in anticipation of the addition of a property.
getValue
in interface Content
obj
- the Object that identifies this property
PropertyConstraintFailure
public final Operator invert(Operator op) throws InvalidOperator, ConstraintFailure
Content
op
on this Content.
invert
in interface Content
InvalidOperator
ConstraintFailure
public void addTxnHandler(TxnHandler handler)
TxnMonitorable
addTxnHandler
in interface TxnMonitorable
handler
- a TxnHandler whose notify methods will be invoked
when this object changes.public void removeTxnHandler(TxnHandler handler)
TxnMonitorable
removeTxnHandler
in interface TxnMonitorable
handler
- a TxnHandler that has previously been added.public MapNode asMapNode()
Node
asMapNode
in interface Node
asMapNode
in class NodeFilter
public RecordNode asRecordNode()
Node
asRecordNode
in interface Node
asRecordNode
in class NodeFilter
public SequenceNode asSequenceNode()
Node
asSequenceNode
in interface Node
asSequenceNode
in class NodeFilter
public final NodeContent.Editor createNode(NodeType type)
NodeFactory
createNode
in interface NodeFactory
public final NodeContent.Editor createNode(NodeType type, Node context)
NodeFactory
createNode
in interface NodeFactory
type
- The NodeType that will be assigned to the new Node.context
- The Node from which context metadata wil be
inherited.public final NodeContent.Editor cloneNode(Node node)
NodeFactory
cloneNode
in interface NodeFactory
node
- The node to be cloned.public final NodeContent.Editor cloneNode(Node node, Node context)
NodeFactory
cloneNode
in interface NodeFactory
node
- The node to be cloned.context
- The Node from which context metadata wil be
inherited.public NodeContent.Editor apply(Operator op) throws InvalidOperator, ConstraintFailure
NodeContent.Editor
apply
in interface NodeContent.Editor
InvalidOperator
ConstraintFailure
public void modify(Operator op) throws InvalidOperator, ConstraintFailure
Content.Editor
modify
in interface Content.Editor
InvalidOperator
ConstraintFailure
public final Txn txn()
NodeContent.Editor
txn
in interface NodeContent.Editor
public final boolean commit()
NodeContent.Editor
commit
in interface NodeContent.Editor
public abstract java.lang.String toString()
public abstract Setter setValue(java.lang.Object key) throws PropertyConstraintFailure
Content.Editor
setValue
in interface Content.Editor
PropertyConstraintFailure
public NodeContent.Editor edit()
Node
edit
in interface Node
edit
in class NodeFilter
public MapNode.Editor editMap()
Node
Returns null if the type is not MapType.
editMap
in interface Node
editMap
in class NodeFilter
public RecordNode.Editor editRecord()
Node
Returns null if the type is not RecordType.
editRecord
in interface Node
editRecord
in class NodeFilter
public SequenceNode.Editor editSequence()
Node
Returns null if the type is not SequenceType.
editSequence
in interface Node
editSequence
in class NodeFilter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |