Dresden OCL Toolkit

tudresden.ocl.sql
Class ModelAdjuster

java.lang.Object
  extended bytudresden.ocl.sql.ModelAdjuster

public class ModelAdjuster
extends Object

a kind of filter for a MModel
the data for object-relational mappings in ORMappingImpl is here made available. This includes:

Also null-entries are filled here

Author:
Andrea Kling
See Also:
ORMappingImpl, MModel, TypeManager

Field Summary
private  Set associations
           
private  Set classAttributes
           
private  Set classifiers
           
private  ru.novosoft.uml.foundation.data_types.MMultiplicity defaultMultiplicity
           
private  Set generalizationRoots
           
private  Set generalizations
           
private  ru.novosoft.uml.model_management.MModel theModel
           
private  Set undefinedAttributes
           
 
Constructor Summary
ModelAdjuster()
          creates a new ModelAdjuster.
ModelAdjuster(ru.novosoft.uml.foundation.data_types.MMultiplicity defaultMultiplicity)
          creates a new ModelAdjuster.
 
Method Summary
private  void addAssociationMultiplicities(ru.novosoft.uml.foundation.data_types.MMultiplicity defaultMultiplicity)
           
private  void addAssociationNames()
          adds names to unnamed Associations by default the name consits of the rolenames of the Association ends connected by an underscore '_'
private  void addAssociationRoles()
          adds AssociationRoles, by default the associated classifier name with the first letter in lower case.
 void adjust(ru.novosoft.uml.model_management.MModel theModel)
          start correcting and analysing the model
private  void getAll(ru.novosoft.uml.foundation.core.MModelElement element)
          gets all MClassifiers, inheritance roots and associations
 Set getAssociations()
          returns a Set of MAssociation of all Associations between classes and/or interfaces
private  void getAttributes()
          gets all attributes with unknown types
 Set getClassifiers()
          returns a Set of all MClassifiers being either a MClass or a MInterface and containing at least one Attribute or being part of and association or generalization
 Set getClassReferenceAttributes()
          returns a Set of MAttribute of all attributes referencing a classifier defined in the MModel
 Set getGeneralizationRoots()
           
 Set getUndefinedAttributes()
          returns a Set of MAttribute of all attributes having an unknown datatype
 void setDefaultMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity multi)
          sets the default multiplicity for AssociationEnds without defined multiplicities
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theModel

private ru.novosoft.uml.model_management.MModel theModel

classifiers

private Set classifiers

associations

private Set associations

generalizations

private Set generalizations

generalizationRoots

private Set generalizationRoots

undefinedAttributes

private Set undefinedAttributes

classAttributes

private Set classAttributes

defaultMultiplicity

private ru.novosoft.uml.foundation.data_types.MMultiplicity defaultMultiplicity
Constructor Detail

ModelAdjuster

public ModelAdjuster()
creates a new ModelAdjuster. undefined Multiplicities at Associationends get a default multiplicity of 1


ModelAdjuster

public ModelAdjuster(ru.novosoft.uml.foundation.data_types.MMultiplicity defaultMultiplicity)
creates a new ModelAdjuster. undefined Multiplicities at Associationends get a default multiplicity of the given parameter

Method Detail

adjust

public void adjust(ru.novosoft.uml.model_management.MModel theModel)
start correcting and analysing the model


setDefaultMultiplicity

public void setDefaultMultiplicity(ru.novosoft.uml.foundation.data_types.MMultiplicity multi)
sets the default multiplicity for AssociationEnds without defined multiplicities


getAll

private void getAll(ru.novosoft.uml.foundation.core.MModelElement element)
gets all MClassifiers, inheritance roots and associations


addAssociationRoles

private void addAssociationRoles()
adds AssociationRoles, by default the associated classifier name with the first letter in lower case. if more than one unnamed associationend with this type exists a sequence number is attached to the new roleName


addAssociationMultiplicities

private void addAssociationMultiplicities(ru.novosoft.uml.foundation.data_types.MMultiplicity defaultMultiplicity)

addAssociationNames

private void addAssociationNames()
adds names to unnamed Associations by default the name consits of the rolenames of the Association ends connected by an underscore '_'


getAttributes

private void getAttributes()
gets all attributes with unknown types


getClassifiers

public Set getClassifiers()
returns a Set of all MClassifiers being either a MClass or a MInterface and containing at least one Attribute or being part of and association or generalization


getAssociations

public Set getAssociations()
returns a Set of MAssociation of all Associations between classes and/or interfaces


getGeneralizationRoots

public Set getGeneralizationRoots()

getUndefinedAttributes

public Set getUndefinedAttributes()
returns a Set of MAttribute of all attributes having an unknown datatype


getClassReferenceAttributes

public Set getClassReferenceAttributes()
returns a Set of MAttribute of all attributes referencing a classifier defined in the MModel


Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.