MetaDone
metadone.metabusiness.impl.MetaModel_impl Class Reference
Inheritance diagram for metadone.metabusiness.impl.MetaModel_impl:
Collaboration diagram for metadone.metabusiness.impl.MetaModel_impl:

List of all members.

Public Member Functions

MetaDef addInDefinition (MetaObject subject, String nickname) throws BadPreCondition
Set< MetaObjectgetMetaObjectsInDefinition () throws BadPreCondition
boolean hasInItsDefinition (MetaObject metaobject) throws BadPreCondition
MetaDef getMembership (MetaObject mo) throws BadPreCondition
Set< MetaDefgetMemberships () throws BadPreCondition
final MetaObject getMOByName (String...names) throws BadPreCondition
MetaObject createMetaObject (String name, MetaObject...supertypes) 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
MetaModel produceMetaModel (String name, MetaObject...supertypes) throws BadPreCondition
MetaObject produceMetaObject (String name, MetaObject...supertypes) throws BadPreCondition
MetaRole produceMetaRole (String name, Cardinality cardinality, MetaObject domain, MetaObject range) throws BadPreCondition

Protected Member Functions

MetaObject getMOByName (String[] name, int index) throws BadPreCondition

Package Functions

 MetaModel_impl (K_ObjectType x, Workspace_impl workspace) throws BadPreCondition
MetaDef _addInDefinition (MetaObject_impl subject, boolean canBeShared, boolean isDependent, boolean isHidden, String nickname)

Private Member Functions

void getMetaObjectsInDefinition_oneshot (final Set< MetaObject > result)
boolean _hasInItsDefinition (MetaObject_impl mo)
final boolean findMetaObjectsInDefinition_oneshot (MetaObject_impl partSide)
final MetaDef _getMembership (MetaObject mo)
MetaObject _createMetaObject (String name, boolean canBeShared, boolean IsHidden, boolean isDependent, MetaObject_impl[] supertypes)
MetaRole _createMetaRole (String name, int cardinality, MetaObject_impl domain, MetaObject_impl range)
MetaModel _createMetaModel (String name, boolean canBeShared, boolean isHidden, boolean isDependent, MetaObject_impl[] supertypes)
void checkNoSupertypeMetaModel (MetaObject_impl[] supertypes) throws BadPreCondition
K_ObjectType[] convertSupertypes (MetaObject_impl[] supertypes)

Static Private Attributes

static final Logger logger = Logger.getLogger(MetaModel_impl.class)

Constructor & Destructor Documentation

metadone.metabusiness.impl.MetaModel_impl.MetaModel_impl ( K_ObjectType  x,
Workspace_impl  workspace 
) throws BadPreCondition [package]

Should be used only by the FactoryOfProxy class !

References metadone.metabusiness.impl.WorkspaceObject_impl.workspace.


Member Function Documentation

MetaModel metadone.metabusiness.impl.MetaModel_impl._createMetaModel ( String  name,
boolean  canBeShared,
boolean  isHidden,
boolean  isDependent,
MetaObject_impl[]  supertypes 
) [private]

References metadone.util.SetUtil.array2HashSet(), metadone.metabusiness.impl.FactoryOfProxy.buildConcreteObject(), metadone.metabusiness.impl.FactoryOfProxy.buildMetaModel(), metadone.metabusiness.impl.FactoryOfProxy.buildMetaObject(), metadone.metabusiness.impl.MetaModel_impl.convertSupertypes(), metadone.repository.kernel.K_TypeBoolean.createObjectBoolean(), metadone.repository.kernel.K_ObjectType.createObjectType(), metadone.repository.kernel.K_PropertyType.createProperty(), metadone.metabusiness.ConcreteObject.createPropertyString(), metadone.repository.kernel.K_PropertyType.createPropertyType(), metadone.metabusiness.impl.Workspace_impl.generateDefName(), metadone.metabusiness.impl.Workspace_impl.getCommonMetaModel_ot(), metadone.metabusiness.impl.Workspace_impl.getCommonMetaObject_ot(), metadone.repository.kernel.K_Common.getDataObject(), metadone.metabusiness.impl.Workspace_impl.getDef_ot(), metadone.metabusiness.impl.Workspace_impl.getDef_pt(), metadone.metabusiness.impl.Workspace_impl.getDefCanBeShared_pt(), metadone.metabusiness.impl.Workspace_impl.getDefIsDependentOf_pt(), metadone.metabusiness.impl.Workspace_impl.getDefIsHidden_pt(), metadone.metabusiness.impl.Workspace_impl.getInvisibleSeparator(), metadone.metabusiness.impl.Workspace_impl.getMetaModel_ot(), metadone.metabusiness.impl.Workspace_impl.getMetaObjectName(), metadone.metabusiness.impl.Workspace_impl.getProject(), metadone.metabusiness.impl.MetaObject_impl.getTarget(), metadone.repository.kernel.Project.getTypeBoolean(), metadone.util.StringUtil.getUniqueString(), metadone.metabusiness.impl.MetaModel_impl.hasInItsDefinition(), metadone.metabusiness.impl.Workspace_impl.isAMetaModel(), metadone.metabusiness.impl.MetaObject_impl.narrow2ConcreteModel(), and metadone.metabusiness.impl.WorkspaceObject_impl.workspace.

Referenced by metadone.metabusiness.impl.MetaModel_impl.createMetaModel().

MetaObject metadone.metabusiness.impl.MetaModel_impl._createMetaObject ( String  name,
boolean  canBeShared,
boolean  IsHidden,
boolean  isDependent,
MetaObject_impl[]  supertypes 
) [private]

References metadone.util.SetUtil.array2HashSet(), metadone.metabusiness.impl.FactoryOfProxy.buildConcreteObject(), metadone.metabusiness.impl.FactoryOfProxy.buildMetaObject(), metadone.metabusiness.impl.MetaModel_impl.convertSupertypes(), metadone.repository.kernel.K_TypeBoolean.createObjectBoolean(), metadone.repository.kernel.K_ObjectType.createObjectType(), metadone.repository.kernel.K_PropertyType.createProperty(), metadone.metabusiness.ConcreteObject.createPropertyString(), metadone.repository.kernel.K_PropertyType.createPropertyType(), metadone.metabusiness.impl.Workspace_impl.generateDefName(), metadone.metabusiness.impl.Workspace_impl.getCommonMetaObject_ot(), metadone.repository.kernel.K_Common.getDataObject(), metadone.metabusiness.impl.Workspace_impl.getDef_ot(), metadone.metabusiness.impl.Workspace_impl.getDef_pt(), metadone.metabusiness.impl.Workspace_impl.getDefCanBeShared_pt(), metadone.metabusiness.impl.Workspace_impl.getDefIsDependentOf_pt(), metadone.metabusiness.impl.Workspace_impl.getDefIsHidden_pt(), metadone.metabusiness.impl.Workspace_impl.getInvisibleSeparator(), metadone.metabusiness.impl.Workspace_impl.getMetaObject_ot(), metadone.metabusiness.impl.Workspace_impl.getMetaObjectName(), metadone.metabusiness.impl.Workspace_impl.getProject(), metadone.metabusiness.impl.MetaObject_impl.getTarget(), metadone.repository.kernel.Project.getTypeBoolean(), metadone.util.StringUtil.getUniqueString(), metadone.metabusiness.impl.MetaModel_impl.hasInItsDefinition(), metadone.metabusiness.impl.MetaObject_impl.narrow2ConcreteModel(), and metadone.metabusiness.impl.WorkspaceObject_impl.workspace.

Referenced by metadone.metabusiness.impl.MetaModel_impl.createMetaObject().

MetaDef metadone.metabusiness.impl.MetaModel_impl.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

Implements metadone.metabusiness.MetaModel.

References metadone.metabusiness.impl.MetaModel_impl._addInDefinition(), metadone.metabusiness.impl.MetaModel_impl._hasInItsDefinition(), metadone.exception.NullArgument.check(), metadone.metabusiness.MetaObject.getAllSupertypes(), metadone.metabusiness.impl.MetaModel_impl.getMOByName(), metadone.metabusiness.impl.MetaObject_impl.getName(), and metadone.metabusiness.impl.MetaModel_impl.hasInItsDefinition().

Referenced by metadone.metabusiness.impl.MetaModel_impl._createMetaRole(), and metadone.metabusiness.impl.Workspace_impl.bootstrap_metametamodel().

void metadone.metabusiness.impl.MetaModel_impl.checkNoSupertypeMetaModel ( MetaObject_impl[]  supertypes) throws BadPreCondition [private]

Check that the supertype of a metamodel is NOT a metamodel FIXME constraint that should be removed in the future

Parameters:
supertypesthe array of supertypes to check
Exceptions:
BadFacet
BadPreCondition

References metadone.metabusiness.impl.Workspace_impl.getMetaModel_ot(), and metadone.metabusiness.impl.WorkspaceObject_impl.workspace.

Referenced by metadone.metabusiness.impl.MetaModel_impl.createMetaObject().

K_ObjectType [] metadone.metabusiness.impl.MetaModel_impl.convertSupertypes ( MetaObject_impl[]  supertypes) [private]

converts the supertypes MetaObject towards K_ObjectTypes

Parameters:
supertypes
Returns:
array of K_ObjectTypes

Referenced by metadone.metabusiness.impl.MetaModel_impl._createMetaModel(), and metadone.metabusiness.impl.MetaModel_impl._createMetaObject().

MetaModel metadone.metabusiness.impl.MetaModel_impl.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

Implements metadone.metabusiness.MetaModel.

References metadone.metabusiness.impl.MetaModel_impl._createMetaModel(), metadone.metabusiness.impl.MetaObject_impl.narrow(), and metadone.metabusiness.impl.MetaObject_impl.precondition_createMetaObject().

Referenced by metadone.metabusiness.impl.MetaModel_impl.produceMetaModel().

MetaObject metadone.metabusiness.impl.MetaModel_impl.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...)

Implements metadone.metabusiness.MetaModel.

References metadone.metabusiness.impl.MetaModel_impl._createMetaObject(), metadone.metabusiness.impl.MetaModel_impl.checkNoSupertypeMetaModel(), metadone.metabusiness.impl.MetaObject_impl.narrow(), and metadone.metabusiness.impl.MetaObject_impl.precondition_createMetaObject().

Referenced by metadone.metabusiness.impl.MetaModel_impl.createMetaObjectDef(), and metadone.metabusiness.impl.MetaModel_impl.produceMetaObject().

MetaDef metadone.metabusiness.impl.MetaModel_impl.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

Implements metadone.metabusiness.MetaModel.

References metadone.metabusiness.impl.MetaModel_impl.createMetaObject(), and metadone.metabusiness.impl.MetaModel_impl.getMembership().

MetaRole metadone.metabusiness.impl.MetaModel_impl.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

Implements metadone.metabusiness.MetaModel.

References metadone.metabusiness.impl.MetaModel_impl._createMetaRole(), metadone.exception.NullArgument.check(), and metadone.metabusiness.impl.MetaObject_impl.precondition_createMetaObject().

Referenced by metadone.metabusiness.impl.MetaModel_impl.produceMetaRole().

MetaDef metadone.metabusiness.impl.MetaModel_impl.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

Implements metadone.metabusiness.MetaModel.

References metadone.metabusiness.impl.MetaModel_impl._getMembership(), and metadone.exception.NullArgument.check().

Referenced by metadone.metabusiness.impl.MetaModel_impl.createMetaObjectDef().

Set<MetaObject> metadone.metabusiness.impl.MetaModel_impl.getMetaObjectsInDefinition ( ) throws BadPreCondition
final MetaObject metadone.metabusiness.impl.MetaModel_impl.getMOByName ( String...  name) throws BadPreCondition

Retrieves a MetaObject in this metamodel by specifying its name.

Parameters:
nameThe name of the metaobject we are looking for
Returns:
The MetaObect instance with the given name if found, null otherwise
Exceptions:
BadPreCondition

Implements metadone.metabusiness.MetaModel.

Referenced by metadone.metabusiness.impl.MetaModel_impl.addInDefinition(), metadone.metabusiness.impl.MetaModel_impl.getMOByName(), metadone.metabusiness.impl.MetaModel_impl.produceMetaModel(), metadone.metabusiness.impl.MetaModel_impl.produceMetaObject(), and metadone.metabusiness.impl.MetaModel_impl.produceMetaRole().

MetaObject metadone.metabusiness.impl.MetaModel_impl.getMOByName ( String[]  name,
int  index 
) throws BadPreCondition [protected]
boolean metadone.metabusiness.impl.MetaModel_impl.hasInItsDefinition ( MetaObject  metaobject) throws BadPreCondition
MetaModel metadone.metabusiness.impl.MetaModel_impl.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...)

Implements metadone.metabusiness.MetaModel.

References metadone.metabusiness.impl.MetaModel_impl.createMetaModel(), metadone.metabusiness.impl.MetaModel_impl.getMOByName(), and metadone.metabusiness.WorkspaceObject.narrow().

MetaObject metadone.metabusiness.impl.MetaModel_impl.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...)

Implements metadone.metabusiness.MetaModel.

References metadone.metabusiness.impl.MetaModel_impl.createMetaObject(), and metadone.metabusiness.impl.MetaModel_impl.getMOByName().


Member Data Documentation

final Logger metadone.metabusiness.impl.MetaModel_impl.logger = Logger.getLogger(MetaModel_impl.class) [static, private]

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