org.andromda.metafacades.uml
Class TypeMappings

java.lang.Object
  extended byorg.andromda.metafacades.uml.TypeMappings

public class TypeMappings
extends Object

An object responsible for mapping types in the object model to other language identifiers/types. (For example, Java, SQL, Jdbc, etc). Basically just wraps the core Mappings instance in order to provide type specific mapping functionality.

Author:
Chad Brandon

Method Summary
static TypeMappings getInstance(org.andromda.core.mapping.Mappings mappings)
          Returns a new configured instance of this TypeMappings configured from the mappings instance.
static TypeMappings getInstance(String mappingsUri)
          Returns a new configured instance of this TypeMappings configured from the mappings instance.
 org.andromda.core.mapping.Mappings getMappings()
          Returns the Mappings instance which this TypeMapping wraps.
 String getTo(String from)
          Returns the to mapping from a given from mapping.
 void setArraySuffix(String arraySuffix)
          Sets the optional suffix used for array types (if
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setArraySuffix

public void setArraySuffix(String arraySuffix)
Sets the optional suffix used for array types (if

Parameters:
arraySuffix - the suffix used for arrays within this mapping.

getInstance

public static TypeMappings getInstance(org.andromda.core.mapping.Mappings mappings)
Returns a new configured instance of this TypeMappings configured from the mappings instance.

Parameters:
mappings - the Mappings instance.
Returns:
TypeMappings the configured TypeMappings instance.

getInstance

public static TypeMappings getInstance(String mappingsUri)
Returns a new configured instance of this TypeMappings configured from the mappings instance.

Parameters:
mappingsUri - the URI to configure the underlying Mappings instance.
Returns:
TypeMappings the configured TypeMappings instance.
Throws:
MalformedURLException - when the mappingsUri is invalid (not a valid URL).

getTo

public String getTo(String from)
Returns the to mapping from a given from mapping.

Parameters:
from - the from mapping, this is the type/identifier that is in the model.
Returns:
String to the to mapping (this is the mapping that can be retrieved if a corresponding 'from' is found.

getMappings

public org.andromda.core.mapping.Mappings getMappings()
Returns the Mappings instance which this TypeMapping wraps.

Returns:
URL


Copyright © 2003-2006 The AndroMDA Team. All Rights Reserved.