Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.datatypes
Class QualifiedName

    java.lang.Object
      org.deegree.datatypes.QualifiedName

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  CoordinateSystem

    public class QualifiedName

extends Object
implements Serializable

This class represent a qualified name for something. A name is thought to be built from an optional prefix and/or a local name E.g.:
- deegree - pre:deegree
a name may be located within a namespace assigned to the names prefix (or as default namespace if the name has not prefix).

Version:
  $Revision: 21574 $, $Date: 2009-12-21 16:37:50 +0100 (Mo, 21. Dez 2009) $
Author:
  Andreas Poth , last edited by: $Author: apoth $
See Also:
  Serialized Form

Constructor Summary
`QualifiedName(QName name)` Creates a new `QualifiedName` instance from a `QName`
`QualifiedName(String name)`
`QualifiedName(String prefix, String localName, URI namespace)`
`QualifiedName(String name, URI namespace)`

Method Summary
`boolean` | `equals(Object o)`
`String` | `getAsString()` Deprecated. use
`String` | `getFormattedString()`
`String` | `getLocalName()` returns the local part of the name
`URI` | `getNamespace()` returns the namespace the name is located within (may be null)
`String` | `getPrefix()` returns the names prefix
`String` | `getPrefixedName()` returns a string representation of a QualifiedName. prefix and local name are separated by ':'.
`int` | `hashCode()`
`boolean` | `isInNamespace(URI ns)`
`String` | `toString()`

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

Constructor Detail

### QualifiedName

    public QualifiedName(QName name)

  Creates a new `QualifiedName` instance from a `QName`

  Parameters:
    `name` -

### QualifiedName

    public QualifiedName(String name)

Parameters:
  `name` - local name/simple (without prefix)

### QualifiedName

    public QualifiedName(String name,
                         URI namespace)

Parameters:
  `name` - complete name including a prefix
  `namespace` - namespace the name is located within

### QualifiedName

    public QualifiedName(String prefix,
                         String localName,
                         URI namespace)

Parameters:
  `prefix` -
  `localName` - local/simple name (e.g. deegree)
  `namespace` - namespace the name is located within

Method Detail

### getAsString

    @Deprecated
    public String getAsString()

  Deprecated. use

  returns a string representation of a QualifiedName. prefix and local name are separated by ':'

  Returns:
    string representation of a QualifiedName
  See Also:
    `or`, `instead`

### getPrefixedName

    public String getPrefixedName()

  returns a string representation of a QualifiedName. prefix and local name are separated by ':'. If the Prefix is null, the sole localname will be returned.

  Returns:
    string representation of a QualifiedName

### getFormattedString

    public String getFormattedString()

  Returns:
    a QualifiedName as a formatted string. If a QualifiedName has a namespace the returned format is:
    {namespace}:localName.
    Otherwise just a String representation of this qualified name will be returned. Which means, that if the prefix is not null (allthough not bound to namespace) the result String will be:
    PRE_FIX:localName.
    If the Prefix is null, the sole localname will be returned.

### getPrefix

    public String getPrefix()

  returns the names prefix

  Returns:
    the names prefix

### getLocalName

    public String getLocalName()

  returns the local part of the name

  Returns:
    the local part of the name

### getNamespace

    public URI getNamespace()

  returns the namespace the name is located within (may be null)

  Returns:
    the namespace the name is located within (may be null)

### isInNamespace

    public boolean isInNamespace(URI ns)

  Parameters:
    `ns` - the namespace to checkfor
  Returns:
    true if the given namespace equals this qualified name's namespace. If the given ns is null and the namespace is null, this method will also return true.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org