Package org.apache.jackrabbit.value
Class AbstractValueFactory
- java.lang.Object
-
- org.apache.jackrabbit.value.AbstractValueFactory
-
- All Implemented Interfaces:
ValueFactory
- Direct Known Subclasses:
SimpleValueFactory,ValueFactoryImpl
public abstract class AbstractValueFactory extends Object implements ValueFactory
This class implements theValueFactoryinterface.- See Also:
Session.getValueFactory()
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractValueFactory()Constructs aValueFactoryobject.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidcheckNameFormat(String nameValue)Checks the format of the given string representing a name value.protected abstract voidcheckPathFormat(String pathValue)Checks the format of the given string representing a path value.BinarycreateBinary(InputStream stream)ValuecreateValue(boolean value)ValuecreateValue(double value)ValuecreateValue(long value)ValuecreateValue(InputStream value)ValuecreateValue(String value)ValuecreateValue(String value, int type)ValuecreateValue(BigDecimal value)ValuecreateValue(Calendar value)ValuecreateValue(Binary value)ValuecreateValue(Node value)ValuecreateValue(Node node, boolean weak)
-
-
-
Method Detail
-
checkPathFormat
protected abstract void checkPathFormat(String pathValue) throws ValueFormatException
Checks the format of the given string representing a path value. Implementations must assert that the given value is a valid jcr path.- Parameters:
pathValue-- Throws:
ValueFormatException- If the givenpathValueisn't a valid jcr path.
-
checkNameFormat
protected abstract void checkNameFormat(String nameValue) throws ValueFormatException
Checks the format of the given string representing a name value. Implementations must assert that the given value is a valid jcr name.- Parameters:
nameValue-- Throws:
ValueFormatException- If the givenpathValueisn't a valid jcr name.
-
createValue
public Value createValue(boolean value)
- Specified by:
createValuein interfaceValueFactory
-
createValue
public Value createValue(Calendar value)
- Specified by:
createValuein interfaceValueFactory
-
createValue
public Value createValue(double value)
- Specified by:
createValuein interfaceValueFactory
-
createValue
public Value createValue(InputStream value)
- Specified by:
createValuein interfaceValueFactory
-
createValue
public Value createValue(long value)
- Specified by:
createValuein interfaceValueFactory
-
createValue
public Value createValue(Node value) throws RepositoryException
- Specified by:
createValuein interfaceValueFactory- Throws:
RepositoryException
-
createValue
public Value createValue(String value)
- Specified by:
createValuein interfaceValueFactory
-
createValue
public Value createValue(String value, int type) throws ValueFormatException
- Specified by:
createValuein interfaceValueFactory- Throws:
ValueFormatException
-
createBinary
public Binary createBinary(InputStream stream) throws RepositoryException
- Specified by:
createBinaryin interfaceValueFactory- Throws:
RepositoryException
-
createValue
public Value createValue(Binary value)
- Specified by:
createValuein interfaceValueFactory
-
createValue
public Value createValue(BigDecimal value)
- Specified by:
createValuein interfaceValueFactory
-
createValue
public Value createValue(Node node, boolean weak) throws RepositoryException
- Specified by:
createValuein interfaceValueFactory- Throws:
RepositoryException
-
-