SAP NetWeaver '04

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

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.util_api.jar]
java.lang.Object
  |
  +--com.sap.netweaver.bc.rf.util.flyweight.FlyWeight
        |
        +--com.sap.netweaver.bc.rf.util.namespace.Name
All Implemented Interfaces:
java.lang.Cloneable, IName, java.io.Serializable
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

Fields inherited from interface com.sap.netweaver.bc.rf.util.namespace.IName
NAMESPACE_SEPARATOR
 
Constructor Summary
protected Name(java.lang.String namespace, java.lang.String localName)
          Construct name based on given namespace and local name.
 
Method Summary
static void checkConstraints(java.lang.String namespace, java.lang.String localName)
          Check this name for illegal defintion and characters and throw exception when found.
static void checkLocalNameConstraints(java.lang.String localName)
          Check local name for illegal format and throw exception when found.
static void checkNamespaceConstraints(java.lang.String namespace)
          Check namespace for illegal format and throw exception when found.
 java.lang.String getFullName()
          Get full name, i.e. including namespace and local name.
 java.lang.String getLocalName()
          Get local name, i.e. the part behind the namespace.
static IName getName(java.lang.String fullName)
          Get name based on given full name, which is the namespace and the local name in {namespace}localName format.
static IName getName(java.lang.String namespace, java.lang.String localName)
          Get name based on given namespace and local name.
 java.lang.String getNamespace()
          Get namespace of the name or an empty string if there is no namespace within the name.
 java.lang.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(java.lang.String namespace,
               java.lang.String localName)
Construct name based on given namespace and local name.
Parameters:
namespace - namespace
localName - local name
Method Detail

getName

public static IName getName(java.lang.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(java.lang.String namespace,
                            java.lang.String localName)
Get name based on given namespace and local name.
Parameters:
namespace - namespace
localName - local name
Returns:
name

getFullName

public final java.lang.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 java.lang.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 java.lang.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 java.lang.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(java.lang.String namespace,
                                    java.lang.String localName)
                             throws java.lang.IllegalArgumentException
Check this name for illegal defintion and characters and throw exception when found.
Parameters:
namespace - namespace
localName - local name
Throws:
java.lang.IllegalArgumentException - when the name contains illegal characters

checkNamespaceConstraints

public static void checkNamespaceConstraints(java.lang.String namespace)
                                      throws java.lang.IllegalArgumentException
Check namespace for illegal format and throw exception when found.
Parameters:
namespace - namespace
Throws:
java.lang.IllegalArgumentException - when namespace is in illegal format

checkLocalNameConstraints

public static void checkLocalNameConstraints(java.lang.String localName)
                                      throws java.lang.IllegalArgumentException
Check local name for illegal format and throw exception when found.
Parameters:
localName - local name
Throws:
java.lang.IllegalArgumentException - when local name is in illegal format

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.