Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.graph.property.basic
Class BasicName

    java.lang.Object
      org.modeshape.graph.property.basic.BasicName

All Implemented Interfaces:
  Serializable, Comparable<Name>, Name, Readable

    @Immutable
    public class BasicName

extends Object
implements Name

A basic implementation of `Name`.

See Also:
  Serialized Form

Constructor Summary
`BasicName(String namespaceUri, String localName)`

Method Summary
`int` | `compareTo(Name that)`
`boolean` | `equals(Object obj)`
`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 object.
`String` | `getString(NamespaceRegistry namespaceRegistry)` Get the string form of the object, using the supplied namespace registry to convert any namespace URIs to prefixes.
`String` | `getString(NamespaceRegistry namespaceRegistry, TextEncoder encoder)` Get the encoded string form of the object, using the supplied namespace registry to convert the any namespace URIs to prefixes.
`String` | `getString(NamespaceRegistry namespaceRegistry, TextEncoder encoder, TextEncoder delimiterEncoder)` Get the encoded string form of the object, using the supplied namespace registry to convert the names' namespace URIs to prefixes and the supplied encoder to encode characters, and using the second delimiter to encode (or convert) the delimiter used between the namespace prefix and the local part of any names.
`String` | `getString(TextEncoder encoder)` Get the encoded string form of the object, using the supplied encoder to encode characters.
`int` | `hashCode()`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BasicName

    public BasicName(String namespaceUri,
                     String localName)

Method Detail

### getLocalName

    public String getLocalName()

  Get the local name part of this qualified name.

  Specified by:
    `getLocalName` in interface `Name`
  Returns:
    the local name; never null

### getNamespaceUri

    public String getNamespaceUri()

  Get the URI for the namespace used in this qualified name.

  Specified by:
    `getNamespaceUri` in interface `Name`
  Returns:
    the URI; never null but possibly empty

### getString

    public String getString()

  Get the string form of the object. A `default encoder` is used to encode characters.

  Specified by:
    `getString` in interface `Readable`
  Returns:
    the encoded string
  See Also:
    `Readable.getString(TextEncoder)`

### getString

    public String getString(TextEncoder encoder)

  Get the encoded string form of the object, using the supplied encoder to encode characters.

  Specified by:
    `getString` in interface `Readable`
  Parameters:
    `encoder` - the encoder to use, or null if the `default encoder` should be used
  Returns:
    the encoded string
  See Also:
    `Readable.getString()`

### getString

    public String getString(NamespaceRegistry namespaceRegistry)

  Get the string form of the object, using the supplied namespace registry to convert any namespace URIs to prefixes. A `default encoder` is used to encode characters.

  Specified by:
    `getString` in interface `Readable`
  Parameters:
    `namespaceRegistry` - the namespace registry that should be used to obtain the prefix for any namespace URIs
  Returns:
    the encoded string
  See Also:
    `Readable.getString(NamespaceRegistry,TextEncoder)`

### getString

    public String getString(NamespaceRegistry namespaceRegistry,
                            TextEncoder encoder)

  Get the encoded string form of the object, using the supplied namespace registry to convert the any namespace URIs to prefixes.

  Specified by:
    `getString` in interface `Readable`
  Parameters:
    `namespaceRegistry` - the namespace registry that should be used to obtain the prefix for the namespace URIs
    `encoder` - the encoder to use, or null if the `default encoder` should be used
  Returns:
    the encoded string
  See Also:
    `Readable.getString(NamespaceRegistry)`

### getString

    public String getString(NamespaceRegistry namespaceRegistry,
                            TextEncoder encoder,
                            TextEncoder delimiterEncoder)

  Get the encoded string form of the object, using the supplied namespace registry to convert the names' namespace URIs to prefixes and the supplied encoder to encode characters, and using the second delimiter to encode (or convert) the delimiter used between the namespace prefix and the local part of any names.

  Specified by:
    `getString` in interface `Readable`
  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 of any names, 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 of any names, or null if the standard delimiter should be used
  Returns:
    the encoded string
  See Also:
    `Readable.getString(org.modeshape.graph.property.NamespaceRegistry, org.modeshape.common.text.TextEncoder, org.modeshape.common.text.TextEncoder)`

### compareTo

    public int compareTo(Name that)

  Specified by:
    `compareTo` in interface `Comparable<Name>`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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