|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Content interface represents access to the content or
properties of a Node
.
The interface presents a generic approach to accessing such
content in a read-only fashion. If the content is to be modified,
then the programmer needs access to the NodeContent.Editor
interface.
The general access interface presents all nodes as an ordered collection of properties that act as keys to a set of values. These properties can be enumerated with the properties method and their respective values accessed with the value method.
Without access to this interface, a Node is simply a placeholder with an identifier and type.
Nested Class Summary | |
static interface |
Content.Editor
Encapsulates the ability to edit Content objects. |
Method Summary | |
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. |
java.util.Iterator |
properties()
A sequence of all of the properties currently indexing the contents if this Content. |
int |
size()
The number of properties contained in this Content object. |
NodeType |
type()
The type of this Content object. |
Getter |
value(java.lang.Object obj)
A generic Getter for property values, given a property. |
Method Detail |
public NodeType type()
Necessarily a NodeType type, and always a specific instance of MapType, RecordType or SequenceType.
public int size()
public java.util.Iterator properties()
public boolean isValidProperty(java.lang.Object property)
property
- the property to be checked
public Getter value(java.lang.Object obj)
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.
obj
- the Object that identifies this propertypublic java.lang.Object getValue(java.lang.Object obj)
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.
obj
- the Object that identifies this property
public Operator invert(Operator op) throws InvalidOperator, ConstraintFailure
op
on this Content.
InvalidOperator
ConstraintFailure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |