org.apache.jackrabbit.value
Class BaseValue

java.lang.Object
  extended by org.apache.jackrabbit.value.BaseValue
All Implemented Interfaces:
Value
Direct Known Subclasses:
BinaryValue, BooleanValue, DateValue, DecimalValue, DoubleValue, LongValue, NameValue, PathValue, ReferenceValue, StringValue, URIValue, WeakReferenceValue

public abstract class BaseValue
extends Object
implements Value

This class is the superclass of the type-specific classes implementing the Value interfaces.

See Also:
Value, StringValue, LongValue, DoubleValue, DecimalValue, BooleanValue, DateValue, BinaryValue, NameValue, PathValue, URIValue, ReferenceValue, WeakReferenceValue

Field Summary
protected static String DEFAULT_ENCODING
           
protected  InputStream stream
           
protected  int type
           
 
Method Summary
 Binary getBinary()
          
 boolean getBoolean()
          
 Calendar getDate()
          
 BigDecimal getDecimal()
          
 double getDouble()
          
protected abstract  String getInternalString()
          Returns the internal string representation of this value without modifying the value state.
 long getLong()
          
 InputStream getStream()
          
 String getString()
          
 int getType()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ENCODING

protected static final String DEFAULT_ENCODING
See Also:
Constant Field Values

type

protected final int type

stream

protected InputStream stream
Method Detail

getInternalString

protected abstract String getInternalString()
                                     throws ValueFormatException,
                                            RepositoryException
Returns the internal string representation of this value without modifying the value state.

Returns:
the internal string representation
Throws:
ValueFormatException - if the value can not be represented as a String or if the value is null.
RepositoryException - if another error occurs.

getType

public int getType()

Specified by:
getType in interface Value

getDate

public Calendar getDate()
                 throws ValueFormatException,
                        IllegalStateException,
                        RepositoryException

Specified by:
getDate in interface Value
Throws:
ValueFormatException
IllegalStateException
RepositoryException

getLong

public long getLong()
             throws ValueFormatException,
                    IllegalStateException,
                    RepositoryException

Specified by:
getLong in interface Value
Throws:
ValueFormatException
IllegalStateException
RepositoryException

getBoolean

public boolean getBoolean()
                   throws ValueFormatException,
                          IllegalStateException,
                          RepositoryException

Specified by:
getBoolean in interface Value
Throws:
ValueFormatException
IllegalStateException
RepositoryException

getDouble

public double getDouble()
                 throws ValueFormatException,
                        IllegalStateException,
                        RepositoryException

Specified by:
getDouble in interface Value
Throws:
ValueFormatException
IllegalStateException
RepositoryException

getDecimal

public BigDecimal getDecimal()
                      throws ValueFormatException,
                             IllegalStateException,
                             RepositoryException

Specified by:
getDecimal in interface Value
Throws:
ValueFormatException
IllegalStateException
RepositoryException

getStream

public InputStream getStream()
                      throws IllegalStateException,
                             RepositoryException

Specified by:
getStream in interface Value
Throws:
IllegalStateException
RepositoryException

getBinary

public Binary getBinary()
                 throws ValueFormatException,
                        IllegalStateException,
                        RepositoryException

Specified by:
getBinary in interface Value
Throws:
ValueFormatException
IllegalStateException
RepositoryException

getString

public String getString()
                 throws ValueFormatException,
                        IllegalStateException,
                        RepositoryException

Specified by:
getString in interface Value
Throws:
ValueFormatException
IllegalStateException
RepositoryException


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.