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

Class Name

java.lang.Object
  extended bycom.sap.netweaver.bc.rf.util.flyweight.FlyWeight
      extended bycom.sap.netweaver.bc.rf.util.namespace.Name
All Implemented Interfaces:
Cloneable, IName, 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

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


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. 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.