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>, javax.jcr.Value
Direct Known Subclasses:
ReferenceValueImpl

public abstract class NodeValueImpl
extends ValueImpl
implements javax.jcr.Value, 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
 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
 
Methods inherited from interface javax.jcr.Value
getBoolean, getDate, getDouble, getLong
 

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 javax.jcr.UnsupportedRepositoryOperationException,
                        javax.jcr.RepositoryException
Throws:
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException

NodeValueImpl

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

getString

public java.lang.String getString()
Specified by:
getString in interface javax.jcr.Value
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.

Specified by:
getStream in interface javax.jcr.Value
Overrides:
getStream in class ValueImpl

getType

public int getType()
Specified by:
getType in interface javax.jcr.Value

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