org.jboss.dna.graph.properties
Interface Name

All Superinterfaces:
Comparable<Name>, Serializable
All Known Implementing Classes:
BasicName

@Immutable
public interface Name
extends Comparable<Name>, Serializable

A qualified name consisting of a namespace and a local name.

Author:
Randall Hauch

Method Summary
 String getLocalName()
          Get the local name part of this qualified name.
 String getNamespaceUri()
          Get the URI for the namespace used in this qualified name.
 String getString()
          Get the string form of the name.
 String getString(NamespaceRegistry namespaceRegistry)
          Get the string form of the name, using the supplied namespace registry to convert the namespace URI to a prefix.
 String getString(NamespaceRegistry namespaceRegistry, TextEncoder encoder)
          Get the encoded string form of the name, using the supplied namespace registry to convert the namespace URI to a prefix.
 String getString(NamespaceRegistry namespaceRegistry, TextEncoder encoder, TextEncoder delimiterEncoder)
          Get the encoded string form of the name, using the supplied namespace registry to convert the names' namespace URIs to prefixes and the supplied encoder to encode characters in each of the path segments, and using the second delimiter to encode (or convert) the delimiter used between the namespace prefix and the local part.
 String getString(TextEncoder encoder)
          Get the encoded string form of the name, using the supplied encoder to encode characters in the local name and namespace.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getLocalName

String getLocalName()
Get the local name part of this qualified name.

Returns:
the local name; never null

getNamespaceUri

String getNamespaceUri()
Get the URI for the namespace used in this qualified name.

Returns:
the URI; never null but possibly empty

getString

String getString()
Get the string form of the name. The default encoder is used to encode characters in the local name and namespace.

Returns:
the encoded string
See Also:
getString(TextEncoder)

getString

String getString(TextEncoder encoder)
Get the encoded string form of the name, using the supplied encoder to encode characters in the local name and namespace.

Parameters:
encoder - the encoder to use, or null if the default encoder should be used
Returns:
the encoded string
See Also:
getString()

getString

String getString(NamespaceRegistry namespaceRegistry)
Get the string form of the name, using the supplied namespace registry to convert the namespace URI to a prefix. The default encoder is used to encode characters in each of the path segments.

Parameters:
namespaceRegistry - the namespace registry that should be used to obtain the prefix for the namespace URI
Returns:
the encoded string
Throws:
IllegalArgumentException - if the namespace registry is null
See Also:
getString(NamespaceRegistry,TextEncoder)

getString

String getString(NamespaceRegistry namespaceRegistry,
                 TextEncoder encoder)
Get the encoded string form of the name, using the supplied namespace registry to convert the namespace URI to a prefix.

Parameters:
namespaceRegistry - the namespace registry that should be used to obtain the prefix for the namespace URI
encoder - the encoder to use, or null if the default encoder should be used
Returns:
the encoded string
Throws:
IllegalArgumentException - if the namespace registry is null
See Also:
getString(NamespaceRegistry)

getString

String getString(NamespaceRegistry namespaceRegistry,
                 TextEncoder encoder,
                 TextEncoder delimiterEncoder)
Get the encoded string form of the name, using the supplied namespace registry to convert the names' namespace URIs to prefixes and the supplied encoder to encode characters in each of the path segments, and using the second delimiter to encode (or convert) the delimiter used between the namespace prefix and the local part.

Parameters:
namespaceRegistry - the namespace registry that should be used to obtain the prefix for the namespace URIs in the segment names
encoder - the encoder to use for encoding the local part and namespace prefix, or null if the default encoder should be used
delimiterEncoder - the encoder to use for encoding the delimiter between the local part and namespace prefix, or null if the standard delimiter should be used
Returns:
the encoded string
See Also:
getString(NamespaceRegistry), getString(NamespaceRegistry, TextEncoder)


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