org.priha.core.values
Class StringValueImpl

java.lang.Object
  extended by org.priha.core.values.ValueImpl
      extended by org.priha.core.values.StringValueImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<ValueImpl>

public class StringValueImpl
extends ValueImpl
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.priha.core.values.ValueImpl
m_state
 
Constructor Summary
StringValueImpl(java.lang.String value)
           
 
Method Summary
protected  java.lang.Object clone()
           
 boolean getBoolean()
           
 java.util.Calendar getDate()
           
 double getDouble()
           
 long getLong()
           
 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
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringValueImpl

public StringValueImpl(java.lang.String value)
Method Detail

getType

public int getType()

getBoolean

public boolean getBoolean()
Overrides:
getBoolean in class ValueImpl

getString

public java.lang.String getString()
                           throws ValueFormatException,
                                  java.lang.IllegalStateException,
                                  RepositoryException
Overrides:
getString in class ValueImpl
Throws:
ValueFormatException
java.lang.IllegalStateException
RepositoryException

getDate

public java.util.Calendar getDate()
                           throws ValueFormatException
Overrides:
getDate in class ValueImpl
Throws:
ValueFormatException

getDouble

public double getDouble()
                 throws ValueFormatException
Overrides:
getDouble in class ValueImpl
Throws:
ValueFormatException

getLong

public long getLong()
             throws ValueFormatException
Overrides:
getLong in class ValueImpl
Throws:
ValueFormatException

getStream

public java.io.InputStream getStream()
                              throws java.lang.IllegalStateException,
                                     RepositoryException
Description copied from class: ValueImpl
By default, returns the inputstream of the String representation.

Overrides:
getStream in class ValueImpl
Throws:
java.lang.IllegalStateException
RepositoryException

toString

public java.lang.String toString()
Overrides:
toString in class ValueImpl

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.

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

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: