org.andromda.core.configuration
Class Namespace

java.lang.Object
  extended by org.andromda.core.configuration.Namespace
All Implemented Interfaces:
Serializable

public class Namespace
extends Object
implements Serializable

A configurable namespace object. These are passed to Plugin instances (Cartridges, etc.).

Author:
Chad Brandon
See Also:
Serialized Form

Constructor Summary
Namespace()
           
 
Method Summary
 void addProperty(Property property)
          Adds a property to this Namespace object.
 String getName()
          Returns name of this Namespace.
 Collection<Collection<Property>> getProperties()
          Gets all namespaces belonging to this namespaces instance.
 Collection<Property> getProperties(String name)
          Retrieves the properties with the specified name.
 Property getProperty(String name)
          Retrieves the property (the first one found) with the specified name.
 void setName(String name)
          Sets the name of this Namespace.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Namespace

public Namespace()
Method Detail

getName

public String getName()
Returns name of this Namespace. Will correspond to a Plugin name (or it can be be 'default' if we want it's settings to be used everywhere).

Returns:
String

setName

public void setName(String name)
Sets the name of this Namespace.

Parameters:
name - The name to set

addProperty

public void addProperty(Property property)
Adds a property to this Namespace object. A property must correspond to a java bean property name on a Plugin in order for it to be set during processing. Otherwise the property will just be ignored.

Parameters:
property - the property to add to this namespace.

getProperties

public Collection<Property> getProperties(String name)
Retrieves the properties with the specified name.

Parameters:
name - the name of the property.
Returns:
the property

getProperty

public Property getProperty(String name)
Retrieves the property (the first one found) with the specified name.

Parameters:
name - the name of the property.
Returns:
the property

getProperties

public Collection<Collection<Property>> getProperties()
Gets all namespaces belonging to this namespaces instance.

Returns:
all namespaces.

toString

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


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