ModeShape Distribution 3.1.0.Final

org.modeshape.jcr.value
Interface NameFactory

All Superinterfaces:
ValueFactory<Name>
All Known Implementing Classes:
NameValueFactory

@ThreadSafe
public interface NameFactory
extends ValueFactory<Name>

A factory for creating names.


Nested Class Summary
static interface NameFactory.Holder
           
 
Field Summary
 
Fields inherited from interface org.modeshape.jcr.value.ValueFactory
DEFAULT_DECODER, DEFAULT_ENCODER
 
Method Summary
 Name create(String namespaceUri, String localName)
          Create a name from the given namespace URI and local name.
 Name create(String namespaceUri, String localName, TextDecoder decoder)
          Create a name from the given namespace URI and local name.
 NamespaceRegistry getNamespaceRegistry()
          Get the namespace registry.
 NameFactory with(NamespaceRegistry.Holder namespaceRegistryHolder)
          Return a potentially new copy of this factory that uses the supplied NamespaceRegistry.Holder object.
 NameFactory with(ValueFactories valueFactories)
          Return a potentially new copy of this factory that uses the supplied ValueFactories object.
 
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, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getPropertyType
 

Method Detail

with

NameFactory 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 ValueFactory<Name>
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

with

NameFactory with(NamespaceRegistry.Holder namespaceRegistryHolder)
Return a potentially new copy of this factory that uses the supplied NamespaceRegistry.Holder object.

Parameters:
namespaceRegistryHolder - the holder of the namespace registry; may not be null
Returns:
the factory, which may be a new instance or may be this object if the supplied namespace registry holder is the same as used by this factory; never null

create

Name create(String namespaceUri,
            String localName)
Create a name from the given namespace URI and local name.

This method is equivalent to calling create(String, String, TextDecoder) with a null encoder.

Parameters:
namespaceUri - the namespace URI
localName - the local name
Returns:
the new name
Throws:
IllegalArgumentException - if the local name is null or empty

create

Name create(String namespaceUri,
            String localName,
            TextDecoder decoder)
Create a name from the given namespace URI and local name.

Parameters:
namespaceUri - the namespace URI
localName - the local name
decoder - the decoder that should be used to decode the qualified name
Returns:
the new name
Throws:
IllegalArgumentException - if the local name is null or empty

getNamespaceRegistry

NamespaceRegistry getNamespaceRegistry()
Get the namespace registry.

Returns:
the namespace registry; never null

ModeShape Distribution 3.1.0.Final

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