org.priha.core.values
Class NodeValueImpl
java.lang.Object
org.priha.core.values.ValueImpl
org.priha.core.values.NodeValueImpl
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<ValueImpl>
- Direct Known Subclasses:
- ReferenceValueImpl
public abstract class NodeValueImpl
- extends ValueImpl
- implements java.io.Serializable
Superclass of all classes which reference a Node
- See Also:
- Serialized Form
Field Summary |
protected int |
m_type
|
protected java.lang.String |
m_value
|
Method Summary |
long |
getSize()
Returns the approximate size of this object in bytes. |
java.io.InputStream |
getStream()
By default, returns the inputstream of the String representation. |
java.lang.String |
getString()
|
int |
getType()
|
java.lang.String |
toString()
|
java.lang.String |
valueAsString()
Allows getting the Value as a String without regard to the current Stream/Value format
setting. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
m_type
protected int m_type
m_value
protected java.lang.String m_value
NodeValueImpl
protected NodeValueImpl(NodeImpl value,
int type)
throws UnsupportedRepositoryOperationException,
RepositoryException
- Throws:
UnsupportedRepositoryOperationException
RepositoryException
NodeValueImpl
protected NodeValueImpl(java.lang.String value,
int type)
getString
public java.lang.String getString()
- Overrides:
getString
in class ValueImpl
getStream
public java.io.InputStream getStream()
- Description copied from class:
ValueImpl
- By default, returns the inputstream of the String representation.
- Overrides:
getStream
in class ValueImpl
getType
public int getType()
valueAsString
public java.lang.String valueAsString()
- Description copied from class:
ValueImpl
- Allows getting the Value as a String without regard to the current Stream/Value format
setting. This means that this method can be called at any time.
- Overrides:
valueAsString
in class ValueImpl
- Returns:
- The value as a String. However, may return null in case the conversion
cannot be made. Default implementation returns null and subclasses are expected
to override this.
toString
public java.lang.String toString()
- Overrides:
toString
in class ValueImpl
getSize
public long getSize()
- Description copied from class:
ValueImpl
- Returns the approximate size of this object in bytes. If not determinable,
returns -1;
- Overrides:
getSize
in class ValueImpl
- Returns: