MetaDone
|
Public Member Functions | |
MetaDef | addInDefinition (MetaObject subject, String name) throws BadPreCondition |
Set< MetaObject > | getMetaObjectsInDefinition () throws BadPreCondition |
Set< MetaDef > | getMemberships () throws BadPreCondition |
MetaDef | getMembership (MetaObject mo) throws BadPreCondition |
boolean | hasInItsDefinition (MetaObject metaobject) throws BadPreCondition |
MetaObject | getMOByName (String...name) throws BadPreCondition |
MetaDef | createMetaObjectDef (String name, MetaObject...supertypes) throws BadPreCondition |
MetaRole | createMetaRole (String name, MetaRole.Cardinality cardinality, MetaObject domain, MetaObject range) throws BadPreCondition |
MetaModel | createMetaModel (String name, MetaObject...supertypes) throws BadPreCondition |
MetaObject | createMetaObject (String name, MetaObject...supertypes) throws BadPreCondition |
MetaObject | produceMetaObject (String name, MetaObject...supertypes) throws BadPreCondition |
MetaRole | produceMetaRole (String name, MetaRole.Cardinality cardinality, MetaObject domain, MetaObject range) throws BadPreCondition |
MetaModel | produceMetaModel (String name, MetaObject...supertypes) throws BadPreCondition |
The metamodel.
By default, created objects can be shared, are not hidden and are not dependent.
MetaDef metadone.metabusiness.MetaModel.addInDefinition | ( | MetaObject | subject, |
String | name | ||
) | throws BadPreCondition |
Adds a metaobject subject
in the definition of this
.
FIXME adding subtypes: "Note: if the metamodel has subtypes, you need to add the metaobject in the definition of these subtypes."
subject | The MetaObject to add in the definition of this |
name | An alias of the MetaObject (must be unique in the definition of this). The name can not be null and must be a string with at least one character. |
BadPreCondition | when subject is already in this |
Implemented in metadone.metabusiness.impl.MetaModel_impl.
Referenced by metadone.client.dialog.swing.metaobjecteditor.Model_global.processMetaModel().
MetaModel metadone.metabusiness.MetaModel.createMetaModel | ( | String | name, |
MetaObject... | supertypes | ||
) | throws BadPreCondition |
Creates a metamodel and adds it to the definition of the MetaModel object (behaviour by default).
For sake of simplicity, we forbid a metamodel as a supertype of another metamodel. This restriction should be removed in future versions, but this has very hard consequences. For instance, names must be unique in definitions, but definitions must be inherited in the subtypes. Hence, any modification of a definition of metamodel entails the modification of the subtypes as well as the verification of their preconditions.
name | The name of the new metamodel. The name must be unique inside the metamodel. |
supertypes | The supertypes of the new metamodel. |
BadPreCondition |
Implemented in metadone.metabusiness.impl.MetaModel_impl.
Referenced by metadone.client.actions.TestDialogConcrete.actionPerformed(), metadone.client.actions.Test2Action.actionPerformed(), metadone.client.functions.importer.km3.KM3Importer.createMetamodel(), metadone.client.actions.Test5Action.initMetaModel(), metadone.client.dialog.swing.metaobjecteditor.Model_global.processMetaModel(), and metadone.client.functions.importer.PromotingImporter.AbstractPromotingImporter.promoteToMetamodel().
MetaObject metadone.metabusiness.MetaModel.createMetaObject | ( | String | name, |
MetaObject... | supertypes | ||
) | throws BadPreCondition |
Creates a MetaObject with the given supertype(s).
By default, the MetaObject can be shared, is not hidden and is not dependent.
name | the name of the new MetaObject |
supertypes | types from which the new MetaObject will inherit. |
BadPreCondition |
Implemented in metadone.metabusiness.impl.MetaModel_impl.
Referenced by metadone.client.actions.TestDialogConcrete.actionPerformed(), metadone.client.actions.Test2Action.actionPerformed(), metadone.client.functions.importer.km3.KM3Importer.createMetamodel(), and metadone.client.actions.Test5Action.initMetaModel().
MetaDef metadone.metabusiness.MetaModel.createMetaObjectDef | ( | String | name, |
MetaObject... | supertypes | ||
) | throws BadPreCondition |
Creates a MetaObject with the given supertype(s).
name | the name of the new MetaObject |
supertypes | types from which the new MetaObject will inherit. |
BadPreCondition |
Implemented in metadone.metabusiness.impl.MetaModel_impl.
Referenced by metadone.client.dialog.swing.metaobjecteditor.Model_metaobject.commit(), and metadone.client.dialog.swing.metaobjecteditor.Model_global.processMetaObject().
MetaRole metadone.metabusiness.MetaModel.createMetaRole | ( | String | name, |
MetaRole.Cardinality | cardinality, | ||
MetaObject | domain, | ||
MetaObject | range | ||
) | throws BadPreCondition |
Creates a MetaRole between two MetaObjects and adds it to the definition of 'this'.
name | the name of the new metarole |
cardinality | the cardinality of the metarole |
domain | the MetaObject that is the domain of the metarole |
range | the MetaObject that is the range-side of the metarole |
BadPreCondition |
Implemented in metadone.metabusiness.impl.MetaModel_impl.
Referenced by metadone.client.actions.TestDialogConcrete.actionPerformed(), metadone.client.actions.Test2Action.actionPerformed(), metadone.client.functions.importer.km3.KM3Importer.createMetamodel(), metadone.client.actions.Test5Action.initMetaModel(), metadone.client.actions.RetroDocAction.initMetaModel(), and metadone.client.dialog.swing.metaobjecteditor.Model_global.processMetaRole().
MetaDef metadone.metabusiness.MetaModel.getMembership | ( | MetaObject | mo | ) | throws BadPreCondition |
Gets the definition of a metaobject in this metamodel.
mo | A metaobject |
mo
and this
; null
if mo
does not belong to the definition of metamodel BadPreCondition |
Implemented in metadone.metabusiness.impl.MetaModel_impl.
Referenced by metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.bootstrap_grasyla(), metadone.client.dialog.swing.metaobjecteditor.Model_global.processMetaModel(), and metadone.client.dialog.swing.genConcreteObject.Builder.retrieveElements().
Set<MetaDef> metadone.metabusiness.MetaModel.getMemberships | ( | ) | throws BadPreCondition |
Gets the set of the memberships of this metamodel
BadPreCondition |
Implemented in metadone.metabusiness.impl.MetaModel_impl.
Referenced by metadone.metabusiness.impl.ConcreteObject_impl.getDependumIfSetIsDeleted().
Set<MetaObject> metadone.metabusiness.MetaModel.getMetaObjectsInDefinition | ( | ) | throws BadPreCondition |
Retrieves all metaobjects that belong to the definition of 'this' metamodel.
Implemented in metadone.metabusiness.impl.MetaModel_impl.
Referenced by metadone.metabusiness.impl.ConcreteModel_impl._getDefinition(), metadone.client.actions.PrintOmegaMetaModel.actionPerformed(), metadone.client.dialog.swing.helperBrowserMetal2.NodeRoot_MetaModel_Definition.getChildren(), metadone.client.dialog.swing.genConcreteObject.Builder.retrieveElements(), and metadone.client.dialog.swing.genConcreteObject.DialogConcreteRoles.selectMetaObject().
MetaObject metadone.metabusiness.MetaModel.getMOByName | ( | String... | name | ) | throws BadPreCondition |
Retrieves a MetaObject in this metamodel by specifying its name.
name | The name of the metaobject we are looking for |
null
otherwise BadPreCondition |
Implemented in metadone.metabusiness.impl.MetaModel_impl.
Referenced by metadone.client.functions.importer.Importer.AbstractImporter.findMetamodel(), metadone.metabusiness.script.groovy.GroovyProxyCO.findMetaRole(), metadone.client.functions.importer.km3.KM3Importer.ModelManipulator.ModelManipulator(), metadone.client.functions.importer.owl.OWLImporter.readOntology(), and metadone.client.functions.importer.owl.OWLImporter.readOntologyModel().
boolean metadone.metabusiness.MetaModel.hasInItsDefinition | ( | MetaObject | metaobject | ) | throws BadPreCondition |
Checks if a metaobject is defined in this model.
metaobject | The metaobject candidate. |
true
iff getMembership(MetaObject) does not return null
BadPreCondition |
Implemented in metadone.metabusiness.impl.MetaModel_impl.
Referenced by metadone.metabusiness.impl.ConcreteObject_impl._getType(), and metadone.client.grasyla2.visuallibrary.ChooseMetaObjectPopup< M extends MetaObject >.SelectAction.SelectAction().
MetaModel metadone.metabusiness.MetaModel.produceMetaModel | ( | String | name, |
MetaObject... | supertypes | ||
) | throws BadPreCondition |
Retrieves or creates a metamodel and adds it to the definition of the MetaModel object (behaviour by default).
The retrieved object must match exactly the given arguments as if it were created, otherwise an exception is thrown.
name | The name of the new metamodel. The name must be unique inside the metamodel. |
supertypes | The supertypes of the new metamodel. |
BadPreCondition |
Implemented in metadone.metabusiness.impl.MetaModel_impl.
Referenced by metadone.metabusiness.annex.BootstrapAnnex.bootstrap_annex(), metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.bootstrap_grasyla(), metadone.plugin.urn.URN.initializeProperties(), metadone.client.actions.Test_ECORE_Action.initializeProperties(), metadone.client.actions.RetroDocAction.initMetaModel(), and metadone.client.actions.Test6Action.initModels().
MetaObject metadone.metabusiness.MetaModel.produceMetaObject | ( | String | name, |
MetaObject... | supertypes | ||
) | throws BadPreCondition |
Retrieves or creates a metaobject.
The retrieved object must match exactly the given arguments as if it were created, otherwise an exception is thrown.
name | the name of the new MetaObject |
supertypes | types from which the new MetaObject will inherit. |
BadPreCondition |
Implemented in metadone.metabusiness.impl.MetaModel_impl.
Referenced by metadone.metabusiness.annex.BootstrapAnnex.bootstrap_annex(), metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.bootstrap_grasyla(), metadone.plugin.urn.URN.initializeProperties(), metadone.client.actions.Test_ECORE_Action.initializeProperties(), metadone.client.actions.RetroDocAction.initMetaModel(), and metadone.client.actions.Test6Action.initModels().
MetaRole metadone.metabusiness.MetaModel.produceMetaRole | ( | String | name, |
MetaRole.Cardinality | cardinality, | ||
MetaObject | domain, | ||
MetaObject | range | ||
) | throws BadPreCondition |
Retrieves or creates a MetaRole between two MetaObjects and adds it to the definition of 'this'.
The retrieved object must match exactly the given arguments as if it were created, otherwise an exception is thrown.
name | the name of the new metarole in this metamodel. |
cardinality | the cardinality of the metarole |
domain | the MetaObject that is the domain of the metarole |
range | the MetaObject that is the range-side of the metarole |
BadPreCondition |
Referenced by metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.bootstrap_grasyla(), metadone.plugin.urn.URN.initializeProperties(), metadone.client.actions.Test_ECORE_Action.initializeProperties(), metadone.client.actions.RetroDocAction.initMetaModel(), and metadone.client.actions.Test6Action.initModels().