org.andromda.core.profile
Class Profile

java.lang.Object
  extended by org.andromda.core.namespace.BaseNamespaceComponent
      extended by org.andromda.core.profile.Profile
All Implemented Interfaces:
java.io.Serializable, NamespaceComponent

public class Profile
extends BaseNamespaceComponent
implements java.io.Serializable

Represents an AndroMDA profile applied to a model. Profiles allow us to extend aspects of a model.

Author:
Chad Brandon
See Also:
Serialized Form

Constructor Summary
Profile()
           
 
Method Summary
 void addElement(java.lang.String name, java.lang.String value)
          Adds a new element to this namespace registry.
 void addElement(java.lang.String namespace, java.lang.String name, java.lang.String value)
          Adds a namespace element for the given namespace with the given name and value.
 java.lang.String get(java.lang.String name)
          Gets the profile value (if one is available) for the given name, otherwise returns name.
 void initialize()
          Initializes this profile instance.
static Profile instance()
          Gets the shared instance of this class.
 void refresh()
          Refreshes the profile instance.
 void shutdown()
          Shuts down the shared instance and releases any used resources.
 
Methods inherited from class org.andromda.core.namespace.BaseNamespaceComponent
getNamespace, getResource, setNamespace, setResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Profile

public Profile()
Method Detail

instance

public static Profile instance()
Gets the shared instance of this class.

Returns:
the shared instance.

addElement

public void addElement(java.lang.String name,
                       java.lang.String value)
Adds a new element to this namespace registry.


get

public java.lang.String get(java.lang.String name)
Gets the profile value (if one is available) for the given name, otherwise returns name.

Parameters:
name - the profile name to retrieve.
Returns:
the value.

initialize

public void initialize()
Initializes this profile instance.


refresh

public void refresh()
Refreshes the profile instance.


addElement

public void addElement(java.lang.String namespace,
                       java.lang.String name,
                       java.lang.String value)
Adds a namespace element for the given namespace with the given name and value.

Parameters:
namespace - the namespace for which to add the namespace element.
name - the element name.
value - the element value.

shutdown

public void shutdown()
Shuts down the shared instance and releases any used resources.



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