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

List of all members.

Public Member Functions

public< T > MetaPropertyExt< T > createMetaPropertyEnumerated (Class< T > type, String name, int cardinality, MetaModel metamodel, boolean restricted, T...values) throws BadPreCondition
MetaPropertyExt<?> getMetaProperty (String name, MetaModel metamodel) throws BadPreCondition
MetaPropertyExt<?> getMetaPropertyAnywhere (String name, MetaModel metamodel) throws BadPreCondition
public< T > MetaPropertyExt< T > produceMetaProperty (Class< T > type, String name, int cardinality, MetaModel metamodel) throws BadPreCondition
public< T > MetaPropertyExt< T > produceMetaPropertyEnumerated (Class< T > type, String name, int cardinality, MetaModel metamodel, boolean restricted, T...values) throws BadPreCondition
String getName (MetaModel metamodel) throws BadPreCondition
String getName () throws BadPreCondition
String[] getNamePath () throws BadPreCondition
Set< MetaObjectgetAllSupertypes () throws BadPreCondition
Set< MetaObjectgetAllSubtypes () throws BadPreCondition
Set< MetaObjectgetDirectSupertypes () throws BadPreCondition
Set< MetaObjectgetDirectSubtypes () throws BadPreCondition
Set< MetaPropertyExt<?> > getAllMetaProperties () throws BadPreCondition
Set< MetaPropertyExt<?> > getDirectMetaProperties () throws BadPreCondition
Set< MetaRolegetAllMetaRolesDomain () throws BadPreCondition
Set< MetaRolegetAllMetaRolesRange () throws BadPreCondition
Set< MetaRolegetDirectMetaRolesDomain () throws BadPreCondition
Set< MetaRolegetDirectMetaRolesRange () throws BadPreCondition
MetaObject addSuperType (MetaObject supertype) throws BadPreCondition
public< A > MetaPropertyExt< A > shareMetaProperty (MetaProperty< A > mp, MetaModel metamodel) throws BadPreCondition
boolean detachMetaProperty (MetaProperty<?> mp) throws BadPreCondition
Set< ConcreteObjectgetInstances () throws BadPreCondition
Set< MetaModelgetAllMetaModels () throws BadPreCondition
boolean hasAtLeastOneInstance ()
void setDisplayNameFormula (String formula, MetaModel metamodel) throws BadPreCondition
String getDisplayNameFormula (MetaModel metamodel) throws BadPreCondition
String getDisplayNameFormula () throws BadPreCondition
String findDisplayNameFormula (MetaModel mm) throws BadPreCondition
MetaPropertyExt< String > createMetaPropertyString (String name, int cardinality, MetaModel metamodel) throws BadPreCondition
MetaPropertyExt< Character > createMetaPropertyChar (String name, int cardinality, MetaModel metamodel) throws BadPreCondition
MetaPropertyExt< Long > createMetaPropertyInteger (String name, int cardinality, MetaModel metamodel) throws BadPreCondition
MetaPropertyExt< Double > createMetaPropertyFloat (String name, int cardinality, MetaModel metamodel) throws BadPreCondition
MetaPropertyExt< Boolean > createMetaPropertyBoolean (String name, int cardinality, MetaModel metamodel) throws BadPreCondition
MetaPropertyExt< String > createMetaPropertyEnumeratedString (String name, int cardinality, MetaModel metamodel, String[] values, boolean restricted) throws BadPreCondition
MetaPropertyExt< Character > createMetaPropertyEnumeratedChar (String name, int cardinality, MetaModel metamodel, char[] values, boolean restricted) throws BadPreCondition
MetaPropertyExt< Long > createMetaPropertyEnumeratedInteger (String name, int cardinality, MetaModel metamodel, long[] values, boolean restricted) throws BadPreCondition
MetaPropertyExt< Double > createMetaPropertyEnumeratedFloat (String name, int cardinality, MetaModel metamodel, double[] values, boolean restricted) throws BadPreCondition

Package Functions

public< T > MetaPropertyExt< T > createMetaProperty (Class< T > type, String name, int cardinality, MetaModel metamodel) throws BadPreCondition

Detailed Description

Represents a meta-object.

This class acts as a proxy, so it shouldn't be cast to its subtypes, narrow methods should be used instead.

Author:
ven
kma
See also:
MetaProperty
MetaModel

Member Function Documentation

MetaObject metadone.metabusiness.MetaObject.addSuperType ( MetaObject  supertype) throws BadPreCondition

Adds a supertype to this metaobject.

Can only be used when 'this' has not yet been initialized.

Parameters:
supertypeThe supertype
Returns:
This with the added supertype
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Referenced by metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.bootstrap_grasyla(), metadone.plugin.urn.URN.initializeProperties(), and metadone.client.actions.RetroDocAction.initMetaModel().

public<T> MetaPropertyExt<T> metadone.metabusiness.MetaObject.createMetaProperty ( Class< T >  type,
String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition [package]

Creates a new MetaPropertyExt in 'this'.

Parameters:
typethe type of the property
namethe name of the property
cardinalitythe maximum number of instances of this MetaProperty that 'this' MetaObject can have
typethe type of the meta property.
metamodelthe MetaModel in which the new MetaProperty will be created
Returns:
the newly created MetaPropertyExt
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Referenced by metadone.client.actions.TestDialogConcrete.actionPerformed(), metadone.client.actions.Test2Action.actionPerformed(), metadone.client.functions.importer.km3.KM3Importer.Promoter.createAttributes(), and metadone.client.functions.importer.km3.KM3Importer.createMetamodel().

MetaPropertyExt<Boolean> metadone.metabusiness.MetaObject.createMetaPropertyBoolean ( String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition
MetaPropertyExt<Character> metadone.metabusiness.MetaObject.createMetaPropertyChar ( String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition
public<T> MetaPropertyExt<T> metadone.metabusiness.MetaObject.createMetaPropertyEnumerated ( Class< T >  type,
String  name,
int  cardinality,
MetaModel  metamodel,
boolean  restricted,
T...  values 
) throws BadPreCondition

Creates a new enumerated MetaPropertyExt in 'this'.

Parameters:
typethe type of the property
namethe name of the metaproperty
cardinalitythe maximum number of instances of this MetaProperty that 'this' MetaObject can have
metamodelthe MetaModel in which the new MetaProperty will be created
restrictedSpecifies if the concrete properties MUST share the enumerated values or not. If not, the concrete properties can share the enumerated value or use fresh new literal values.
Returns:
The newly created MetaPropertyExt
Parameters:
valuesThe enumerated values. The array cannot be null nor empty.
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaObject_impl.

MetaPropertyExt<Character> metadone.metabusiness.MetaObject.createMetaPropertyEnumeratedChar ( String  name,
int  cardinality,
MetaModel  metamodel,
char[]  values,
boolean  restricted 
) throws BadPreCondition
MetaPropertyExt<Double> metadone.metabusiness.MetaObject.createMetaPropertyEnumeratedFloat ( String  name,
int  cardinality,
MetaModel  metamodel,
double[]  values,
boolean  restricted 
) throws BadPreCondition
MetaPropertyExt<Long> metadone.metabusiness.MetaObject.createMetaPropertyEnumeratedInteger ( String  name,
int  cardinality,
MetaModel  metamodel,
long[]  values,
boolean  restricted 
) throws BadPreCondition
MetaPropertyExt<String> metadone.metabusiness.MetaObject.createMetaPropertyEnumeratedString ( String  name,
int  cardinality,
MetaModel  metamodel,
String[]  values,
boolean  restricted 
) throws BadPreCondition
MetaPropertyExt<Double> metadone.metabusiness.MetaObject.createMetaPropertyFloat ( String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition
MetaPropertyExt<Long> metadone.metabusiness.MetaObject.createMetaPropertyInteger ( String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition
MetaPropertyExt<String> metadone.metabusiness.MetaObject.createMetaPropertyString ( String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition
boolean metadone.metabusiness.MetaObject.detachMetaProperty ( MetaProperty<?>  mp) throws BadPreCondition
String metadone.metabusiness.MetaObject.findDisplayNameFormula ( MetaModel  mm) throws BadPreCondition
Parameters:
mmThe formula is defined wrt this MetaModel. (not null)
Returns:
a string that denotes a groovy script to compute the sympathic representation of a concrete object.
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaObject_impl.

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

Set<MetaModel> metadone.metabusiness.MetaObject.getAllMetaModels ( ) throws BadPreCondition

Gets all the metamodels this metaobject belongs to.

Returns:
The set of metamodels that contain this metaobject in their definition.
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Referenced by metadone.client.MetadoneDesktopPane.addNewFrame(), metadone.metabusiness.impl.MetaObject_impl.lookForPath(), and metadone.client.dialog.swing.setSympathicName.MySetSympathicName.MySetSympathicName().

Set<MetaPropertyExt<?> > metadone.metabusiness.MetaObject.getAllMetaProperties ( ) throws BadPreCondition
Set<MetaRole> metadone.metabusiness.MetaObject.getAllMetaRolesDomain ( ) throws BadPreCondition
Set<MetaRole> metadone.metabusiness.MetaObject.getAllMetaRolesRange ( ) throws BadPreCondition

Gets all the metaroles of which this metaobject is the range.

Returns:
the set of metaroles whose the range is this and its supertypes.

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Referenced by metadone.client.actions.PrintOmegaMetaModel.actionPerformed(), and metadone.client.dialog.swing.genConcreteObject.Builder.retrieveElements().

Set<MetaObject> metadone.metabusiness.MetaObject.getAllSubtypes ( ) throws BadPreCondition

Gets all the subtypes of this metaobject.

Returns:
The set of all the subtypes

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Referenced by metadone.client.dialog.swing.genConcreteObject.DialogConcreteRoles.selectMetaObject().

Set<MetaObject> metadone.metabusiness.MetaObject.getAllSupertypes ( ) throws BadPreCondition
Set<MetaPropertyExt<?> > metadone.metabusiness.MetaObject.getDirectMetaProperties ( ) throws BadPreCondition

Gets the metaproperties declared in this metaobject (does not include supertypes).

Returns:
the set of MetaProperties attached to this

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Set<MetaRole> metadone.metabusiness.MetaObject.getDirectMetaRolesDomain ( ) throws BadPreCondition

Get the direct metaroles of which this metaobject is the domain.

Returns:
the set of metaroles whose the domain is this (without the supertypes).

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Referenced by metadone.plugin.grasyla.generator.GrasylaGenerator.createTableRows(), and metadone.metabusiness.impl.ConcreteObject_impl.getDependumIfSetIsDeleted().

Set<MetaRole> metadone.metabusiness.MetaObject.getDirectMetaRolesRange ( ) throws BadPreCondition

Get the direct metaroles of which this metaobject is the range.

Returns:
the set of metaroles whose the range is this (without the supertypes)

Implemented in metadone.metabusiness.impl.MetaObject_impl.

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

Set<MetaObject> metadone.metabusiness.MetaObject.getDirectSubtypes ( ) throws BadPreCondition

Gets the direct supertypes of this metaobject.

Returns:
The set of the direct subtypes

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Set<MetaObject> metadone.metabusiness.MetaObject.getDirectSupertypes ( ) throws BadPreCondition

Gets the direct subtypes of this metaobject.

Returns:
The set of the direct supertypes

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Referenced by metadone.metabusiness.impl.MetaObject_impl._getName().

String metadone.metabusiness.MetaObject.getDisplayNameFormula ( ) throws BadPreCondition
Returns:
the sympathic formula. This implementation doesn't take a metamodel to refine the search and can produce non determinictic results.
See also:
getDisplayNameFormula(MetaModel)
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaObject_impl.

String metadone.metabusiness.MetaObject.getDisplayNameFormula ( MetaModel  metamodel) throws BadPreCondition
Returns:
the formula to produce a user friendly string representation of a concrete object, and null if no formula is defined. Only the formula defined for this metaobject is taken into account. See findDisplayNameFormula(MetaModel) for a more general method.
Parameters:
metamodelThe formula is defined wrt this MetaModel.
Precondition:
metamodel is not null.

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Referenced by metadone.client.dialog.swing.setSympathicName.MySetSympathicName.MySetSympathicName().

Set<ConcreteObject> metadone.metabusiness.MetaObject.getInstances ( ) throws BadPreCondition
MetaPropertyExt<?> metadone.metabusiness.MetaObject.getMetaProperty ( String  name,
MetaModel  metamodel 
) throws BadPreCondition

Retrieves a metaproperty amongst the direct metaproperties of this metaobject.

Parameters:
nameThe name of the metaproperty to retrieve. Not null.
metamodelThe metamodel that should contain the metaproperty. Not null.
Returns:
The metaproperty whose name is name and belongs to metamodel or null
See also:
getMetaPropertyAnywhere(String, MetaModel)

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Referenced by metadone.client.functions.importer.km3.KM3Importer.ModelManipulator.ModelManipulator().

MetaPropertyExt<?> metadone.metabusiness.MetaObject.getMetaPropertyAnywhere ( String  name,
MetaModel  metamodel 
) throws BadPreCondition

Retrieves a metaproperty amongst the direct and indirect metaproperties of this metaobject.

Parameters:
nameThe name of the metaproperty to retrieve. Not null.
metamodelThe metamodel that should contain the metaproperty. Not null.
Returns:
The metaproperty whose name is name or null
See also:
getMetaProperty(String, MetaModel)

Implemented in metadone.metabusiness.impl.MetaObject_impl.

String metadone.metabusiness.MetaObject.getName ( ) throws BadPreCondition

Gets one of the absolute names of this metaobject.

Returns:
the full name
Exceptions:
BadPreCondition
See also:
getNamePath()

Implemented in metadone.metabusiness.impl.MetaObject_impl.

String metadone.metabusiness.MetaObject.getName ( MetaModel  metamodel) throws BadPreCondition

Gets the name of this metaobject in some metamodel.

Precondition:
metamodel != null
Returns:
the name of this metaobject in metamodel.

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Referenced by metadone.metabusiness.impl.ConcreteObject_impl._getDisplayName(), metadone.client.actions.VisualizeMetaModelAction.actionPerformed(), metadone.client.actions.PrintOmegaMetaModel.actionPerformed(), metadone.client.dialog.swing.BrowserMetal2.buildContent(), metadone.client.grasyla2.SelectorBestEquation.EquationHeaderRating.compare(), metadone.client.dialog.swing.metaobjecteditor.ModelTreeChooseMetaObject.CompareMetaObjects.compare(), metadone.client.functions.importer.km3.KM3Importer.Promoter.createAttributes(), metadone.plugin.grasyla.generator.GrasylaGenerator.createMenu(), metadone.metabusiness.impl.MetaObject_impl.createMetaProperty(), metadone.plugin.grasyla.generator.GrasylaGenerator.createMetaRoleEditors(), metadone.client.dialog.swing.concreteobjecteditor.RoleEditor.createMetaRoles(), metadone.client.dialog.swing.selectAMetaRole.MyChooseMetaRole.format(), metadone.metabusiness.impl.ConcreteObject_impl.getDisplayName(), metadone.client.dialog.swing.setSympathicName.MySetSympathicName.MyCellMetaModelRenderer.getListCellRendererComponent(), metadone.metabusiness.impl.MetaObject_impl.getNamePath(), metadone.client.grasyla2.actions.UserConnectEvent.initRoles(), metadone.client.dialog.swing.metaobjecteditor.MyPanelMetaRole.myconfigure(), metadone.client.dialog.swing.setSympathicName.MySetSympathicName.MySetSympathicName(), metadone.client.dialog.swing.genConcreteObject.Panel_many_domains.Panel_many_domains(), metadone.client.dialog.swing.genConcreteObject.Panel_many_ranges.Panel_many_ranges(), metadone.client.dialog.swing.genConcreteObject.Panel_one_domain.Panel_one_domain(), metadone.client.dialog.swing.genConcreteObject.Panel_one_range.Panel_one_range(), metadone.client.dialog.swing.metaobjecteditor.Model_global.processMetaModel(), metadone.client.dialog.swing.metaobjecteditor.Model_metaobject.setMetaModel(), metadone.client.dialog.swing.metaobjecteditor.Model_metamodel.Record_MemberOfMetaModel.toString(), metadone.client.dialog.swing.helperBrowserMetal2.NodeRoot_MetaObject.toString(), metadone.client.dialog.swing.helperBrowserMetal2.NodeRoot_MetaModel_Definition_Type.toString(), and metadone.client.dialog.swing.helperBrowserMetal2.NodeRoot_MetaModel.toString().

String [] metadone.metabusiness.MetaObject.getNamePath ( ) throws BadPreCondition

Gets one of the absolute names of this metaobject.

Returns:
the full name
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaObject_impl.

boolean metadone.metabusiness.MetaObject.hasAtLeastOneInstance ( )

Indicates whether this metaobject has at least one instance.

Returns:
true iff this metaobject has at least one instance.

Implemented in metadone.metabusiness.impl.MetaObject_impl.

public<T> MetaPropertyExt<T> metadone.metabusiness.MetaObject.produceMetaProperty ( Class< T >  type,
String  name,
int  cardinality,
MetaModel  metamodel 
) throws BadPreCondition

Creates or retrieves an existing metaproperty.

The retrieved property must match exactly the given arguments as if it were created, otherwise an exception is thrown.

Parameters:
typethe type of the property
namethe name of the property
cardinalitythe maximum number of instances of this MetaProperty that 'this' MetaObject can have
typethe type of the meta property.
metamodelthe MetaModel in which the new MetaProperty will be created
Returns:
the existign or a newly created MetaPropertyExt
Exceptions:
BadPreConditionwhen the existing property didn't match the required arguments or when the property couldn't be created
See also:
#getMetaProperty(String)
#createMetaProperty(Class, String, int, MetaModel)

Implemented in metadone.metabusiness.impl.MetaObject_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().

public<T> MetaPropertyExt<T> metadone.metabusiness.MetaObject.produceMetaPropertyEnumerated ( Class< T >  type,
String  name,
int  cardinality,
MetaModel  metamodel,
boolean  restricted,
T...  values 
) throws BadPreCondition

Creates or retrieves an existing enumerated metaproperty.

The retrieved property must match exactly the given arguments as if it were created, otherwise an exception is thrown.

Parameters:
typethe type of the property
namethe name of the metaproperty
cardinalitythe maximum number of instances of this MetaProperty that 'this' MetaObject can have
metamodelthe MetaModel in which the new MetaProperty will be created
restrictedSpecifies if the concrete properties MUST share the enumerated values or not. If not, the concrete properties can share the enumerated value or use fresh new literal values.
valuesThe enumerated values. The array cannot be null nor estmpty.
Returns:
The existing or a newly created MetaPropertyExt
Exceptions:
BadPreConditionwhen the existing property didn't match the required arguments or when the property couldn't be created
See also:
#getMetaProperty(String)
createMetaPropertyEnumerated(Class, String, int, MetaModel, boolean, Object...)

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Referenced by metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.bootstrap_grasyla(), and metadone.plugin.urn.URN.initializeProperties().

void metadone.metabusiness.MetaObject.setDisplayNameFormula ( String  formula,
MetaModel  metamodel 
) throws BadPreCondition

Defines the formula expression that will build the string to represent the instances of this metaobject in a user-friendly way. So far, expression must be Clojure expressions beginning with suffix ".clj" without space characters.

Parameters:
formulanot null, a clojure expression.
metamodelthe display name is configured wrt a metamodel specified by this argument.
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Referenced by metadone.client.actions.Test5Action.initMetaModel(), metadone.client.actions.RetroDocAction.initMetaModel(), and metadone.client.dialog.swing.setSympathicName.MySetSympathicName.MySetSympathicName().

public<A> MetaPropertyExt<A> metadone.metabusiness.MetaObject.shareMetaProperty ( MetaProperty< A >  mp,
MetaModel  metamodel 
) throws BadPreCondition

Shares a metaproperty with another metamodel.

This metaproperty will be added to the set of metaproperties that describe this metaobject. The previous metaobjects the metaproperty was attached to are not modified. Hence, if this operation succeeds, the metaproperty will be attached to n+1 metaobjects. Be aware that the first time a metaobject that owns this metaproperty will be deleted, will entail the deletion of the metaproperty. If this already owns the metaproperty, then mp is just returned.

Parameters:
mpDenotes some existing metaproperty.
metamodelDenotes the metamodel that will contain the metaproperty in its definition.
Returns:
The shared metaproperty
Exceptions:
BadPreCondition

Implemented in metadone.metabusiness.impl.MetaObject_impl.

Referenced by metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.bootstrap_grasyla(), and metadone.plugin.urn.URN.initializeProperties().


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