org.andromda.core.namespace
Class NamespaceRegistry

java.lang.Object
  extended by org.andromda.core.namespace.NamespaceRegistry

public class NamespaceRegistry
extends java.lang.Object

Represents a namespace registry. This is where all components within a namespace are registered.

Author:
Chad Brandon

Constructor Summary
NamespaceRegistry()
           
 
Method Summary
 void addPropertyDefinition(PropertyDefinition propertyDefinition)
          Adds a property definition to the group of defintions.
 void addPropertyDefinitions(PropertyDefinition[] propertyDefinitions)
          Adds all property definitions to the current property definitions.
 java.lang.String getName()
          Gets the name of the namespace registry.
 java.lang.String[] getPaths(java.lang.String name)
          Gets the initialization paths for the given component name.
 PropertyDefinition getPropertyDefinition(java.lang.String name)
          Attempts to retrieve the property definition for the given name.
 PropertyDefinition[] getPropertyDefinitions()
          Gets all property definitions belonging to this registry.
 java.lang.String[] getRegisteredComponents()
          Gets the names registered components.
 java.net.URL[] getResourceRoots()
          Gets the resource root of this namespace.
 boolean isShared()
          Gets whether or not the namespace defined by this registry is shared.
 void registerComponent(Component component)
          Registers the component with the give name in this registry.
 void setName(java.lang.String name)
          SEts the name of the namespace registry.
 void setShared(boolean shared)
          Sets whether or not the namespace defined by this registry is shared.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamespaceRegistry

public NamespaceRegistry()
Method Detail

getName

public java.lang.String getName()
Gets the name of the namespace registry.

Returns:
Returns the name.

setName

public void setName(java.lang.String name)
SEts the name of the namespace registry.

Parameters:
name - The name to set.

isShared

public boolean isShared()
Gets whether or not the namespace defined by this registry is shared. By default namespaces are NOT shared.

Returns:
Returns the shared.

setShared

public void setShared(boolean shared)
Sets whether or not the namespace defined by this registry is shared.

Parameters:
shared - The shared to set.

registerComponent

public void registerComponent(Component component)
Registers the component with the give name in this registry.

Parameters:
component - the component of the registry.

getRegisteredComponents

public java.lang.String[] getRegisteredComponents()
Gets the names registered components.

Returns:
the names of the registered components.

getPaths

public java.lang.String[] getPaths(java.lang.String name)
Gets the initialization paths for the given component name.

Parameters:
name - the name of the component.
Returns:
the paths or null if none are found.

getPropertyDefinition

public PropertyDefinition getPropertyDefinition(java.lang.String name)
Attempts to retrieve the property definition for the given name.

Returns:
the property definition or null if one could not be found.

addPropertyDefinitions

public void addPropertyDefinitions(PropertyDefinition[] propertyDefinitions)
Adds all property definitions to the current property definitions.

Parameters:
propertyDefinitions - the collection of property definitions.

getPropertyDefinitions

public PropertyDefinition[] getPropertyDefinitions()
Gets all property definitions belonging to this registry.

Returns:
all property definitions.

addPropertyDefinition

public void addPropertyDefinition(PropertyDefinition propertyDefinition)
Adds a property definition to the group of defintions.

Parameters:
propertyDefinition - the property definition.

getResourceRoots

public java.net.URL[] getResourceRoots()
Gets the resource root of this namespace.

Returns:
Returns the resource.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2003-2008 AndroMDA.org. All Rights Reserved.