|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Metamodel
Defines a metamodel ("UML 2.1" for example), from which you can manage models.
This interface is not intended to be implemented by clients.
Model.getMetamodel(),
MDWObject.eMetamodel(),
MetamodelManager.getMetamodel(String)| Method Summary | |
|---|---|
int |
compareTo(Object o)
Compare the metamodels based on their presentation name. |
Model |
createModel()
Creates an empty model based on this metamodel. |
MetamodelConfiguration |
getConfiguration()
Returns the configuration from which this metamodel originates. |
EClassifier |
getEClassifier(String name)
Returns the EClassifier of specified name defined in this metamodel. |
|
getEClassifiers()
Returns the list of EClassifiers defined in this metamodel. |
EPackage |
getEPackage()
Returns the EPackage declaring this metamodel. |
MetamodelManager |
getManager()
Returns the manager to which the metamodel is registered. |
ConnectorDescriptor |
getModelReaderDescriptor(String name)
Returns the connector, used to read a model, that matches the specified name. |
List<ConnectorDescriptor> |
getModelReaderDescriptors()
Returns the registered connectors that can be used to read a model. |
ConnectorDescriptor |
getModelWriterDescriptor(String name)
Returns the connector, used to write a model, that matches the specified name. |
List<ConnectorDescriptor> |
getModelWriterDescriptors()
Returns the registered connectors that can be used to write a model. |
String |
getName()
Returns the name of this metamodel ("UML" for example). |
String |
getPresentationName()
Returns the display name of this metamodel, which may include a name and a metamodel version ("UML 2.1" for example). |
String |
getUniqueID()
Returns the ID which uniquely identifies this metamodel. |
String |
getVersion()
Returns the version of this metamodel ("2.1" for example), if any. |
boolean |
isAssignableFrom(Metamodel metamodel)
Determines if the metamodel represented by this Metamodel object
is the same as the specified Metamodel parameter,
and if the applied metamodel extensions are the same or a subset of the ones applied on the Metamodel parameter. |
Model |
readModel(String readerName,
String uri)
Creates and populates a model using the specified connector information. |
| Method Detail |
|---|
MetamodelManager getManager()
MetamodelConfiguration getConfiguration()
String getName()
String getVersion()
String if no version is specified.String getPresentationName()
String getUniqueID()
Model createModel()
Model readModel(String readerName,
String uri)
throws CoreException
The reader name must match a connector registered on this metamodel.
The uri is used to locate a resource from where the connector should read information.
If the connector expects a file, the uri must be a valid file path.
Otherwise, it can be any connector specific resource locator,
including null when the connector does not expect any uri.
This method is a facility and acts as a strict equivalent of calling createModel()
and then Model.read(String, String).
readerName - the connector name to be used.uri - an additional resource locator used by the connector to read the model (can be null)
CoreException - if the model could not be loaded. Reasons include:
Model.read(String, String),
getModelReaderDescriptors(),
ConnectorDescriptor.getKind()List<ConnectorDescriptor> getModelReaderDescriptors()
The connectors are returned in the order they are declared in the metamodels.xml file
of this metamodel. Additional connectors (declared outside of the metamodel descriptor)
are appended in an unpredictable order.
ConnectorDescriptor getModelReaderDescriptor(String name)
throws CoreException
name - the name of the connector to retrieve.
CoreException - if no reader connector matches this nameConnectorDescriptor.getName()List<ConnectorDescriptor> getModelWriterDescriptors()
The connectors are returned in the order they are declared in the metamodels.xml file
of this metamodel. Additional connectors (declared outside of the metamodel descriptor)
are appended in an unpredictable order.
ConnectorDescriptor getModelWriterDescriptor(String name)
throws CoreException
name - the name of the connector to retrieve.
CoreException - if no writer connector matches this nameConnectorDescriptor.getName()int compareTo(Object o)
compareTo in interface Comparable<Object>getPresentationName()getEClassifiers()
EClassifiers defined in this metamodel.
EClassifiers defined in this metamodel.EClassifier getEClassifier(String name)
EClassifier of specified name defined in this metamodel.
name - the name of the classifier to look for
EClassifier of specified name defined in this metamodel, null if none.EPackage getEPackage()
EPackage declaring this metamodel.
EPackage declaring this metamodel.boolean isAssignableFrom(Metamodel metamodel)
Metamodel object
is the same as the specified Metamodel parameter,
and if the applied metamodel extensions are the same or a subset of the ones applied on the Metamodel parameter.
metamodel - the metamodel to be checked
true if the specified metamodel is the same as the receiver and if the applied metamodel extensions are compatible.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||