org.apache.woden.wsdl20.fragids

## Class FragmentIdentifier

- java.lang.Object
- - org.apache.woden.wsdl20.fragids.FragmentIdentifier

-     public class FragmentIdentifier
      extends Object

  This Class extends the XPointer class to work with WSDL fragment identifiers which are WSDL XPointer in effect.
  Author:
    Dan Harvey (danharvey42@gmail.com) TODO Add methods to find WSDL component from the FragmentIdentifier. Add deserialisation code in a constructor with a String argument. (Pass this onto XPointer to do the work?)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FragmentIdentifier(ComponentPart wsdlPart)` Constructs a new empty Fragment Identifier

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `NCName` | `getXmlNamespacePrefix(QName qname)` Returns the prefix for the Xml namespace of the QName in the XPointer.
    `NCName` | `getXmlNamespacePrefix(String namespace)` Returns the prefix for the Xml namespace in the XPointer.
    `QName` | `prefixQNameNamespace(QName qname)` Returns a QName prefixed from the map of local namespaces and prefixes.
    `String` | `toString()` Returns a String serialisation of this fragment identifier.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FragmentIdentifier

          public FragmentIdentifier(ComponentPart wsdlPart)

      Constructs a new empty Fragment Identifier
      Parameters:
        `wsdlPart` - The WSDL2.0 component pointer part for this fragment identifier.

  - ### Method Detail

    - #### toString

          public String toString()

      Returns a String serialisation of this fragment identifier.
      Overrides:
        `toString` in class `Object`
      Returns:
        a String fragment identifier

    - #### getXmlNamespacePrefix

          public NCName getXmlNamespacePrefix(QName qname)

      Returns the prefix for the Xml namespace of the QName in the XPointer. If the namespace does not have a prefix in the XPointer it will create a new prefix with the prefix from the QName or one of the form nsXX and add a xmlns Pointer Part, then return that.
      Parameters:
        `qname` - The QName containing the namespace and a prefix.
      Returns:
        a NCName of the prefix for the namespace.

    - #### getXmlNamespacePrefix

          public NCName getXmlNamespacePrefix(String namespace)

      Returns the prefix for the Xml namespace in the XPointer. If the namespace does not have a prefix in the XPointer it will create a new prefix of the form nsXX and add a xmlns Pointer Part, then return that.
      Parameters:
        `namespace` - The namespace to get the prefix for.
      Returns:
        a NCName of the prefix for the namespace.

    - #### prefixQNameNamespace

          public QName prefixQNameNamespace(QName qname)

      Returns a QName prefixed from the map of local namespaces and prefixes. The namespace and localpart remain unchanged.
      Parameters:
        `qname` - the QName used to lookup the namespace and copy.
      Returns:
        a QName with the new prefix, but same namespace and localpart.

Copyright ? Apache Software Foundation. All Rights Reserved.