org.priha.core.values
Class NodeValueImpl

java.lang.Object
  extended by org.priha.core.values.ValueImpl
      extended by 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
           
 
Fields inherited from class org.priha.core.values.ValueImpl
m_state
 
Constructor Summary
protected NodeValueImpl(NodeImpl value, int type)
           
protected NodeValueImpl(java.lang.String value, int type)
           
 
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 org.priha.core.values.ValueImpl
checkStream, checkValue, compareTo, equals, getBoolean, getDate, getDouble, getLong
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_type

protected int m_type

m_value

protected java.lang.String m_value
Constructor Detail

NodeValueImpl

protected NodeValueImpl(NodeImpl value,
                        int type)
                 throws UnsupportedRepositoryOperationException,
                        RepositoryException
Throws:
UnsupportedRepositoryOperationException
RepositoryException

NodeValueImpl

protected NodeValueImpl(java.lang.String value,
                        int type)
Method Detail

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: