MetaDone
metadone.metabusiness.MetaModel Interface Reference
Inheritance diagram for metadone.metabusiness.MetaModel:
Collaboration diagram for metadone.metabusiness.MetaModel:

List of all members.

Public Member Functions

MetaDef addInDefinition (MetaObject subject, String name) throws BadPreCondition
Set< MetaObjectgetMetaObjectsInDefinition () throws BadPreCondition
Set< MetaDefgetMemberships () 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

Detailed Description

The metamodel.

By default, created objects can be shared, are not hidden and are not dependent.

Author:
ven
kma
See also:
MetaObject

Member Function Documentation

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."

Parameters:
subjectThe MetaObject to add in the definition of this
nameAn 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.
Returns:
The metadef between the metamodel and the metaobject.
Exceptions:
BadPreConditionwhen 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.

Parameters:
nameThe name of the new metamodel. The name must be unique inside the metamodel.
supertypesThe supertypes of the new metamodel.
Returns:
The created metamodel
Exceptions:
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.

Parameters:
namethe name of the new MetaObject
supertypestypes from which the new MetaObject will inherit.
Returns:
the created MetaObject instance
Exceptions:
BadPreCondition
See also:
createMetaObjectDef(String, String, MetaObject...)

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).

Parameters:
namethe name of the new MetaObject
supertypestypes from which the new MetaObject will inherit.
Returns:
the created MetaObject instance
Exceptions:
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'.

Parameters:
namethe name of the new metarole
cardinalitythe cardinality of the metarole
domainthe MetaObject that is the domain of the metarole
rangethe MetaObject that is the range-side of the metarole
Returns:
The newly created MetaRole instance
Exceptions:
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.

Parameters:
moA metaobject
Returns:
The metadef object between mo and this; null if mo does not belong to the definition of metamodel
Exceptions:
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

Returns:
The set of all the MetaDef objects attached to the metamodel.
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaModel_impl.

Referenced by metadone.metabusiness.impl.ConcreteObject_impl.getDependumIfSetIsDeleted().

MetaObject metadone.metabusiness.MetaModel.getMOByName ( String...  name) throws BadPreCondition
boolean metadone.metabusiness.MetaModel.hasInItsDefinition ( MetaObject  metaobject) throws BadPreCondition

Checks if a metaobject is defined in this model.

Parameters:
metaobjectThe metaobject candidate.
Returns:
true iff getMembership(MetaObject) does not return null
Exceptions:
BadPreCondition
See also:
getMembership(MetaObject)

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.

Parameters:
nameThe name of the new metamodel. The name must be unique inside the metamodel.
supertypesThe supertypes of the new metamodel.
Returns:
The retrieved or created metamodel
Exceptions:
BadPreCondition
See also:
createMetaModel(String, String, MetaObject...)

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.

Parameters:
namethe name of the new MetaObject
supertypestypes from which the new MetaObject will inherit.
Returns:
the retrieved or created MetaObject instance
Exceptions:
BadPreCondition
See also:
createMetaObject(String, String, MetaObject...)

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.

Parameters:
namethe name of the new metarole in this metamodel.
cardinalitythe cardinality of the metarole
domainthe MetaObject that is the domain of the metarole
rangethe MetaObject that is the range-side of the metarole
Returns:
The retrieved or newly created MetaRole instance
Exceptions:
BadPreCondition
See also:
createMetaRole(String, MetaRole.Cardinality, MetaObject, MetaObject)

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().


The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations