Package org.apache.jackrabbit.value
Class BaseValue
- java.lang.Object
-
- 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 theValue
interfaces.
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
DEFAULT_ENCODING
protected InputStream
stream
protected int
type
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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()
-
-
-
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 aString
or if the value isnull
.RepositoryException
- if another error occurs.
-
getDate
public Calendar getDate() throws ValueFormatException, IllegalStateException, RepositoryException
- Specified by:
getDate
in interfaceValue
- Throws:
ValueFormatException
IllegalStateException
RepositoryException
-
getLong
public long getLong() throws ValueFormatException, IllegalStateException, RepositoryException
- Specified by:
getLong
in interfaceValue
- Throws:
ValueFormatException
IllegalStateException
RepositoryException
-
getBoolean
public boolean getBoolean() throws ValueFormatException, IllegalStateException, RepositoryException
- Specified by:
getBoolean
in interfaceValue
- Throws:
ValueFormatException
IllegalStateException
RepositoryException
-
getDouble
public double getDouble() throws ValueFormatException, IllegalStateException, RepositoryException
- Specified by:
getDouble
in interfaceValue
- Throws:
ValueFormatException
IllegalStateException
RepositoryException
-
getDecimal
public BigDecimal getDecimal() throws ValueFormatException, IllegalStateException, RepositoryException
- Specified by:
getDecimal
in interfaceValue
- Throws:
ValueFormatException
IllegalStateException
RepositoryException
-
getStream
public InputStream getStream() throws IllegalStateException, RepositoryException
- Specified by:
getStream
in interfaceValue
- Throws:
IllegalStateException
RepositoryException
-
getBinary
public Binary getBinary() throws ValueFormatException, IllegalStateException, RepositoryException
- Specified by:
getBinary
in interfaceValue
- Throws:
ValueFormatException
IllegalStateException
RepositoryException
-
getString
public String getString() throws ValueFormatException, IllegalStateException, RepositoryException
- Specified by:
getString
in interfaceValue
- Throws:
ValueFormatException
IllegalStateException
RepositoryException
-
-