Author: b00__1
Date: 2007-06-03 15:32:11-0700
New Revision: 12750
Added:
branches/gsoc2007/b00__1/model-euml/.classpath
branches/gsoc2007/b00__1/model-euml/.project
branches/gsoc2007/b00__1/model-euml/.settings/
branches/gsoc2007/b00__1/model-euml/.settings/org.eclipse.jdt.core.prefs
branches/gsoc2007/b00__1/model-euml/.settings/org.eclipse.jdt.ui.prefs
branches/gsoc2007/b00__1/model-euml/ArgoUML UML2-EUML debug.launch
branches/gsoc2007/b00__1/model-euml/META-INF/
branches/gsoc2007/b00__1/model-euml/META-INF/MANIFEST.MF
branches/gsoc2007/b00__1/model-euml/build.bat
branches/gsoc2007/b00__1/model-euml/build.properties (contents, props changed)
branches/gsoc2007/b00__1/model-euml/build.sh (contents, props changed)
branches/gsoc2007/b00__1/model-euml/build.xml
branches/gsoc2007/b00__1/model-euml/build2.bat
branches/gsoc2007/b00__1/model-euml/build2.sh (contents, props changed)
branches/gsoc2007/b00__1/model-euml/lib/
branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.emf.common_2.3.0.v200703080200.jar (contents, props changed)
branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.emf.ecore.xmi_2.3.0.v200703080200.jar (contents, props changed)
branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.emf.ecore_2.3.0.v200703080200.jar (contents, props changed)
branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.uml2.common_1.3.0.v200703011358.jar (contents, props changed)
branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.uml2.uml_2.1.0.v200703011358.jar (contents, props changed)
branches/gsoc2007/b00__1/model-euml/plugin.properties (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/
branches/gsoc2007/b00__1/model-euml/src/org/
branches/gsoc2007/b00__1/model-euml/src/org/argouml/
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ActivityGraphsFactoryEUMLlImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ActivityGraphsHelperEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/AggregationKindEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ChangeableKindEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CollaborationsFactoryEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CollaborationsHelperEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CommonBehaviorFactoryEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CommonBehaviorHelperEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ConcurrencyKindEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CopyHelperEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/DataTypesFactoryEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/DataTypesHelperEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/DirectionKindEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/EUMLModelImplementation.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ExtensionMechanismsFactoryEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ExtensionMechanismsHelperEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelManagementFactoryEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/NotYetImplementedException.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/OrderingKindEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/PseudostateKindEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ScopeKindEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/StateMachinesHelperEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UmlHelperEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UseCasesFactoryEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UseCasesHelperEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/VisibilityKindEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/XmiReaderEUMLImpl.java (contents, props changed)
branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/XmiWriterEUMLImpl.java (contents, props changed)
Log:
Initial import from tfmorris.
Added: branches/gsoc2007/b00__1/model-euml/.classpath
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/.classpath?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/.classpath 2007-06-03 15:32:11-0700
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="lib" path="lib/org.eclipse.emf.common_2.3.0.v200703080200.jar"/>
+ <classpathentry kind="lib" path="lib/org.eclipse.emf.ecore_2.3.0.v200703080200.jar"/>
+ <classpathentry kind="lib" path="lib/org.eclipse.emf.ecore.xmi_2.3.0.v200703080200.jar"/>
+ <classpathentry kind="lib" path="lib/org.eclipse.uml2.common_1.3.0.v200703011358.jar"/>
+ <classpathentry kind="lib" path="lib/org.eclipse.uml2.uml_2.1.0.v200703011358.jar"/>
+ <classpathentry kind="output" path="build-eclipse"/>
+</classpath>
Added: branches/gsoc2007/b00__1/model-euml/.project
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/.project?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/.project 2007-06-03 15:32:11-0700
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>argouml-core-model-euml</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: branches/gsoc2007/b00__1/model-euml/.settings/org.eclipse.jdt.core.prefs
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/.settings/org.eclipse.jdt.core.prefs?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/.settings/org.eclipse.jdt.core.prefs 2007-06-03 15:32:11-0700
@@ -0,0 +1,69 @@
+#Mon May 28 18:37:58 EDT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.5
Added: branches/gsoc2007/b00__1/model-euml/.settings/org.eclipse.jdt.ui.prefs
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/.settings/org.eclipse.jdt.ui.prefs?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/.settings/org.eclipse.jdt.ui.prefs 2007-06-03 15:32:11-0700
@@ -0,0 +1,3 @@
+#Mon May 28 17:57:57 EDT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructor
comment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n *\r\n * ${tags}\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment fo
r non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/*\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\=
"newtype">// $$Id\: eclipse-argo-codetemplates.xml,v 1.2 2006/05/25 12\:58\:04 linus Exp $$\r\n// Copyright (c) ${year} The Regents of the University of California. All\r\n// Rights Reserved. Permission to use, copy, modify, and distribute this\r\n// software and its documentation without fee, and without a written\r\n// agreement is hereby granted, provided that the above copyright notice\r\n// and this paragraph appear in all copies. This software program and\r\n// documentation are copyrighted by The Regents of the University of\r\n// California. The software program and documentation are supplied "AS\r\n// IS", without any accompanying services from The Regents. The Regents\r\n// does not warrant that the operation of the program will be\r\n// uninterrupted or error-free. The end-user understands that the program\r\n// was developed for research purposes and is advised not to rely\
r\n// exclusively on the program for any reason. IN NO EVENT SHALL THE\r\n// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,\r\n// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,\r\n// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF\r\n// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF\r\n// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY\r\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE\r\n// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF\r\n// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,\r\n// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true"
context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><t
emplate autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\nLOG.error("Exception", ${exception_var});</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo}\: Auto-generated method stub\r\nthrow new NotYetImplementedException();\r\n</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stu
b</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
Added: branches/gsoc2007/b00__1/model-euml/ArgoUML UML2-EUML debug.launch
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/ArgoUML%20UML2-EUML%20debug.launch?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/ArgoUML UML2-EUML debug.launch 2007-06-03 15:32:11-0700
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.argouml.application.Main"/>
+<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER" javaProject="argouml" path="1" type="4"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="argouml"/> </runtimeClasspathEntry> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-model-mdr/lib/jmi.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-model-mdr/lib/jmiutils.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-model-mdr/lib/mdrapi.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-model-mdr/lib/mof.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-model-mdr/lib/nbmdr.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-model-mdr/lib/openide-util.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry path="3" projectName="argouml-core-model" type="1"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry path="3" projectName="argouml-core-lib" type="1"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-lib/antlrall-2.7.2.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-lib/commons-logging-1.0.2.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-lib/log4j-1.2.6.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-lib/ocl-argo-1.1.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-lib/toolbar-1.4beta.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-lib/swidgets-0.1.4.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-model-euml/lib/org.eclipse.emf.common_2.3.0.v200703080200.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-model-euml/lib/org.eclipse.emf.ecore_2.3.0.v200703080200.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-model-euml/lib/org.eclipse.emf.ecore.xmi_2.3.0.v200703080200.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-model-euml/lib/org.eclipse.uml2.common_1.3.0.v200703011358.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry internalArchive="/argouml-core-model-euml/lib/org.eclipse.uml2.uml_2.1.0.v200703011358.jar" path="3" type="2"/> "/>
+<listEntry value="<?xml version="1.0" encoding="UTF-8"?> <runtimeClasspathEntry path="3" projectName="argouml-core-model-euml" type="1"/> "/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="argouml"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx400M -ea -Dlog4j.configuration=org/argouml/resource/full_console.lcf -Dargouml.model.implementation=org.argouml.model.euml.EUMLModelImplementation"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/argouml"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+</launchConfiguration>
Added: branches/gsoc2007/b00__1/model-euml/META-INF/MANIFEST.MF
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/META-INF/MANIFEST.MF?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/META-INF/MANIFEST.MF 2007-06-03 15:32:11-0700
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.argouml.core.model.euml2
+Bundle-Version: 0.25.3
+Bundle-Localization: plugin
+Export-Package: org.argouml.model.euml
+Bundle-Vendor: %pluginProvider
+Require-Bundle: org.argouml.core.model,
+ org.eclipse.core.runtime
+Bundle-ClassPath:
+Eclipse-RegisterBuddy:
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: branches/gsoc2007/b00__1/model-euml/build.bat
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/build.bat?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/build.bat 2007-06-03 15:32:11-0700
@@ -0,0 +1,11 @@
+@echo off
+
+rem
+rem build.bat always calls the version of ant distributed with ArgoUML
+rem
+
+set SAVE_ANT_HOME=%ANT_HOME%
+set ANT_HOME=..\..\tools\ant-1.6.2
+call %ANT_HOME%\bin\ant %1 %2 %3 %4 %5 %6 %7 %8 %9
+set ANT_HOME=%SAVE_ANT_HOME%
+set SAVE_ANT_HOME=
Added: branches/gsoc2007/b00__1/model-euml/build.properties
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/build.properties?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/build.properties 2007-06-03 15:32:11-0700
@@ -0,0 +1,7 @@
+bin.includes = META-INF/,\
+ lib/jmi.jar,\
+ lib/jmiutils.jar,\
+ lib/mdrapi.jar,\
+ lib/mof.jar,\
+ lib/nbmdr.jar,\
+ lib/openide-util.jar
Added: branches/gsoc2007/b00__1/model-euml/build.sh
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/build.sh?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/build.sh 2007-06-03 15:32:11-0700
@@ -0,0 +1,42 @@
+#! /bin/sh
+# $Id: build.sh 9943 2006-03-04 18:15:38Z rastaman $
+#
+
+# OS specific support.
+darwin=false
+
+case "`uname`" in
+ Darwin*) darwin=true;;
+esac
+
+# +-------------------------------------------------------------------------+
+# | Verify and Set Required Environment Variables |
+# +-------------------------------------------------------------------------+
+if [ "$JAVA_HOME" = "" ] ; then
+ if $darwin; then
+ # Set Java Home automatically
+ JAVA_HOME=/Library/Java/Home
+ export JAVA_HOME
+ else
+ echo "***************************************************************"
+ echo " ERROR: JAVA_HOME environment variable not found."
+ echo ""
+ echo " Please set JAVA_HOME to the Java JDK installation directory."
+ echo "***************************************************************"
+ exit 1
+ fi
+fi
+
+#
+# build.sh always calls the version of ant distributed with ArgoUML
+#
+ANT_HOME=../../tools/ant-1.6.2
+
+echo ANT_HOME is: $ANT_HOME
+echo
+echo Starting Ant...
+echo
+
+$ANT_HOME/bin/ant $*
+
+#exit
Added: branches/gsoc2007/b00__1/model-euml/build.xml
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/build.xml?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/build.xml 2007-06-03 15:32:11-0700
@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id: build.xml 12413 2007-04-21 15:44:59Z linus $
+
+Build file for the MDR implementation of the Model subsystem.
+
+This is designed to work in two different environments:
+ - in a subdirectory of argouml, as stored in CVS
+ (ie argouml/src/model-mdr)
+ - in a peer directory of argouml, as checked out for Eclipse
+ (ie argouml-core-model-mdr)
+
+-->
+
+<project default="compile" name="ArgoUML MDR Model subsystem">
+ <!-- =================================================================== -->
+ <!-- Initialization target -->
+ <!-- =================================================================== -->
+ <target name="init">
+ <tstamp/>
+
+ <!-- argo.root.dir should be passed in to make sure it is correct -->
+ <property name="argo.root.dir" value="../.."/>
+ <property name="argo.build.dir" value="${argo.root.dir}/build"/>
+
+ <property name="build.dir" value="build"/>
+ <property name="build.classes" value="${build.dir}/classes"/>
+ <property name="build.javas" value="${build.dir}/java"/>
+
+ <property name="tests.classes" value="${build.dir}/tests/classes"/>
+ <property name="tests.reports" value="${build.dir}/tests/reports"/>
+
+ <property name="lib.dir" value="lib" />
+
+ <property name="debug" value="yes"/>
+ <property name="deprecation" value="yes"/>
+ <property name="optimize" value="yes"/>
+
+ <property name="result.jar" value="argouml-mdr.jar"/>
+ <property name="javainterfaces.jar" value="java-interfaces.jar"/>
+
+ <property name="mdrant.jar" value="tools/lib/mdrant.jar" />
+ <property name="mof.jar" value="${lib.dir}/mof.jar" />
+ <property name="jmi.jar" value="${lib.dir}/jmi.jar" />
+ <property name="mdrapi.jar" value="${lib.dir}/mdrapi.jar" />
+ <property name="nbmdr.jar" value="${lib.dir}/nbmdr.jar" />
+ <property name="jmiutils.jar" value="${lib.dir}/jmiutils.jar" />
+ <property name="openide-lookup.jar" value="${lib.dir}/openide-util.jar" />
+
+ <path id="mdr.generate.classpath">
+ <pathelement location="${mdrant.jar}" />
+ <pathelement location="${nbmdr.jar}" />
+ <pathelement location="${mdrapi.jar}" />
+ <pathelement location="${jmiutils.jar}" />
+ <pathelement location="${mof.jar}" />
+ <pathelement location="${jmi.jar}" />
+ <pathelement location="${openide-lookup.jar}" />
+ </path>
+
+ <path id="mdr.compile.classpath">
+ <path refid="mdr.generate.classpath"/>
+ <pathelement location="${build.dir}/${javainterfaces.jar}"/>
+ </path>
+
+ <path id="mdr.run.classpath">
+ <path refid="mdr.compile.classpath"/>
+ </path>
+
+ <path id="compile.classpath">
+ <pathelement location="${argo.build.dir}/log4j.jar"/>
+ <pathelement location="${argo.build.dir}/argouml-model.jar"/>
+ <path refid="mdr.compile.classpath"/>
+ </path>
+
+
+ <!-- Define a few places we can find Junit -->
+ <path id="junit.classpath">
+ <pathelement location="${junit.jar.path}"/>
+ <pathelement location="${argo.tools.dir}/junit-3.8.1/junit.jar"/>
+ <pathelement location="${argo.root.dir}/tools/junit-3.8.1/junit.jar"/>
+ </path>
+
+ <path id="run.classpath">
+ <fileset dir="${argo.build.dir}" includes="*.jar"/>
+ <path refid="mdr.run.classpath"/>
+ </path>
+
+ <property name="profile.file.dir" value="org/argouml/model/mdr/profiles"/>
+
+ <!-- Implementation classes for UML 1.4 are generated from this file -->
+ <!-- When changing to a different UML metamodel, be sure to use the
+ _Diff file which adds the Java specific tags for JMI, not the
+ base OMG file
+ -->
+ <property name="mof.file.dir" value="org/argouml/model/mdr/mof"/>
+ <property name="xmi.file" value="src/${mof.file.dir}/01-02-15_Diff" />
+
+ <taskdef name="mdr" classname="org.netbeans.mdrant.MdrTask">
+ <classpath>
+ <path refid="mdr.generate.classpath" />
+ </classpath>
+ </taskdef>
+
+ <path id="ant.optional.classpath">
+ <pathelement location="${ant.home}/libopt/ant-junit.jar"/>
+ <path refid="junit.classpath"/>
+ </path>
+
+ <taskdef classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" name="junit">
+ <classpath refid="ant.optional.classpath"/>
+ </taskdef>
+
+ <taskdef classname="org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator" name="junitreport">
+ <classpath>
+ <path refid="ant.optional.classpath"/>
+ </classpath>
+ </taskdef>
+
+ </target>
+
+
+ <!-- =================================================================== -->
+ <!-- Generate, compile, & package the JMI interfaces -->
+ <!-- =================================================================== -->
+ <target name="generate" depends="generate-internal"
+ description="Generate the JMI interfaces for a UML metamodel."
+ unless="generate.notRequired">
+
+ <javac srcdir="${build.javas}"
+ source="1.5"
+ target="1.5">
+ <compilerarg compiler="javac1.5" line="-Xlint:unchecked"/>
+ <classpath>
+ <pathelement location="${jmi.jar}" />
+ </classpath>
+ </javac>
+
+ <jar basedir="${build.javas}"
+ includes="**/*.class"
+ jarfile="${build.dir}/${javainterfaces.jar}"/>
+ </target>
+
+ <target name="generate-needed" depends="init">
+ <uptodate property="generate.notRequired"
+ srcfile="${xmi.file}.xml"
+
+ targetfile="${build.dir}/${javainterfaces.jar}" >
+
+ </uptodate>
+
+ </target>
+
+ <target name="generate-skipped" if="generate.notRequired">
+ <echo message="${build.dir}/${javainterfaces.jar} is up to date"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Generate Java files for JMI interface from UML model in XMI -->
+ <!-- =================================================================== -->
+ <target name="generate-internal" depends="init,generate-needed,generate-skipped"
+ unless="generate.notRequired">
+ <!-- create directories -->
+ <mkdir dir="${build.dir}"/>
+ <delete>
+ <fileset dir="${build.javas}">
+ <exclude name="**/.cvsignore"/>
+ <exclude name="**/readme-build-java.txt"/>
+ <exclude name="**/CVS/*"/>
+ </fileset>
+ </delete>
+ <mkdir dir="${build.javas}"/>
+
+ <!-- NOTE: The MDR task needs an absolute path for storageFile or it will
+ put it in the caller's directory when called from argouml build
+ -->
+ <echo message="Generating JMI interfaces from ${xmi.file}"/>
+ <mdr storageFile="${basedir}/${build.javas}/mymdr">
+ <instantiate name="mof4models" />
+ <readXMI file="${xmi.file}.xml" extent="mof4models" />
+ <mapJava dir="${build.javas}" extent="mof4models" />
+
+ <!-- not sure this is correct, but try to generate a DTD -->
+ <instantiate name="uml" extent="mof4models" package="UML"/>
+ <writeDTD file="${build.dir}/UML14.dtd" extent="uml"/>
+
+ <!-- Other functions available
+ <writeXMI file="${storageDir}/${model}/xmi/${xmi.file}.xml"
+ extent="mof4models" xmiVersion="1.2"/>
+ <writeDTD file="${storageDir}/${model}/xmi/${xmi.file}.dtd"
+ extent="mof4models"/>
+ <mapClass dir="${build.javas}" extent="mof4models" />
+ <printExtentNames/>
+ -->
+ </mdr>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Run from classes -->
+ <!-- =================================================================== -->
+ <target name="run" depends="compile"
+ description="Run ArgoUML with MDR model implementation.">
+ <java classname="org.argouml.application.Main"
+ fork="yes"
+ taskname="argouml"
+ maxmemory="500M">
+ <sysproperty key="log4j.configuration"
+ value="org/argouml/resource/warn_console.lcf"/>
+ <!-- the following is redundant since it's the default, but leave for now -->
+ <sysproperty key="argouml.model.implementation"
+ value="org.argouml.model.mdr.MDRModelImplementation"/>
+ <sysproperty key="org.netbeans.lib.jmi.Logger"
+ value="0"/>
+ <classpath>
+ <pathelement location="${build.classes}"/>
+ <path refid="run.classpath"/>
+ </classpath>
+ </java>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the source directory -->
+ <!-- =================================================================== -->
+ <target name="compile"
+ depends="init,generate"
+ description="Compile the sources.">
+ <!-- create directories -->
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.classes}"/>
+
+ <javac srcdir="src"
+ destdir="${build.classes}"
+ includes="org/argouml/**/*.java"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ source="1.5"
+ target="1.5"
+ >
+ <compilerarg compiler="javac1.5" line="-Xlint:unchecked"/>
+ <classpath>
+ <path refid="compile.classpath"/>
+ </classpath>
+ </javac>
+ <copy todir="${build.classes}">
+ <fileset dir="src">
+ <include name="**/*.xsl"/>
+ <include name="${mof.file.dir}/**"/>
+ <include name="${profile.file.dir}/**"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Creates the jar file -->
+ <!-- =================================================================== -->
+ <target name="jar" depends="compile"
+ description="Build the ${result.jar} file.">
+ <jar basedir="${build.classes}"
+ includes="org/argouml/**"
+ manifest="src/manifest.mf"
+ jarfile="${build.dir}/${result.jar}"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Install the jar file -->
+ <!-- =================================================================== -->
+ <target name="install" depends="jar"
+ description="Copy the ${result.jar} file to the ArgoUML directory.">
+ <copy todir="${argo.build.dir}">
+ <fileset dir="${build.dir}" includes="*.jar"/>
+ <fileset dir="${lib.dir}" includes="*.jar"/>
+ </copy>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Compiles the tests directory -->
+ <!-- =================================================================== -->
+ <target name="compile-tests"
+ depends="init,compile">
+ <!-- create directories -->
+ <mkdir dir="${tests.classes}"/>
+
+ <javac srcdir="tests"
+ destdir="${tests.classes}"
+ includes="org/argouml/**/*.java"
+ debug="${debug}"
+ deprecation="${deprecation}"
+ optimize="${optimize}"
+ source="1.5"
+ target="1.5"
+ >
+ <compilerarg compiler="javac1.5" line="-Xlint:unchecked"/>
+ <classpath>
+ <path refid="junit.classpath"/>
+ <path>
+ <fileset dir="${argo.build.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+ </classpath>
+ </javac>
+
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Clean out the tests -->
+ <!-- =================================================================== -->
+ <target name="junit-report-clean">
+ <mkdir dir="${tests.reports}/junit/output"/>
+ <mkdir dir="${tests.reports}/junit/output/html"/>
+ <delete>
+ <fileset dir="${tests.reports}/junit/output">
+ <include name="TEST-*.xml"/>
+ <include name="TEST-*.txt"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Create the report -->
+ <!-- =================================================================== -->
+ <target name="junit-report-create">
+ <junitreport todir="${tests.reports}/junit/output">
+ <fileset dir="${tests.reports}/junit/output">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="frames" todir="${tests.reports}/junit/output/html"/>
+ </junitreport>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Runs the tests -->
+ <!-- =================================================================== -->
+ <target name="tests"
+ depends="init,compile,compile-tests,junit-report-clean">
+ <!-- create directories -->
+ <mkdir dir="${tests.classes}"/>
+
+ <junit errorproperty="junit.failure" fork="yes" haltonfailure="false"
+ maxmemory="256M" printsummary="true">
+ <sysproperty key="log4j.configuration"
+ value="org/argouml/resource/info_console.lcf"/>
+ <sysproperty key="argouml.model.implementation"
+ value="org.argouml.model.mdr.MDRModelImplementation"/>
+ <classpath>
+ <pathelement location="${tests.classes}"/>
+ <path refid="junit.classpath"/>
+ <path refid="run.classpath"/>
+ </classpath>
+ <formatter type="xml"/>
+ <batchtest todir="${tests.reports}/junit/output">
+ <fileset dir="tests">
+ <include name="org/argouml/**/Test*.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ <antcall target="junit-report-create"/>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Clean targets -->
+ <!-- =================================================================== -->
+ <target name="clean" depends="init"
+ description="Clean out all built files.">
+ <delete includeemptydirs="true">
+ <fileset dir="${build.dir}">
+ <exclude name="**/.cvsignore"/>
+ <exclude name="**/readme-build-java.txt"/>
+ <exclude name="**/CVS/*"/>
+ </fileset>
+ </delete>
+ </target>
+
+</project>
Added: branches/gsoc2007/b00__1/model-euml/build2.bat
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/build2.bat?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/build2.bat 2007-06-03 15:32:11-0700
@@ -0,0 +1,11 @@
+@echo off
+
+rem
+rem build.bat always calls the version of ant distributed with ArgoUML
+rem
+
+set SAVE_ANT_HOME=%ANT_HOME%
+set ANT_HOME=..\argouml-core-tools\ant-1.6.2
+call %ANT_HOME%\bin\ant -Doverride.build.properties=..\argouml\eclipse-ant-build.properties -Dargo.root.dir=%CD%\.. %1 %2 %3 %4 %5 %6 %7 %8 %9
+set ANT_HOME=%SAVE_ANT_HOME%
+set SAVE_ANT_HOME=
Added: branches/gsoc2007/b00__1/model-euml/build2.sh
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/build2.sh?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/build2.sh 2007-06-03 15:32:11-0700
@@ -0,0 +1,29 @@
+#! /bin/sh
+# $Id: build2.sh 9997 2006-03-08 16:34:51Z tfmorris $
+#
+
+# +-------------------------------------------------------------------------+
+# | Verify and Set Required Environment Variables |
+# +-------------------------------------------------------------------------+
+if [ "$JAVA_HOME" = "" ] ; then
+ echo "***************************************************************"
+ echo " ERROR: JAVA_HOME environment variable not found."
+ echo ""
+ echo " Please set JAVA_HOME to the Java JDK installation directory."
+ echo "***************************************************************"
+ exit 1
+fi
+
+#
+# build.sh always calls the version of ant distributed with ArgoUML
+#
+ANT_HOME=../argouml-core-tools/ant-1.6.2
+
+echo ANT_HOME is: $ANT_HOME
+echo
+echo Starting Ant...
+echo
+
+$ANT_HOME/bin/ant -Doverride.build.properties=../argouml/eclipse-ant-build.properties -Dargo.root.dir=`pwd`/.. $*
+
+#exit
Added: branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.emf.common_2.3.0.v200703080200.jar
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.emf.common_2.3.0.v200703080200.jar?view=auto&rev=12750
==============================================================================
Binary file. No diff available.
Added: branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.emf.ecore.xmi_2.3.0.v200703080200.jar
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.emf.ecore.xmi_2.3.0.v200703080200.jar?view=auto&rev=12750
==============================================================================
Binary file. No diff available.
Added: branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.emf.ecore_2.3.0.v200703080200.jar
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.emf.ecore_2.3.0.v200703080200.jar?view=auto&rev=12750
==============================================================================
Binary file. No diff available.
Added: branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.uml2.common_1.3.0.v200703011358.jar
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.uml2.common_1.3.0.v200703011358.jar?view=auto&rev=12750
==============================================================================
Binary file. No diff available.
Added: branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.uml2.uml_2.1.0.v200703011358.jar
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/lib/org.eclipse.uml2.uml_2.1.0.v200703011358.jar?view=auto&rev=12750
==============================================================================
Binary file. No diff available.
Added: branches/gsoc2007/b00__1/model-euml/plugin.properties
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/plugin.properties?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/plugin.properties 2007-06-03 15:32:11-0700
@@ -0,0 +1,3 @@
+# properties file for argouml-core-model-mdr
+pluginProvider = ArgoUML team
+pluginName = ArgoUML eUML2
\ No newline at end of file
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ActivityGraphsFactoryEUMLlImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ActivityGraphsFactoryEUMLlImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ActivityGraphsFactoryEUMLlImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,103 @@
+// $Id:ActivityGraphsFactoryEUMLlImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.Collection;
+
+import org.argouml.model.ActivityGraphsFactory;
+
+/**
+ * The implementation of the ActivityGraphsFactory for EUML2.
+ */
+class ActivityGraphsFactoryEUMLlImpl implements ActivityGraphsFactory {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation The ModelImplementation.
+ */
+ public ActivityGraphsFactoryEUMLlImpl(
+ EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public Object buildActivityGraph(Object theContext) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object buildClassifierInState(Object classifier, Collection state) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object buildObjectFlowState(Object compositeState) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object createActionState() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object createActivityGraph() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object createCallState() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object createClassifierInState() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object createObjectFlowState() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object createPartition() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object createSubactivityState() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ActivityGraphsHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ActivityGraphsHelperEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ActivityGraphsHelperEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,113 @@
+// $Id:ActivityGraphsHelperEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.Collection;
+
+import org.argouml.model.ActivityGraphsHelper;
+
+/**
+ * The implementation of the ActivityGraphsHelper for EUML.
+ */
+class ActivityGraphsHelperEUMLImpl implements ActivityGraphsHelper {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public ActivityGraphsHelperEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public void addContent(Object partition, Object modeElement) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addInState(Object classifierInState, Object state) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addParameter(Object objectFlowState, Object parameter) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Object findClassifierByName(Object ofs, String s) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object findStateByName(Object c, String s) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isAddingActivityGraphAllowed(Object context) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void removeContent(Object partition, Object modeElement) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeParameter(Object objectFlowState, Object parameter) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setContents(Object partition, Collection newContents) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setInStates(Object classifierInState, Collection newStates) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setParameters(Object objectFlowState, Collection parameters) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setSynch(Object objectFlowState, boolean isSynch) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/AggregationKindEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/AggregationKindEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/AggregationKindEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,50 @@
+// $Id:AggregationKindEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.AggregationKind;
+
+/**
+ * Eclipse UML2 implementation of AggregationKind.
+ *
+ * @author Tom Morris
+ */
+class AggregationKindEUMLImpl implements AggregationKind {
+
+ public Object getAggregate() {
+ return org.eclipse.uml2.uml.AggregationKind.SHARED_LITERAL;
+ }
+
+ public Object getComposite() {
+ return org.eclipse.uml2.uml.AggregationKind.COMPOSITE_LITERAL;
+ }
+
+ public Object getNone() {
+ return org.eclipse.uml2.uml.AggregationKind.NONE_LITERAL;
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ChangeableKindEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ChangeableKindEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ChangeableKindEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,55 @@
+// $Id:ChangeableKindEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.ChangeableKind;
+import org.argouml.model.NotImplementedException;
+
+/**
+ * Eclipse UML2 implementation for ChangeableKind.
+ *
+ * @author Tom Morris
+ * @deprecated This is a simple binary choice (isReadOnly or not) in UML2, so
+ * this is purely for backward compatibility.
+ */
+class ChangeableKindEUMLImpl implements ChangeableKind {
+
+
+ public Object getAddOnly() {
+ throw new NotImplementedException();
+ }
+
+ public Object getChangeable() {
+ return "changeable";
+ }
+
+ public Object getFrozen() {
+ return "frozen";
+ }
+
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CollaborationsFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CollaborationsFactoryEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CollaborationsFactoryEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,141 @@
+// $Id:CollaborationsFactoryEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.CollaborationsFactory;
+
+/**
+ * Eclipse UML2 implementation of CollaborationsFactory.
+ */
+class CollaborationsFactoryEUMLImpl implements CollaborationsFactory {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation The ModelImplementation.
+ */
+ public CollaborationsFactoryEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public Object buildActivator(Object owner, Object interaction) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildAssociationEndRole(Object atype) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildAssociationRole(Object from, Object to) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildAssociationRole(Object from, Object agg1, Object to, Object agg2, Boolean unidirectional) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildAssociationRole(Object link) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildClassifierRole(Object collaboration) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildCollaboration(Object handle) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildCollaboration(Object namespace, Object representedElement) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildInteraction(Object handle) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildMessage(Object acollab, Object arole) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createAssociationEndRole() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createAssociationRole() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createClassifierRole() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createCollaboration() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createCollaborationInstanceSet() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createInteraction() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createInteractionInstanceSet() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createMessage() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CollaborationsHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CollaborationsHelperEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CollaborationsHelperEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,218 @@
+// $Id:CollaborationsHelperEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.Collection;
+
+import org.argouml.model.CollaborationsHelper;
+
+/**
+ * Eclipse UML2 implementation of CollaborationsHelper.
+ */
+class CollaborationsHelperEUMLImpl implements CollaborationsHelper {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation The ModelImplementation.
+ */
+ public CollaborationsHelperEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public void addBase(Object arole, Object abase) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addConstrainingElement(Object handle, Object constraint) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addInstance(Object classifierRole, Object instance) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addMessage(Object handle, Object elem) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addPredecessor(Object handle, Object predecessor) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addSuccessor(Object handle, Object mess) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Collection allAvailableContents(Object arole) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection allAvailableFeatures(Object arole) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllClassifierRoles(Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllPossibleActivators(Object ames) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllPossibleAssociationRoles(Object role) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllPossibleBases(Object role) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllPossiblePredecessors(Object amessage) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getAssociationRole(Object afrom, Object ato) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getClassifierRoles(Object role) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean hasAsActivator(Object message, Object activator) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isAddingCollaborationAllowed(Object context) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void removeBase(Object handle, Object c) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeConstrainingElement(Object handle, Object constraint) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeInteraction(Object collab, Object interaction) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeMessage(Object handle, Object message) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removePredecessor(Object handle, Object message) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeSuccessor(Object handle, Object mess) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setAction(Object handle, Object action) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setActivator(Object ames, Object anactivator) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setBase(Object arole, Object abase) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setBases(Object role, Collection bases) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setContext(Object handle, Object col) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setPredecessors(Object handle, Collection predecessors) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setRepresentedClassifier(Object handle, Object classifier) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setRepresentedOperation(Object handle, Object operation) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setSender(Object handle, Object sender) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setSuccessors(Object handle, Collection messages) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CommonBehaviorFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CommonBehaviorFactoryEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CommonBehaviorFactoryEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,196 @@
+// $Id:CommonBehaviorFactoryEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.CommonBehaviorFactory;
+
+/**
+ * The implementation of the CommonBehaviorFactory for EUML2.
+ */
+class CommonBehaviorFactoryEUMLImpl implements CommonBehaviorFactory {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation The ModelImplementation.
+ */
+ public CommonBehaviorFactoryEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public Object buildAction(Object message) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildCallAction(Object oper, String name) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildLink(Object fromInstance, Object toInstance) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildReception(Object aClassifier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildSignal(Object element) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildStimulus(Object link) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildUninterpretedAction(Object actionState) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createActionSequence() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createArgument() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createAttributeLink() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createCallAction() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createComponentInstance() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createCreateAction() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createDataValue() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createDestroyAction() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createException() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createLink() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createLinkEnd() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createLinkObject() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createNodeInstance() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createObject() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createReception() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createReturnAction() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createSendAction() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createSignal() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createStimulus() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createSubsystemInstance() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createTerminateAction() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createUninterpretedAction() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CommonBehaviorHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CommonBehaviorHelperEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CommonBehaviorHelperEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,235 @@
+// $Id:CommonBehaviorHelperEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Vector;
+
+import org.argouml.model.CommonBehaviorHelper;
+
+/**
+ * Eclipse UML2 implementatoin of CommonBehaviorHelper.
+ */
+class CommonBehaviorHelperEUMLImpl implements CommonBehaviorHelper {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation The ModelImplementation.
+ */
+ public CommonBehaviorHelperEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public void addAction(Object handle, Object action) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addAction(Object handle, int position, Object action) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addActualArgument(Object handle, Object argument) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addActualArgument(Object handle, int position, Object argument) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addClassifier(Object handle, Object classifier) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addStimulus(Object handle, Object stimulus) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Object getActionOwner(Object handle) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getDestination(Object link) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getInstantiation(Object createaction) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getSource(Object link) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void removeAction(Object handle, Object action) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeActualArgument(Object handle, Object argument) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeClassifier(Object handle, Object classifier) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeContext(Object handle, Object context) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeReception(Object handle, Object reception) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setActualArguments(Object action, List arguments) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setAsynchronous(Object handle, boolean value) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setClassifiers(Object handle, Vector v) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setCommunicationLink(Object handle, Object c) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setComponentInstance(Object handle, Object c) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setContexts(Object handle, Collection c) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setDispatchAction(Object handle, Object value) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setInstance(Object handle, Object inst) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setInstantiation(Object createaction, Object instantiation) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setNodeInstance(Object handle, Object nodeInstance) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setOperation(Object handle, Object operation) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setReceiver(Object handle, Object receiver) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setReception(Object handle, Collection receptions) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setRecurrence(Object handle, Object expr) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setScript(Object handle, Object expr) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setSender(Object handle, Object sender) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setSignal(Object handle, Object signal) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setSpecification(Object handle, String specification) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setTarget(Object handle, Object element) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setTransition(Object handle, Object trans) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setValue(Object handle, Object value) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ConcurrencyKindEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ConcurrencyKindEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ConcurrencyKindEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,51 @@
+// $Id:ConcurrencyKindEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.ConcurrencyKind;
+import org.eclipse.uml2.uml.CallConcurrencyKind;
+
+/**
+ * The Eclipse UML2 implementation for Concurrency Kind.
+ * @author Tom Morris
+ */
+class ConcurrencyKindEUMLImpl implements ConcurrencyKind {
+
+ public Object getConcurrent() {
+ return CallConcurrencyKind.CONCURRENT_LITERAL;
+ }
+
+ public Object getGuarded() {
+ return CallConcurrencyKind.GUARDED_LITERAL;
+ }
+
+ public Object getSequential() {
+ return CallConcurrencyKind.SEQUENTIAL_LITERAL;
+ }
+
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CopyHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CopyHelperEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CopyHelperEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,56 @@
+// $Id:CopyHelperEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.CopyHelper;
+
+/**
+ * The implementation of the CopyHelper for EUML2.
+ */
+class CopyHelperEUMLImpl implements CopyHelper {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation The ModelImplementation.
+ */
+ public CopyHelperEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public Object copy(Object source, Object destination) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,477 @@
+// $Id:CoreFactoryEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.List;
+
+import org.argouml.model.CoreFactory;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+
+
+/**
+ * The implementation of the CoreFactory for EUML2.
+ */
+class CoreFactoryEUMLImpl implements CoreFactory {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation The ModelImplementation.
+ */
+ public CoreFactoryEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public Object buildAbstraction(String name, Object supplier, Object client) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ // TODO: A few different ways of building Associations. Pick one that
+ // works and is efficient - tfm
+ public Object buildAssociation(Object fromClassifier,
+ Object aggregationKind1, Object toClassifier,
+ Object aggregationKind2, Boolean unidirectional) {
+
+// return ((Type) fromClassifier).createAssociation(
+// true, (AggregationKind) aggregationKind1, null, 1, 1,
+// (Type) toClassifier,
+// true, (AggregationKind) aggregationKind2, null, 1, 1);
+
+ Association assoc = (Association) createAssociation();
+ Property end1 = assoc.createNavigableOwnedEnd(null, (Type) fromClassifier);
+ Property end2 = assoc.createOwnedEnd(null, (Type) toClassifier);
+ boolean uni = false;
+ if (unidirectional != null && unidirectional.booleanValue()) {
+ uni = true;
+ }
+ end2.setIsNavigable(uni);
+ return assoc;
+
+ }
+
+ public Object buildAssociation(Object classifier1, Object classifier2) {
+ return buildAssociation(
+ classifier1, AggregationKind.NONE_LITERAL, classifier2,
+ AggregationKind.NONE_LITERAL, false);
+ }
+
+ public Object buildAssociation(Object c1, boolean nav1, Object c2,
+ boolean nav2, String name) {
+ Association assoc = (Association) createAssociation();
+ Property end1 = assoc.createOwnedEnd(null, (Type) c1);
+ end1.setIsNavigable(nav1);
+ Property end2 = assoc.createOwnedEnd(null, (Type) c2);
+ end2.setIsNavigable(nav1);
+ assoc.setName(name);
+ return assoc;
+ }
+
+ public Object buildAssociationClass(Object end1, Object end2) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ 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) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildAssociationEnd(Object type, Object assoc) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildAttribute() {
+ // TODO: Required for UmlFactory.buildNode()
+ throw new NotYetImplementedException();
+// Attribute attr = (Attribute) createAttribute();
+// attr.setName("newAttr");
+// attr.setMultiplicity(getMultiplicity11());
+// attr.setVisibility(VisibilityKindEnum.VK_PUBLIC);
+// attr.setOwnerScope(ScopeKindEnum.SK_INSTANCE);
+// attr.setChangeability(ChangeableKindEnum.CK_CHANGEABLE);
+// attr.setTargetScope(ScopeKindEnum.SK_INSTANCE);
+// return attr;
+ }
+
+ public Object buildAttribute(Object model, Object type) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildAttribute(Object handle, Object model, Object type) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildAttribute2(Object type) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildAttribute2(Object handle, Object type) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildBinding(Object client, Object supplier, List arguments) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildClass() {
+ return createClass();
+ }
+
+ public Object buildClass(Object owner) {
+ return buildClass(null, owner);
+ }
+
+ public Object buildClass(String name) {
+ return buildClass(name, null);
+ }
+
+ public Object buildClass(String name, Object owner) {
+ org.eclipse.uml2.uml.Class cls =
+ (org.eclipse.uml2.uml.Class) createClass();
+ if (owner != null) {
+ ((Namespace) owner).getOwnedElements().add(cls);
+ }
+ if (name != null) {
+ cls.setName(name);
+ }
+ return cls;
+ }
+
+ public Object buildComment(Object element, Object model) {
+ if (model == null) {
+ throw new IllegalArgumentException("A namespace must be supplied.");
+ }
+ Element elementToAnnotate = (Element) element;
+ Comment comment = (Comment) createComment();
+
+ Element owner = null;
+ if (elementToAnnotate != null) {
+ comment.getAnnotatedElements().add(elementToAnnotate);
+ owner = elementToAnnotate.getOwner();
+ } else {
+ owner = (Namespace) model;
+ }
+
+ owner.getOwnedElements().add(comment);
+ return comment;
+ }
+
+ public Object buildConstraint(Object constrElement) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildConstraint(String name, Object bexpr) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildDataType(String name, Object owner) {
+ DataType dt = (DataType) createDataType();
+ dt.setName(name);
+ ((Element) owner).getOwnedElements().add(dt);
+ return dt;
+ }
+
+ public Object buildDependency(Object clientObj, Object supplierObj) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildElementResidence(Object me, Object component) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildEnumeration(String name, Object owner) {
+ Enumeration enumer = (Enumeration) createEnumeration();
+ enumer.setName(name);
+ if (owner != null) {
+ ((Element) owner).getOwnedElements().add(enumer);
+ }
+ return enumer;
+ }
+
+ public Object buildEnumerationLiteral(String name, Object enumeration) {
+ return ((Enumeration) enumeration).createOwnedLiteral(name);
+ }
+
+ public Object buildGeneralization(Object child, Object parent, String name) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildGeneralization(Object child, Object parent) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildInterface() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildInterface(Object owner) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildInterface(String name) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildInterface(String name, Object owner) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildMethod(String name) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildOperation(Object classifier, Object model, Object returnType) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildOperation(Object classifier, Object returnType) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildOperation(Object cls, Object model, Object returnType, String name) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildOperation2(Object cls, Object returnType, String name) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildParameter(Object o, Object model, Object type) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildParameter(Object o, Object type) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildPermission(Object clientObj, Object supplierObj) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildRealization(Object clnt, Object spplr, Object model) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildTemplateArgument(Object element) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildUsage(Object client, Object supplier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object copyClass(Object source, Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object copyDataType(Object source, Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object copyFeature(Object source, Object classifier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object copyInterface(Object source, Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createAbstraction() {
+ return UMLFactory.eINSTANCE.createAbstraction();
+ }
+
+ public Object createArtifact() {
+ return UMLFactory.eINSTANCE.createArtifact();
+ }
+
+ public Object createAssociation() {
+ return UMLFactory.eINSTANCE.createAssociation();
+ }
+
+ public Object createAssociationClass() {
+ return UMLFactory.eINSTANCE.createAssociationClass();
+ }
+
+ public Object createAssociationEnd() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createAttribute() {
+ // TODO: Double check - tfm
+ return UMLFactory.eINSTANCE.createProperty();
+ }
+
+ public Object createBinding() {
+ return UMLFactory.eINSTANCE.createTemplateBinding();
+ }
+
+ public Object createClass() {
+ return UMLFactory.eINSTANCE.createClass();
+ }
+
+ public Object createComment() {
+ return UMLFactory.eINSTANCE.createComment();
+ }
+
+ public Object createComponent() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createConstraint() {
+ return UMLFactory.eINSTANCE.createConstraint();
+ }
+
+ public Object createDataType() {
+ return UMLFactory.eINSTANCE.createDataType();
+ }
+
+ public Object createDependency() {
+ return UMLFactory.eINSTANCE.createDependency();
+ }
+
+ public Object createElementResidence() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createEnumeration() {
+ return UMLFactory.eINSTANCE.createEnumeration();
+ }
+
+ public Object createEnumerationLiteral() {
+ return UMLFactory.eINSTANCE.createEnumerationLiteral();
+ }
+
+ public Object createFlow() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createGeneralization() {
+ return UMLFactory.eINSTANCE.createGeneralization();
+ }
+
+ public Object createInterface() {
+ return UMLFactory.eINSTANCE.createInterface();
+ }
+
+ public Object createMethod() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createNode() {
+ return UMLFactory.eINSTANCE.createNode();
+ }
+
+ public Object createOperation() {
+ return UMLFactory.eINSTANCE.createOperation();
+ }
+
+ public Object createParameter() {
+ return UMLFactory.eINSTANCE.createParameter();
+ }
+
+ public Object createPermission() {
+ return UMLFactory.eINSTANCE.createPackageImport();
+ }
+
+ public Object createPrimitive() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createProgrammingLanguageDataType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createTemplateArgument() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createTemplateParameter() {
+ return UMLFactory.eINSTANCE.createTemplateParameter();
+ }
+
+ public Object createUsage() {
+ return UMLFactory.eINSTANCE.createUsage();
+ }
+
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,905 @@
+// $Id:CoreHelperEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import org.argouml.model.CoreHelper;
+import org.argouml.model.NotImplementedException;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.BehavioralFeature;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Extend;
+import org.eclipse.uml2.uml.Feature;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.Include;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.RedefinableElement;
+import org.eclipse.uml2.uml.StructuralFeature;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.VisibilityKind;
+
+
+/**
+ * Eclipse UML2 implementation of CoreHelper.
+ */
+class CoreHelperEUMLImpl implements CoreHelper {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation The ModelImplementation.
+ */
+ public CoreHelperEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public void addAllStereotypes(Object modelElement, Collection stereos) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addAnnotatedElement(Object comment, Object annotatedElement) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addClient(Object dependency, Object element) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addClientDependency(Object handle, Object dependency) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addComment(Object element, Object comment) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addConnection(Object handle, Object connection) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addConnection(Object handle, int position, Object connection) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addConstraint(Object handle, Object mc) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addDeploymentLocation(Object handle, Object node) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addElementResidence(Object handle, Object residence) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addFeature(Object handle, int index, Object f) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addFeature(Object handle, Object f) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addLink(Object handle, Object link) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addLiteral(Object handle, int index, Object literal) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addMethod(Object handle, Object method) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addOwnedElement(Object handle, Object me) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addParameter(Object handle, int index, Object parameter) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addParameter(Object handle, Object parameter) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addQualifier(Object handle, int position, Object qualifier) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addRaisedSignal(Object handle, Object sig) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addSourceFlow(Object handle, Object flow) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addStereotype(Object modelElement, Object stereo) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addSupplier(Object handle, Object element) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addSupplierDependency(Object supplier, Object dependency) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addTaggedValue(Object handle, Object taggedValue) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addTargetFlow(Object handle, Object flow) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addTemplateArgument(Object handle, int index, Object argument) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addTemplateArgument(Object handle, Object argument) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addTemplateParameter(Object handle, int index, Object parameter) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addTemplateParameter(Object handle, Object parameter) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void clearStereotypes(Object handle) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean equalsAggregationKind(Object associationEnd, String kindType) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Collection getAllAttributes(Object classifier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllBehavioralFeatures(Object element) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllClasses(Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllClassifiers(Object namespace) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllComponents(Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllContents(Object namespace) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllDataTypes(Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllInterfaces(Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllMetatypeNames() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllNodes(Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllPossibleNamespaces(Object modelElement, Object model) {
+ // TODO: Dummy implementation that just returns the current namespace
+ Collection<Namespace> result = new ArrayList<Namespace>();
+ result.add(((NamedElement) modelElement).getNamespace());
+ return result;
+ }
+
+ public Collection getAllRealizedInterfaces(Object element) {
+ // TODO Auto-generated method stub
+ return Collections.EMPTY_SET;
+ }
+
+ public Collection getAllSupertypes(Object classifier) {
+ // TODO Auto-generated method stub
+ return Collections.EMPTY_SET;
+ }
+
+ public Collection getAllVisibleElements(Object ns) {
+ // TODO Auto-generated method stub
+ return Collections.EMPTY_SET;
+ }
+
+ public Collection getAssociateEnds(Object classifier) {
+ // TODO Auto-generated method stub
+ return Collections.EMPTY_SET;
+ }
+
+ public Collection getAssociateEndsInh(Object classifier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAssociatedClassifiers(Object aclassifier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getAssociationEnd(Object type, Object assoc) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAssociations(Object from, Object to) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAssociations(Object oclassifier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAttributesInh(Object classifier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List getBehavioralFeatures(Object classifier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getBody(Object comment) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getChildren(Object element) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getDependencies(Object supplierObj, Object clientObj) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getExtendedClassifiers(Object element) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getExtendingClassifiers(Object classifier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getExtendingElements(Object element) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getFirstSharedNamespace(Object ns1, Object ns2) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getFlows(Object source, Object target) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getGeneralization(Object achild, Object aparent) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getOperationsInh(Object classifier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getRealizedInterfaces(Object cls) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getRelationships(Object source, Object dest) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List getReturnParameters(Object operation) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getSource(Object relationship) {
+
+ // TODO: not implemented for UML 2 - tfm
+// if (relationship instanceof Link) {
+// Iterator it =
+// modelImpl.getFacade()
+// .getConnections(relationship).iterator();
+// if (it.hasNext()) {
+// return modelImpl.getFacade().getInstance(it.next());
+// } else {
+// return null;
+// }
+// }
+ if (relationship instanceof Association) {
+ Association assoc = (Association) relationship;
+ List conns = assoc.getMemberEnds();
+ if (conns == null || conns.isEmpty()) {
+ return null;
+ }
+ // TODO: double check this - tfm
+ return ((Property) conns.get(0)).getType();
+ } else if (relationship instanceof Generalization) {
+ Generalization gen = (Generalization) relationship;
+ return gen.getSpecific();
+ } else if (relationship instanceof Dependency) {
+ Dependency dep = (Dependency) relationship;
+ List col = dep.getClients();
+ if (col.isEmpty()) {
+ return null;
+ }
+ return col.get(0);
+ // TODO: not implemented for UML 2 - tfm
+// } else if (relationship instanceof Flow) {
+// Flow flow = (Flow) relationship;
+// Collection col = flow.getSource();
+// if (col.isEmpty()) {
+// return null;
+// }
+// return (col.toArray())[0];
+ } else if (relationship instanceof Extend) {
+ Extend extend = (Extend) relationship;
+ return extend.getExtension(); // we have to follow the
+ // arrows..
+ } else if (relationship instanceof Include) {
+ Include include = (Include) relationship;
+ return modelImpl.getFacade().getBase(include);
+ } else if (relationship instanceof Property) {
+ return ((Property) relationship).getAssociation();
+ } else {
+ throw new IllegalArgumentException();
+ }
+
+ }
+
+
+ public Object getDestination(Object relationship) {
+
+// if (relationship instanceof Link) {
+// Iterator it = modelImpl.getFacade()
+// .getConnections(relationship).iterator();
+// if (it.hasNext()) {
+// it.next();
+// if (it.hasNext()) {
+// return modelImpl.getFacade().getInstance(it.next());
+// } else {
+// return null;
+// }
+// } else {
+// return null;
+// }
+// }
+
+ if (relationship instanceof Association) {
+ Association assoc = (Association) relationship;
+ List conns = assoc.getMemberEnds();
+ if (conns.size() <= 1) {
+ return null;
+ }
+ return ((Property) conns.get(1)).getType();
+ } else if (relationship instanceof Generalization) {
+ Generalization gen = (Generalization) relationship;
+ return gen.getGeneral();
+ } else if (relationship instanceof Dependency) {
+ Dependency dep = (Dependency) relationship;
+ List col = dep.getSuppliers();
+ if (col.isEmpty()) {
+ return null;
+ }
+ return col.get(0);
+// } else if (relationship instanceof Flow) {
+// Flow flow = (Flow) relationship;
+// Collection col = flow.getTarget();
+// if (col.isEmpty()) {
+// return null;
+// }
+// return getFirstItemOrNull(col);
+ } else if (relationship instanceof Extend) {
+ Extend extend = (Extend) relationship;
+ return extend.getExtendedCase();
+ } else if (relationship instanceof Include) {
+ Include include = (Include) relationship;
+ return modelImpl.getFacade().getAddition(include);
+ } else if (relationship instanceof Property) {
+ return ((Property) relationship).getType();
+ } else {
+ throw new IllegalArgumentException();
+ }
+
+ }
+
+
+ public Object getSpecification(Object object) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getSpecifications(Object classifier) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getSubtypes(Object cls) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getSupertypes(Object generalizableElement) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean hasCompositeEnd(Object association) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isSubType(Object type, Object subType) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isValidNamespace(Object element, Object namespace) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void removeAnnotatedElement(Object handle, Object me) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeClientDependency(Object handle, Object dep) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeConnection(Object handle, Object connection) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeConstraint(Object handle, Object cons) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeDeploymentLocation(Object handle, Object node) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeElementResidence(Object handle, Object residence) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeFeature(Object cls, Object feature) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeLiteral(Object enumeration, Object literal) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeOwnedElement(Object handle, Object value) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeParameter(Object handle, Object parameter) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeQualifier(Object handle, Object qualifier) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeSourceFlow(Object handle, Object flow) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeStereotype(Object handle, Object stereo) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeSupplierDependency(Object supplier, Object dependency) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeTargetFlow(Object handle, Object flow) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeTemplateArgument(Object binding, Object argument) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeTemplateParameter(Object handle, Object parameter) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setAbstract(Object handle, boolean isAbstract) {
+ if (handle instanceof Classifier) {
+ ((Classifier) handle).setIsAbstract(isAbstract);
+ } else if (handle instanceof BehavioralFeature) {
+ ((BehavioralFeature) handle).setIsAbstract(isAbstract);
+ } else {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ public void setActive(Object handle, boolean isActive) {
+ ((org.eclipse.uml2.uml.Class) handle).setIsActive(isActive);
+ }
+
+ public void setAggregation(Object handle, Object aggregationKind) {
+ // TODO Auto-generated method stub
+ }
+
+ public void setAnnotatedElements(Object handle, Collection elems) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setAssociation(Object handle, Object association) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setAttributes(Object classifier, List attributes) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setBody(Object handle, Object expr) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setBody(Object handle, String body) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setChangeability(Object handle, Object ck) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setChangeable(Object handle, boolean changeable) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setChild(Object handle, Object child) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setConcurrency(Object handle, Object concurrencyKind) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setConnections(Object handle, Collection ends) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setContainer(Object handle, Object component) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setDefaultElement(Object handle, Object element) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setDefaultValue(Object handle, Object expression) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setDiscriminator(Object handle, String discriminator) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setEnumerationLiterals(Object enumeration, List literals) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setFeature(Object classifier, int index, Object feature) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setFeatures(Object classifier, Collection features) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setInitialValue(Object attribute, Object expression) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setKind(Object handle, Object kind) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setLeaf(Object handle, boolean isLeaf) {
+ ((RedefinableElement) handle).setIsLeaf(isLeaf);
+ }
+
+ public void setModelElementContainer(Object handle, Object container) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setMultiplicity(Object handle, Object arg) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setName(Object handle, String name) {
+ ((NamedElement) handle).setName(name);
+ }
+
+ public void setNamespace(Object handle, Object ns) {
+ ((Namespace) ns).getOwnedElements().add((NamedElement) handle);
+ }
+
+ public void setNavigable(Object handle, boolean flag) {
+ ((Property) handle).setIsNavigable(flag);
+ }
+
+ public void setOperations(Object classifier, List operations) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setOrdering(Object handle, Object ordering) {
+// ((Property) handle).setIsOrdered(ordering);
+ // TODO Auto-generated method stub
+ }
+
+ public void setOwner(Object handle, Object owner) {
+ // TODO Auto-generated method stub
+ }
+
+ public void setOwnerScope(Object feature, Object scopeKind) {
+ // Don't implement - deprecated method in interface.
+ throw new NotImplementedException();
+ }
+
+ public void setParameter(Object handle, Object parameter) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setParameters(Object handle, Collection parameters) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setParent(Object handle, Object parent) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setPowertype(Object handle, Object powerType) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setQualifiers(Object handle, List qualifiers) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setQuery(Object handle, boolean isQuery) {
+ ((Operation) handle).setIsQuery(isQuery);
+ }
+
+ public void setRaisedSignals(Object handle, Collection raisedSignals) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setReadOnly(Object handle, boolean isReadOnly) {
+ ((StructuralFeature) handle).setIsReadOnly(isReadOnly);
+ }
+
+ public void setResident(Object handle, Object resident) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setResidents(Object handle, Collection residents) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setRoot(Object handle, boolean isRoot) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setSources(Object handle, Collection specifications) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setSpecification(Object handle, boolean isSpecification) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setSpecification(Object method, Object specification) {
+ // TODO Auto-generated method stub
+ }
+
+ public void setSpecification(Object operation, String specification) {
+ // TODO Auto-generated method stub
+ }
+
+ public void setSpecifications(Object handle, Collection specifications) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setStatic(Object feature, boolean isStatic) {
+ ((Feature) feature).setIsStatic(isStatic);
+ }
+
+ public void setTaggedValue(Object handle, String tag, String value) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setTaggedValues(Object handle, Collection taggedValues) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setTargetScope(Object handle, Object targetScope) {
+ // Don't implement - deprecated method in interface.
+ throw new NotImplementedException();
+ }
+
+ public void setType(Object handle, Object type) {
+ ((TypedElement) handle).setType((Type) type);
+ }
+
+ public void setVisibility(Object handle, Object visibility) {
+ ((NamedElement) handle).setVisibility((VisibilityKind) visibility);
+ }
+
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/DataTypesFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/DataTypesFactoryEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/DataTypesFactoryEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,160 @@
+// $Id:DataTypesFactoryEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.List;
+
+import org.argouml.model.DataTypesFactory;
+
+/**
+ * The implementation of the DataTypesFactory for EUML2.
+ */
+class DataTypesFactoryEUMLImpl implements DataTypesFactory {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation The ModelImplementation.
+ */
+ public DataTypesFactoryEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public Object createActionExpression(String language, String body) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createArgListsExpression(String language, String body) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createBooleanExpression(String language, String body) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createExpression(String language, String body) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createIterationExpression(String language, String body) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createMappingExpression(String language, String body) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createMultiplicity(int lower, int upper) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createMultiplicity(List range) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createMultiplicity(String str) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createMultiplicityRange(String str) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createMultiplicityRange(int lower, int upper) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createObjectSetExpression(String language, String body) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createProcedureExpression(String language, String body) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createTimeExpression(String language, String body) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createTypeExpression(String language, String body) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * Convert an integer to a string using MultiplicityRange notation.
+ *
+ * @param i integer to convert
+ * @return String version of integer or "*" for unlimited (-1)
+ */
+ static String boundToString(int i) {
+ if (i == -1) {
+ return "*";
+ } else {
+ return "" + i;
+ }
+ }
+
+ /**
+ * Convert a MultiplicityRange bound string to an integer.
+ *
+ * @param b String containing a single MultiplicityRange bound
+ * @return integer representation
+ */
+ private static int stringToBound(String b) {
+ try {
+ if (b.equals("n") || b.equals("*")) {
+ return -1;
+ } else {
+ return Integer.parseInt(b);
+ }
+ } catch (Exception ex) {
+ throw new IllegalArgumentException("illegal range bound : "
+ + (b == null ? "null" : b));
+ }
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/DataTypesHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/DataTypesHelperEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/DataTypesHelperEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,126 @@
+// $Id:DataTypesHelperEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.DataTypesHelper;
+import org.eclipse.uml2.uml.MultiplicityElement;
+
+
+/**
+ * The implementation of the DataTypesHelper for EUML2.
+ */
+class DataTypesHelperEUMLImpl implements DataTypesHelper {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation The ModelImplementation.
+ */
+ public DataTypesHelperEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public void copyTaggedValues(Object from, Object to) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public boolean equalsCHOICEKind(Object kind) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean equalsDeepHistoryKind(Object kind) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean equalsFORKKind(Object kind) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean equalsINITIALKind(Object kind) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean equalsJOINKind(Object kind) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean equalsJUNCTIONKind(Object kind) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean equalsShallowHistoryKind(Object kind) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public String getBody(Object handle) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getLanguage(Object handle) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String multiplicityToString(Object multiplicity) {
+ MultiplicityElement mult = (MultiplicityElement) multiplicity;
+ if (mult.getLower() == mult.getUpper()) {
+ return DataTypesFactoryEUMLImpl.boundToString(mult.getLower());
+ } else {
+ return DataTypesFactoryEUMLImpl.boundToString(
+ mult.getLower())
+ + ".."
+ + DataTypesFactoryEUMLImpl.boundToString(mult.getUpper());
+ }
+ }
+
+
+ public Object setBody(Object handle, String body) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object setLanguage(Object handle, String language) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/DirectionKindEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/DirectionKindEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/DirectionKindEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,55 @@
+// $Id:DirectionKindEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.DirectionKind;
+import org.eclipse.uml2.uml.ParameterDirectionKind;
+
+/**
+ * The Eclipse UML2 implementation of DirectionKind.
+ *
+ * @author Tom Morris
+ */
+class DirectionKindEUMLImpl implements DirectionKind {
+
+ public Object getInOutParameter() {
+ return ParameterDirectionKind.INOUT_LITERAL;
+ }
+
+ public Object getInParameter() {
+ return ParameterDirectionKind.IN_LITERAL;
+ }
+
+ public Object getOutParameter() {
+ return ParameterDirectionKind.OUT_LITERAL;
+ }
+
+ public Object getReturnParameter() {
+ return ParameterDirectionKind.RETURN_LITERAL;
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/EUMLModelImplementation.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/EUMLModelImplementation.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/EUMLModelImplementation.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,495 @@
+// $Id:EUMLModelImplementation.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.io.Writer;
+
+import org.apache.log4j.Logger;
+import org.argouml.model.ActivityGraphsFactory;
+import org.argouml.model.ActivityGraphsHelper;
+import org.argouml.model.AggregationKind;
+import org.argouml.model.ChangeableKind;
+import org.argouml.model.CollaborationsFactory;
+import org.argouml.model.CollaborationsHelper;
+import org.argouml.model.CommonBehaviorFactory;
+import org.argouml.model.CommonBehaviorHelper;
+import org.argouml.model.ConcurrencyKind;
+import org.argouml.model.CopyHelper;
+import org.argouml.model.CoreFactory;
+import org.argouml.model.CoreHelper;
+import org.argouml.model.DataTypesFactory;
+import org.argouml.model.DataTypesHelper;
+import org.argouml.model.DiagramInterchangeModel;
+import org.argouml.model.DirectionKind;
+import org.argouml.model.ExtensionMechanismsFactory;
+import org.argouml.model.ExtensionMechanismsHelper;
+import org.argouml.model.Facade;
+import org.argouml.model.MetaTypes;
+import org.argouml.model.ModelEventPump;
+import org.argouml.model.ModelImplementation;
+import org.argouml.model.ModelManagementFactory;
+import org.argouml.model.ModelManagementHelper;
+import org.argouml.model.OrderingKind;
+import org.argouml.model.PseudostateKind;
+import org.argouml.model.ScopeKind;
+import org.argouml.model.StateMachinesFactory;
+import org.argouml.model.StateMachinesHelper;
+import org.argouml.model.UmlException;
+import org.argouml.model.UmlFactory;
+import org.argouml.model.UmlHelper;
+import org.argouml.model.UseCasesFactory;
+import org.argouml.model.UseCasesHelper;
+import org.argouml.model.VisibilityKind;
+import org.argouml.model.XmiReader;
+import org.argouml.model.XmiWriter;
+import org.argouml.model.euml.ActivityGraphsFactoryEUMLlImpl;
+import org.argouml.model.euml.ActivityGraphsHelperEUMLImpl;
+import org.argouml.model.euml.CommonBehaviorFactoryEUMLImpl;
+import org.argouml.model.euml.CommonBehaviorHelperEUMLImpl;
+import org.argouml.model.euml.CoreFactoryEUMLImpl;
+import org.argouml.model.euml.CoreHelperEUMLImpl;
+import org.argouml.model.euml.DataTypesFactoryEUMLImpl;
+import org.argouml.model.euml.DataTypesHelperEUMLImpl;
+import org.argouml.model.euml.ExtensionMechanismsFactoryEUMLImpl;
+import org.argouml.model.euml.ExtensionMechanismsHelperEUMLImpl;
+import org.argouml.model.euml.ModelEventPumpEUMLImpl;
+import org.argouml.model.euml.ModelManagementFactoryEUMLImpl;
+import org.argouml.model.euml.ModelManagementHelperEUMLImpl;
+import org.argouml.model.euml.StateMachinesFactoryEUMLImpl;
+import org.argouml.model.euml.StateMachinesHelperEUMLImpl;
+import org.argouml.model.euml.UseCasesFactoryEUMLImpl;
+import org.argouml.model.euml.UseCasesHelperEUMLImpl;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.resource.UMLResource;
+
+/**
+ * Eclipse UML2 implementation of the ArgoUML Model subsystem. Although built on
+ * the Eclipse UML2 plugin which is, in turn, built on eCore and the Eclipse
+ * Modeling Framework (EMF), the only things required from Eclipse are the five
+ * Jars which implement UML2, eCore, and the subset of EMF needed for to support
+ * them.
+ * <p>
+ * The implementation of this subsystem was generously sponsored by Google as
+ * part of the Google Summer of Code 2007. The bulk of the implementation was
+ * built by the sponsored student, Bogdan Ciprian Pistol, who was mentored by
+ * Tom Morris.
+ *
+ * @author Bogdan Ciprian Pistol
+ * @author Tom Morris <[email protected]>
+ * @since ArgoUML 0.25.4, May 2007
+ */
+public class EUMLModelImplementation implements ModelImplementation {
+
+ private static final Logger LOG =
+ Logger.getLogger(EUMLModelImplementation.class);
+
+ private ActivityGraphsFactory theActivityGraphsFactory;
+
+ private ActivityGraphsHelper theActivityGraphsHelper;
+
+ private AggregationKind theAggregationKind;
+
+ @SuppressWarnings("deprecation")
+ private ChangeableKind theChangeableKind;
+
+ private CollaborationsFactory theCollaborationsFactory;
+
+ private CollaborationsHelper theCollaborationsHelper;
+
+ private CommonBehaviorFactory theCommonBehaviorFactory;
+
+ private CommonBehaviorHelper theCommonBehaviorHelper;
+
+ private ConcurrencyKind theConcurrencyKind;
+
+ private CopyHelper theCopyHelper;
+
+ private CoreFactory theCoreFactory;
+
+ private CoreHelper theCoreHelper;
+
+ private DataTypesFactory theDataTypesFactory;
+
+ private DataTypesHelper theDataTypesHelper;
+
+ private DirectionKind theDirectionKind;
+
+ private ExtensionMechanismsFactory theExtensionMechanismsFactory;
+
+ private ExtensionMechanismsHelper theExtensionMechanismsHelper;
+
+ private Facade theFacade;
+
+ private MetaTypes theMetaTypes;
+
+ private ModelEventPump theModelEventPump;
+
+ private ModelManagementFactory theModelManagementFactory;
+
+ private ModelManagementHelper theModelManagementHelper;
+
+ private OrderingKind theOrderingKind;
+
+ private PseudostateKind thePseudostateKind;
+
+ @SuppressWarnings("deprecation")
+ private ScopeKind theScopeKind;
+
+ private StateMachinesFactory theStateMachinesFactory;
+
+ private StateMachinesHelper theStateMachinesHelper;
+
+ private UmlFactory theUmlFactory;
+
+ private UmlHelper theUmlHelper;
+
+ private UseCasesFactory theUseCasesFactory;
+
+ private UseCasesHelper theUseCasesHelper;
+
+ private VisibilityKind theVisibilityKind;
+
+ /**
+ * Constructor.
+ */
+ public EUMLModelImplementation() {
+
+ registerResourceFactories();
+
+// model = UMLFactory.eINSTANCE.createModel();
+// model.setName("uml2_simple_model");
+
+// theCoreFactory = new CoreFactoryEUMLImpl(this);
+//
+//
+//
+// // Create and start event pump first so it's available for all others
+// theModelEventPump = new ModelEventPumpEUMLImpl(this);
+// theModelEventPump.startPumpingEvents();
+// LOG.debug("EUML Init - event pump started");
+//
+// // DataTypes is next so it's available for Kinds, ModelManagement,
+// // & Extensions
+// theDataTypesFactory = new DataTypesFactoryEUMLImpl(this);
+// theDataTypesHelper = new DataTypesHelperEUMLImpl(this);
+//
+// theAggregationKind = new AggregationKindEUMLImpl(this);
+// theChangeableKind = new ChangeableKindEUMLImpl(this);
+// theConcurrencyKind = new ConcurrencyKindEUMLImpl(this);
+// theDirectionKind = new DirectionKindEUMLImpl(this);
+// theOrderingKind = new OrderingKindEUMLImpl(this);
+// thePseudostateKind = new PseudostateKindEUMLImpl(this);
+// theScopeKind = new ScopeKindEUMLImpl(this);
+// theVisibilityKind = new VisibilityKindEUMLImpl(this);
+//
+// theModelManagementFactory = new ModelManagementFactoryEUMLImpl(this);
+// theExtensionMechanismsHelper =
+// new ExtensionMechanismsHelperEUMLImpl(this);
+// theExtensionMechanismsFactory =
+// new ExtensionMechanismsFactoryEUMLImpl(this);
+// LOG.debug("EUML Init - initialized package Extension mechanism");
+//
+// // Initialize remaining factories and helpers
+// // (but defer heavyweight ones until needed)
+// theCopyHelper = new CopyHelperEUMLImpl(this);
+// theActivityGraphsHelper = new ActivityGraphsHelperEUMLImpl(this);
+// theCoreHelper = new CoreHelperEUMLImpl(this);
+// LOG.debug("EUML Init - initialized package Core helper");
+// theModelManagementHelper = new ModelManagementHelperEUMLImpl(this);
+// theStateMachinesHelper = new StateMachinesHelperEUMLImpl(this);
+// LOG.debug("EUML Init - initialized package StateMachines");
+// theUseCasesFactory = new UseCasesFactoryEUMLImpl(this);
+// theUseCasesHelper = new UseCasesHelperEUMLImpl(this);
+// LOG.debug("EUML Init - initialized package Use Cases");
+// theActivityGraphsFactory = new ActivityGraphsFactoryEUMLlImpl(this);
+// LOG.debug("EUML Init - initialized package Collaborations");
+// theCommonBehaviorFactory = new CommonBehaviorFactoryEUMLImpl(this);
+// theCommonBehaviorHelper = new CommonBehaviorHelperEUMLImpl(this);
+// LOG.debug("EUML Init - initialized package CommonBehavior");
+// theStateMachinesFactory = new StateMachinesFactoryEUMLImpl(this);
+// theCoreFactory = new CoreFactoryEUMLImpl(this);
+// LOG.debug("EUML Init - all packages initialized");
+ }
+
+ private static void registerResourceFactories() {
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
+ UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
+ "xmi", UMLResource.Factory.INSTANCE);
+ }
+
+ public ActivityGraphsFactory getActivityGraphsFactory() {
+ if (theActivityGraphsFactory == null) {
+ theActivityGraphsFactory = new ActivityGraphsFactoryEUMLlImpl(this);
+ }
+ return theActivityGraphsFactory;
+ }
+
+ public ActivityGraphsHelper getActivityGraphsHelper() {
+ if (theActivityGraphsHelper == null) {
+ theActivityGraphsHelper = new ActivityGraphsHelperEUMLImpl(this);
+ }
+ return theActivityGraphsHelper;
+ }
+
+ public AggregationKind getAggregationKind() {
+ if (theAggregationKind == null) {
+ theAggregationKind = new AggregationKindEUMLImpl();
+ }
+ return theAggregationKind;
+ }
+
+ @SuppressWarnings("deprecation")
+ public ChangeableKind getChangeableKind() {
+ if (theChangeableKind == null) {
+ theChangeableKind = new ChangeableKindEUMLImpl();
+ }
+
+ return theChangeableKind;
+ }
+
+ public CollaborationsFactory getCollaborationsFactory() {
+ if (theCollaborationsFactory == null) {
+ theCollaborationsFactory = new CollaborationsFactoryEUMLImpl(this);
+ }
+ return theCollaborationsFactory;
+ }
+
+ public CollaborationsHelper getCollaborationsHelper() {
+ if (theCollaborationsHelper == null) {
+ theCollaborationsHelper = new CollaborationsHelperEUMLImpl(this);
+ }
+ return theCollaborationsHelper;
+ }
+
+ public CommonBehaviorFactory getCommonBehaviorFactory() {
+ if (theCommonBehaviorFactory == null) {
+ theCommonBehaviorFactory = new CommonBehaviorFactoryEUMLImpl(this);
+ }
+ return theCommonBehaviorFactory;
+ }
+
+ public CommonBehaviorHelper getCommonBehaviorHelper() {
+ if (theCommonBehaviorHelper == null) {
+ theCommonBehaviorHelper = new CommonBehaviorHelperEUMLImpl(this);
+ }
+ return theCommonBehaviorHelper;
+ }
+
+ public ConcurrencyKind getConcurrencyKind() {
+ if (theConcurrencyKind == null) {
+ theConcurrencyKind = new ConcurrencyKindEUMLImpl();
+ }
+ return theConcurrencyKind;
+ }
+
+ public CopyHelper getCopyHelper() {
+ if (theCopyHelper == null) {
+ theCopyHelper = new CopyHelperEUMLImpl(this);
+ }
+ return theCopyHelper;
+ }
+
+ public CoreFactory getCoreFactory() {
+ if (theCoreFactory == null) {
+ theCoreFactory = new CoreFactoryEUMLImpl(this);
+ }
+ return theCoreFactory;
+ }
+
+ public CoreHelper getCoreHelper() {
+ if (theCoreHelper == null) {
+ theCoreHelper = new CoreHelperEUMLImpl(this);
+ }
+ return theCoreHelper;
+ }
+
+ public DataTypesFactory getDataTypesFactory() {
+ if (theDataTypesFactory == null) {
+ theDataTypesFactory = new DataTypesFactoryEUMLImpl(this);
+ }
+ return theDataTypesFactory;
+ }
+
+ public DataTypesHelper getDataTypesHelper() {
+ if (theDataTypesHelper == null) {
+ theDataTypesHelper = new DataTypesHelperEUMLImpl(this);
+ }
+ return theDataTypesHelper;
+ }
+
+ public DirectionKind getDirectionKind() {
+ if (theDirectionKind == null) {
+ theDirectionKind = new DirectionKindEUMLImpl();
+ }
+ return theDirectionKind;
+ }
+
+ public ExtensionMechanismsFactory getExtensionMechanismsFactory() {
+ if (theExtensionMechanismsFactory == null) {
+ theExtensionMechanismsFactory =
+ new ExtensionMechanismsFactoryEUMLImpl(this);
+ }
+ return theExtensionMechanismsFactory;
+ }
+
+ public ExtensionMechanismsHelper getExtensionMechanismsHelper() {
+ if (theExtensionMechanismsHelper == null) {
+ theExtensionMechanismsHelper =
+ new ExtensionMechanismsHelperEUMLImpl(this);
+ }
+
+ return theExtensionMechanismsHelper;
+ }
+
+ public Facade getFacade() {
+ if (theFacade == null) {
+ theFacade = new FacadeEUMLImpl(this);
+ }
+
+ return theFacade;
+ }
+
+ public MetaTypes getMetaTypes() {
+ if (theMetaTypes == null) {
+ theMetaTypes = new MetaTypesEUMLImpl(this);
+ }
+ return theMetaTypes;
+ }
+
+ public ModelEventPump getModelEventPump() {
+ if (theModelEventPump == null) {
+ theModelEventPump = new ModelEventPumpEUMLImpl(this);
+ }
+ return theModelEventPump;
+ }
+
+ public ModelManagementFactory getModelManagementFactory() {
+ if (theModelManagementFactory == null) {
+ theModelManagementFactory =
+ new ModelManagementFactoryEUMLImpl(this);
+ }
+ return theModelManagementFactory;
+ }
+
+ public ModelManagementHelper getModelManagementHelper() {
+ if (theModelManagementHelper == null) {
+ theModelManagementHelper = new ModelManagementHelperEUMLImpl(this);
+ }
+ return theModelManagementHelper;
+ }
+
+ public OrderingKind getOrderingKind() {
+ if (theOrderingKind == null) {
+ theOrderingKind = new OrderingKindEUMLImpl();
+ }
+
+ return theOrderingKind;
+ }
+
+ public PseudostateKind getPseudostateKind() {
+ if (thePseudostateKind == null) {
+ thePseudostateKind = new PseudostateKindEUMLImpl();
+ }
+ return thePseudostateKind;
+ }
+
+ @SuppressWarnings("deprecation")
+ public ScopeKind getScopeKind() {
+ if (theScopeKind == null) {
+ theScopeKind = new ScopeKindEUMLImpl();
+ }
+ return theScopeKind;
+ }
+
+
+ public StateMachinesFactory getStateMachinesFactory() {
+ if (theStateMachinesFactory == null) {
+ theStateMachinesFactory = new StateMachinesFactoryEUMLImpl(this);
+ }
+ return theStateMachinesFactory;
+ }
+
+ public StateMachinesHelper getStateMachinesHelper() {
+ if (theStateMachinesHelper == null) {
+ theStateMachinesHelper = new StateMachinesHelperEUMLImpl(this);
+ }
+ return theStateMachinesHelper;
+ }
+
+ public UmlFactory getUmlFactory() {
+ if (theUmlFactory == null) {
+ theUmlFactory = new UmlFactoryEUMLImpl(this);
+ }
+ return theUmlFactory;
+ }
+
+ public UmlHelper getUmlHelper() {
+ if (theUmlHelper == null) {
+ theUmlHelper = new UmlHelperEUMLImpl(this);
+ }
+ return theUmlHelper;
+ }
+
+ public UseCasesFactory getUseCasesFactory() {
+ if (theUseCasesFactory == null) {
+ theUseCasesFactory = new UseCasesFactoryEUMLImpl(this);
+ }
+ return theUseCasesFactory;
+ }
+
+ public UseCasesHelper getUseCasesHelper() {
+ if (theUseCasesHelper == null) {
+ theUseCasesHelper = new UseCasesHelperEUMLImpl(this);
+ }
+ return theUseCasesHelper;
+ }
+
+ public VisibilityKind getVisibilityKind() {
+ if (theVisibilityKind == null) {
+ theVisibilityKind = new VisibilityKindEUMLImpl();
+ }
+
+ return theVisibilityKind;
+ }
+
+ public XmiReader getXmiReader() throws UmlException {
+ return new XmiReaderEUMLImpl(this);
+ }
+
+ public XmiWriter getXmiWriter(Object model, Writer writer, String version)
+ throws UmlException {
+ return new XmiWriterEUMLImpl(this, model, writer, version);
+ }
+
+ public DiagramInterchangeModel getDiagramInterchangeModel() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ExtensionMechanismsFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ExtensionMechanismsFactoryEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ExtensionMechanismsFactoryEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,112 @@
+// $Id:ExtensionMechanismsFactoryEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.Collection;
+
+import org.argouml.model.ExtensionMechanismsFactory;
+
+/**
+ * The implementation of the ExtensionMechanismsFactory for EUML2.
+ */
+class ExtensionMechanismsFactoryEUMLImpl implements
+ ExtensionMechanismsFactory {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public ExtensionMechanismsFactoryEUMLImpl(
+ EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public Object buildStereotype(Object theModelElementObject, Object theName,
+ Object theNamespaceObject) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildStereotype(Object theModelElementObject, String theName,
+ Object model, Collection models) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildStereotype(String text, Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildTagDefinition(String name, Object stereotype, Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildTaggedValue(String tag, String value) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object copyStereotype(Object source, Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object copyTagDefinition(Object aTd, Object aNs) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void copyTaggedValues(Object source, Object target) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Object createStereotype() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createTagDefinition() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createTaggedValue() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ExtensionMechanismsHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ExtensionMechanismsHelperEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ExtensionMechanismsHelperEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,158 @@
+// $Id:ExtensionMechanismsHelperEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.Collection;
+
+import org.argouml.model.ExtensionMechanismsHelper;
+
+/**
+ * The implementation of the ExtensionMechanismsHelper for EUML2.
+ */
+class ExtensionMechanismsHelperEUMLImpl implements ExtensionMechanismsHelper {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation The ModelImplementation.
+ */
+ public ExtensionMechanismsHelperEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public void addBaseClass(Object handle, Object baseClass) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addCopyStereotype(Object modelElement, Object stereotype) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addExtendedElement(Object handle, Object extendedElement) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addTaggedValue(Object handle, Object taggedValue) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Collection getAllPossibleStereotypes(Collection models, Object modelElement) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String getMetaModelName(Object m) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getStereotype(Object ns, Object stereo) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getStereotype(Collection models, Object stereo) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getStereotypes(Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getStereotypes(Collection models) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean hasStereoType(Object handle, String name) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isStereotype(Object object, String name, String base) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isStereotypeInh(Object object, String name, String base) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isValidStereoType(Object theModelElement, Object theStereotype) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void removeBaseClass(Object handle, Object baseClass) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeTaggedValue(Object handle, Object taggedValue) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setIcon(Object handle, Object icon) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setTag(Object handle, Object tag) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setTaggedValue(Object handle, Collection taggedValues) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setType(Object handle, Object type) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setValueOfTag(Object handle, String value) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,1977 @@
+//$Id:FacadeEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.argouml.model.Facade;
+import org.argouml.model.NotImplementedException;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Action;
+import org.eclipse.uml2.uml.ActivityGroup;
+import org.eclipse.uml2.uml.ActivityPartition;
+import org.eclipse.uml2.uml.Actor;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Artifact;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.AssociationClass;
+import org.eclipse.uml2.uml.BehavioralFeature;
+import org.eclipse.uml2.uml.CallAction;
+import org.eclipse.uml2.uml.CallEvent;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Collaboration;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Component;
+import org.eclipse.uml2.uml.CreateObjectAction;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.DestroyObjectAction;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ElementImport;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Expression;
+import org.eclipse.uml2.uml.Extend;
+import org.eclipse.uml2.uml.ExtensionPoint;
+import org.eclipse.uml2.uml.Feature;
+import org.eclipse.uml2.uml.FinalState;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.Include;
+import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.LinkEndData;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.MultiplicityElement;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Node;
+import org.eclipse.uml2.uml.ObjectFlow;
+import org.eclipse.uml2.uml.ObjectNode;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.OutputPin;
+import org.eclipse.uml2.uml.PackageImport;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Pseudostate;
+import org.eclipse.uml2.uml.PseudostateKind;
+import org.eclipse.uml2.uml.Reception;
+import org.eclipse.uml2.uml.RedefinableElement;
+import org.eclipse.uml2.uml.Relationship;
+import org.eclipse.uml2.uml.SendObjectAction;
+import org.eclipse.uml2.uml.SendSignalAction;
+import org.eclipse.uml2.uml.Signal;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.StateMachine;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.StructuralFeature;
+import org.eclipse.uml2.uml.TemplateParameter;
+import org.eclipse.uml2.uml.TimeEvent;
+import org.eclipse.uml2.uml.TimeExpression;
+import org.eclipse.uml2.uml.Transition;
+import org.eclipse.uml2.uml.Trigger;
+import org.eclipse.uml2.uml.TypedElement;
+import org.eclipse.uml2.uml.Usage;
+import org.eclipse.uml2.uml.UseCase;
+import org.eclipse.uml2.uml.ValueSpecification;
+import org.eclipse.uml2.uml.VisibilityKind;
+
+
+/**
+ * The implementation of the Facade for EUML2.
+ */
+class FacadeEUMLImpl implements Facade {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public FacadeEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public boolean equalsPseudostateKind(Object ps1, Object ps2) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getAction(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getActionSequence(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public List getActions(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getActivatedMessages(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getActivator(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getActivityGraph(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public List getActualArguments(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getAddition(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getAggregation(Object handle) {
+ return ((Property) handle).getAggregation();
+ }
+
+ public String getAlias(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getAnnotatedElements(Object handle) {
+ return ((Comment) handle).getAnnotatedElements();
+ }
+
+ public List getArguments(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getAssociatedClasses(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getAssociation(Object handle) {
+ // TODO: Link not implemented
+ return ((Property) handle).getOwningAssociation();
+ }
+
+ public Object getAssociationEnd(Object classifier, Object association) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getAssociationEnds(Object handle) {
+ // TODO: Do we want near end, far end, or both here? - tfm
+ // We'll just return them all for now
+ Collection<Association> associations =
+ ((Classifier) handle).getAssociations();
+ Collection<Property> ends = new ArrayList<Property>();
+ for (Association assoc : associations) {
+ ends.addAll(assoc.getMemberEnds());
+ }
+ return ends;
+ }
+
+ public Collection getAssociationRoles(Object handle) {
+ // TODO: In UML 2.0, ClassifierRole, AssociationRole, and
+ // AssociationEndRole have been replaced by the internal
+ // structure of the Collaboration
+ return Collections.EMPTY_SET;
+ }
+
+ public List getAttributes(Object handle) {
+ // TODO: Just a shortcut for now. Add real implementation - tfm
+ return getStructuralFeatures(handle);
+ }
+
+ public Object getBase(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getBaseClasses(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getBases(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getBehavioralFeature(Object handle) {
+ List<Feature> features = ((Classifier) handle).getFeatures();
+ List<Feature> result = new ArrayList<Feature>();
+ for (Feature f : features) {
+ if (f instanceof BehavioralFeature) {
+ result.add(f);
+ }
+ }
+ return result;
+ }
+
+ public Collection getBehaviors(Object handle) {
+ // TODO:
+ return Collections.EMPTY_SET;
+ }
+
+ public Object getBinding(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getBody(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public int getBound(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getChangeExpression(Object target) {
+ throw new NotYetImplementedException();
+
+ }
+
+ @SuppressWarnings("deprecation")
+ public Object getChangeability(Object handle) {
+ if (handle instanceof Property) {
+ if (((Property) handle).isReadOnly()) {
+ return modelImpl.getChangeableKind().getFrozen();
+ } else {
+ return modelImpl.getChangeableKind().getChangeable();
+ }
+ }
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getChild(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getChildren(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getClassifier(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getClassifierRoles(Object handle) {
+ // TODO: In UML 2.0, ClassifierRole, AssociationRole, and
+ // AssociationEndRole have been replaced by the internal
+ // structure of the Collaboration
+ return Collections.EMPTY_SET;
+ }
+
+ public Collection getClassifiers(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getClassifiersInState(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection<Dependency> getClientDependencies(Object handle) {
+ return ((NamedElement) handle).getClientDependencies();
+ }
+
+ public Collection<NamedElement> getClients(Object handle) {
+ return ((Dependency) handle).getClients();
+ }
+
+ public Collection getCollaborations(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getComments(Object handle) {
+ return ((Element) handle).getOwnedComments();
+ }
+
+ public Object getCommunicationConnection(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getCommunicationLink(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getComponentInstance(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getConcurrency(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getCondition(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getConnections(Object handle) {
+ // TODO: Link not implemented - tfm
+ if (handle instanceof Association) {
+ return ((Association) handle).getMemberEnds();
+ } else {
+ throw new IllegalArgumentException();
+ }
+
+ }
+
+ public List getConstrainedElements(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getConstrainingElements(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getConstraints(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getContainer(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getContents(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getContext(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getContexts(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getCreateActions(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getDataValue(Object taggedValue) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getDefaultElement(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getDefaultValue(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getDeferrableEvents(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getDeployedComponents(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getDeploymentLocations(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getDiscriminator(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getDispatchAction(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getDoActivity(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getEffect(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getElementImports(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getElementImports2(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getElementResidences(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getEntry(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getEnumeration(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public List getEnumerationLiterals(Object handle) {
+ return ((Enumeration) handle).getOwnedLiterals();
+ }
+
+ public Object getExit(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getExpression(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getExtendedElements(Object handle) {
+ ((Stereotype) handle).getExtendedMetaclasses();
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getExtenders(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getExtends(Object handle) {
+ return ((UseCase) handle).getExtends();
+ }
+
+ public Object getExtension(Object handle) {
+ return ((Extend) handle).getExtension();
+ }
+
+ public ExtensionPoint getExtensionPoint(Object handle, int index) {
+ return ((UseCase) handle).getExtensionPoints().get(index);
+ }
+
+ public List<ExtensionPoint> getExtensionPoints(Object handle) {
+ return ((UseCase) handle).getExtensionPoints();
+ }
+
+ public List<Feature> getFeatures(Object handle) {
+ return ((Classifier) handle).getFeatures();
+ }
+
+ public Object getGeneralization(Object handle, Object parent) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getGeneralizations(Object handle) {
+ // TODO: Check whether this returns all generalizations or just
+ // those that we are a child of (probably the former)
+ return ((Classifier) handle).getGeneralizations();
+ }
+
+ public Object getGuard(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getIcon(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getImportedElement(Object elementImport) {
+ return ((ElementImport) elementImport).getImportedElement();
+ }
+
+ public Collection getImportedElements(Object pack) {
+ // TODO: double check - tfm
+ return ((Namespace) pack).getImportedElements();
+ }
+
+ public Collection getInStates(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getIncluders(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getIncludes(Object handle) {
+ return ((UseCase) handle).getIncludes();
+ }
+
+ public Collection getIncomings(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getInitialValue(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getInstance(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getInstances(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getInteraction(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getInteractions(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getInternalTransitions(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getKind(Object handle) {
+ if (handle instanceof Pseudostate) {
+ return ((Pseudostate) handle).getKind();
+ } else if (handle instanceof Parameter) {
+ return ((Parameter) handle).getDirection();
+ } else {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ public Object getLink(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getLinkEnds(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getLinks(Object handle) {
+ // TODO: no Links in UML 2
+ return Collections.EMPTY_SET;
+ }
+
+ public String getLocation(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public int getLower(Object handle) {
+ throw new NotYetImplementedException();
+ }
+
+ public Collection getMessages(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getMethods(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getModel(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getModelElement(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public List getModelElementAssociated(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Element getModelElementContainer(Object handle) {
+ return ((Element) handle).getOwner();
+ }
+
+ public List<Element> getModelElementContents(Object handle) {
+ return ((Element) handle).getOwnedElements();
+ }
+
+ public Object getMultiplicity(Object handle) {
+ // MultiplicityElement is now an interface implemented
+ // by element types that support multiplicities - tfm
+ if (handle instanceof MultiplicityElement) {
+ return handle;
+ } else {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ public String getName(Object handle) {
+ if (handle instanceof String) {
+ return (String) handle;
+ } else if (handle instanceof NamedElement) {
+ return ((NamedElement) handle).getName();
+ }
+ throw new IllegalArgumentException();
+ }
+
+ public Object getNamespace(Object handle) {
+ return ((NamedElement) handle).getNamespace();
+ }
+
+ public Object getNextEnd(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getNodeInstance(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getObjectFlowStates(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getOccurrences(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getOperation(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public List getOperations(Object handle) {
+ List<Feature> features = ((Classifier) handle).getFeatures();
+ List<Feature> result = new ArrayList<Feature>();
+ for (Feature f : features) {
+ if (f instanceof Operation) {
+ result.add(f);
+ }
+ }
+ return result;
+ }
+
+ public List<Feature> getOperationsAndReceptions(Object handle) {
+ List<Feature> features = ((Classifier) handle).getFeatures();
+ List<Feature> result = new ArrayList<Feature>();
+ for (Feature f : features) {
+ if (f instanceof Operation || f instanceof Reception) {
+ result.add(f);
+ }
+ }
+ return result;
+ }
+
+ public Object getOppositeEnd(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getOrdering(Object handle) {
+ if (handle instanceof Property) {
+ if (((Property) handle).isOrdered()) {
+ return modelImpl.getOrderingKind().getOrdered();
+ } else {
+ return modelImpl.getOrderingKind().getUnordered();
+ }
+ } else if (handle instanceof MultiplicityElement) {
+ if (((MultiplicityElement) handle).isOrdered()) {
+ return modelImpl.getOrderingKind().getOrdered();
+ } else {
+ return modelImpl.getOrderingKind().getUnordered();
+ }
+ }
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getOtherAssociationEnds(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getOtherLinkEnds(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getOutgoings(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getOwnedElements(Object handle) {
+ return ((Namespace) handle).getOwnedElements();
+ }
+
+ public Object getOwner(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getOwnerScope(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getPackage(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getParameter(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getParameter(Object handle, int n) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getParameters(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public List getParametersList(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getParent(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getPartitions(Object container) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getPowertype(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getPowertypeRanges(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getPredecessors(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getPseudostateKind(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public List getQualifiers(Object handle) {
+ return ((Property) handle).getQualifiers();
+ }
+
+ public Collection getRaisedSignals(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Iterator getRanges(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getReceivedMessages(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getReceivedStimuli(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getReceiver(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getReceptions(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getRecurrence(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public String getReferenceState(Object o) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getReferenceValue(Object taggedValue) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getRepresentedClassifier(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getRepresentedOperation(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getResident(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getResidentElements(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getResidents(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getScript(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getSender(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getSentMessages(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getSentStimuli(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getSignal(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getSource(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getSourceFlows(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getSources(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getSpecializations(Object handle) {
+ Collection generalizations = ((Classifier) handle).getGeneralizations();
+ // TODO: not implemented
+ return Collections.EMPTY_SET;
+ }
+
+ public String getSpecification(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getSpecifications(Object handle) {
+ if (handle instanceof Property) {
+ // TODO: unimplemented
+// return ((Property) handle).gets
+ return Collections.EMPTY_SET;
+ } else if (handle instanceof Classifier) {
+ ((Classifier) handle).getAllUsedInterfaces();
+ }
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getState(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getStateMachine(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getStates(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getStereotypes(Object handle) {
+ // TODO: Changed to Profiles::Class::extension in UML 2.x?
+ return Collections.EMPTY_SET;
+ }
+
+ public Collection getStimuli(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public List getStructuralFeatures(Object handle) {
+ List<Feature> features = ((Classifier) handle).getFeatures();
+ List<Feature> result = new ArrayList<Feature>();
+ for (Feature f : features) {
+ if (f instanceof StructuralFeature) {
+ result.add(f);
+ }
+ }
+ return result;
+ }
+
+ public Object getSubmachine(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getSubmachineStates(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getSubvertices(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getSuccessors(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getSupplierDependencies(Object handle) {
+
+ // TODO: not navigable this direction? - tfm
+ return Collections.EMPTY_SET;
+ }
+
+ public Collection<NamedElement> getSuppliers(Object handle) {
+ return ((Dependency) handle).getSuppliers();
+ }
+
+ public String getTag(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getTagDefinition(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getTagDefinitions(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public String getTagOfTag(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getTaggedValue(Object handle, String name) {
+ // TODO: not implemented
+ return null;
+ }
+
+ public String getTaggedValueValue(Object handle, String name) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Iterator getTaggedValues(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getTaggedValuesCollection(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getTarget(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getTargetFlows(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ @SuppressWarnings("deprecation")
+ public Object getTargetScope(Object handle) {
+ // Don't implement - deprecated method in interface.
+ throw new NotImplementedException();
+ }
+
+ public Object getTemplate(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public List getTemplateParameters(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public String getTipString(Object modelElement) {
+ // TODO: Not Model implementation dependent
+ return getUMLClassName(modelElement) + ": " + getName(modelElement);
+ }
+
+ public Object getTop(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getTransition(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getTransitions(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Trigger getTrigger(Object handle) {
+ // TODO: Transitions can have multiple Triggers now?
+ // Need API change to handle - tfm
+ return ((Transition) handle).getTriggers().get(0);
+ }
+
+ public Object getType(Object handle) {
+ if (handle instanceof TypedElement) {
+ return ((TypedElement) handle).getType();
+ }
+ throw new NotYetImplementedException();
+ }
+
+ public Collection getTypedValues(Object handle) {
+ throw new NotYetImplementedException();
+ }
+
+ public String getUMLClassName(Object handle) {
+ return modelImpl.getMetaTypes().getName(handle);
+ }
+
+ public String getUUID(Object element) {
+ throw new NotYetImplementedException();
+ }
+
+ public int getUpper(Object handle) {
+ throw new NotYetImplementedException();
+ }
+
+ public UseCase getUseCase(Object handle) {
+ return ((ExtensionPoint) handle).getUseCase();
+ }
+
+ public Object getValue(Object handle) {
+ throw new NotYetImplementedException();
+ }
+
+ public String getValueOfTag(Object handle) {
+ throw new NotYetImplementedException();
+ }
+
+ public VisibilityKind getVisibility(Object handle) {
+ return ((NamedElement) handle).getVisibility();
+ }
+
+ public ValueSpecification getWhen(Object target) {
+ return ((TimeEvent) target).getWhen();
+ }
+
+ public boolean hasReturnParameterDirectionKind(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAAbstraction(Object handle) {
+ return handle instanceof Abstraction;
+ }
+
+ public boolean isAAction(Object handle) {
+ return handle instanceof Action;
+ }
+
+ public boolean isAActionExpression(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAActionSequence(Object handle) {
+ // TODO: gone in UML 2.x
+ return false;
+ }
+
+ public boolean isAActionState(Object handle) {
+ // TODO: ActionState, CallState, and SubactivityState have been replaced
+ // in UML 2.0 by explicitly modeled Actions
+ return false;
+ }
+
+ public boolean isAActivityGraph(Object handle) {
+ // TODO: Just a guess - double check - tfm;
+// return handle instanceof ActivityGroup;
+ return false;
+ }
+
+ public boolean isAActor(Object handle) {
+ return handle instanceof Actor;
+ }
+
+ public boolean isAAggregationKind(Object handle) {
+ return handle instanceof AggregationKind;
+ }
+
+ public boolean isAArgListsExpression(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAArgument(Object modelElement) {
+ // TODO: Double check - tfm
+ return modelElement instanceof InputPin
+ || modelElement instanceof OutputPin;
+ }
+
+ public boolean isAArtifact(Object handle) {
+ return handle instanceof Artifact;
+ }
+
+ public boolean isAAssociation(Object handle) {
+ return handle instanceof Association;
+ }
+
+ public boolean isAAssociationClass(Object handle) {
+ return handle instanceof AssociationClass;
+ }
+
+ public boolean isAAssociationEnd(Object handle) {
+ return handle instanceof Property
+ && ((Property) handle).getOwningAssociation() != null;
+ }
+
+ public boolean isAAssociationEndRole(Object handle) {
+ // TODO: In UML 2.0, ClassifierRole, AssociationRole, and
+ // AssociationEndRole have been replaced by the internal
+ // structure of the Collaboration
+ return false;
+ }
+
+ public boolean isAAssociationRole(Object handle) {
+ // TODO: In UML 2.0, ClassifierRole, AssociationRole, and
+ // AssociationEndRole have been replaced by the internal
+ // structure of the Collaboration
+ return false;
+ }
+
+ public boolean isAAttribute(Object handle) {
+ // TODO: This probably needs more qualification - tfm
+ return handle instanceof Property
+ && ((Property) handle).getClass_() != null;
+ }
+
+ public boolean isAAttributeLink(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isABehavioralFeature(Object handle) {
+ return handle instanceof BehavioralFeature;
+ }
+
+ public boolean isABinding(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isABooleanExpression(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isACallAction(Object handle) {
+ return handle instanceof CallAction;
+ }
+
+ public boolean isACallEvent(Object handle) {
+ return handle instanceof CallEvent;
+ }
+
+ public boolean isACallState(Object handle) {
+ // TODO: ActionState, CallState, and SubactivityState have been replaced
+ // in UML 2.0 by explicitly modeled Actions
+ return false;
+ }
+
+ public boolean isAChangeEvent(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAClass(Object handle) {
+ return handle instanceof org.eclipse.uml2.uml.Class;
+ }
+
+ public boolean isAClassifier(Object handle) {
+ return handle instanceof Classifier;
+ }
+
+ public boolean isAClassifierInState(Object handle) {
+ // TODO: gone in UML 2
+ return false;
+ }
+
+ public boolean isAClassifierRole(Object handle) {
+ // TODO: In UML 2.0, ClassifierRole, AssociationRole, and
+ // AssociationEndRole have been replaced by the internal
+ // structure of the Collaboration
+ return false;
+ }
+
+ public boolean isACollaboration(Object handle) {
+ return handle instanceof Collaboration;
+ }
+
+ public boolean isACollaborationInstanceSet(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAComment(Object handle) {
+ return handle instanceof Comment;
+ }
+
+ public boolean isAComponent(Object handle) {
+ return handle instanceof Component;
+ }
+
+ public boolean isAComponentInstance(Object handle) {
+ // TODO: Gone in UML 2
+ return false;
+ }
+
+ public boolean isACompositeState(Object handle) {
+ // TODO: changed in UML2
+ return false;
+ }
+
+ public boolean isAConcurrentRegion(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAConstraint(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isACreateAction(Object handle) {
+ // Double check - tfm
+ return handle instanceof CreateObjectAction;
+ }
+
+ public boolean isADataType(Object handle) {
+ return handle instanceof DataType;
+ }
+
+ public boolean isADataValue(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isADependency(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isADestroyAction(Object handle) {
+ // TODO: double check - tfm
+ return handle instanceof DestroyObjectAction;
+ }
+
+ public boolean isAElement(Object handle) {
+ return handle instanceof Element;
+ }
+
+ public boolean isAElementImport(Object handle) {
+ return handle instanceof ElementImport;
+ }
+
+ public boolean isAElementResidence(Object handle) {
+ // TODO: Restructured in UML 2
+ return false;
+ }
+
+ public boolean isAEnumeration(Object handle) {
+ return handle instanceof Enumeration;
+ }
+
+ public boolean isAEnumerationLiteral(Object handle) {
+ return handle instanceof EnumerationLiteral;
+ }
+
+ public boolean isAEvent(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAException(Object handle) {
+ // TODO: This isn't right
+ return handle instanceof Signal;
+ }
+
+ public boolean isAExpression(Object handle) {
+ return handle instanceof Expression;
+ }
+
+ public boolean isAExtend(Object handle) {
+ return handle instanceof Extend;
+ }
+
+ public boolean isAExtensionPoint(Object handle) {
+ return handle instanceof ExtensionPoint;
+ }
+
+ public boolean isAFeature(Object handle) {
+ return handle instanceof Feature;
+ }
+
+ public boolean isAFinalState(Object handle) {
+ return handle instanceof FinalState;
+ }
+
+ public boolean isAFlow(Object handle) {
+ // TODO: double check - tfm
+ return handle instanceof ObjectFlow;
+ }
+
+ public boolean isAGeneralizableElement(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAGeneralization(Object handle) {
+ return handle instanceof Generalization;
+ }
+
+ public boolean isAGuard(Object handle) {
+ // TODO: gone in UML 2
+ return false;
+ }
+
+ public boolean isAInclude(Object handle) {
+ return handle instanceof Include;
+ }
+
+ public boolean isAInstance(Object handle) {
+ // TODO: Double check this - tfm
+ return handle instanceof InstanceSpecification;
+ }
+
+ public boolean isAInteraction(Object handle) {
+ // TODO: changed for UML 2.x
+ return false;
+ }
+
+ public boolean isAInteractionInstanceSet(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAInterface(Object handle) {
+ return handle instanceof Interface;
+ }
+
+ public boolean isAIterationExpression(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isALink(Object handle) {
+// return handle instanceof Link;
+ // TODO:
+ return false;
+ }
+
+ public boolean isALinkEnd(Object handle) {
+ // TODO: just a guess, probably not right - tfm
+ return handle instanceof LinkEndData;
+ }
+
+ public boolean isALinkObject(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAMappingExpression(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAMessage(Object handle) {
+ return handle instanceof Message;
+ }
+
+ public boolean isAMethod(Object handle) {
+ // TODO: gone from UML 2
+ return false;
+ }
+
+ public boolean isAModel(Object handle) {
+ return handle instanceof Model;
+ }
+
+ public boolean isAModelElement(Object handle) {
+ // TODO: What do we want to use as an equivalent here?
+ return handle instanceof NamedElement;
+ }
+
+ public boolean isAMultiplicity(Object handle) {
+ // TODO: The UML 1.4 concept of a Multiplicity & Multiplicity Range has
+ // been replaced by a single element
+ return handle instanceof MultiplicityElement;
+ }
+
+ public boolean isAMultiplicityRange(Object handle) {
+ return handle instanceof MultiplicityElement;
+ }
+
+ public boolean isANamespace(Object handle) {
+ return handle instanceof Namespace;
+ }
+
+ public boolean isANaryAssociation(Object handle) {
+ return handle instanceof Association
+ && ((Association) handle).getMemberEnds().size() > 2;
+ }
+
+ public boolean isANode(Object handle) {
+ return handle instanceof Node;
+ }
+
+ public boolean isANodeInstance(Object handle) {
+ // TODO: not in UML 2
+ return false;
+ }
+
+ public boolean isAObject(Object handle) {
+ // TODO: Double check - tfm
+ return handle instanceof ObjectNode;
+ }
+
+ public boolean isAObjectFlowState(Object handle) {
+ // TODO: not in UML 2
+ return false;
+ }
+
+ public boolean isAObjectSetExpression(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAOperation(Object handle) {
+ return handle instanceof Operation;
+ }
+
+ public boolean isAPackage(Object handle) {
+ return handle instanceof org.eclipse.uml2.uml.Package;
+ }
+
+ public boolean isAParameter(Object handle) {
+ return handle instanceof Parameter;
+ }
+
+ public boolean isAPartition(Object handle) {
+ return handle instanceof ActivityPartition;
+ }
+
+ public boolean isAPermission(Object handle) {
+ return handle instanceof PackageImport;
+ }
+
+ public boolean isAPrimitive(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAProcedureExpression(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAProgrammingLanguageDataType(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAPseudostate(Object handle) {
+ return handle instanceof Pseudostate;
+ }
+
+ public boolean isAPseudostateKind(Object handle) {
+ return handle instanceof PseudostateKind;
+ }
+
+ public boolean isAReception(Object handle) {
+ return handle instanceof Reception;
+ }
+
+ public boolean isARelationship(Object handle) {
+ return handle instanceof Relationship;
+ }
+
+ public boolean isAReturnAction(Object handle) {
+ // TODO: not implemented
+ return handle instanceof Action
+ && false; // && ((Action) handle).get
+ }
+
+ public boolean isASendAction(Object handle) {
+ // TODO: Do we want both here? - tfm
+ return handle instanceof SendObjectAction
+ || handle instanceof SendSignalAction;
+ }
+
+ public boolean isASignal(Object handle) {
+ return handle instanceof Signal;
+ }
+
+ public boolean isASignalEvent(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isASimpleState(Object handle) {
+ // TODO: not in UML 2
+ return false;
+ }
+
+ public boolean isAState(Object handle) {
+ return handle instanceof State;
+ }
+
+ public boolean isAStateMachine(Object handle) {
+ return handle instanceof StateMachine;
+ }
+
+ public boolean isAStateVertex(Object handle) {
+ // TODO: Changed for UML2
+ return handle instanceof State;
+ }
+
+ public boolean isAStereotype(Object handle) {
+ return handle instanceof Stereotype;
+ }
+
+ public boolean isAStimulus(Object handle) {
+// return handle instanceof Stimulus;
+ // TODO:
+ return false;
+ }
+
+ public boolean isAStructuralFeature(Object handle) {
+ return handle instanceof StructuralFeature;
+ }
+
+ public boolean isAStubState(Object handle) {
+ // TODO: not in UML 2
+ return false;
+ }
+
+ public boolean isASubactivityState(Object handle) {
+ // TODO: ActionState, CallState, and SubactivityState have been replaced
+ // in UML 2.0 by explicitly modeled Actions
+ return false;
+ }
+
+ public boolean isASubmachineState(Object handle) {
+ // NOTE: No longer a separate type in UML 2.1
+ return handle instanceof State && ((State) handle).isSubmachineState();
+ }
+
+ public boolean isASubsystem(Object handle) {
+ // TODO: complete this implementation - tfm
+ return handle instanceof Component
+ && false; // has <<subsystem>> stereotype
+ }
+
+ public boolean isASubsystemInstance(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isASynchState(Object handle) {
+ // TODO: not in UML 2
+ return false;
+ }
+
+ public boolean isATagDefinition(Object handle) {
+ // TODO: TagDefinitions are gone from UML 2
+ // they are now Properties of Stereotypes;
+ return false;
+ }
+
+ public boolean isATaggedValue(Object handle) {
+ // TODO: Changed in UML 2.x to special type of Property?
+ return false;
+ }
+
+ public boolean isATemplateArgument(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isATemplateParameter(Object handle) {
+ return handle instanceof TemplateParameter;
+ }
+
+ public boolean isATerminateAction(Object handle) {
+ // TODO: not in UML 2
+ return false;
+ }
+
+ public boolean isATimeEvent(Object handle) {
+ return handle instanceof TimeEvent;
+ }
+
+ public boolean isATimeExpression(Object handle) {
+ return handle instanceof TimeExpression;
+ }
+
+ public boolean isATransition(Object handle) {
+ return handle instanceof Transition;
+ }
+
+ public boolean isATypeExpression(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAUMLElement(Object handle) {
+ return handle instanceof Element;
+ }
+
+ public boolean isAUninterpretedAction(Object handle) {
+ // TODO: not in UML 2
+ return false;
+ }
+
+ public boolean isAUsage(Object handle) {
+ return handle instanceof Usage;
+ }
+
+ public boolean isAUseCase(Object handle) {
+ return handle instanceof UseCase;
+ }
+
+ public boolean isAUseCaseInstance(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAVisibilityKind(Object handle) {
+ return handle instanceof VisibilityKind;
+ }
+
+ public boolean isAbstract(Object handle) {
+ if (handle instanceof Classifier) {
+ return ((Classifier) handle).isAbstract();
+ } else if (handle instanceof BehavioralFeature) {
+ return ((BehavioralFeature) handle).isAbstract();
+ } else {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ public boolean isActive(Object handle) {
+ return ((org.eclipse.uml2.uml.Class) handle).isActive();
+ }
+
+ public boolean isAggregate(Object handle) {
+ throw new NotYetImplementedException();
+ }
+
+ public boolean isAsynchronous(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isChangeable(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isClassifierScope(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isComposite(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isConcurrent(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isConstructor(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isFrozen(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isInitialized(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isInstanceScope(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isInternal(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isLeaf(Object handle) {
+ return ((RedefinableElement) handle).isLeaf();
+ }
+
+ public boolean isNavigable(Object handle) {
+ return ((Property) handle).isNavigable();
+ }
+
+ public boolean isPackage(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isPrimaryObject(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isPrivate(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isProtected(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isPublic(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isQuery(Object handle) {
+ return ((Operation) handle).isQuery();
+ }
+
+ public boolean isRealize(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isReturn(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isRoot(Object handle) {
+// return ((RedefinableElement) handle).isRoot();
+ // TODO: One part of UML 2.1.1 spec says that this is as above,
+ // but it appears to be gone - tfm
+ return false;
+ }
+
+ public boolean isSingleton(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isSpecification(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isStereotype(Object handle, String stereotypename) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isSynch(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isTop(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isType(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isUtility(Object handle) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object lookupIn(Object handle, String name) {
+ throw new NotYetImplementedException();
+
+ }
+
+ public String toString(Object modelElement) {
+ if (modelElement instanceof MultiplicityElement) {
+ return org.argouml.model.Model.getDataTypesHelper()
+ .multiplicityToString(modelElement);
+ } else if (modelElement instanceof Element) {
+ return getUMLClassName(modelElement) + ": " + getName(modelElement);
+ }
+ if (modelElement == null) {
+ return "";
+ }
+ return modelElement.toString();
+ }
+
+ public boolean isReadOnly(Object handle) {
+ return ((StructuralFeature) handle).isReadOnly();
+ }
+
+ public boolean isStatic(Object handle) {
+ return ((Feature) handle).isStatic();
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/MetaTypesEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,509 @@
+// $Id:MetaTypesEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.MetaTypes;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Action;
+import org.eclipse.uml2.uml.ActivityPartition;
+import org.eclipse.uml2.uml.Actor;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.AssociationClass;
+import org.eclipse.uml2.uml.BehavioralFeature;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Comment;
+import org.eclipse.uml2.uml.Component;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Extend;
+import org.eclipse.uml2.uml.FinalState;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.Include;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.Interaction;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.MultiplicityElement;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Node;
+import org.eclipse.uml2.uml.ObjectNode;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.PackageImport;
+import org.eclipse.uml2.uml.Parameter;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Pseudostate;
+import org.eclipse.uml2.uml.PseudostateKind;
+import org.eclipse.uml2.uml.Reception;
+import org.eclipse.uml2.uml.Signal;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.StateMachine;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.Transition;
+import org.eclipse.uml2.uml.Usage;
+import org.eclipse.uml2.uml.UseCase;
+
+
+/**
+ * The implementation of the MetaTypes for EUML2.
+ */
+final class MetaTypesEUMLImpl implements MetaTypes {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public MetaTypesEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public Object getAbstraction() {
+ return Abstraction.class;
+ }
+
+ public Object getAction() {
+ return Action.class;
+ }
+
+ public Object getActionExpression() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getActionState() {
+ // TODO: ActionState, CallState, and SubactivityState have been replaced
+ // in UML 2.0 by explicitly modeled Actions
+ return null;
+ }
+
+ public Object getActor() {
+ return Actor.class;
+ }
+
+ public Object getAggregationKind() {
+ return AggregationKind.class;
+ }
+
+ public Object getAssociation() {
+ return Association.class;
+ }
+
+ public Object getAssociationClass() {
+ return AssociationClass.class;
+ }
+
+ public Object getAssociationEnd() {
+ // TODO: Needs checking -tfm
+ // an AssociationEnd is now a Property owned by an Association
+ return Property.class;
+ }
+
+ public Object getAssociationEndRole() {
+ // TODO: In UML 2.0, ClassifierRole, AssociationRole, and
+ // AssociationEndRole have been replaced by the internal
+ // structure of the Collaboration
+ return null;
+ }
+
+ public Object getAssociationRole() {
+ // TODO: In UML 2.0, ClassifierRole, AssociationRole, and
+ // AssociationEndRole have been replaced by the internal
+ // structure of the Collaboration
+ return null;
+ }
+
+ public Object getAttribute() {
+ // TODO: changed in UML 2.x - needs review - tfm
+ return Property.class;
+ }
+
+ public Object getBehavioralFeature() {
+ return BehavioralFeature.class;
+ }
+
+ public Object getBooleanExpression() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getCallAction() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getCallConcurrencyKind() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getCallState() {
+ // TODO: ActionState, CallState, and SubactivityState have been replaced
+ // in UML 2.0 by explicitly modeled Actions
+ return null;
+ }
+
+ public Object getClassifier() {
+ return Classifier.class;
+ }
+
+ public Object getClassifierRole() {
+ // TODO: In UML 2.0, ClassifierRole, AssociationRole, and
+ // AssociationEndRole have been replaced by the internal
+ // structure of the Collaboration
+ return null;
+ }
+
+ public Object getCollaboration() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getComment() {
+ return Comment.class;
+ }
+
+ public Object getComponent() {
+ return Component.class;
+ }
+
+ public Object getComponentInstance() {
+ // Gone in UML 2.x
+ return null;
+ }
+
+ public Object getCompositeState() {
+ // TODO: no separate CompositeState in UML 2.1 - tfm
+ return State.class;
+ }
+
+ public Object getCreateAction() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getDataType() {
+ return DataType.class;
+ }
+
+ public Object getDependency() {
+ return Dependency.class;
+ }
+
+ public Object getDestroyAction() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getEnumeration() {
+ return Enumeration.class;
+ }
+
+ public Object getEnumerationLiteral() {
+ return EnumerationLiteral.class;
+ }
+
+ public Object getEvent() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getException() {
+ // TODO: Exception has been removed for UML 2.x
+ // just return Signal for now - tfm
+ return Signal.class;
+ }
+
+ public Object getExtend() {
+ return Extend.class;
+ }
+
+ public Object getFinalState() {
+ return FinalState.class;
+ }
+
+ public Object getGeneralizableElement() {
+ // TODO: Gone in UML 2.x - just Classifier now? - tfm
+ return Classifier.class;
+ }
+
+ public Object getGeneralization() {
+ return Generalization.class;
+ }
+
+ public Object getGuard() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getInclude() {
+ return Include.class;
+ }
+
+ public Object getInstance() {
+ // TODO: Just a guess - double check - tfm
+ return InstanceSpecification.class;
+ }
+
+ public Object getInteraction() {
+ return Interaction.class;
+ }
+
+ public Object getInterface() {
+ return Interface.class;
+ }
+
+ public Object getLink() {
+ // TODO Auto-generated method stub
+// throw new NotYetImplementedException();
+ return null;
+ }
+
+ public Object getMessage() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getModel() {
+ return Model.class;
+ }
+
+ public Object getModelElement() {
+ return NamedElement.class;
+ }
+
+ public Object getMultiplicity() {
+ return MultiplicityElement.class;
+ }
+
+ public String getName(Object element) {
+ Class clazz;
+ if (element instanceof Class) {
+ clazz = (Class) element;
+ } else {
+ clazz = element.getClass();
+ }
+ String name = clazz.getName();
+
+ // The name of the meta type is the class name (after the last .)
+ // and before the next $ or end of class name.
+ int startName = name.lastIndexOf('.') + 1;
+
+ // MDR classes may have a UML or Uml prefix which should be removed.
+// if (name.regionMatches(true, startName, "UML", 0, 3)) {
+// startName += 3;
+// }
+
+ // eUML2 implementation classes end with "Impl"
+ final String suffix = "Impl";
+ int endName = name.length();
+ if (name.endsWith(suffix)) {
+ endName -= suffix.length();
+ }
+ if (endName < 0) {
+ endName = name.length();
+ }
+
+ return name.substring(startName, endName);
+ }
+
+ public Object getNamespace() {
+ return Namespace.class;
+ }
+
+ public Object getNode() {
+ return Node.class;
+ }
+
+ public Object getNodeInstance() {
+ // Gone in UML 2.x
+ return null;
+ }
+
+ public Object getObject() {
+ // TODO: just a guess - double check
+ return org.eclipse.uml2.uml.ObjectNode.class;
+ }
+
+ public Object getObjectFlowState() {
+ // TODO: not in UML 2.1
+ return ObjectNode.class;
+ }
+
+ public Object getOperation() {
+ return Operation.class;
+ }
+
+ public Object getPackage() {
+ return org.eclipse.uml2.uml.Package.class;
+ }
+
+ public Object getParameter() {
+ return Parameter.class;
+ }
+
+ public Object getParameterDirectionKind() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getPartition() {
+ return ActivityPartition.class;
+ }
+
+ public Object getPermission() {
+ // TODO: double check this - tfm
+ return PackageImport.class;
+ }
+
+ public Object getPseudostate() {
+ return Pseudostate.class;
+ }
+
+ public Object getPseudostateKind() {
+ return PseudostateKind.class;
+ }
+
+ public Object getReception() {
+ return Reception.class;
+ }
+
+ public Object getReturnAction() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getScopeKind() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getSendAction() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getSignal() {
+ return Signal.class;
+ }
+
+ public Object getSimpleState() {
+ // TODO: Gone in UML 2.1
+ return null;
+ }
+
+ public Object getState() {
+ return State.class;
+ }
+
+ public Object getStateMachine() {
+ return StateMachine.class;
+ }
+
+ public Object getStateVertex() {
+ // TODO: State & Vertex are independent classes in UML 2.1
+ return State.class;
+ }
+
+ public Object getStereotype() {
+ return Stereotype.class;
+ }
+
+ public Object getStimulus() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getStubState() {
+ // TODO: gone in UML 2.1
+ return null;
+ }
+
+ public Object getSubactivityState() {
+ // TODO: ActionState, CallState, and SubactivityState have been replaced
+ // in UML 2.0 by explicitly modeled Actions
+ return null;
+ }
+
+ public Object getSubmachineState() {
+ // TODO: gone in UML 2.1
+ return null;
+ }
+
+ public Object getSubsystem() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getSynchState() {
+ // TODO: no separate SyncState in UML 2.1 - tfm
+ return State.class;
+ }
+
+ public Object getTagDefinition() {
+ // TODO: In UML 2.x a TagDefinition has become a Property on a Stereotype
+ // Anything that uses this will probably need to be reviewed/changed.
+ // Just return Propety for now.
+ return Property.class;
+ }
+
+ public Object getTerminateAction() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public Object getTransition() {
+ return Transition.class;
+ }
+
+ public Object getUMLClass() {
+ return org.eclipse.uml2.uml.Class.class;
+ }
+
+ public Object getUsage() {
+ return Usage.class;
+ }
+
+ public Object getUseCase() {
+ return UseCase.class;
+ }
+
+ public Object getVisibilityKind() {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelEventPumpEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,128 @@
+// $Id:ModelEventPumpEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.beans.PropertyChangeListener;
+
+import org.argouml.model.ModelEventPump;
+
+/**
+ * The implementation of the ModelEventPump for EUML2.
+ */
+class ModelEventPumpEUMLImpl implements ModelEventPump {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public ModelEventPumpEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public void addClassModelEventListener(PropertyChangeListener listener,
+ Object modelClass, String[] propertyNames) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addClassModelEventListener(PropertyChangeListener listener,
+ Object modelClass, String propertyName) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addModelEventListener(PropertyChangeListener listener,
+ Object modelelement, String[] propertyNames) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addModelEventListener(PropertyChangeListener listener,
+ Object modelelement, String propertyName) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addModelEventListener(PropertyChangeListener listener,
+ Object modelelement) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void flushModelEvents() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeClassModelEventListener(PropertyChangeListener listener,
+ Object modelClass, String[] propertyNames) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeClassModelEventListener(PropertyChangeListener listener,
+ Object modelClass, String propertyName) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeModelEventListener(PropertyChangeListener listener,
+ Object modelelement, String[] propertyNames) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeModelEventListener(PropertyChangeListener listener,
+ Object modelelement, String propertyName) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeModelEventListener(PropertyChangeListener listener,
+ Object modelelement) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void startPumpingEvents() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void stopPumpingEvents() {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelManagementFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelManagementFactoryEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelManagementFactoryEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,114 @@
+// $Id:ModelManagementFactoryEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.ModelManagementFactory;
+import org.argouml.model.NotImplementedException;
+import org.eclipse.uml2.uml.ElementImport;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.UMLFactory;
+
+
+/**
+ * The implementation of the ModelManagementFactory for EUML2.
+ */
+class ModelManagementFactoryEUMLImpl implements ModelManagementFactory {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ private Model theRootModel;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public ModelManagementFactoryEUMLImpl(
+ EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public Object buildElementImport(Object pack, Object me) {
+ ElementImport imp = (ElementImport) createElementImport();
+ imp.setImportingNamespace((Namespace) pack);
+ imp.setImportedElement((PackageableElement) me);
+ return imp;
+ }
+
+ public Object buildPackage(String name, String uuid) {
+ org.eclipse.uml2.uml.Package pkg =
+ (org.eclipse.uml2.uml.Package) createPackage();
+ pkg.setName(name);
+ // TODO: What about UUID? This has been gone since UML 1.4 transition - tfm
+ return pkg;
+ }
+
+ public Object copyPackage(Object source, Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object createElementImport() {
+ return UMLFactory.eINSTANCE.createElementImport();
+ }
+
+ public Object createModel() {
+ return UMLFactory.eINSTANCE.createModel();
+ }
+
+ public Object createPackage() {
+ return UMLFactory.eINSTANCE.createPackage();
+ }
+
+ public Object createSubsystem() {
+ // TODO: Removed from UML 2?
+ throw new NotImplementedException();
+ }
+
+ // TODO: get/setRootModel aren't specific to the Model implementation
+ // they could probably be moved elsewhere - tfm - 20070530
+ public void setRootModel(Object rootModel) {
+ if (rootModel != null && !(rootModel instanceof Model)) {
+ throw new IllegalArgumentException(
+ "The rootModel supplied must be a Model. Got a "
+ + rootModel.getClass().getName());
+ }
+ theRootModel = (Model) rootModel;
+ }
+
+ public Object getRootModel() {
+ return theRootModel;
+ }
+
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ModelManagementHelperEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,250 @@
+// $Id:ModelManagementHelperEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Vector;
+
+import org.argouml.model.ModelManagementHelper;
+import org.eclipse.uml2.uml.Namespace;
+
+
+/**
+ * The implementation of the ModelManagementHelper for EUML2.
+ */
+class ModelManagementHelperEUMLImpl implements ModelManagementHelper {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public ModelManagementHelperEUMLImpl(
+ EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public boolean corresponds(Object obj1, Object obj2) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public Collection getAllBehavioralFeatures(Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllContents(Object namespace) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllImportedElements(Object pack) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllModelElementsOfKind(Object nsa, Object type) {
+
+ if (nsa == null || type == null) {
+ return Collections.EMPTY_LIST;
+ }
+ if (type instanceof String) {
+ return getAllModelElementsOfKind(nsa, (String) type);
+ }
+ if (!(nsa instanceof Namespace) || !(type instanceof Class)) {
+ throw new IllegalArgumentException("illegal argument - namespace: "
+ + nsa + " type: " + type);
+ }
+
+ return Collections.EMPTY_SET;
+
+ // TODO: MDR impelementation below - needs review/conversion
+
+ /*
+ * Because we get the metatype class stripped of its reflective
+ * proxies, we need to jump through a hoop or two to find it
+ * in the metamodel, then work from there to get its proxy.
+ */
+// String name = ((Class) type).getName();
+// name = name.substring(name.lastIndexOf(".") + 1);
+// if (name.startsWith("Uml")) name = name.substring(3);
+//
+// Collection allOfType = Collections.EMPTY_LIST;
+// // Get all (UML) metaclasses and search for the requested one
+// Collection metaTypes = nsmodel.getModelPackage().getMofClass()
+// .refAllOfClass();
+// for (Iterator it = metaTypes.iterator(); it.hasNext();) {
+// MofClass elem = (MofClass) it.next();
+// // TODO: Generalize - assumes UML type names are unique
+// // without the qualifying package names - true for UML 1.4
+// if (name.equals(elem.getName())) {
+// List names = elem.getQualifiedName();
+// // TODO: Generalize to handle more than one level of package
+// // OK for UML 1.4 because of clustering
+// RefPackage pkg = nsmodel.getUmlPackage().refPackage(
+// (String) names.get(0));
+// // Get the metatype proxy and use it to find all instances
+// RefClass classProxy = pkg.refClass((String) names.get(1));
+// allOfType = classProxy.refAllOfType();
+// break;
+// }
+// }
+//
+// // Remove any elements not in requested namespace
+// Collection returnElements = new ArrayList();
+// for (Iterator i = allOfType.iterator(); i.hasNext();) {
+// Object me = i.next();
+// // TODO: Optimize for root model case? - tfm
+// if (contained(nsa, me)) {
+// returnElements.add(me);
+// }
+// }
+// return returnElements;
+
+ }
+
+ /*
+ * Check whether model element is contained in given namespace/container.
+ * TODO: Investigate a faster way to do this
+ */
+ private boolean contained(Object container, Object candidate) {
+ Object current = candidate;
+ while (current != null) {
+ if (container.equals(current))
+ return true;
+ current = modelImpl.getFacade().getModelElementContainer(current);
+ }
+ return false;
+ }
+ public Collection getAllModelElementsOfKind(Object nsa, String kind) {
+ try {
+ return getAllModelElementsOfKind(nsa, Class.forName(kind));
+ } catch (ClassNotFoundException cnfe) {
+ throw new IllegalArgumentException(
+ "Can't derive a class name from " + kind);
+ }
+ }
+
+ public Collection getAllModelElementsOfKindWithModel(Object model,
+ Object type) {
+ if (model == null) {
+ throw new IllegalArgumentException("A model must be supplied");
+ }
+ Class kind = (Class) type;
+ Collection ret = getAllModelElementsOfKind(model, kind);
+ if (kind.isAssignableFrom(model.getClass())) {
+ ret = new ArrayList(ret);
+ if (!ret.contains(model)) {
+ ret.add(model);
+ }
+ }
+ return ret;
+ }
+
+ public Collection getAllNamespaces(Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllPossibleImports(Object pack) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllSubSystems(Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllSurroundingNamespaces(Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getContents(Object namespace) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getCorrespondingElement(Object elem, Object model) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getCorrespondingElement(Object elem, Object model,
+ boolean canCreate) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getElement(Vector path, Object theRootNamespace) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Vector<String> getPath(Object element) {
+ // TODO: Needs completing - stub implementation only! - tfm
+ Vector<String> path = new Vector<String>();
+ path.add(modelImpl.getFacade().getName(element));
+ return path;
+ }
+
+ public boolean isCyclicOwnership(Object parent, Object child) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public void removeImportedElement(Object handle, Object me) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setAlias(Object handle, String alias) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setImportedElements(Object pack, Collection imports) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setSpecification(Object handle, boolean isSpecification) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/NotYetImplementedException.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/NotYetImplementedException.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/NotYetImplementedException.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,51 @@
+// $Id:NotYetImplementedException.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.NotImplementedException;
+
+/**
+ * Runtime exception for things in eUML implementation which are not
+ * yet implemented. We use NotImplementedException for things which we
+ * never plan to implement and NotYetImplemented for things which we
+ * plan to implement but haven't gotten around to yet.
+ * <p>
+ * When the implementation is complete this class may be removed.
+ *
+ * @author Tom Morris
+ */
+class NotYetImplementedException extends NotImplementedException {
+
+ NotYetImplementedException() {
+ super();
+ }
+
+ NotYetImplementedException(String message) {
+ super(message);
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/OrderingKindEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/OrderingKindEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/OrderingKindEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,44 @@
+// $Id:OrderingKindEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.OrderingKind;
+
+/**
+ * The implementation of the OrderingKind for EUML2.
+ */
+class OrderingKindEUMLImpl implements OrderingKind {
+
+ public Object getOrdered() {
+ return "ordered"; //$NON-NLS-1$
+ }
+
+ public Object getUnordered() {
+ return "unordered"; //$NON-NLS-1$
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/PseudostateKindEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/PseudostateKindEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/PseudostateKindEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,80 @@
+// $Id:PseudostateKindEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.PseudostateKind;
+
+/**
+ * The Eclipse UML2 implementation of PseudoStateKind. An enumeration
+ * of all the values that a PseudoState can have. EntryPoint, ExitPoint,
+ * and Terminate are new for UML 2.x.
+ *
+ * @author Tom Morris
+ */
+class PseudostateKindEUMLImpl implements PseudostateKind {
+
+ public Object getChoice() {
+ return org.eclipse.uml2.uml.PseudostateKind.CHOICE_LITERAL;
+ }
+
+ public Object getDeepHistory() {
+ return org.eclipse.uml2.uml.PseudostateKind.DEEP_HISTORY_LITERAL;
+ }
+
+ public Object getEntryPoint() {
+ return org.eclipse.uml2.uml.PseudostateKind.ENTRY_POINT_LITERAL;
+ }
+
+ public Object getExitPoint() {
+ return org.eclipse.uml2.uml.PseudostateKind.EXIT_POINT_LITERAL;
+ }
+
+ public Object getFork() {
+ return org.eclipse.uml2.uml.PseudostateKind.FORK_LITERAL;
+ }
+
+ public Object getInitial() {
+ return org.eclipse.uml2.uml.PseudostateKind.INITIAL_LITERAL;
+ }
+
+ public Object getJoin() {
+ return org.eclipse.uml2.uml.PseudostateKind.JOIN_LITERAL;
+ }
+
+ public Object getJunction() {
+ return org.eclipse.uml2.uml.PseudostateKind.JUNCTION_LITERAL;
+ }
+
+ public Object getShallowHistory() {
+ return org.eclipse.uml2.uml.PseudostateKind.SHALLOW_HISTORY_LITERAL;
+ }
+
+ public Object getTerminate() {
+ return org.eclipse.uml2.uml.PseudostateKind.TERMINATE_LITERAL;
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ScopeKindEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ScopeKindEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/ScopeKindEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,48 @@
+// $Id:ScopeKindEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.ScopeKind;
+
+/**
+ * The implementation of the ScopeKind for EUML2.
+ *
+ * @author Tom Morris
+ * @deprecated This is no longer used in UML 2. We return literal placeholder
+ * values for any code that still uses this.
+ */
+class ScopeKindEUMLImpl implements ScopeKind {
+
+ public Object getClassifier() {
+ return "classifier";
+ }
+
+ public Object getInstance() {
+ return "instance";
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,261 @@
+// $Id:StateMachinesFactoryEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.StateMachinesFactory;
+
+/**
+ * The implementation of the StateMachinesFactory for EUML2.
+ */
+class StateMachinesFactoryEUMLImpl implements StateMachinesFactory {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public StateMachinesFactoryEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public Object buildCallEvent(Object ns) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildCallEvent(Object trans, String name, Object ns) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildChangeEvent(Object ns) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildChangeEvent(String s, Object ns) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildCompositeState(Object compositeState) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildCompositeStateOnStateMachine(Object statemachine) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildFinalState(Object compositeState) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildGuard(Object transition) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildInternalTransition(Object state) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildPseudoState(Object compositeState) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildSignalEvent(Object ns) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildSignalEvent(String name, Object ns) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildSimpleState(Object compositeState) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildStateMachine(Object oContext) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildStubState(Object compositeState) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildSubmachineState(Object compositeState) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildSynchState(Object compositeState) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildTimeEvent(Object ns) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildTimeEvent(String s, Object ns) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildTransition(Object owningState, Object source, Object dest) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object buildTransition(Object source, Object target) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createCallEvent() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createChangeEvent() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createCompositeState() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createFinalState() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createGuard() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createPseudostate() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createSignalEvent() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createSimpleState() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createStateMachine() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createStubState() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createSubmachineState() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createSynchState() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createTimeEvent() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object createTransition() {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/StateMachinesHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/StateMachinesHelperEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/StateMachinesHelperEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,289 @@
+// $Id:StateMachinesHelperEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.Collection;
+
+import org.argouml.model.StateMachinesHelper;
+import org.eclipse.uml2.uml.State;
+
+/**
+ * The implementation of the StateMachinesHelper for EUML2.
+ */
+class StateMachinesHelperEUMLImpl implements StateMachinesHelper {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public StateMachinesHelperEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public void addDeferrableEvent(Object state, Object deferrableEvent) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void addSubvertex(Object handle, Object subvertex) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object findNamespaceForEvent(Object trans, Object model) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object findOperationByName(Object trans, String opname) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getAllPossibleStatemachines(Object model,
+ Object oSubmachineState) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getAllPossibleSubvertices(Object oState) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getAllSubStates(Object compState) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getDestination(Object trans) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Collection getOutgoingStates(Object ostatevertex) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public String getPath(Object o) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getSource(Object trans) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getStateMachine(Object handle) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getStatebyName(String path, Object container) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public Object getTop(Object sm) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isAddingStatemachineAllowed(Object context) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public boolean isTopState(Object o) {
+ // TODO: This needs to be double checked. - tfm
+ return o instanceof State && ((State) o).getOwner() == null;
+ }
+
+ public void removeDeferrableEvent(Object state, Object deferrableEvent) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void removeSubvertex(Object handle, Object subvertex) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setBound(Object handle, int bound) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setChangeExpression(Object handle, Object value) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setConcurrent(Object handle, boolean concurrent) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setContainer(Object handle, Object compositeState) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setContext(Object statemachine, Object modelElement) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setDoActivity(Object handle, Object value) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setEffect(Object handle, Object value) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setEntry(Object handle, Object value) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setEventAsTrigger(Object transition, Object event) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setExit(Object handle, Object value) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setExpression(Object handle, Object value) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setGuard(Object handle, Object guard) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setInternalTransitions(Object handle, Collection intTrans) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setReferenceState(Object o, String referenced) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setSource(Object handle, Object state) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setState(Object handle, Object element) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setStateMachine(Object handle, Object stm) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setStatemachineAsSubmachine(Object oSubmachineState,
+ Object oStatemachine) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setSubvertices(Object handle, Collection subvertices) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setTrigger(Object handle, Object event) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+ public void setWhen(Object handle, Object value) {
+ // TODO: Auto-generated method stub
+ throw new NotYetImplementedException();
+
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UmlFactoryEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,502 @@
+// $Id:UmlFactoryEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.argouml.model.IllegalModelElementConnectionException;
+import org.argouml.model.MetaTypes;
+import org.argouml.model.UmlFactory;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.AggregationKind;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.AssociationClass;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Component;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Extend;
+import org.eclipse.uml2.uml.Generalization;
+import org.eclipse.uml2.uml.Include;
+import org.eclipse.uml2.uml.Interface;
+import org.eclipse.uml2.uml.Message;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.PackageImport;
+import org.eclipse.uml2.uml.State;
+import org.eclipse.uml2.uml.Transition;
+import org.eclipse.uml2.uml.Usage;
+import org.eclipse.uml2.uml.UseCase;
+
+
+/**
+ * The implementation of the UmlFactory for EUML2.
+ */
+class UmlFactoryEUMLImpl implements UmlFactory {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * The meta types factory.
+ */
+ private MetaTypes metaTypes;
+
+ /**
+ * A map of valid connections keyed by the connection type. The constructor
+ * builds this from the data in the VALID_CONNECTIONS array
+ */
+ private Map validConnectionMap = new HashMap();
+
+ /**
+ * An array of valid connections, the combination of connecting class and
+ * node classes must exist as a row in this list to be considered valid.
+ * <ul>
+ * <li>The 1st column is the connecting element.
+ * <li>The 2nd column is the "from" element type.
+ * <li>The 3rd column is the "to" element type.
+ * <li>The 3rd column is optional, if not given then it is assumed to be
+ * the same as the "to" element.
+ * <li>The existence of a 4th column indicates that the connection is valid
+ * in one direction only.
+ * </ul>
+ * TODO: This encodes not only what is legal in UML, but also what ArgoUML
+ * knows how to create, so not all legal connections are included. Probably
+ * should be split into two pieces: 1) legal UML (here) and 2) supported (in
+ * ArgoUML application someplace) - tfm - 20060325<p>
+ *
+ * Most of these are subtypes of Relationship which includes Association,
+ * Dependency, Flow, Generalization, Extend, and Include. Dependency
+ * includes Binding, Abstraction, Usage, and Permission. AssociationRole and
+ * AssociationClass are Associations. The remaining items (Link, Transition,
+ * AssociationEnd, Message) are non-Relationship types which ArgoUML treats
+ * as connections/edges.
+ */
+ // TODO: This should be built by reflection from the metamodel - tfm
+ // Update for UML 2.x metamodel if not replaced by reflection
+ private static final Object[][] VALID_CONNECTIONS = {
+ {Generalization.class, Classifier.class, },
+ {Dependency.class, Element.class, },
+ // Although Usage & Permission are Dependencies, they need to
+ // be include separately because of the way lookup works
+ {Usage.class, NamedElement.class, },
+ {PackageImport.class, NamedElement.class, },
+ // The following is specifically for Realizations
+ {Abstraction.class, org.eclipse.uml2.uml.Class.class, Interface.class, null, },
+ // The next 3 restrictions for Abstraction seem to be Argo specific
+ // not something the UML spec requires - tfm - 20070215
+ {Abstraction.class, org.eclipse.uml2.uml.Class.class, org.eclipse.uml2.uml.Class.class, null, },
+ {Abstraction.class, org.eclipse.uml2.uml.Package.class,org.eclipse.uml2.uml.Package.class, null, },
+ {Abstraction.class, Component.class, Interface.class, null, },
+ {Association.class, Classifier.class, },
+// {AssociationRole.class, ClassifierRole.class, },
+ {Extend.class, UseCase.class, },
+ {Include.class, UseCase.class, },
+// {Link.class, Instance.class, },
+// {Transition.class, StateVertex.class, },
+ {Transition.class, State.class, },
+ {AssociationClass.class, org.eclipse.uml2.uml.Class.class, },
+// {AssociationEnd.class, Classifier.class, Association.class, },
+// {Message.class, ClassifierRole.class },
+ };
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public UmlFactoryEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ metaTypes = modelImpl.getMetaTypes();
+ buildValidConnectionMap();
+ }
+
+ // TODO: This is unchanged from UML 1.4 - needs review - tfm
+ public Object buildConnection(Object elementType, Object fromElement,
+ Object fromStyle, Object toElement, Object toStyle,
+ Object unidirectional, Object namespace)
+ throws IllegalModelElementConnectionException {
+ if (!isConnectionValid(elementType, fromElement, toElement, true)) {
+ throw new IllegalModelElementConnectionException("Cannot make a "
+ + elementType.getClass().getName() + " between a "
+ + fromElement.getClass().getName() + " and a "
+ + toElement.getClass().getName());
+ }
+
+ Object connection = null;
+
+ if (elementType == metaTypes.getAssociation()) {
+ connection =
+ getCore().buildAssociation((Classifier) fromElement,
+ (AggregationKind) fromStyle, (Classifier) toElement,
+ (AggregationKind) toStyle, (Boolean) unidirectional);
+ } else if (elementType == metaTypes.getAssociationEnd()) {
+ if (fromElement instanceof Association) {
+ connection =
+ getCore().buildAssociationEnd(toElement, fromElement);
+ } else if (fromElement instanceof Classifier) {
+ connection =
+ getCore().buildAssociationEnd(fromElement, toElement);
+ }
+ } else if (elementType
+ == metaTypes.getAssociationClass()) {
+ connection =
+ getCore().buildAssociationClass(fromElement, toElement);
+ } else if (elementType == metaTypes.getAssociationRole()) {
+ connection =
+ getCollaborations().buildAssociationRole(fromElement,
+ fromStyle, toElement, toStyle, (Boolean) unidirectional);
+ } else if (elementType == metaTypes.getGeneralization()) {
+ connection = getCore().buildGeneralization(fromElement, toElement);
+ } else if (elementType == metaTypes.getPermission()) {
+ connection = getCore().buildPermission(fromElement, toElement);
+ } else if (elementType == metaTypes.getUsage()) {
+ connection = getCore().buildUsage(fromElement, toElement);
+ } else if (elementType == metaTypes.getGeneralization()) {
+ connection = getCore().buildGeneralization(fromElement, toElement);
+ } else if (elementType == metaTypes.getDependency()) {
+ connection = getCore().buildDependency(fromElement, toElement);
+ } else if (elementType == metaTypes.getAbstraction()) {
+ connection =
+ getCore().buildRealization(fromElement, toElement, namespace);
+ } else if (elementType == metaTypes.getLink()) {
+ connection = getCommonBehavior().buildLink(fromElement, toElement);
+ } else if (elementType == metaTypes.getExtend()) {
+ // Extend, but only between two use cases. Remember we draw from the
+ // extension port to the base port.
+ connection = getUseCases().buildExtend(toElement, fromElement);
+ } else if (elementType == metaTypes.getInclude()) {
+ connection = getUseCases().buildInclude(fromElement, toElement);
+ } else if (elementType == metaTypes.getTransition()) {
+ connection =
+ getStateMachines().buildTransition(fromElement, toElement);
+ }
+
+ if (connection == null) {
+ throw new IllegalModelElementConnectionException("Cannot make a "
+ + elementType.getClass().getName() + " between a "
+ + fromElement.getClass().getName() + " and a "
+ + toElement.getClass().getName());
+ }
+
+ return connection;
+ }
+
+ public Object buildNode(Object elementType) {
+ if (elementType == metaTypes.getActor()) {
+ return getUseCases().createActor();
+ } else if (elementType == metaTypes.getUseCase()) {
+ return getUseCases().createUseCase();
+ } else if (elementType == metaTypes.getUMLClass()) {
+ return getCore().buildClass();
+ } else if (elementType == metaTypes.getInterface()) {
+ return getCore().buildInterface();
+ } else if (elementType == metaTypes.getDataType()) {
+ return getCore().createDataType();
+ } else if (elementType == metaTypes.getPackage()) {
+ return getModelManagement().createPackage();
+ } else if (elementType == metaTypes.getModel()) {
+ return getModelManagement().createModel();
+ } else if (elementType == metaTypes.getInstance()) {
+ throw new IllegalArgumentException(
+ "Attempt to instantiate abstract type");
+ } else if (elementType == metaTypes.getSubsystem()) {
+ return getModelManagement().createSubsystem();
+ } else if (elementType == metaTypes.getCallState()) {
+ return getActivityGraphs().createCallState();
+ } else if (elementType == metaTypes.getSimpleState()) {
+ return getStateMachines().createSimpleState();
+ } else if (elementType == metaTypes.getFinalState()) {
+ return getStateMachines().createFinalState();
+ } else if (elementType == metaTypes.getPseudostate()) {
+ return getStateMachines().createPseudostate();
+ } else if (elementType == metaTypes.getObjectFlowState()) {
+ return getActivityGraphs().createObjectFlowState();
+ } else if (elementType == metaTypes.getActionState()) {
+ return getActivityGraphs().createActionState();
+ } else if (elementType == metaTypes.getSubactivityState()) {
+ return getActivityGraphs().createSubactivityState();
+ } else if (elementType == metaTypes.getPartition()) {
+ return getActivityGraphs().createPartition();
+ } else if (elementType == metaTypes.getStubState()) {
+ return getStateMachines().createStubState();
+ } else if (elementType == metaTypes.getSubmachineState()) {
+ return getStateMachines().createSubmachineState();
+ } else if (elementType == metaTypes.getCompositeState()) {
+ return getStateMachines().createCompositeState();
+ } else if (elementType == metaTypes.getSynchState()) {
+ return getStateMachines().createSynchState();
+ } else if (elementType == metaTypes.getState()) {
+ throw new IllegalArgumentException(
+ "Attempt to instantiate abstract type");
+ } else if (elementType == modelImpl.getMetaTypes().getSimpleState()) {
+ return getStateMachines().createSimpleState();
+ } else if (elementType == metaTypes.getClassifierRole()) {
+ return getCollaborations().createClassifierRole();
+ } else if (elementType == metaTypes.getComponent()) {
+ return getCore().createComponent();
+ } else if (elementType == metaTypes.getComponentInstance()) {
+ return getCommonBehavior().createComponentInstance();
+ } else if (elementType == metaTypes.getNode()) {
+ return getCore().createNode();
+ } else if (elementType == metaTypes.getNodeInstance()) {
+ return getCommonBehavior().createNodeInstance();
+ } else if (elementType == metaTypes.getObject()) {
+ return getCommonBehavior().createObject();
+ } else if (elementType == metaTypes.getComment()) {
+ return getCore().createComment();
+ } else if (elementType == metaTypes.getNamespace()) {
+ throw new IllegalArgumentException(
+ "Attempt to instantiate abstract type");
+ } else if (elementType == metaTypes.getOperation()) {
+ return getCore().createOperation();
+ } else if (elementType == metaTypes.getEnumeration()) {
+ return getCore().createEnumeration();
+ } else if (elementType == metaTypes.getStereotype()) {
+ return getExtensionMechanisms().createStereotype();
+ } else if (elementType == metaTypes.getAttribute()) {
+ return getCore().buildAttribute();
+ } else if (elementType == metaTypes.getSignal()) {
+ return getCommonBehavior().createSignal();
+ } else if (elementType == metaTypes.getException()) {
+ return getCommonBehavior().createException();
+ } else if (elementType == metaTypes.getTransition()) {
+ return getStateMachines().createTransition();
+ }
+
+ throw new IllegalArgumentException(
+ "Attempted to create unsupported model element type: "
+ + elementType);
+ }
+
+ public void delete(Object elem) {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public boolean isConnectionType(Object connectionType) {
+ // TODO Auto-generated method stub
+ throw new NotYetImplementedException();
+ }
+
+ public boolean isConnectionValid(Object connectionType, Object fromElement,
+ Object toElement) {
+ return isConnectionValid(connectionType, fromElement, toElement, true);
+ }
+
+ // TODO: This is unchanged from UML 1.4 - needs review - tfm
+ public boolean isConnectionValid(Object connectionType, Object fromElement,
+ Object toElement, boolean checkWFR) {
+ // Get the list of valid model item pairs for the given connection type
+ List validItems = (ArrayList) validConnectionMap.get(connectionType);
+ if (validItems == null) {
+ return false;
+ }
+ // See if there's a pair in this list that match the given
+ // model elements
+ Iterator it = validItems.iterator();
+ while (it.hasNext()) {
+ Class[] modeElementPair = (Class[]) it.next();
+ if (modeElementPair[0].isInstance(fromElement)
+ && modeElementPair[1].isInstance(toElement)) {
+ if (checkWFR) {
+ return isConnectionWellformed(
+ (Class) connectionType,
+ (Element) fromElement,
+ (Element) toElement);
+ } else {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Run through any well formedness rules we wish to enforce for a
+ * connection.
+ * @param connectionType
+ * @param fromElement
+ * @param toElement
+ * @return true if the connection satisfies the wellformedness rules
+ */
+ private boolean isConnectionWellformed(
+ Class connectionType,
+ Element fromElement,
+ Element toElement) {
+
+ if (fromElement == null || toElement == null) {
+ return false;
+ }
+
+ if (connectionType == Generalization.class) {
+ /*
+ * UML 1.4.2 Spec section 4.5.3.20 [5]
+ * A GeneralizableElement may only be a child of
+ * GeneralizableElement of the same kind.
+ */
+ if (fromElement.getClass() != toElement.getClass()) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public boolean isRemoved(Object o) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ /**
+ * Returns the package factory for the UML package
+ * Foundation::ExtensionMechanisms.
+ *
+ * @return the ExtensionMechanisms factory instance.
+ */
+ private ExtensionMechanismsFactoryEUMLImpl getExtensionMechanisms() {
+ return (ExtensionMechanismsFactoryEUMLImpl) modelImpl.
+ getExtensionMechanismsFactory();
+ }
+
+ /**
+ * Returns the package factory for the UML package Foundation::Core.
+ *
+ * @return the Core factory instance.
+ */
+ private CoreFactoryEUMLImpl getCore() {
+ return (CoreFactoryEUMLImpl) modelImpl.getCoreFactory();
+ }
+
+ /**
+ * Returns the package factory for the UML package
+ * BehavioralElements::CommonBehavior.
+ *
+ * @return the CommonBehavior factory instance.
+ */
+ private CommonBehaviorFactoryEUMLImpl getCommonBehavior() {
+ return (CommonBehaviorFactoryEUMLImpl) modelImpl.
+ getCommonBehaviorFactory();
+ }
+
+ /**
+ * Returns the package factory for the UML package
+ * BehavioralElements::UseCases.
+ *
+ * @return the UseCases factory instance.
+ */
+ private UseCasesFactoryEUMLImpl getUseCases() {
+ return (UseCasesFactoryEUMLImpl) modelImpl.getUseCasesFactory();
+ }
+
+ /**
+ * Returns the package factory for the UML package
+ * BehavioralElements::StateMachines.
+ *
+ * @return the StateMachines factory instance.
+ */
+ private StateMachinesFactoryEUMLImpl getStateMachines() {
+ return (StateMachinesFactoryEUMLImpl) modelImpl.getStateMachinesFactory();
+ }
+
+ /**
+ * Returns the package factory for the UML package
+ * BehavioralElements::Collaborations.
+ *
+ * @return the Collaborations factory instance.
+ */
+ private CollaborationsFactoryEUMLImpl getCollaborations() {
+ return (CollaborationsFactoryEUMLImpl) modelImpl.
+ getCollaborationsFactory();
+ }
+
+ /**
+ * Returns the package factory for the UML package
+ * BehavioralElements::ActivityGraphs.
+ *
+ * @return the ActivityGraphs factory instance.
+ */
+ private ActivityGraphsFactoryEUMLlImpl getActivityGraphs() {
+ return (ActivityGraphsFactoryEUMLlImpl) modelImpl.
+ getActivityGraphsFactory();
+ }
+
+ /**
+ * Returns the package factory for the UML package ModelManagement.
+ *
+ * @return the ModelManagement factory instance.
+ */
+ private ModelManagementFactoryEUMLImpl getModelManagement() {
+ return (ModelManagementFactoryEUMLImpl) modelImpl.
+ getModelManagementFactory();
+ }
+
+ private void buildValidConnectionMap() {
+ // A list of valid connections between elements, the
+ // connection type first and then the elements to be connected
+
+ Object connection = null;
+ for (int i = 0; i < VALID_CONNECTIONS.length; ++i) {
+ connection = VALID_CONNECTIONS[i][0];
+ List validItems = (ArrayList) validConnectionMap.get(connection);
+ if (validItems == null) {
+ validItems = new ArrayList();
+ validConnectionMap.put(connection, validItems);
+ }
+ if (VALID_CONNECTIONS[i].length < 3) {
+ // If there isn't a 3rd column then this represents a connection
+ // of elements of the same type.
+ Object[] modeElementPair = new Class[2];
+ modeElementPair[0] = VALID_CONNECTIONS[i][1];
+ modeElementPair[1] = VALID_CONNECTIONS[i][1];
+ validItems.add(modeElementPair);
+ } else {
+ // If there is a 3rd column then this represents a connection
+ // of between 2 different types of element.
+ Object[] modeElementPair = new Class[2];
+ modeElementPair[0] = VALID_CONNECTIONS[i][1];
+ modeElementPair[1] = VALID_CONNECTIONS[i][2];
+ validItems.add(modeElementPair);
+ // If the array hasn't been flagged to indicate otherwise
+ // swap elements the elemnts and add again.
+ if (VALID_CONNECTIONS[i].length < 4) {
+ Object[] reversedModeElementPair = new Class[2];
+ reversedModeElementPair[0] = VALID_CONNECTIONS[i][2];
+ reversedModeElementPair[1] = VALID_CONNECTIONS[i][1];
+ validItems.add(reversedModeElementPair);
+ }
+ }
+ }
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UmlHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UmlHelperEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UmlHelperEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,106 @@
+// $Id:UmlHelperEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.argouml.model.UmlHelper;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Relationship;
+import org.eclipse.uml2.uml.Transition;
+
+
+/**
+ * The implementation of the UmlHelper for EUML2.
+ */
+class UmlHelperEUMLImpl implements UmlHelper {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public UmlHelperEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public void addListenersToModel(Object model) {
+ // Nothing to do
+
+ }
+
+ // TODO: Model implementation independent
+ public void deleteCollection(Collection col) {
+ Iterator it = col.iterator();
+ while (it.hasNext()) {
+ modelImpl.getUmlFactory().delete(it.next());
+ }
+ }
+
+ /*
+ * @see org.argouml.model.UmlHelper#getSource(java.lang.Object)
+ */
+ public Object getSource(Object relationship) {
+ if (relationship instanceof Relationship) {
+ // handles all children of relationship including extend and
+ // include which are not members of core
+ return modelImpl.getCoreHelper().getSource(relationship);
+ } else if (relationship instanceof Transition) {
+ return modelImpl.getStateMachinesHelper().getSource(relationship);
+ } else if (relationship instanceof Property) {
+ // TODO: We expect an association end here - check more carefully? - tfm
+ return modelImpl.getCoreHelper().getSource(relationship);
+ }
+ throw new IllegalArgumentException();
+ }
+
+ /*
+ * @see org.argouml.model.UmlHelper#getDestination(java.lang.Object)
+ */
+ public Object getDestination(Object relationShip) {
+ if (relationShip instanceof Relationship) {
+ // handles all children of relationship including extend and
+ // include which are not members of core
+ return modelImpl.getCoreHelper().getDestination(relationShip);
+ } else if (relationShip instanceof Transition) {
+ return modelImpl.getStateMachinesHelper().
+ getDestination(relationShip);
+ } else if (relationShip instanceof Property) {
+ // TODO: We expect an association end here - check more carefully? - tfm
+ return modelImpl.getCoreHelper().getDestination(relationShip);
+ }
+ throw new IllegalArgumentException();
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UseCasesFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UseCasesFactoryEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UseCasesFactoryEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,120 @@
+// $Id:UseCasesFactoryEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.UseCasesFactory;
+import org.eclipse.uml2.uml.Actor;
+import org.eclipse.uml2.uml.Extend;
+import org.eclipse.uml2.uml.ExtensionPoint;
+import org.eclipse.uml2.uml.Include;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UseCase;
+
+
+/**
+ * The implementation of the UseCasesFactory for EUML2.
+ */
+class UseCasesFactoryEUMLImpl implements UseCasesFactory {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public UseCasesFactoryEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public Object buildActor(Object actor, Object model) {
+ Namespace ns = ((Actor) actor).getNamespace();
+ if (ns == null) {
+ ns = (Namespace) model;
+ }
+ Actor actor2 = (Actor) createActor();
+// actor2.setNamespace(ns);
+ ns.getOwnedElements().add(actor2);
+ actor2.setIsLeaf(false);
+// actor2.setIsRoot(false);
+ return actor2;
+ }
+
+ public Object buildExtend(Object abase, Object anextension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildExtend(Object abase, Object anextension, Object apoint) {
+ Extend ext = (Extend) createExtend();
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object buildExtensionPoint(Object modelElement) {
+ ExtensionPoint ep = (ExtensionPoint) createExtensionPoint();
+ ((UseCase) modelElement).getExtensionPoints().add(ep);
+ return ep;
+ }
+
+ public Object buildInclude(Object abase, Object anaddition) {
+ Include inc = (Include) createInclude();
+ // TODO Auto-generated method stub
+ return inc;
+ }
+
+ public Object createActor() {
+ return UMLFactory.eINSTANCE.createActor();
+ }
+
+ public Object createExtend() {
+ return UMLFactory.eINSTANCE.createExtend();
+ }
+
+ public Object createExtensionPoint() {
+ return UMLFactory.eINSTANCE.createExtensionPoint();
+ }
+
+ public Object createInclude() {
+ return UMLFactory.eINSTANCE.createInclude();
+ }
+
+ public Object createUseCase() {
+ return UMLFactory.eINSTANCE.createUseCase();
+ }
+
+ public Object createUseCaseInstance() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UseCasesHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UseCasesHelperEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/UseCasesHelperEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,169 @@
+// $Id:UseCasesHelperEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.Collection;
+
+import org.argouml.model.UseCasesHelper;
+
+/**
+ * The implementation of the UseCasesHelper for EUML2.
+ */
+class UseCasesHelperEUMLImpl implements UseCasesHelper {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public UseCasesHelperEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public void addExtend(Object elem, Object extend) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addExtensionPoint(Object handle, Object extensionPoint) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addExtensionPoint(Object handle, int position,
+ Object extensionPoint) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void addInclude(Object usecase, Object include) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public Collection getAllActors(Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getAllUseCases(Object ns) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getExtendedUseCases(Object ausecase) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getExtendingUseCases(Object usecase) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getExtends(Object abase, Object anextension) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getIncludedUseCases(Object ausecase) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Object getIncludes(Object abase, Object aninclusion) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection getSpecificationPath(Object ausecase) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public void removeExtend(Object elem, Object extend) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeExtensionPoint(Object elem, Object ep) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeInclude(Object usecase, Object include) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setAddition(Object handle, Object useCase) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setBase(Object extend, Object base) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setCondition(Object handle, Object booleanExpression) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setExtension(Object handle, Object ext) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setExtensionPoints(Object handle, Collection extensionPoints) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setIncludes(Object handle, Collection includes) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setLocation(Object handle, String loc) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void setUseCase(Object elem, Object usecase) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/VisibilityKindEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/VisibilityKindEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/VisibilityKindEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,54 @@
+// $Id:VisibilityKindEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import org.argouml.model.VisibilityKind;
+
+/**
+ * The Eclipse UML2 implementation of VisibilityKind.
+ *
+ * @author Tom Morris
+ */
+class VisibilityKindEUMLImpl implements VisibilityKind {
+
+ public Object getPackage() {
+ return org.eclipse.uml2.uml.VisibilityKind.PACKAGE_LITERAL;
+ }
+
+ public Object getPrivate() {
+ return org.eclipse.uml2.uml.VisibilityKind.PRIVATE_LITERAL;
+ }
+
+ public Object getProtected() {
+ return org.eclipse.uml2.uml.VisibilityKind.PROTECTED_LITERAL;
+ }
+
+ public Object getPublic() {
+ return org.eclipse.uml2.uml.VisibilityKind.PUBLIC_LITERAL;
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/XmiReaderEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/XmiReaderEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/XmiReaderEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,87 @@
+// $Id:XmiReaderEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.argouml.model.UmlException;
+import org.argouml.model.XmiReader;
+import org.xml.sax.InputSource;
+
+/**
+ * The implementation of the XmiReader for EUML2.
+ */
+class XmiReaderEUMLImpl implements XmiReader {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ */
+ public XmiReaderEUMLImpl(EUMLModelImplementation implementation) {
+ modelImpl = implementation;
+ }
+
+ public int getIgnoredElementCount() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public String[] getIgnoredElements() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Map getXMIUUIDToObjectMap() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection parse(InputSource pIs) throws UmlException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection parse(InputSource pIs, boolean profile)
+ throws UmlException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean setIgnoredElements(String[] elementNames) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
Added: branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/XmiWriterEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/XmiWriterEUMLImpl.java?view=auto&rev=12750
==============================================================================
--- (empty file)
+++ branches/gsoc2007/b00__1/model-euml/src/org/argouml/model/euml/XmiWriterEUMLImpl.java 2007-06-03 15:32:11-0700
@@ -0,0 +1,72 @@
+// $Id:XmiWriterEUMLImpl.java 12721 2007-05-30 18:14:55Z tfmorris $
+// Copyright (c) 2007, The ArgoUML Project
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are met:
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+// * Neither the name of the ArgoUML Project nor the
+// names of its contributors may be used to endorse or promote products
+// derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE ArgoUML PROJECT ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE ArgoUML PROJECT BE LIABLE FOR ANY
+// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package org.argouml.model.euml;
+
+import java.io.Writer;
+
+import org.argouml.model.UmlException;
+import org.argouml.model.XmiExtensionWriter;
+import org.argouml.model.XmiWriter;
+
+/**
+ * Eclipse UML2 implementation of XmiWriter.
+ */
+class XmiWriterEUMLImpl implements XmiWriter {
+
+ /**
+ * The model implementation.
+ */
+ private EUMLModelImplementation modelImpl;
+
+ /**
+ * Constructor.
+ *
+ * @param implementation
+ * The ModelImplementation.
+ * @param model
+ * The project member model.
+ * @param writer
+ * The writer.
+ * @param version
+ * The version of ArgoUML.
+ */
+ public XmiWriterEUMLImpl(EUMLModelImplementation implementation,
+ Object model, Writer writer, String version) {
+ modelImpl = implementation;
+ }
+
+ public void setXmiExtensionWriter(XmiExtensionWriter xmiExtensionWriter) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void write() throws UmlException {
+ // TODO Auto-generated method stub
+
+ }
+
+}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.