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(Value value,
int targetType,
NamespaceResolver nsResolver)
throws ValueFormatException,
RepositoryException
- Parameters:
value
- targetType
- nsResolver
-
- Returns:
-
- Throws:
ValueFormatException
RepositoryException
create
public static InternalValue create(String value,
int targetType,
NamespaceResolver nsResolver)
throws ValueFormatException,
RepositoryException
- Parameters:
value
- targetType
- nsResolver
-
- Returns:
-
- Throws:
ValueFormatException
RepositoryException
create
public static InternalValue create(String value)
- Parameters:
value
-
- Returns:
create
public static InternalValue create(long value)
- Parameters:
value
-
- Returns:
create
public static InternalValue create(double value)
- Parameters:
value
-
- Returns:
create
public static InternalValue create(Calendar value)
- Parameters:
value
-
- Returns:
create
public static InternalValue create(boolean value)
- Parameters:
value
-
- Returns:
create
public static InternalValue create(byte[] value)
- Parameters:
value
-
- Returns:
create
public static InternalValue create(InputStream value)
throws IOException
- Parameters:
value
-
- 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:
create
public static InternalValue[] create(QName[] values)
- Parameters:
values
-
- Returns:
create
public static InternalValue[] create(String[] values)
- Parameters:
values
-
- Returns:
create
public static InternalValue[] create(Calendar[] values)
- Parameters:
values
-
- Returns:
create
public static InternalValue create(Path value)
- Parameters:
value
-
- Returns:
create
public static InternalValue create(UUID value)
- Parameters:
value
-
- Returns:
toJCRValue
public Value toJCRValue(NamespaceResolver nsResolver)
throws RepositoryException
- Parameters:
nsResolver
-
- Returns:
-
- Throws:
RepositoryException
internalValue
public Object internalValue()
- Returns:
getType
public int getType()
- Returns:
createCopy
public InternalValue createCopy()
throws RepositoryException
- Returns:
-
- Throws:
RepositoryException
toString
public String toString()
- Returns the string representation of this internal value. If this is a
binary value then the path of its backing file will be returned.
- Returns:
- string representation of this internal value
equals
public boolean equals(Object obj)
hashCode
public int hashCode()
- Returns zero to satisfy the Object equals/hashCode contract.
This class is mutable and not meant to be used as a hash key.
- Returns:
- always zero
- See Also:
Object.hashCode()
valueOf
public static InternalValue valueOf(String s,
int type)
- Parameters:
s
- type
-
- Returns:
Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.