org.planx.xmlstore.references
Class ContentValueReference
java.lang.Object
org.planx.xmlstore.references.ContentValueReference
- All Implemented Interfaces:
- Serializable, Comparable<ContentValueReference>, Reference, ValueReference
public class ContentValueReference
- extends Object
- implements ValueReference, Serializable, Comparable<ContentValueReference>
A ValueReference created from a content hash of a Node
(currently MD5). This gives a unique location independent ValueReference
that can be computed anywhere based on Node data.
- Author:
- Kasper Bøgebjerg, Henning Niss, Thomas Ambus
- See Also:
- Serialized Form
|
Constructor Summary |
ContentValueReference(Node node)
Creates a new ContentValueReference by computing a content
hash of the tree rooted at the specified Node. |
CLASS_ID
public static final byte CLASS_ID
- See Also:
- Constant Field Values
ContentValueReference
public ContentValueReference(Node node)
- Creates a new
ContentValueReference by computing a content
hash of the tree rooted at the specified Node.
reference
public static ContentValueReference reference(Node node,
ReferenceListener listener)
asIdentifier
public Identifier asIdentifier()
- Returns this reference as an
Identifier acceptable
by the routing layer.
- Specified by:
asIdentifier in interface ValueReference
equals
public boolean equals(Object o)
- Returns
true if and only if the specified object
is also a ContentValueReference and it represents
the same content hash
as this ContentValueReference.
- Overrides:
equals in class Object
compareTo
public int compareTo(ContentValueReference vref)
- Specified by:
compareTo in interface Comparable<ContentValueReference>
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
toString
public String toString()
- Overrides:
toString in class Object
getStreamer
public static Streamer<ContentValueReference> getStreamer()
getDiscriminator
public static Discriminator<ContentValueReference> getDiscriminator()
getDiscriminator
public static Discriminator<ContentValueReference> getDiscriminator(Memory memory)
Copyright © 2010. All Rights Reserved.