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 theValueinterfaces.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringDEFAULT_ENCODINGprotected InputStreamstreamprotected inttype
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BinarygetBinary()booleangetBoolean()CalendargetDate()BigDecimalgetDecimal()doublegetDouble()protected abstract StringgetInternalString()Returns the internal string representation of this value without modifying the value state.longgetLong()InputStreamgetStream()StringgetString()intgetType()
-
-
-
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 aStringor if the value isnull.RepositoryException- if another error occurs.
-
getDate
public Calendar getDate() throws ValueFormatException, IllegalStateException, RepositoryException
- Specified by:
getDatein interfaceValue- Throws:
ValueFormatExceptionIllegalStateExceptionRepositoryException
-
getLong
public long getLong() throws ValueFormatException, IllegalStateException, RepositoryException- Specified by:
getLongin interfaceValue- Throws:
ValueFormatExceptionIllegalStateExceptionRepositoryException
-
getBoolean
public boolean getBoolean() throws ValueFormatException, IllegalStateException, RepositoryException- Specified by:
getBooleanin interfaceValue- Throws:
ValueFormatExceptionIllegalStateExceptionRepositoryException
-
getDouble
public double getDouble() throws ValueFormatException, IllegalStateException, RepositoryException- Specified by:
getDoublein interfaceValue- Throws:
ValueFormatExceptionIllegalStateExceptionRepositoryException
-
getDecimal
public BigDecimal getDecimal() throws ValueFormatException, IllegalStateException, RepositoryException
- Specified by:
getDecimalin interfaceValue- Throws:
ValueFormatExceptionIllegalStateExceptionRepositoryException
-
getStream
public InputStream getStream() throws IllegalStateException, RepositoryException
- Specified by:
getStreamin interfaceValue- Throws:
IllegalStateExceptionRepositoryException
-
getBinary
public Binary getBinary() throws ValueFormatException, IllegalStateException, RepositoryException
- Specified by:
getBinaryin interfaceValue- Throws:
ValueFormatExceptionIllegalStateExceptionRepositoryException
-
getString
public String getString() throws ValueFormatException, IllegalStateException, RepositoryException
- Specified by:
getStringin interfaceValue- Throws:
ValueFormatExceptionIllegalStateExceptionRepositoryException
-
-