org.apache.jackrabbit.core.value
Class InternalValue
java.lang.Object
org.apache.jackrabbit.core.value.InternalValue
public class InternalValue
- extends Object
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 | QName |
PATH | Path |
BINARY | BLOBFileValue |
REFERENCE | UUID |
EMPTY_ARRAY
public static final InternalValue[] EMPTY_ARRAY
BOOLEAN_TRUE
public static final InternalValue BOOLEAN_TRUE
BOOLEAN_FALSE
public static final InternalValue BOOLEAN_FALSE
create
public static InternalValue create(Value value,
NamespaceResolver nsResolver)
throws ValueFormatException,
RepositoryException
- Parameters:
value
- nsResolver
-
- Returns:
-
- Throws:
ValueFormatException
RepositoryException
create
public static InternalValue create(String value)
- Parameters:
value
-
- Returns:
- the created value
create
public static InternalValue create(long value)
- Parameters:
value
-
- Returns:
- the created value
create
public static InternalValue create(double value)
- Parameters:
value
-
- Returns:
- the created value
create
public static InternalValue create(Calendar value)
- Parameters:
value
-
- Returns:
- the created value
create
public static InternalValue create(boolean value)
- Parameters:
value
-
- Returns:
- the created value
create
public static InternalValue create(byte[] value)
- Parameters:
value
-
- Returns:
- the created value
create
public static InternalValue create(InputStream value)
throws IOException
- Parameters:
value
-
- Returns:
-
- Throws:
IOException
create
public static InternalValue create(InputStream value,
boolean temp)
throws IOException
- Parameters:
value
- temp
-
- Returns:
-
- Throws:
IOException
create
public static InternalValue create(FileSystemResource value)
throws IOException
- Parameters:
value
-
- Returns:
-
- Throws:
IOException
create
public static InternalValue create(File value)
throws IOException
- Parameters:
value
-
- Returns:
-
- Throws:
IOException
create
public static InternalValue create(QName value)
- Parameters:
value
-
- Returns:
- the created value
create
public static InternalValue[] create(QName[] values)
- Parameters:
values
-
- Returns:
- the created value
create
public static InternalValue[] create(String[] values)
- Parameters:
values
-
- Returns:
- the created value
create
public static InternalValue[] create(Calendar[] values)
- Parameters:
values
-
- Returns:
- the created value
create
public static InternalValue create(Path value)
- Parameters:
value
-
- Returns:
- the created value
create
public static InternalValue create(UUID value)
- Parameters:
value
-
- Returns:
- the created value
toJCRValue
public Value toJCRValue(NamespaceResolver nsResolver)
throws RepositoryException
- Parameters:
nsResolver
-
- Returns:
-
- Throws:
RepositoryException
internalValue
public Object internalValue()
- Returns:
- the internal object
getType
public int getType()
- Returns:
- the type
createCopy
public InternalValue createCopy()
throws RepositoryException
- Returns:
-
- Throws:
RepositoryException
valueOf
public static InternalValue valueOf(String s,
int type)
- Parses the given string as an
InternalValue
of the
specified type. The string must be in the format returned by the
InternalValue.toString()
method.
- Parameters:
s
- a String
containing the InternalValue
representation to be parsed.type
-
- Returns:
- the
InternalValue
represented by the arguments
- Throws:
IllegalArgumentException
- if the specified string can not be parsed
as an InternalValue
of the
specified type.- See Also:
toString()
toString
public String toString()
- Returns the string representation of this internal value.
- Overrides:
toString
in class Object
- Returns:
- string representation of this internal value
equals
public boolean equals(Object obj)
-
- Overrides:
equals
in class Object
hashCode
public int hashCode()
-
- Overrides:
hashCode
in class Object
Copyright © 2004-2007 The Apache Software Foundation. All Rights Reserved.