public class InternalValue
extends org.apache.jackrabbit.spi.commons.value.AbstractQValue
InternalValue represents the internal format of a property value.
The following table specifies the internal format for every property type:
| PropertyType | Internal Format |
| STRING | String |
| LONG | Long |
| DOUBLE | Double |
| DATE | Calendar |
| BOOLEAN | Boolean |
| NAME | Name |
| PATH | Path |
| URI | URI |
| DECIMAL | BigDecimal |
| BINARY | BLOBFileValue |
| REFERENCE | NodeId |
| Modifier and Type | Field and Description |
|---|---|
static InternalValue[] |
EMPTY_ARRAY |
| Modifier and Type | Method and Description |
|---|---|
static InternalValue |
create(BigDecimal value) |
static InternalValue |
create(boolean value) |
static InternalValue |
create(byte[] value) |
static InternalValue |
create(Calendar value) |
static InternalValue |
create(org.apache.jackrabbit.core.data.DataStore store,
String id)
Create a binary object with the given identifier.
|
static InternalValue |
create(double value) |
static InternalValue |
create(org.apache.jackrabbit.core.fs.FileSystemResource value) |
static InternalValue |
create(InputStream value) |
static InternalValue |
create(InputStream value,
org.apache.jackrabbit.core.data.DataStore store)
Create an internal value that is stored in the data store (if enabled).
|
static InternalValue |
create(long value) |
static InternalValue |
create(org.apache.jackrabbit.spi.Name value) |
static InternalValue[] |
create(org.apache.jackrabbit.spi.Name[] values) |
static InternalValue |
create(NodeId value) |
static InternalValue |
create(NodeId value,
boolean weak) |
static InternalValue |
create(org.apache.jackrabbit.spi.Path value) |
static InternalValue |
create(org.apache.jackrabbit.spi.QValue value) |
static InternalValue[] |
create(org.apache.jackrabbit.spi.QValue[] values) |
static InternalValue |
create(String value) |
static InternalValue |
create(URI value) |
static InternalValue |
create(Value value,
org.apache.jackrabbit.spi.commons.conversion.NamePathResolver resolver)
Create a new internal value from the given JCR value.
|
static InternalValue |
create(Value value,
org.apache.jackrabbit.spi.commons.conversion.NamePathResolver resolver,
org.apache.jackrabbit.core.data.DataStore store)
Create a new internal value from the given JCR value.
|
InternalValue |
createCopy()
Create a copy of this object.
|
static InternalValue |
createDate(String value)
https://issues.apache.org/jira/browse/JCR-3083
|
static InternalValue |
createTemporary(InputStream value)
Create an internal value that is backed by a temporary file.
|
void |
deleteBinaryResource()
Delete persistent binary objects.
|
void |
discard() |
boolean |
equals(Object object) |
Binary |
getBinary() |
Calendar |
getDate() |
long |
getLength() |
NodeId |
getNodeId() |
InputStream |
getStream() |
boolean |
isInDataStore() |
static InternalValue |
valueOf(String s,
int type)
Parses the given string as an
InternalValue of the
specified type. |
public static final InternalValue[] EMPTY_ARRAY
public static InternalValue create(Value value, org.apache.jackrabbit.spi.commons.conversion.NamePathResolver resolver) throws ValueFormatException, RepositoryException
value - the JCR valueresolver - RepositoryExceptionValueFormatExceptionpublic static InternalValue create(Value value, org.apache.jackrabbit.spi.commons.conversion.NamePathResolver resolver, org.apache.jackrabbit.core.data.DataStore store) throws ValueFormatException, RepositoryException
value - the JCR valueresolver - store - the data storeRepositoryExceptionValueFormatExceptionpublic static InternalValue create(org.apache.jackrabbit.spi.QValue value) throws RepositoryException
RepositoryExceptionpublic static InternalValue[] create(org.apache.jackrabbit.spi.QValue[] values) throws RepositoryException
RepositoryExceptionpublic static InternalValue create(String value)
value - public static InternalValue create(long value)
value - public static InternalValue create(double value)
value - public static InternalValue create(Calendar value)
value - public static InternalValue createDate(String value)
value - public static InternalValue create(BigDecimal value)
value - public static InternalValue create(URI value)
value - public static InternalValue create(boolean value)
value - public static InternalValue create(byte[] value)
value - public static InternalValue createTemporary(InputStream value) throws RepositoryException
value - the streamRepositoryExceptionpublic static InternalValue create(InputStream value, org.apache.jackrabbit.core.data.DataStore store) throws RepositoryException
value - the input streamstore - RepositoryExceptionpublic static InternalValue create(InputStream value) throws RepositoryException
value - RepositoryExceptionpublic static InternalValue create(org.apache.jackrabbit.core.fs.FileSystemResource value) throws IOException
value - IOExceptionpublic static InternalValue create(org.apache.jackrabbit.core.data.DataStore store, String id)
store - the data storeid - the identifierpublic static InternalValue create(org.apache.jackrabbit.spi.Name value)
value - public static InternalValue[] create(org.apache.jackrabbit.spi.Name[] values)
values - public static InternalValue create(org.apache.jackrabbit.spi.Path value)
value - public static InternalValue create(NodeId value)
value - public static InternalValue create(NodeId value, boolean weak)
value - weak - public NodeId getNodeId()
public Calendar getDate() throws RepositoryException
RepositoryExceptionpublic InternalValue createCopy() throws RepositoryException
RepositoryExceptionpublic static InternalValue valueOf(String s, int type)
InternalValue of the
specified type. The string must be in the format returned by the
InternalValue.toString() method.s - a String containing the InternalValue
representation to be parsed.type - InternalValue represented by the argumentsIllegalArgumentException - if the specified string can not be parsed
as an InternalValue of the
specified type.AbstractQValue.toString()public boolean isInDataStore()
public long getLength()
throws RepositoryException
getLength in interface org.apache.jackrabbit.spi.QValuegetLength in class org.apache.jackrabbit.spi.commons.value.AbstractQValueRepositoryExceptionQValue.getLength()public InputStream getStream() throws RepositoryException
RepositoryExceptionQValue.getStream()public Binary getBinary() throws RepositoryException
getBinary in interface org.apache.jackrabbit.spi.QValuegetBinary in class org.apache.jackrabbit.spi.commons.value.AbstractQValueRepositoryExceptionQValue.getBinary()public void discard()
discard in interface org.apache.jackrabbit.spi.QValuediscard in class org.apache.jackrabbit.spi.commons.value.AbstractQValueQValue.discard()public void deleteBinaryResource()
public boolean equals(Object object)
equals in class org.apache.jackrabbit.spi.commons.value.AbstractQValueCopyright © 2004–2018 The Apache Software Foundation. All rights reserved.