|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.andromda.core.mapping.Mappings
public class Mappings
An object responsible for mapping multiple from values to
single to. The public constructor should NOT be used to
construct this instance. An instance of this object should be retrieved
through the method getInstance(java.net.URL).
The mappings will change based upon the language, database, etc being used.
XmlObjectFactory| Constructor Summary | |
|---|---|
Mappings()
|
|
| Method Summary | |
|---|---|
static void |
addLogicalMappings(java.net.URL mappingsUri)
Adds a mapping to the globally available mappings, these are used by this class to instantiate mappings from logical names as opposed to physical names. |
void |
addMapping(Mapping mapping)
Adds a Mapping object to the set of current mappings. |
void |
addMappings(Mappings mappings)
Adds the mappings instance to this Mappings instance
overriding any mappings with duplicate names. |
static void |
clearLogicalMappings()
Clears the entries from the logical mappings cache. |
boolean |
containsFrom(java.lang.String from)
Returns true if the mapping contains the from value |
static Mappings |
getInstance(java.lang.String mappingsUri)
Returns a new configured instance of this Mappings configured from the mappings configuration URI string. |
static Mappings |
getInstance(java.net.URL mappingsUri)
Returns a new configured instance of this Mappings configured from the mappings configuration URI. |
Mapping |
getMapping(java.lang.String from)
Gets the mapping having the given from. |
java.util.Collection |
getMappings()
Gets all Mapping instances for for this Mappings instance. |
java.lang.String |
getName()
Returns the name name (this is the name for which the type mappings are for). |
java.net.URL |
getResource()
Returns the resource URI from which this Mappings object was loaded. |
java.lang.String |
getTo(java.lang.String from)
Returns the to mapping from a given from
mapping. |
static void |
initializeLogicalMappings()
This initializes all logical mappings that are contained with global Mapping set. |
void |
setExtendsUri(java.lang.String extendsUri)
Sets the name of the mappings which this instance extends. |
void |
setName(java.lang.String name)
Sets the name name. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Mappings()
| Method Detail |
|---|
public static Mappings getInstance(java.lang.String mappingsUri)
mappingsUri - the URI to the XML type mappings configuration file.
public static Mappings getInstance(java.net.URL mappingsUri)
mappingsUri - the URI to the XML type mappings configuration file.
public static void initializeLogicalMappings()
addLogicalMappings(java.net.URL)
otherwise inheritance between logical mappings will not work correctly.
public static void clearLogicalMappings()
public java.lang.String getName()
public void setName(java.lang.String name)
name - public void setExtendsUri(java.lang.String extendsUri)
extendsUri - the URI of the mapping which
this one extends.public void addMapping(Mapping mapping)
mapping - the Mapping instance.public void addMappings(Mappings mappings)
mappings instance to this Mappings instance
overriding any mappings with duplicate names.
mappings - the Mappings instance to add this instance.public java.lang.String getTo(java.lang.String from)
to mapping from a given from
mapping.
from - the from mapping, this is the type/identifier
that is in the model.
to mapping (this is the mapping that
can be retrieved if a corresponding 'from' is found).public static void addLogicalMappings(java.net.URL mappingsUri)
mappingsUri - the Mappings URI to add to the globally available Mapping
instances.public boolean containsFrom(java.lang.String from)
from value
from - the value of the from mapping.
from, false otherwise.public java.net.URL getResource()
public java.util.Collection getMappings()
public Mapping getMapping(java.lang.String from)
from.
from - the from mapping.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||