|
ModeShape Distribution 3.5.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.jcr.value.basic.AbstractValueFactory<Reference>
org.modeshape.jcr.value.basic.ReferenceValueFactory
@Immutable public class ReferenceValueFactory
The standard ValueFactory for PropertyType.REFERENCE values.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.modeshape.jcr.value.basic.AbstractValueFactory |
|---|
AbstractValueFactory.ConvertingIterator<ValueType> |
| Field Summary | |
|---|---|
protected boolean |
simple
|
protected boolean |
weak
|
| Fields inherited from class org.modeshape.jcr.value.basic.AbstractValueFactory |
|---|
decoder, propertyType, valueFactories |
| Fields inherited from interface org.modeshape.jcr.value.ValueFactory |
|---|
DEFAULT_DECODER, DEFAULT_ENCODER |
| Constructor Summary | |
|---|---|
protected |
ReferenceValueFactory(PropertyType type,
TextDecoder decoder,
ValueFactories valueFactories,
boolean weak,
boolean simple)
|
| Method Summary | |
|---|---|
Reference |
create(BigDecimal value)
Create a value from a decimal. |
Reference |
create(BinaryValue value)
Create a value from the binary content given by the supplied stream. |
Reference |
create(boolean value)
Create a boolean from a string. |
Reference |
create(byte[] value)
Create a value from the binary content given by the supplied array. |
Reference |
create(Calendar value)
Create a value from a Calendar instance. |
Reference |
create(Date value)
Create a value from a date. |
Reference |
create(DateTime value)
Create a value from a date-time instant. |
Reference |
create(double value)
Create a value from a double. |
Reference |
create(float value)
Create a value from a float. |
Reference |
create(InputStream stream)
Create a value from the binary content given by the supplied stream. |
Reference |
create(int value)
Create a value from an integer. |
Reference |
create(long value)
Create a long from a string. |
Reference |
create(Name value)
Create a value from a name. |
Reference |
create(NodeKey value)
Create a value from a NodeKey. |
Reference[] |
create(NodeKey[] values,
boolean foreign)
|
Reference |
create(NodeKey value,
boolean foreign)
|
Reference |
create(Path.Segment value)
Create a value from a path segment. |
Reference |
create(Path value)
Create a value from a path. |
Reference |
create(Reference value)
Create a value from a reference. |
Reference |
create(String value)
Create a value from a string, using no decoding. |
Reference |
create(String value,
TextDecoder decoder)
Create a value from a string, using the supplied decoder. |
Reference |
create(URI value)
Create a value from a URI. |
Reference |
create(UUID value)
Create a value from a UUID. |
protected Reference[] |
createEmptyArray(int length)
|
static ReferenceValueFactory |
newInstance(TextDecoder decoder,
ValueFactories factories,
boolean weak,
boolean simple)
Create a new instance. |
ReferenceFactory |
with(ValueFactories valueFactories)
Return a potentially new copy of this factory that uses the supplied ValueFactories object. |
| Methods inherited from class org.modeshape.jcr.value.basic.AbstractValueFactory |
|---|
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getDecoder, getDecoder, getPropertyType, getStringValueFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.modeshape.jcr.value.ValueFactory |
|---|
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getPropertyType |
| Field Detail |
|---|
protected final boolean weak
protected final boolean simple
| Constructor Detail |
|---|
protected ReferenceValueFactory(PropertyType type,
TextDecoder decoder,
ValueFactories valueFactories,
boolean weak,
boolean simple)
| Method Detail |
|---|
public static ReferenceValueFactory newInstance(TextDecoder decoder,
ValueFactories factories,
boolean weak,
boolean simple)
decoder - the text decoder; may be null if the default decoder should be usedfactories - the set of value factories, used to obtain the string value
factory; may not be nullweak - true if this factory should create weak references, or false if it should create strong referencessimple - true if this factory should create simple references, false otherwisepublic ReferenceFactory with(ValueFactories valueFactories)
ValueFactory
with in interface ReferenceFactorywith in interface ValueFactory<Reference>valueFactories - the value factories object; may not be null
public Reference create(String value)
ValueFactory
create in interface ValueFactory<Reference>value - the string from which the value is to be created
ValueFactory.create(String, TextDecoder)
public Reference create(String value,
TextDecoder decoder)
ValueFactory
create in interface ValueFactory<Reference>value - the string from which the value is to be createddecoder - the decoder that should be used; if null, the default decoder is used
ValueFactory.create(String)public Reference create(int value)
ValueFactory
create in interface ValueFactory<Reference>value - the integer from which the value is to be created
public Reference create(long value)
ValueFactory
create in interface ValueFactory<Reference>value - the string from which the long is to be created
public Reference create(boolean value)
ValueFactory
create in interface ValueFactory<Reference>value - the boolean from which the value is to be created
public Reference create(float value)
ValueFactory
create in interface ValueFactory<Reference>value - the float from which the value is to be created
public Reference create(double value)
ValueFactory
create in interface ValueFactory<Reference>value - the double from which the value is to be created
public Reference create(BigDecimal value)
ValueFactory
create in interface ValueFactory<Reference>value - the decimal from which the value is to be created
public Reference create(Calendar value)
ValueFactory
create in interface ValueFactory<Reference>value - the Calendar instance from which the value is to be created
public Reference create(Date value)
ValueFactory
create in interface ValueFactory<Reference>value - the date from which the value is to be created
public Reference create(DateTime value)
throws ValueFormatException
ValueFactory
create in interface ValueFactory<Reference>value - the date-time instant from which the value is to be created
ValueFormatException - if the conversion from a Date could not be performedpublic Reference create(Name value)
ValueFactory
create in interface ValueFactory<Reference>value - the name from which the value is to be created
public Reference create(Path value)
ValueFactory
create in interface ValueFactory<Reference>value - the path from which the value is to be created
public Reference create(Path.Segment value)
ValueFactory
create in interface ValueFactory<Reference>value - the path segment from which the value is to be created
public Reference create(Reference value)
ValueFactory
create in interface ValueFactory<Reference>value - the reference from which the value is to be created
public Reference create(UUID value)
ValueFactory
create in interface ValueFactory<Reference>value - the UUID from which the value is to be created
public Reference create(NodeKey value)
throws ValueFormatException
ValueFactoryNodeKey.
create in interface ValueFactory<Reference>value - the node key from which the value is to be created
ValueFormatException - if the conversion from a NodeKey could not be performed
public Reference create(NodeKey value,
boolean foreign)
throws ValueFormatException
create in interface ReferenceFactoryValueFormatException
public Reference[] create(NodeKey[] values,
boolean foreign)
throws ValueFormatException
create in interface ReferenceFactoryValueFormatExceptionpublic Reference create(URI value)
ValueFactory
create in interface ValueFactory<Reference>value - the URI from which the value is to be created
public Reference create(byte[] value)
ValueFactory
create in interface ValueFactory<Reference>value - the content to be used to create the value
public Reference create(BinaryValue value)
throws ValueFormatException,
IoException
ValueFactory
create in interface ValueFactory<Reference>value - the binary object to be used to create the value
ValueFormatException - if the conversion from the binary object could not be performed
IoException - If an unexpected problem occurs while accessing the supplied binary value (such as an
IOException).
public Reference create(InputStream stream)
throws IoException
ValueFactory
create in interface ValueFactory<Reference>stream - the stream containing the content to be used to create the value
IoException - If an unexpected problem occurs while accessing the supplied stream (such as an IOException).protected Reference[] createEmptyArray(int length)
createEmptyArray in class AbstractValueFactory<Reference>
|
ModeShape Distribution 3.5.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||