|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nodal.util.NodeFilter
Filter for implementing aspects of Node interface.
This class is intended to be inherited in order to implement functionality on top of a basic Node. After encapsulating some other Node, it allows a developer to selectively override methods that, by default, simply pass on to the base Node.
Node
Field Summary | |
protected Node |
node
|
Constructor Summary | |
protected |
NodeFilter(Node n)
|
Method Summary | |
AnchorNode |
asAnchor()
An AnchorNode interface if this Node is an anchor, otherwise null. |
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. |
Node |
bareNode()
The canonical "bare" instance of this Node. |
Capability |
capability()
A Capability describing the User's current permissions for this Node. |
NodeContent |
content()
The Node's contents. |
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. |
NodeHistory |
history()
The Node's history. |
Name |
id()
The Node's global identity expressed as a Name. |
Path |
path()
An absolute Path that is bound to this Node. |
Repository |
repository()
The Repository containing this Node. |
NodeType |
type()
The data Type of the Node's contents. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final Node node
Constructor Detail |
protected NodeFilter(Node n)
Method Detail |
public Repository repository()
Node
repository
in interface Node
public Name id()
Node
id
in interface Node
public NodeType type()
Node
type
in interface Node
public Path path()
Node
path
in interface Node
public Capability capability()
Node
capability
in interface Node
public Node bareNode()
Node
A "bare" instance is the instance of this Node that is not a NodeContent, NodeEditor or NodeHistory instance and that has a trivial, direct Path.
bareNode
in interface Node
public NodeContent content()
Node
If the Capability does not provide read access, then this will return null.
content
in interface Node
public MapNode asMapNode()
Node
asMapNode
in interface Node
public SequenceNode asSequenceNode()
Node
asSequenceNode
in interface Node
public RecordNode asRecordNode()
Node
asRecordNode
in interface Node
public NodeHistory history()
Node
If the Capability does not provide history access, then this will return null.
history
in interface Node
public AnchorNode asAnchor()
Node
asAnchor
in interface Node
public NodeContent.Editor edit()
Node
edit
in interface Node
public MapNode.Editor editMap()
Node
Returns null if the type is not MapType.
editMap
in interface Node
public RecordNode.Editor editRecord()
Node
Returns null if the type is not RecordType.
editRecord
in interface Node
public SequenceNode.Editor editSequence()
Node
Returns null if the type is not SequenceType.
editSequence
in interface Node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |