|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.graph.property.basic.AbstractValueFactory<Reference> org.modeshape.graph.property.basic.ReferenceValueFactory
@Immutable public class ReferenceValueFactory
The standard ValueFactory
for PropertyType.REFERENCE
values.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.modeshape.graph.property.basic.AbstractValueFactory |
---|
AbstractValueFactory.ConvertingIterator<ValueType> |
Field Summary |
---|
Fields inherited from interface org.modeshape.graph.property.ValueFactory |
---|
DEFAULT_DECODER, DEFAULT_ENCODER |
Constructor Summary | |
---|---|
ReferenceValueFactory(TextDecoder decoder,
ValueFactory<String> stringValueFactory,
boolean weak)
|
Method Summary | |
---|---|
Reference |
create(BigDecimal value)
Create a value from a decimal. |
Reference |
create(Binary 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,
long approximateLength)
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(Path.Segment value)
Create a value from a path segment. |
Reference |
create(Path value)
Create a value from a path. |
Reference |
create(Reader reader,
long approximateLength)
Create a value from a the binary content given by the supplied reader. |
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)
|
Methods inherited from class org.modeshape.graph.property.basic.AbstractValueFactory |
---|
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.graph.property.ValueFactory |
---|
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getPropertyType |
Constructor Detail |
---|
public ReferenceValueFactory(TextDecoder decoder, ValueFactory<String> stringValueFactory, boolean weak)
Method Detail |
---|
public Reference create(String value)
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)
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)
create
in interface ValueFactory<Reference>
value
- the integer from which the value is to be created
public Reference create(long value)
create
in interface ValueFactory<Reference>
value
- the string from which the long is to be created
public Reference create(boolean value)
create
in interface ValueFactory<Reference>
value
- the boolean from which the value is to be created
public Reference create(float value)
create
in interface ValueFactory<Reference>
value
- the float from which the value is to be created
public Reference create(double value)
create
in interface ValueFactory<Reference>
value
- the double from which the value is to be created
public Reference create(BigDecimal value)
create
in interface ValueFactory<Reference>
value
- the decimal from which the value is to be created
public Reference create(Calendar value)
create
in interface ValueFactory<Reference>
value
- the Calendar instance from which the value is to be created
public Reference create(Date value)
create
in interface ValueFactory<Reference>
value
- the date from which the value is to be created
public Reference create(DateTime value) throws ValueFormatException
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 performedValueFactory.create(org.modeshape.graph.property.DateTime)
public Reference create(Name value)
create
in interface ValueFactory<Reference>
value
- the name from which the value is to be created
public Reference create(Path value)
create
in interface ValueFactory<Reference>
value
- the path from which the value is to be created
public Reference create(Path.Segment value)
create
in interface ValueFactory<Reference>
value
- the path segment from which the value is to be created
public Reference create(Reference value)
create
in interface ValueFactory<Reference>
value
- the reference from which the value is to be created
public Reference create(UUID value)
create
in interface ValueFactory<Reference>
value
- the UUID from which the value is to be created
ValueFactory.create(java.util.UUID)
public Reference create(URI value)
create
in interface ValueFactory<Reference>
value
- the URI from which the value is to be created
public Reference create(byte[] value)
create
in interface ValueFactory<Reference>
value
- the content to be used to create the value
public Reference create(Binary value) throws ValueFormatException, IoException
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
).ValueFactory.create(org.modeshape.graph.property.Binary)
public Reference create(InputStream stream, long approximateLength) throws IoException
create
in interface ValueFactory<Reference>
stream
- the stream containing the content to be used to create the valueapproximateLength
- the approximate length of the content (in bytes)
IoException
- If an unexpected problem occurs while accessing the supplied stream (such as an IOException
).public Reference create(Reader reader, long approximateLength) throws IoException
create
in interface ValueFactory<Reference>
reader
- the reader containing the content to be used to create the valueapproximateLength
- the approximate length of the content (in bytes)
IoException
- If an unexpected problem occurs while accessing the supplied reader (such as an IOException
).protected Reference[] createEmptyArray(int length)
createEmptyArray
in class AbstractValueFactory<Reference>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |