ModeShape Distribution 3.2.0.Final

org.modeshape.jcr.value.basic
Class NodeIdentifierReferenceFactory

java.lang.Object
  extended by org.modeshape.jcr.value.basic.AbstractValueFactory<Reference>
      extended by org.modeshape.jcr.value.basic.ReferenceValueFactory
          extended by org.modeshape.jcr.value.basic.NodeIdentifierReferenceFactory
All Implemented Interfaces:
ReferenceFactory, ValueFactory<Reference>

public class NodeIdentifierReferenceFactory
extends ReferenceValueFactory

A custom ReferenceValueFactory specialization that knows about a particular workspace, used to handle conversion from Node.getIdentifier() strings, including those that are local (e.g., not foreign) and thus don't have the source part and workspace part.

See Also:
JcrSession

Nested Class Summary
 
Nested classes/interfaces inherited from class org.modeshape.jcr.value.basic.AbstractValueFactory
AbstractValueFactory.ConvertingIterator<ValueType>
 
Field Summary
 
Fields inherited from class org.modeshape.jcr.value.basic.ReferenceValueFactory
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
NodeIdentifierReferenceFactory(NodeKey rootKey, TextDecoder decoder, ValueFactories factories, boolean weak)
           
 
Method Summary
 Reference create(String value)
          Create a value from a string, using no decoding.
 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.ReferenceValueFactory
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, createEmptyArray
 
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, 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, getPropertyType
 

Constructor Detail

NodeIdentifierReferenceFactory

public NodeIdentifierReferenceFactory(NodeKey rootKey,
                                      TextDecoder decoder,
                                      ValueFactories factories,
                                      boolean weak)
Parameters:
rootKey -
decoder -
factories -
weak -
Method Detail

create

public Reference create(String value)
Description copied from interface: ValueFactory
Create a value from a string, using no decoding.

Specified by:
create in interface ValueFactory<Reference>
Overrides:
create in class ReferenceValueFactory
Parameters:
value - the string from which the value is to be created
Returns:
the value, or null if the supplied string is null
See Also:
ValueFactory.create(String, TextDecoder)

with

public ReferenceFactory with(ValueFactories valueFactories)
Description copied from interface: ValueFactory
Return a potentially new copy of this factory that uses the supplied ValueFactories object.

Specified by:
with in interface ReferenceFactory
Specified by:
with in interface ValueFactory<Reference>
Overrides:
with in class ReferenceValueFactory
Parameters:
valueFactories - the value factories object; may not be null
Returns:
the factory, which may be a new instance or may be this object if the supplied value factories is the same as used by this factory; never null

ModeShape Distribution 3.2.0.Final

Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.