com.sap.netweaver.bc.rf.util.namespace

Class Name

java.lang.Object
  extended by com.sap.netweaver.bc.rf.util.flyweight.FlyWeight
      extended by com.sap.netweaver.bc.rf.util.namespace.Name
All Implemented Interfaces:
IName, Serializable, Cloneable
Direct Known Subclasses:
PropertyName

public class Name
extends FlyWeight
implements IName

Class implementing a namespace-qualified name with a namespace prefix. Please see here .

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.sap.netweaver.bc.rf.util.namespace.IName
NAMESPACE_SEPARATOR
 
Constructor Summary
protected Name(String namespace, String localName)
          Construct name based on given namespace and local name.
 
Method Summary
static void checkConstraints(String namespace, String localName)
          Check this name for illegal defintion and characters and throw exception when found.
static void checkLocalNameConstraints(String localName)
          Check local name for illegal format and throw exception when found.
static void checkNamespaceConstraints(String namespace)
          Check namespace for illegal format and throw exception when found.
 String getFullName()
          Get full name, i.e. including namespace and local name.
 String getLocalName()
          Get local name, i.e. the part behind the namespace.
static IName getName(String fullName)
          Get name based on given full name, which is the namespace and the local name in {namespace}localName format.
static IName getName(String namespace, String localName)
          Get name based on given namespace and local name.
 String getNamespace()
          Get namespace of the name or an empty string if there is no namespace within the name.
 String getNamespaceOrNull()
          Get namespace of the name or null if there is no namespace within the name, e.g. used when the value is going to be passed to a XML DOM level 2 method.
 
Methods inherited from class com.sap.netweaver.bc.rf.util.flyweight.FlyWeight
clone, equals, getAllFlyWeights, getAllFlyWeightsInherited, getFlyWeight, getFlyWeightId, getFlyWeightInherited, hashCode, removeAllFlyWeights, removeAllFlyWeightsInherited, removeFlyWeight, removeFlyWeightInherited, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Name

protected Name(String namespace,
               String localName)
Construct name based on given namespace and local name.

Parameters:
namespace - namespace
localName - local name
Method Detail

getName

public static IName getName(String fullName)
Get name based on given full name, which is the namespace and the local name in {namespace}localName format.

Parameters:
fullName - namespace and local name as full name
Returns:
name

getName

public static IName getName(String namespace,
                            String localName)
Get name based on given namespace and local name.

Parameters:
namespace - namespace
localName - local name
Returns:
name

getFullName

public final String getFullName()
Get full name, i.e. including namespace and local name.

Specified by:
getFullName in interface IName
Returns:
full name, i.e. including namespace and local name

getLocalName

public final String getLocalName()
Get local name, i.e. the part behind the namespace.

Specified by:
getLocalName in interface IName
Returns:
local name, i.e. the part behind the namespace.

getNamespace

public final String getNamespace()
Get namespace of the name or an empty string if there is no namespace within the name.

Specified by:
getNamespace in interface IName
Returns:
namespace of the name or an empty string if there is no namespace within the name

getNamespaceOrNull

public final String getNamespaceOrNull()
Get namespace of the name or null if there is no namespace within the name, e.g. used when the value is going to be passed to a XML DOM level 2 method.

Specified by:
getNamespaceOrNull in interface IName
Returns:
namespace of the name or null if there is no namespace within the name

checkConstraints

public static void checkConstraints(String namespace,
                                    String localName)
                             throws IllegalArgumentException
Check this name for illegal defintion and characters and throw exception when found.

Parameters:
namespace - namespace
localName - local name
Throws:
IllegalArgumentException - when the name contains illegal characters

checkNamespaceConstraints

public static void checkNamespaceConstraints(String namespace)
                                      throws IllegalArgumentException
Check namespace for illegal format and throw exception when found.

Parameters:
namespace - namespace
Throws:
IllegalArgumentException - when namespace is in illegal format

checkLocalNameConstraints

public static void checkLocalNameConstraints(String localName)
                                      throws IllegalArgumentException
Check local name for illegal format and throw exception when found.

Parameters:
localName - local name
Throws:
IllegalArgumentException - when local name is in illegal format
Access Rights

This class can be accessed from:


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


Copyright 2011 SAP AG Complete Copyright Notice