WebObjects 5.4.2

com.webobjects.appserver.parser.woml
Class WOMLDefaultNamespaceProvider

java.lang.Object
  extended by com.webobjects.appserver.parser.woml.WOMLDefaultNamespaceProvider
All Implemented Interfaces:
WOMLNamespaceProvider

public class WOMLDefaultNamespaceProvider
extends Object
implements WOMLNamespaceProvider

DefaultNamespaceProvider is a Map-based container for namespaces. It maintains a map of namespace id mappings to namespaces in the order in which they were added. The public getNamespacesById() method provides the Map for adding or removing namespaces. The WOMLNamespace.getNamespaces() method returns the collection of WOMLNamespace objects in the order in which they were added.


Constructor Summary
WOMLDefaultNamespaceProvider()
           
 
Method Summary
 void addNamespace(WOMLNamespace namespace)
           
 boolean containsNamespace(String namespace)
           
 WOMLNamespace getDefaultNamespace()
          Returns the default WOMLNamespace for the provider that will be used in the absence of another namespace in the provider that claims a particular declaration.
 WOMLNamespace getNamespace(String namespace)
           
 String getNamespaceId(WOMLNamespace namespace)
          Returns the namespace identifier of the given namespace.
 Collection getNamespaces()
          Returns a collection of all namespaces that the provider manages, in the order in which they should be used to contribute to declarations.
 Map getNamespacesById()
           
 void setDefaultNamespace(WOMLNamespace value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WOMLDefaultNamespaceProvider

public WOMLDefaultNamespaceProvider()
Method Detail

containsNamespace

public boolean containsNamespace(String namespace)
Parameters:
namespace -
Returns:

getNamespacesById

public Map getNamespacesById()

setDefaultNamespace

public void setDefaultNamespace(WOMLNamespace value)

addNamespace

public void addNamespace(WOMLNamespace namespace)

getDefaultNamespace

public WOMLNamespace getDefaultNamespace()
Description copied from interface: WOMLNamespaceProvider
Returns the default WOMLNamespace for the provider that will be used in the absence of another namespace in the provider that claims a particular declaration. The normal case for this is when the declared element has dynamic attributes that indicate an element should be generated but contains no identifying namespace or attribute that marks is specically (like wo:component). The provider must provide a default namespace. Do not confuse this with the namespace associated with the empty namespace (null).

Specified by:
getDefaultNamespace in interface WOMLNamespaceProvider
Returns:

getNamespace

public WOMLNamespace getNamespace(String namespace)
Specified by:
getNamespace in interface WOMLNamespaceProvider
Parameters:
namespace -
Returns:
See Also:
WOMLNamespaceProvider.getNamespace(java.lang.String)

getNamespaceId

public String getNamespaceId(WOMLNamespace namespace)
Description copied from interface: WOMLNamespaceProvider
Returns the namespace identifier of the given namespace. If the namespace is not contained in the provider this will throw IllegalArgumentException.

Specified by:
getNamespaceId in interface WOMLNamespaceProvider
Returns:

getNamespaces

public Collection getNamespaces()
Description copied from interface: WOMLNamespaceProvider
Returns a collection of all namespaces that the provider manages, in the order in which they should be used to contribute to declarations.

Specified by:
getNamespaces in interface WOMLNamespaceProvider
Returns:
Collection of namespaces

Last updated June 2008

Copyright © 2000-2008 Apple Inc.