org.argouml.model.uml
Class DataTypesFactoryImpl

java.lang.Object
  extended byorg.argouml.model.uml.AbstractUmlModelFactory
      extended byorg.argouml.model.uml.DataTypesFactoryImpl
All Implemented Interfaces:
org.argouml.model.DataTypesFactory

public class DataTypesFactoryImpl
extends AbstractUmlModelFactory
implements org.argouml.model.DataTypesFactory

Factory to create UML classes for the UML Foundation::DataTypes package.

TODO: Change visibility to package after reflection problem solved.

Since:
ARGO0.11.2

Field Summary
private  NSUMLModelImplementation nsmodel
          The model implementation.
 
Constructor Summary
(package private) DataTypesFactoryImpl(NSUMLModelImplementation implementation)
          Don't allow instantiation.
 
Method Summary
 Object createActionExpression(String language, String body)
          Create an empty but initialized instance of a UML ActionExpression.
 Object createArgListsExpression(String language, String body)
          Create an empty but initialized instance of a UML ArgListsExpression.
 Object createBooleanExpression(String language, String body)
          Create an empty but initialized instance of a UML BooleanExpression.
 Object createExpression(String language, String body)
          Create an empty but initialized instance of a UML Expression.
 Object createExpressionEditor(Object expr)
          Create an UML ExpressionEditor based on a given expression.
 Object createIterationExpression(String language, String body)
          Create an empty but initialized instance of a UML IterationExpression.
 Object createMappingExpression(String language, String body)
          Create an empty but initialized instance of a UML MappingExpression.
 Object createMultiplicity(int lower, int upper)
          Create an empty but initialized instance of a UML Multiplicity.
 Object createMultiplicity(List range)
          Create an empty but initialized instance of a UML Multiplicity.
 Object createMultiplicity(String str)
          Create an empty but initialized instance of a UML Multiplicity.
 Object createObjectSetExpression(String language, String body)
          Create an empty but initialized instance of a UML ObjectSetExpression.
 Object createProcedureExpression(String language, String body)
          Create an empty but initialized instance of a UML ProcedureExpression.
 Object createTimeExpression(String language, String body)
          Create an empty but initialized instance of a UML TimeExpression.
 Object createTypeExpression(String language, String body)
          Create an empty but initialized instance of a UML TypeExpression.
 
Methods inherited from class org.argouml.model.uml.AbstractUmlModelFactory
addListenersToModelElement, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nsmodel

private NSUMLModelImplementation nsmodel
The model implementation.

Constructor Detail

DataTypesFactoryImpl

DataTypesFactoryImpl(NSUMLModelImplementation implementation)
Don't allow instantiation.

Parameters:
implementation - To get other helpers and factories.
Method Detail

createActionExpression

public Object createActionExpression(String language,
                                     String body)
Create an empty but initialized instance of a UML ActionExpression.

Specified by:
createActionExpression in interface org.argouml.model.DataTypesFactory
Parameters:
language - the language for the expression
body - the body for the expression
Returns:
an initialized UML ActionExpression instance.

createArgListsExpression

public Object createArgListsExpression(String language,
                                       String body)
Create an empty but initialized instance of a UML ArgListsExpression.

Specified by:
createArgListsExpression in interface org.argouml.model.DataTypesFactory
Parameters:
language - the language for the expression
body - the body for the expression
Returns:
an initialized UML ArgListsExpression instance.

createBooleanExpression

public Object createBooleanExpression(String language,
                                      String body)
Create an empty but initialized instance of a UML BooleanExpression.

Specified by:
createBooleanExpression in interface org.argouml.model.DataTypesFactory
Parameters:
language - the language for the expression
body - the body for the expression
Returns:
an initialized UML BooleanExpression instance.

createExpressionEditor

public Object createExpressionEditor(Object expr)
Create an UML ExpressionEditor based on a given expression.

Specified by:
createExpressionEditor in interface org.argouml.model.DataTypesFactory
Parameters:
expr - Object MExpression the given expression
Returns:
an initialized ExpressionEditor instance.

createExpression

public Object createExpression(String language,
                               String body)
Create an empty but initialized instance of a UML Expression.

Specified by:
createExpression in interface org.argouml.model.DataTypesFactory
Parameters:
language - the language for the expression
body - the body for the expression
Returns:
an initialized UML Expression instance.

createIterationExpression

public Object createIterationExpression(String language,
                                        String body)
Create an empty but initialized instance of a UML IterationExpression.

Specified by:
createIterationExpression in interface org.argouml.model.DataTypesFactory
Parameters:
language - the language for the expression
body - the body for the expression
Returns:
an initialized UML IterationExpression instance.

createMappingExpression

public Object createMappingExpression(String language,
                                      String body)
Create an empty but initialized instance of a UML MappingExpression.

Specified by:
createMappingExpression in interface org.argouml.model.DataTypesFactory
Parameters:
language - the language for the expression
body - the body for the expression
Returns:
an initialized UML MappingExpression instance.

createObjectSetExpression

public Object createObjectSetExpression(String language,
                                        String body)
Create an empty but initialized instance of a UML ObjectSetExpression.

Specified by:
createObjectSetExpression in interface org.argouml.model.DataTypesFactory
Parameters:
language - the language for the expression
body - the body for the expression
Returns:
an initialized UML ObjectSetExpression instance.

createProcedureExpression

public Object createProcedureExpression(String language,
                                        String body)
Create an empty but initialized instance of a UML ProcedureExpression.

Specified by:
createProcedureExpression in interface org.argouml.model.DataTypesFactory
Parameters:
language - the language for the expression
body - the body for the expression
Returns:
an initialized UML ProcedureExpression instance.

createTimeExpression

public Object createTimeExpression(String language,
                                   String body)
Create an empty but initialized instance of a UML TimeExpression.

Specified by:
createTimeExpression in interface org.argouml.model.DataTypesFactory
Parameters:
language - the language for the expression
body - the body for the expression
Returns:
an initialized UML TimeExpression instance.

createTypeExpression

public Object createTypeExpression(String language,
                                   String body)
Create an empty but initialized instance of a UML TypeExpression.

Specified by:
createTypeExpression in interface org.argouml.model.DataTypesFactory
Parameters:
language - the language for the expression
body - the body for the expression
Returns:
an initialized UML TypeExpression instance.

createMultiplicity

public Object createMultiplicity(int lower,
                                 int upper)
Create an empty but initialized instance of a UML Multiplicity. Quote from the standard: "In the metamodel a MultiplicityRange defines a range of integers. The upper bound of the range cannot be below the lower bound. The lower bound must be a nonnegative integer. The upper bound must be a nonnegative integer or the special value unlimited, which indicates there is no upper bound on the range."

Specified by:
createMultiplicity in interface org.argouml.model.DataTypesFactory
Parameters:
lower - the lower bound of the range
upper - the upper bound of the range TODO: UnlimitedInteger - which number represents "unlimited?". Quote from standard: "In the metamodel UnlimitedInteger defines a data type whose range is the nonnegative integers augmented by the special value 'unlimited'."
Returns:
an initialized UML Multiplicity instance.

createMultiplicity

public Object createMultiplicity(List range)
Create an empty but initialized instance of a UML Multiplicity.

Specified by:
createMultiplicity in interface org.argouml.model.DataTypesFactory
Parameters:
range - a List containing the range
Returns:
an initialized UML Multiplicity instance.

createMultiplicity

public Object createMultiplicity(String str)
Create an empty but initialized instance of a UML Multiplicity.

Specified by:
createMultiplicity in interface org.argouml.model.DataTypesFactory
Parameters:
str - a String representing the multiplicity
Returns:
an initialized UML Multiplicity instance.


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook