com.sapportals.wcm.util.name

Class Name

java.lang.Object
  extended by com.sapportals.wcm.util.name.Name
All Implemented Interfaces:
IName, Serializable
Direct Known Subclasses:
Name, PropertyName

public class Name
extends Object
implements IName, Serializable

Generic class for the representation of namespace-qualified names.

Copyright (c) SAP AG 2001-2004

See Also:
Serialized Form

Constructor Summary
Name(String prefixedName)
          Deprecated. since NW04 SPS19 / NW04s SP10 - please use Name.get() instead
Name(String namespace, String name)
          Deprecated. since NW04 SPS19 / NW04s SP10 - please use Name.get() instead
 
Method Summary
 boolean equals(Object other)
           
 boolean equalsNode(Node node)
          Compare namespace name and local name with namespace and name of a DOM node.
static Name get(String prefixedName)
           
static Name get(String namespace, String name)
           
 String getName()
          return get the local name
 String getNamespace()
          Returns the namespace URI (a missing namespace is mapped to an empty string).
 String getNamespaceOrNull()
          Returns the namespace URI (a missing namespace is mapped to null ).
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Name

public Name(String namespace,
            String name)
Deprecated. since NW04 SPS19 / NW04s SP10 - please use Name.get() instead


Name

public Name(String prefixedName)
     throws Exception
Deprecated. since NW04 SPS19 / NW04s SP10 - please use Name.get() instead

Throws:
Exception
Method Detail

get

public static final Name get(String namespace,
                             String name)
Parameters:
namespace - namespaceUri. Note that both "" (the empty string) and null are internally treated identically (as a non-namespace-qualified name).
name - NCName TODO : implement

get

public static final Name get(String prefixedName)
                      throws Exception
Parameters:
prefixedName - namespace & name in {namespace}name format TODO : implement
Throws:
Exception

getNamespace

public final String getNamespace()
Description copied from interface: IName
Returns the namespace URI (a missing namespace is mapped to an empty string).

Specified by:
getNamespace in interface IName
Returns:
the namespace URI (or the empty string when no namespace was given)

getNamespaceOrNull

public final String getNamespaceOrNull()
Description copied from interface: IName
Returns the namespace URI (a missing namespace is mapped to null ). Use this function if the value is going to be passed to a XML DOM level 2 method.

Specified by:
getNamespaceOrNull in interface IName
Returns:
the namespace URI (or null when no namespace was given)

getName

public final String getName()
return get the local name

Specified by:
getName in interface IName
Returns:
name

equals

public final boolean equals(Object other)
Overrides:
equals in class Object

equalsNode

public boolean equalsNode(Node node)
Compare namespace name and local name with namespace and name of a DOM node.

Parameters:
node - DOM node to compare with
Returns:
whether both match

hashCode

public final int hashCode()
Overrides:
hashCode in class Object

toString

public final String toString()
Overrides:
toString in class Object
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice