org.argouml.model.uml
Class CoreFactoryImpl

java.lang.Object
  extended byorg.argouml.model.uml.AbstractUmlModelFactory
      extended byorg.argouml.model.uml.CoreFactoryImpl
All Implemented Interfaces:
org.argouml.model.CoreFactory

public class CoreFactoryImpl
extends AbstractUmlModelFactory
implements org.argouml.model.CoreFactory

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

Feature, StructuralFeature, and PresentationElement do not have a create method since it is called an "abstract metaclass" in the UML specifications.

Since:
ARGO0.11.2

Field Summary
private  NSUMLModelImplementation nsmodel
          The model implementation.
 
Constructor Summary
(package private) CoreFactoryImpl(NSUMLModelImplementation implementation)
          Don't allow instantiation.
 
Method Summary
 Object buildAbstraction(String name, Object supplier, Object client)
          Build an empty but initialized instance of a UML Abstraction with a given name.
private  ru.novosoft.uml.foundation.core.MAssociation buildAssociation(ru.novosoft.uml.foundation.core.MClassifier c1, boolean nav1, ru.novosoft.uml.foundation.data_types.MAggregationKind agg1, ru.novosoft.uml.foundation.core.MClassifier c2, boolean nav2, ru.novosoft.uml.foundation.data_types.MAggregationKind agg2)
          Builds a default binary association with two default association ends.
 Object buildAssociation(Object c1, boolean nav1, Object c2, boolean nav2, String name)
          Builds a binary association with a direction, aggregation and a given name.
 Object buildAssociation(Object classifier1, Object classifier2)
          Builds a binary associations between two classifiers with default values for the association ends and the association itself.
 Object buildAssociation(Object fromClassifier, Object aggregationKind1, Object toClassifier, Object aggregationKind2, Boolean unidirectional)
          Builds a binary associationrole on basis of two classifierroles, navigation and aggregation.
private  ru.novosoft.uml.foundation.core.MAssociationClass buildAssociationClass(ru.novosoft.uml.foundation.core.MClass cl, ru.novosoft.uml.foundation.core.MClassifier end1, ru.novosoft.uml.foundation.core.MClassifier end2)
          Builds an association class from a class and two classifiers that should be associated.
 Object buildAssociationClass(Object end1, Object end2)
          Builds an associationClass between classifier end1 and end2 with a default class.
 Object buildAssociationEnd(Object type, Object assoc)
          Builds a simply configured association end.
 Object buildAssociationEnd(Object assoc, String name, Object type, Object multi, Object stereo, boolean navigable, Object order, Object aggregation, Object scope, Object changeable, Object visibility)
          Builds a fully configurable association end.
 Object buildAttribute(Object model, Object theIntType)
          Builds a default attribute.
 Object buildAttribute(Object handle, Object model, Object intType, Collection propertyChangeListeners)
          Builds an attribute owned by some classifier cls.
 Object buildClass()
          Builds a default implementation for a class.
 Object buildClass(Object owner)
          Builds a class with a given namespace.
 Object buildClass(String name)
          Builds a class with a given name.
 Object buildClass(String name, Object owner)
          Builds a class with a given name and namespace.
 Object buildComment(Object element, Object model)
          Builds a comment inluding a reference to the given modelelement to comment.
 Object buildConstraint(Object constrElement)
          Builds a constraint that constraints the given modelelement.
 Object buildConstraint(String name, Object bexpr)
          Builds a constraint with a given name and boolean expression.
 Object buildDataType(String name, Object owner)
          Builds a datatype with a given name and namespace.
 Object buildDependency(Object clientObj, Object supplierObj)
          Builds a modelelement dependency between two modelelements.
 Object buildGeneralization(Object child1, Object parent1)
          Builds a generalization between a parent and a child.
 Object buildGeneralization(Object child, Object parent, String name)
          Builds a generalization between a parent and a child with a given name.
 Object buildInterface()
          Builds a default implementation for an interface.
 Object buildInterface(Object owner)
          Builds an interface with a given namespace.
 Object buildInterface(String name)
          Builds an interface with a given name.
 Object buildInterface(String name, Object owner)
          Builds an interface with a given name and namespace.
 Object buildMethod(String name)
          Builds a method with a given name.
 Object buildOperation(Object classifier, Object model, Object voidType, Collection propertyChangeListeners)
          Builds an operation for a classifier.
 Object buildOperation(Object cls, Object model, Object voidType, String name, Collection propertyChangeListeners)
          Builds an operation with a given name for classifier.
private  Object buildParameter(ru.novosoft.uml.model_management.MModel model, ru.novosoft.uml.foundation.core.MClassifier voidType)
          Constructs a default parameter.
 Object buildParameter(Object o, Object model, Object voidType, Collection propertyChangeListeners)
          Adds a parameter initialized to default values to a given event or behavioral feature.
 Object buildPermission(Object clientObj, Object supplierObj)
          Builds a modelelement permission between two modelelements.
 Object buildRealization(Object clnt, Object spplr, Object model)
          Builds a realization between some supplier (for example an interface in Java) and a client who implements the realization.
 Object buildUsage(Object client, Object supplier)
          Builds a usage between some client and a supplier.
 Object copyClass(Object source, Object ns)
          Copies a class, and it's features.
 Object copyDataType(Object source, Object ns)
          Copies a datatype, and it's features.
 Object copyInterface(Object source, Object ns)
          Copies an interface, and it's features.
(package private)  Object createAbstraction()
          Create an empty but initialized instance of a UML Abstraction.
(package private)  Object createAssociation()
          Create an empty but initialized instance of a UML Association.
(package private)  Object createAssociationClass()
          Create an empty but initialized instance of a UML AssociationClass.
 Object createAssociationEnd()
          Create an empty but initialized instance of a UML AssociationEnd.
 Object createAttribute()
          Create an empty but initialized instance of a UML Attribute.
 Object createBinding()
          Create an empty but initialized instance of a UML Binding.
 Object createClass()
          Create an empty but initialized instance of a UML Class.
 Object createClassifier()
          Create an empty but initialized instance of a UML Classifier.
 Object createComment()
          Create an empty but initialized instance of a UML Comment.
 Object createComponent()
          Create an empty but initialized instance of a UML Component.
 Object createConstraint()
          Create an empty but initialized instance of a UML Constraint.
 Object createDataType()
          Create an empty but initialized instance of a UML DataType.
(package private)  Object createDependency()
          Create an empty but initialized instance of a UML Dependency.
 Object createElementResidence()
          Create an empty but initialized instance of a UML ElementResidence.
 Object createFlow()
          Create an empty but initialized instance of a UML Flow.
(package private)  Object createGeneralization()
          Create an empty but initialized instance of a UML Generalization.
 Object createInterface()
          Create an empty but initialized instance of a UML Interface.
 Object createMethod()
          Create an empty but initialized instance of a UML Method.
 Object createNamespace()
          Create an empty but initialized instance of a UML Namespace.
 Object createNode()
          Create an empty but initialized instance of a UML Node.
 Object createOperation()
          Create an empty but initialized instance of a UML Operation.
 Object createParameter()
          Create an empty but initialized instance of a UML Parameter.
 Object createPermission()
          Create an empty but initialized instance of a UML Permission.
 Object createRelationship()
          Create an empty but initialized instance of a UML Relationship.
 Object createTemplateParameter()
          Create an empty but initialized instance of a UML TemplateParameter.
 Object createUsage()
          Create an empty but initialized instance of a UML Usage.
(package private)  void deleteAbstraction(Object elem)
           
(package private)  void deleteAssociation(Object elem)
           
(package private)  void deleteAssociationClass(Object elem)
           
(package private)  void deleteAssociationEnd(Object elem)
          Does a 'cascading delete' to all modelelements that are associated with this element that would be in an illegal state after deletion of the element.
(package private)  void deleteAttribute(Object elem)
           
(package private)  void deleteBehavioralFeature(Object elem)
           
(package private)  void deleteBinding(Object elem)
           
(package private)  void deleteClass(Object elem)
           
(package private)  void deleteClassifier(Object elem)
          Does a 'cascading delete' to all modelelements that are associated with this element that would be in an illegal state after deletion of the element.
(package private)  void deleteComment(Object elem)
           
(package private)  void deleteComponent(Object elem)
           
(package private)  void deleteConstraint(Object elem)
           
(package private)  void deleteDataType(Object elem)
           
(package private)  void deleteDependency(Object elem)
           
(package private)  void deleteElement(Object elem)
           
(package private)  void deleteElementResidence(Object elem)
           
(package private)  void deleteFeature(Object elem)
           
(package private)  void deleteFlow(Object elem)
           
(package private)  void deleteGeneralizableElement(Object elem)
           
(package private)  void deleteGeneralization(Object elem)
           
(package private)  void deleteInterface(Object elem)
           
(package private)  void deleteMethod(Object elem)
           
(package private)  void deleteModelElement(Object elem)
          Does a 'cascading delete' to all modelelements that are associated with this element that would be in an illegal state after deletion of the element.
(package private)  void deleteNamespace(Object elem)
          A namespace deletes its owned elements.
(package private)  void deleteNode(Object elem)
           
(package private)  void deleteOperation(Object elem)
           
(package private)  void deleteParameter(Object elem)
           
(package private)  void deletePermission(Object elem)
           
(package private)  void deletePresentationElement(Object elem)
           
(package private)  void deleteRelationship(Object elem)
           
(package private)  void deleteStructuralFeature(Object elem)
           
(package private)  void deleteTemplateParameter(Object elem)
           
(package private)  void deleteUsage(Object elem)
           
 void doCopyClass(Object source, Object target)
          Used by the copy functions.
 void doCopyClassifier(Object source, Object target)
          Used by the copy functions.
 void doCopyDataType(Object source, Object target)
          Used by the copy functions.
private  void doCopyElement(Object source, Object target)
          Used by the copy functions.
 void doCopyGeneralizableElement(Object source, Object target)
          Used by the copy functions.
 void doCopyInterface(Object source, Object target)
          Used by the copy functions.
 void doCopyModelElement(Object source, Object target)
          Used by the copy functions.
 void doCopyNamespace(Object source, Object target)
          Used by the copy functions.
 
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

CoreFactoryImpl

CoreFactoryImpl(NSUMLModelImplementation implementation)
Don't allow instantiation.

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

createAbstraction

Object createAbstraction()
Create an empty but initialized instance of a UML Abstraction.

Returns:
an initialized UML Abstraction instance.

buildAbstraction

public Object buildAbstraction(String name,
                               Object supplier,
                               Object client)
Build an empty but initialized instance of a UML Abstraction with a given name.

Specified by:
buildAbstraction in interface org.argouml.model.CoreFactory
Parameters:
name - The name.
supplier - the supplier of the abstraction
client - the client of the abstraction
Returns:
an initialized UML Abstraction instance.

createAssociation

Object createAssociation()
Create an empty but initialized instance of a UML Association.

Returns:
an initialized UML Association instance.

createAssociationClass

Object createAssociationClass()
Create an empty but initialized instance of a UML AssociationClass.

Returns:
an initialized UML AssociationClass instance.

createAssociationEnd

public Object createAssociationEnd()
Create an empty but initialized instance of a UML AssociationEnd.

Specified by:
createAssociationEnd in interface org.argouml.model.CoreFactory
Returns:
an initialized UML AssociationEnd instance.

createAttribute

public Object createAttribute()
Create an empty but initialized instance of a UML Attribute.

Specified by:
createAttribute in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Attribute instance.

createBinding

public Object createBinding()
Create an empty but initialized instance of a UML Binding.

Specified by:
createBinding in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Binding instance.

createClass

public Object createClass()
Create an empty but initialized instance of a UML Class.

Specified by:
createClass in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Class instance.

createClassifier

public Object createClassifier()
Create an empty but initialized instance of a UML Classifier.

Specified by:
createClassifier in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Classifier instance.

createComment

public Object createComment()
Create an empty but initialized instance of a UML Comment.

Specified by:
createComment in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Comment instance.

createComponent

public Object createComponent()
Create an empty but initialized instance of a UML Component.

Specified by:
createComponent in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Component instance.

createConstraint

public Object createConstraint()
Create an empty but initialized instance of a UML Constraint.

Specified by:
createConstraint in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Constraint instance.

createDataType

public Object createDataType()
Create an empty but initialized instance of a UML DataType.

Specified by:
createDataType in interface org.argouml.model.CoreFactory
Returns:
an initialized UML DataType instance.

createDependency

Object createDependency()
Create an empty but initialized instance of a UML Dependency.

Returns:
an initialized UML Dependency instance.

createElementResidence

public Object createElementResidence()
Create an empty but initialized instance of a UML ElementResidence.

Specified by:
createElementResidence in interface org.argouml.model.CoreFactory
Returns:
an initialized UML ElementResidence instance.

createFlow

public Object createFlow()
Create an empty but initialized instance of a UML Flow.

Specified by:
createFlow in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Flow instance.

createGeneralization

Object createGeneralization()
Create an empty but initialized instance of a UML Generalization.

Returns:
an initialized UML Generalization instance.

createInterface

public Object createInterface()
Create an empty but initialized instance of a UML Interface.

Specified by:
createInterface in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Interface instance.

createMethod

public Object createMethod()
Create an empty but initialized instance of a UML Method.

Specified by:
createMethod in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Method instance.

createNamespace

public Object createNamespace()
Create an empty but initialized instance of a UML Namespace.

Specified by:
createNamespace in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Namespace instance.

createNode

public Object createNode()
Create an empty but initialized instance of a UML Node.

Specified by:
createNode in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Node instance.

createOperation

public Object createOperation()
Create an empty but initialized instance of a UML Operation.

Specified by:
createOperation in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Operation instance.

createParameter

public Object createParameter()
Create an empty but initialized instance of a UML Parameter.

Specified by:
createParameter in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Parameter instance.

createPermission

public Object createPermission()
Create an empty but initialized instance of a UML Permission.

Specified by:
createPermission in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Permission instance.

createRelationship

public Object createRelationship()
Create an empty but initialized instance of a UML Relationship.

Specified by:
createRelationship in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Relationship instance.

createTemplateParameter

public Object createTemplateParameter()
Create an empty but initialized instance of a UML TemplateParameter.

Specified by:
createTemplateParameter in interface org.argouml.model.CoreFactory
Returns:
an initialized UML TemplateParameter instance.

createUsage

public Object createUsage()
Create an empty but initialized instance of a UML Usage.

Specified by:
createUsage in interface org.argouml.model.CoreFactory
Returns:
an initialized UML Usage instance.

buildAssociation

private ru.novosoft.uml.foundation.core.MAssociation buildAssociation(ru.novosoft.uml.foundation.core.MClassifier c1,
                                                                      boolean nav1,
                                                                      ru.novosoft.uml.foundation.data_types.MAggregationKind agg1,
                                                                      ru.novosoft.uml.foundation.core.MClassifier c2,
                                                                      boolean nav2,
                                                                      ru.novosoft.uml.foundation.data_types.MAggregationKind agg2)
Builds a default binary association with two default association ends.

Parameters:
c1 - The first classifier to connect to
nav1 - The navigability of the Associaton end
agg1 - The aggregation type of the second Associaton end
c2 - The second classifier to connect to
nav2 - The navigability of the second Associaton end
agg2 - The aggregation type of the second Associaton end
Returns:
MAssociation
Throws:
IllegalArgumentException - if either Classifier is null

buildAssociation

public Object buildAssociation(Object fromClassifier,
                               Object aggregationKind1,
                               Object toClassifier,
                               Object aggregationKind2,
                               Boolean unidirectional)
Builds a binary associationrole on basis of two classifierroles, navigation and aggregation.

Specified by:
buildAssociation in interface org.argouml.model.CoreFactory
Parameters:
fromClassifier - the first given classifier
aggregationKind1 - the first aggregationkind
toClassifier - the second given classifier
aggregationKind2 - the second aggregationkind
unidirectional - true if unidirectional
Returns:
the newly build binary associationrole

buildAssociation

public Object buildAssociation(Object classifier1,
                               Object classifier2)
Builds a binary associations between two classifiers with default values for the association ends and the association itself.

Specified by:
buildAssociation in interface org.argouml.model.CoreFactory
Parameters:
classifier1 - The first classifier to connect
classifier2 - The second classifier to connect
Returns:
MAssociation

buildAssociation

public Object buildAssociation(Object c1,
                               boolean nav1,
                               Object c2,
                               boolean nav2,
                               String name)
Builds a binary association with a direction, aggregation and a given name.

Specified by:
buildAssociation in interface org.argouml.model.CoreFactory
Parameters:
c1 - The first classifier to connect to
nav1 - The navigability of the Associaton end
c2 - The second classifier to connect to
nav2 - The navigability of the second Associaton end
name - the given name
Returns:
association

buildAssociationClass

public Object buildAssociationClass(Object end1,
                                    Object end2)
Builds an associationClass between classifier end1 and end2 with a default class.

Specified by:
buildAssociationClass in interface org.argouml.model.CoreFactory
Parameters:
end1 - the first given classifier
end2 - the second given classifier
Returns:
MAssociationClass

buildAssociationEnd

public Object buildAssociationEnd(Object assoc,
                                  String name,
                                  Object type,
                                  Object multi,
                                  Object stereo,
                                  boolean navigable,
                                  Object order,
                                  Object aggregation,
                                  Object scope,
                                  Object changeable,
                                  Object visibility)
Builds a fully configurable association end. All variables for an associationend can be given as parameter.

Specified by:
buildAssociationEnd in interface org.argouml.model.CoreFactory
Parameters:
assoc - The associaton this end will be part of
name - The name of the association end
type - The type (classifier) the end will connect. The end is a connection piece between an association and a classifier
multi - The multiplicity
stereo - The stereotype
navigable - The navigability. True if this association end can be 'passed' from the other classifier.
order - Ordering of the association
aggregation - the aggregationkind
scope - the scope kind
changeable - the changeablekind
visibility - the visibilitykind
Returns:
MAssociationEnd

buildAssociationEnd

public Object buildAssociationEnd(Object type,
                                  Object assoc)
Builds a simply configured association end.

Specified by:
buildAssociationEnd in interface org.argouml.model.CoreFactory
Parameters:
type - the given classifier
assoc - the given association
Returns:
the newly build associationend

buildAssociationClass

private ru.novosoft.uml.foundation.core.MAssociationClass buildAssociationClass(ru.novosoft.uml.foundation.core.MClass cl,
                                                                                ru.novosoft.uml.foundation.core.MClassifier end1,
                                                                                ru.novosoft.uml.foundation.core.MClassifier end2)
Builds an association class from a class and two classifiers that should be associated. Both ends of the associationclass are navigable.

Parameters:
cl - the class
end1 - the first classifier
end2 - the second classifier
Returns:
MAssociationClass

buildAttribute

public Object buildAttribute(Object model,
                             Object theIntType)
Builds a default attribute.

Specified by:
buildAttribute in interface org.argouml.model.CoreFactory
See Also:
CoreFactory.buildAttribute(java.lang.Object, java.lang.Object)

buildAttribute

public Object buildAttribute(Object handle,
                             Object model,
                             Object intType,
                             Collection propertyChangeListeners)
Builds an attribute owned by some classifier cls. I don't know if this is legal for an interface (purely UML speaking). In this method it is.

Specified by:
buildAttribute in interface org.argouml.model.CoreFactory
See Also:
CoreFactory.buildAttribute(java.lang.Object, java.lang.Object, java.lang.Object, java.util.Collection)

buildClass

public Object buildClass()
Builds a default implementation for a class. The class is not owned by any model element by default. Users should not forget to add ownership

Specified by:
buildClass in interface org.argouml.model.CoreFactory
Returns:
MClass

buildClass

public Object buildClass(Object owner)
Builds a class with a given namespace.

Specified by:
buildClass in interface org.argouml.model.CoreFactory
Parameters:
owner - the namespace
Returns:
MClass
See Also:
buildClass()

buildClass

public Object buildClass(String name)
Builds a class with a given name.

Specified by:
buildClass in interface org.argouml.model.CoreFactory
Parameters:
name - the given name
Returns:
MClass
See Also:
buildClass()

buildClass

public Object buildClass(String name,
                         Object owner)
Builds a class with a given name and namespace.

Specified by:
buildClass in interface org.argouml.model.CoreFactory
Parameters:
name - the given name
owner - the namespace
Returns:
MClass
See Also:
buildClass()

buildInterface

public Object buildInterface()
Builds a default implementation for an interface. The interface is not owned by any model element by default. Users should not forget to add ownership.

Specified by:
buildInterface in interface org.argouml.model.CoreFactory
Returns:
MInterface

buildInterface

public Object buildInterface(Object owner)
Builds an interface with a given namespace.

Specified by:
buildInterface in interface org.argouml.model.CoreFactory
Parameters:
owner - is the owner
Returns:
MInterface
See Also:
buildInterface()

buildInterface

public Object buildInterface(String name)
Builds an interface with a given name.

Specified by:
buildInterface in interface org.argouml.model.CoreFactory
Parameters:
name - is the given name.
Returns:
MInterface
See Also:
buildInterface()

buildInterface

public Object buildInterface(String name,
                             Object owner)
Builds an interface with a given name and namespace.

Specified by:
buildInterface in interface org.argouml.model.CoreFactory
Parameters:
name - is the given name
owner - is the namespace
Returns:
MInterface
See Also:
buildInterface()

buildDataType

public Object buildDataType(String name,
                            Object owner)
Builds a datatype with a given name and namespace.

Specified by:
buildDataType in interface org.argouml.model.CoreFactory
Parameters:
name - is the name
owner - is the namespace
Returns:
an initialized UML DataType instance.

buildDependency

public Object buildDependency(Object clientObj,
                              Object supplierObj)
Builds a modelelement dependency between two modelelements.

Specified by:
buildDependency in interface org.argouml.model.CoreFactory
Parameters:
clientObj - is the client
supplierObj - is the supplier
Returns:
MDependency

buildPermission

public Object buildPermission(Object clientObj,
                              Object supplierObj)
Builds a modelelement permission between two modelelements.

Specified by:
buildPermission in interface org.argouml.model.CoreFactory
Parameters:
clientObj - is the client
supplierObj - is the supplier
Returns:
MPermission

buildGeneralization

public Object buildGeneralization(Object child,
                                  Object parent,
                                  String name)
Builds a generalization between a parent and a child with a given name.

Specified by:
buildGeneralization in interface org.argouml.model.CoreFactory
Parameters:
child - is the child
parent - is the parent
name - is the given name
Returns:
generalization

buildGeneralization

public Object buildGeneralization(Object child1,
                                  Object parent1)
Builds a generalization between a parent and a child. Does not check if multiple inheritance is allowed for the current notation.

Specified by:
buildGeneralization in interface org.argouml.model.CoreFactory
Parameters:
child1 - is the child
parent1 - is the parent
Returns:
MGeneralization

buildMethod

public Object buildMethod(String name)
Builds a method with a given name.

Specified by:
buildMethod in interface org.argouml.model.CoreFactory
Parameters:
name - is the given name
Returns:
method

buildOperation

public Object buildOperation(Object classifier,
                             Object model,
                             Object voidType,
                             Collection propertyChangeListeners)
Builds an operation for a classifier.

Specified by:
buildOperation in interface org.argouml.model.CoreFactory
Parameters:
classifier - is the given classifier
model - is the model to which the class belongs
voidType - the type of the return parameter
propertyChangeListeners - the listeners
Returns:
the operation

buildOperation

public Object buildOperation(Object cls,
                             Object model,
                             Object voidType,
                             String name,
                             Collection propertyChangeListeners)
Builds an operation with a given name for classifier.

Specified by:
buildOperation in interface org.argouml.model.CoreFactory
Parameters:
cls - is the classifier that shall own the operation
model - is the model that contains the class
voidType - the type of the return parameter
name - the given name for the operation
propertyChangeListeners - the listeners
Returns:
the operation

buildParameter

private Object buildParameter(ru.novosoft.uml.model_management.MModel model,
                              ru.novosoft.uml.foundation.core.MClassifier voidType)
Constructs a default parameter.

Returns:
The newly created parameter.

buildParameter

public Object buildParameter(Object o,
                             Object model,
                             Object voidType,
                             Collection propertyChangeListeners)
Adds a parameter initialized to default values to a given event or behavioral feature.

Specified by:
buildParameter in interface org.argouml.model.CoreFactory
Parameters:
o - an event or behavioral feature
model - the model to which the event or behavioral feature belongs
voidType - the type of the return parameter
propertyChangeListeners - the listeners
Returns:
the parameter

buildRealization

public Object buildRealization(Object clnt,
                               Object spplr,
                               Object model)
Builds a realization between some supplier (for example an interface in Java) and a client who implements the realization.

Specified by:
buildRealization in interface org.argouml.model.CoreFactory
Parameters:
clnt - is the client
spplr - is the supplier
model - the namespace to use if client and supplier are of different namespace
Returns:
Object the created abstraction

buildUsage

public Object buildUsage(Object client,
                         Object supplier)
Builds a usage between some client and a supplier. If client and supplier do not have the same model, an IllegalArgumentException is thrown.

Specified by:
buildUsage in interface org.argouml.model.CoreFactory
Parameters:
client - is the client
supplier - is the supplier
Returns:
MUsage

buildComment

public Object buildComment(Object element,
                           Object model)
Builds a comment inluding a reference to the given modelelement to comment. If the element is null, the comment is still build since it is not mandatory to have an annotated element in the comment.

Specified by:
buildComment in interface org.argouml.model.CoreFactory
Parameters:
element - is the model element
model - the namespace for the comment
Returns:
MComment

buildConstraint

public Object buildConstraint(Object constrElement)
Builds a constraint that constraints the given modelelement. The namespace of the constraint will be the same as the namespace of the given modelelement.

Specified by:
buildConstraint in interface org.argouml.model.CoreFactory
Parameters:
constrElement - The constrained element.
Returns:
MConstraint

buildConstraint

public Object buildConstraint(String name,
                              Object bexpr)
Builds a constraint with a given name and boolean expression.

Specified by:
buildConstraint in interface org.argouml.model.CoreFactory
Parameters:
name - is the given name
bexpr - boolean expression
Returns:
constraint

deleteAbstraction

void deleteAbstraction(Object elem)
Parameters:
elem - the abstraction to be deleted

deleteAssociation

void deleteAssociation(Object elem)
Parameters:
elem - the association to be deleted

deleteAssociationClass

void deleteAssociationClass(Object elem)
Parameters:
elem - the a. to be deleted

deleteAssociationEnd

void deleteAssociationEnd(Object elem)
Does a 'cascading delete' to all modelelements that are associated with this element that would be in an illegal state after deletion of the element. Does not do an cascading delete for elements that are deleted by the NSUML method remove. This method should not be called directly.

In the case of an associationend these are the following elements:

Parameters:
elem -
See Also:
UmlFactoryImpl.delete(Object)

deleteAttribute

void deleteAttribute(Object elem)
Parameters:
elem - the attribute to be deleted

deleteBehavioralFeature

void deleteBehavioralFeature(Object elem)
Parameters:
elem - the element to be deleted

deleteBinding

void deleteBinding(Object elem)
Parameters:
elem - the element to be deleted

deleteClass

void deleteClass(Object elem)
Parameters:
elem - the element to be deleted

deleteClassifier

void deleteClassifier(Object elem)
Does a 'cascading delete' to all modelelements that are associated with this element that would be in an illegal state after deletion of the element. Does not do an cascading delete for elements that are deleted by the NSUML method remove. This method should not be called directly.

In the case of a classifier these are the following elements:

Parameters:
elem -
See Also:
UmlFactoryImpl.delete(Object)

deleteComment

void deleteComment(Object elem)
Parameters:
elem - the element to be deleted

deleteComponent

void deleteComponent(Object elem)
Parameters:
elem - the element to be deleted

deleteConstraint

void deleteConstraint(Object elem)
Parameters:
elem - the element to be deleted

deleteDataType

void deleteDataType(Object elem)
Parameters:
elem - the element to be deleted

deleteDependency

void deleteDependency(Object elem)
Parameters:
elem - the element to be deleted

deleteElement

void deleteElement(Object elem)
Parameters:
elem - the element to be deleted

deleteElementResidence

void deleteElementResidence(Object elem)
Parameters:
elem - the element to be deleted

deleteFeature

void deleteFeature(Object elem)
Parameters:
elem - the element to be deleted

deleteFlow

void deleteFlow(Object elem)
Parameters:
elem - the element to be deleted

deleteGeneralizableElement

void deleteGeneralizableElement(Object elem)
Parameters:
elem - the element to be deleted

deleteGeneralization

void deleteGeneralization(Object elem)
Parameters:
elem - the element to be deleted

deleteInterface

void deleteInterface(Object elem)
Parameters:
elem - the element to be deleted

deleteMethod

void deleteMethod(Object elem)
Parameters:
elem - the element to be deleted

deleteModelElement

void deleteModelElement(Object elem)
Does a 'cascading delete' to all modelelements that are associated with this element that would be in an illegal state after deletion of the element. Does not do an cascading delete for elements that are deleted by the NSUML method remove. This method should not be called directly.

In the case of a modelelement these are the following elements:

Parameters:
elem -
See Also:
UmlFactoryImpl.delete(Object)

deleteNamespace

void deleteNamespace(Object elem)
A namespace deletes its owned elements.

Parameters:
elem - is the namespace.

deleteNode

void deleteNode(Object elem)
Parameters:
elem - the element to be deleted

deleteOperation

void deleteOperation(Object elem)
Parameters:
elem - the element to be deleted

deleteParameter

void deleteParameter(Object elem)
Parameters:
elem - the element to be deleted

deletePermission

void deletePermission(Object elem)
Parameters:
elem - the element to be deleted

deletePresentationElement

void deletePresentationElement(Object elem)
Parameters:
elem - the element to be deleted

deleteRelationship

void deleteRelationship(Object elem)
Parameters:
elem - the element to be deleted

deleteStructuralFeature

void deleteStructuralFeature(Object elem)
Parameters:
elem - the element to be deleted

deleteTemplateParameter

void deleteTemplateParameter(Object elem)
Parameters:
elem - the element to be deleted

deleteUsage

void deleteUsage(Object elem)
Parameters:
elem - the element to be deleted

copyClass

public Object copyClass(Object source,
                        Object ns)
Copies a class, and it's features. This may also require other classifiers to be copied.

Specified by:
copyClass in interface org.argouml.model.CoreFactory
Parameters:
source - is the class to copy.
ns - is the namespace to put the copy in.
Returns:
a newly created class.

copyDataType

public Object copyDataType(Object source,
                           Object ns)
Copies a datatype, and it's features. This may also require other classifiers to be copied.

Specified by:
copyDataType in interface org.argouml.model.CoreFactory
Parameters:
source - is the datatype to copy.
ns - is the namespace to put the copy in.
Returns:
a newly created data type.

copyInterface

public Object copyInterface(Object source,
                            Object ns)
Copies an interface, and it's features. This may also require other classifiers to be copied.

Specified by:
copyInterface in interface org.argouml.model.CoreFactory
Parameters:
source - is the interface to copy.
ns - is the namespace to put the copy in.
Returns:
a newly created interface.

doCopyElement

private void doCopyElement(Object source,
                           Object target)
Used by the copy functions. Do not call this function directly.


doCopyClass

public void doCopyClass(Object source,
                        Object target)
Used by the copy functions. Do not call this function directly.

Specified by:
doCopyClass in interface org.argouml.model.CoreFactory
Parameters:
source - the source class
target - the target class

doCopyClassifier

public void doCopyClassifier(Object source,
                             Object target)
Used by the copy functions. Do not call this function directly. TODO: actions? instances? collaborations etc?

Specified by:
doCopyClassifier in interface org.argouml.model.CoreFactory
Parameters:
source - the source classifier
target - the target classifier

doCopyDataType

public void doCopyDataType(Object source,
                           Object target)
Used by the copy functions. Do not call this function directly.

Specified by:
doCopyDataType in interface org.argouml.model.CoreFactory
Parameters:
source - the source datatype
target - the target datatype

doCopyGeneralizableElement

public void doCopyGeneralizableElement(Object source,
                                       Object target)
Used by the copy functions. Do not call this function directly. TODO: generalizations, specializations?

Specified by:
doCopyGeneralizableElement in interface org.argouml.model.CoreFactory
Parameters:
source - the source generalizable element
target - the target generalizable element

doCopyInterface

public void doCopyInterface(Object source,
                            Object target)
Used by the copy functions. Do not call this function directly.

Specified by:
doCopyInterface in interface org.argouml.model.CoreFactory
Parameters:
source - the source interface
target - the target interface

doCopyModelElement

public void doCopyModelElement(Object source,
                               Object target)
Used by the copy functions. Do not call this function directly. TODO: template parameters, default type TODO: constraining elements TODO: flows, dependencies, comments, bindings, contexts ??? TODO: contents, residences ???

Specified by:
doCopyModelElement in interface org.argouml.model.CoreFactory
Parameters:
source - the source me
target - the target me

doCopyNamespace

public void doCopyNamespace(Object source,
                            Object target)
Used by the copy functions. Do not call this function directly.

Specified by:
doCopyNamespace in interface org.argouml.model.CoreFactory
Parameters:
source - the source namespace
target - the target namespace


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