Difference between revisions of "Artefact:Template/org/ooem/templates/wiml-1.0-ooem-multipart-1.0"

From OOModels
Jump to navigationJump to search
 
(106 intermediate revisions by the same user not shown)
Line 6: Line 6:
| Meta_Maturity = final
| Meta_Maturity = final
}}
}}
'''Caution!''' This is a 98% copy of wiml-1.0-ooem-package-1.0 (todo: wiki subtemplates)


==Code==
==Code==


<div class="code">
<OOMCode type="org/oogenerator/Template/2.0">
<span class="oogintro">G-2.0-java_jpp-1.0 -*- coding: utf-8; -*-</span>
G-2.0-java_jpp-1.0 -*- coding: utf-8; -*-
<span class="oogfilecode">▼<span class="oogcontinuation">…</span></span>
▼…
<span class="oogfilecode">import org.oomodels.wiml.*;</span>
import org.oomodels.wiml.*;
<span class="oogfilecode">▼</span><span class="oogcontinuation">…</span>
▼…
<span class="oogtemplatecode">⊏ signature(String wiml_code) ⊐</span><span class="oogcontinuation">…</span>
⊏ signature(String wiml_code) ⊐…
<span class="oogcode">« try { WIMLClass wc = WIMLClass.parseWIML(wiml_code); object = wc; »</span><span class="oogcontinuation">…</span>
« WIMLClass wc; try { wc = WIMLClass.parseWIML(wiml_code); object = wc;  
<Class>
  boolean has_associations = false;
  <InternalModelImport>org.uml.stereotypes.*</InternalModelImport>
  if (wc == null) {
  <ExternalImport>java.lang.String</ExternalImport>
    throw new org.oomodels.OOMStatusCode(204);
  <ExternalImport>java.lang.Object</ExternalImport>
  } else {
  <ExternalImport>java.lang.Boolean</ExternalImport>
»…
  <Name><span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span></span></Name>
MIME-Version: 1.0
<span class="oogindentation">  ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/ModelTemplateArguments"</span>){»</span><span class="oogcontinuation">…</span>
Content-type: multipart/mixed; charset=utf-8; boundary="mimeboundery"
  <TemplateArgument Name="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>" GenericLevel="MODEL_TEMPLATE"/>
 
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
«
<span class="oogindentation">  ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/CodeGeneratorTemplateArguments"</span>){»</span><span class="oogcontinuation">…</span>
    ∀(‖"Ⓟ/Attributes"){
  <TemplateArgument Name="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>" GenericLevel="CODE_GENERATOR_TEMPLATE"/>
      if (‖"Ⓟ/Association"!=null) { has_associations = true; }
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
    }/∀
<span class="oogindentation">  ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/ImplementationLanguageTemplateArguments"</span>){»</span><span class="oogcontinuation">…</span>
»…
  <TemplateArgument Name="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>" GenericLevel="IMPLEMENTATION_LANGUAGE_TEMPLATE"/>
--mimeboundery
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
Content-type: text/plain; charset=utf-8
<span class="oogindentation">  ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/Bases"</span>){»</span><span class="oogcontinuation">…</span>
Content-Disposition: attachment; filename=◂‖"/Name"▸.model
  <Base Name="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>"/>
 
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<span class="oogindentation">  ⋮</span><span class="oogcode">«¬∅(<span class="oogpath">‖"Ⓟ/Stereotypes"</span>){»</span><span class="oogcontinuation">…</span>
« ⇾(⊙,WIMLStateMachine) {»<StateMachine>«}∨{»<Class>« }/⇾ »
  <Stereotype><span class="oogcode">«∀(){»</span><span class="oogexpression">◂⊙▸</span><span class="oogcode">«}/∀»</span></Stereotype>
  ⋮⊏ ➜ this.Imports(wc) ⊐…
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/¬∅»</span><span class="oogcontinuation">…</span>
  <Name>◂‖"Ⓟ/Name"▸</Name>
<span class="oogindentation">  ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/Attributes"</span>){»</span><span class="oogcontinuation">…</span>
  ⋮«∀(‖"Ⓟ/ModelTemplateArguments"){»…
  <Attribute Name="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>" Type="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Type"</span></span>"<span class="oogcode">«¬∅(<span class="oogpath">‖"Ⓟ/Stereotypes"</span>)</span> Stereotype="<span class="oogcode">«∀(⊙){»</span><span class="oogexpression">◂⊙▸</span><span class="oogcode">«}/∀»</span>"<span class="oogcode">«}/¬∅»</span><span class="oogcontinuation">…</span>
  <TemplateParameter Name="◂‖"/Name"▸" «∃(‖"/DefaultValue"){»DefaultValue="◂((String)(⊙)).replace("/",".")▸" «}/∃»GenericLevel="MODEL_TEMPLATE"/>
<span class="oogindentation">    ⋮</span><span class="oogcode">«¬∅(<span class="oogpath">‖"Ⓟ/Extensions"</span>){»</span><span class="oogcontinuation">…</span>
  ⋮«}/∀»…
<span class="oogindentation">      ⋮</span>>
  ⋮«∀(‖"Ⓟ/CodeGeneratorTemplateArguments"){»…
<span class="oogindentation">      ⋮</span><span class="oogtemplatecode">⊏ ➜ this.Extensions(object) ⊐</span><span class="oogcontinuation">…</span>
  <TemplateParameter Name="◂‖"/Name"" «∃(‖"Ⓟ/DefaultValue"){»DefaultValue="◂((String)(⊙)).replace("/",".")▸" «}/∃»GenericLevel="CODE_GENERATOR_TEMPLATE"/>
  </Attribute>
  ⋮«}/∀»…
<span class="oogindentation">    ⋮</span><span class="oogcode">«}∨{»</span><span class="oogcontinuation">…</span>
  ⋮«∀(‖"Ⓟ/ImplementationLanguageTemplateArguments"){»…
<span class="oogindentation">      ⋮</span>/>
  <TemplateParameter Name="◂‖"/Name"" «∃(‖"Ⓟ/DefaultValue"){»DefaultValue="◂((String)(⊙)).replace("/",".")▸" «}/∃»GenericLevel="IMPLEMENTATION_LANGUAGE_TEMPLATE"/>
<span class="oogindentation">    ⋮</span><span class="oogcode">«}/¬∅»</span><span class="oogcontinuation">…</span>
  ⋮«}/∀»…
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
  ⋮«∀(‖"Ⓟ/Bases"){»…
<span class="oogindentation">  ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/Operations"</span>){»</span><span class="oogcontinuation">…</span>
  <Base Parent="◂((String)(⊙)).replace("/",".")▸"/>
  <Operation Name="<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span></span>" ReturnType="<span class="oogexpression"><span class="oogpath">‖"Ⓟ/ReturnType"</span></span>"<span class="oogcode">«¬∅(<span class="oogpath">‖"Ⓟ/Stereotypes"</span>){»</span> Stereotype="<span class="oogcode">«∀()</span><span class="oogexpression">◂⊙▸</span><span class="oogcode">«}/∀»</span>"<span class="oogcode">«}/¬∅»</span><span class="oogcontinuation">…</span>
  ⋮«}/∀»…
<span class="oogindentation">    ⋮</span><span class="oogcode">«¬∅(<span class="oogpath">‖"Ⓟ/Extensions"</span>){»</span><span class="oogcontinuation">…</span>
  ⋮«¬∅(‖"Ⓟ/Stereotypes"){»«∀(⊙){»…
<span class="oogindentation">      ⋮</span>>
  <Stereotype>◂((String)⊙).replaceFirst("org/ooem/stereotypes/.*/","")▸</Stereotype>
<span class="oogindentation">      ⋮</span><span class="oogtemplatecode">⊏ ➜ this.Extensions(object) ⊐</span><span class="oogcontinuation">…</span>
  ⋮«}/∀»«}/¬∅»…
  </Attribute>
  ⋮« ⇾(⊙,WIMLStateMachine) {»…
<span class="oogindentation">    ⋮</span><span class="oogcode">«}∨{»</span><span class="oogcontinuation">…</span>
  ⋮«¬∅(‖"Ⓟ/States"){»«∀(⊙){»…
<span class="oogindentation">      ⋮</span>/>
  <State Name="◂‖"/0"▸" Variable="◂‖"Ⓟ/1"▸"«∃(‖"Ⓟ/2"){» StateType="◂⊙▸"«}/∃»/>
<span class="oogindentation">    ⋮</span><span class="oogcode">«}/¬∅»</span><span class="oogcontinuation">…</span>
  ⋮«}/∀»«}/¬∅»…
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
  ⋮« }/⇾ »…
<span class="oogindentation">  ⋮</span><span class="oogcode">«¬∅(<span class="oogpath">‖"Ⓟ/Extensions"</span>){»</span><span class="oogcontinuation">…</span>
  ⋮«∀(‖"Ⓟ/Attributes"){if(‖"Ⓟ/Association" == null){»…
<span class="oogindentation">   ⋮</span><span class="oogtemplatecode">⊏ ➜ this.Extensions(object) </span><span class="oogcontinuation">…</span>
  <Attribute Name="◂‖"/Name"▸" Type="((String)(‖"Ⓟ/Type")).replace("/",".")▸"«∀(‖"/Stereotypes"){» Stereotype-◂Ⓘ▸="◂⊙▸"«}/∀»…
<span class="oogindentation">  ⋮</span><span class="oogcode">«}/¬∅»</span><span class="oogcontinuation">…</span>
    ⋮⊏ ➜ this.Extensions(object, "Attribute") ⊐…
</Class>
  ⋮«}}/∀»…
<span class="oogcode">« } catch (Throwable t) { »</span><span class="oogcontinuation">…</span>
  ⋮«∀(‖"Ⓟ/Operations"){»…
ERROR: <span class="oogexpression">◂t▸</span>
  ⋮« String op_type; ⇾(⊙,WIMLTransition) { op_type = "Transition"; }∨{ op_type = "Operation"; }/⇾ »…
<span class="oogcode">« } »</span><span class="oogcontinuation">…</span>
  <◂op_type▸ Name="◂‖"Ⓟ/Name"▸" ReturnType="◂‖"Ⓟ/ReturnType"▸"«∀(‖"/Stereotypes"){» Stereotype-◂Ⓘ▸="◂⊙▸"«}/∀»…
<span class="oogtemplatecode">⊏ Ⓣ Extensions(Object object) ⊐</span><span class="oogcontinuation">…</span>
                      ⋮« ⇾(⊙,WIMLTransition) {»«¬∅(‖"Ⓟ/BeforeStateExpression"){» BeforeStates="◂⊙▸"«}/¬∅»« }/⇾ »…
    <Extensions>
    ⋮⊏ ➜ this.Extensions(object, op_type) ⊐…
<span class="oogindentation">    ⋮</span><span class="oogcode">«∀(⊙){»</span><span class="oogcontinuation">…</span>
  ⋮«}/∀»…
      <<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>>
  ⋮«∀(‖"Ⓟ/Views"){»…
<span class="oogindentation">        ⋮</span><span class="oogcode">«∀(<span class="oogpath">‖"Ⓟ/Properties"</span>){»</span><span class="oogcontinuation">…</span>
  <View Name="◂‖"Ⓟ/Name"▸" «¬∅(‖"Ⓟ/Stereotypes"){» Stereotype="«∀(⊙){»◂⊙▸«}/∀»"«}/¬∅» CLASS="UMLView_SlotSpecification">
        <<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span>▸</span>><span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Value"</span>▸</span></<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span></span>>
    <ClassOfView>◂‖[wc]"Ⓟ/Name"</ClassOfView>
<span class="oogindentation">        ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation"></span>
    ⋮⊏ ➜ this.Extensions(object, null) ⊐…
      </<span class="oogexpression">◂<span class="oogpath">‖"Ⓟ/Name"</span></span>>
    ⋮«∀(‖"Ⓟ/SlotSpecifications"){»…
<span class="oogindentation">    ⋮</span><span class="oogcode">«}/∀»</span><span class="oogcontinuation">…</span>
    <SlotSpecification Name="◂‖"/Name"" Visibility="◂‖"/Visibility"" Attributes="◂‖"Ⓟ/Attributes"▸" Associations="◂‖"/Associations"" Operations="◂‖"/Operations"▸" Expand="◂‖"/Expand"">
    </Extensions>
      <EntryIncludeRegExp>◂‖"Ⓟ/EntryIncludeRegExp"</EntryIncludeRegExp>
<span class="oogtemplatecode">⊏ /Ⓣ ⊐</span><span class="oogcontinuation">…</span>
      <EntryExcludeRegExp>◂‖"Ⓟ/EntryExcludeRegExp"</EntryExcludeRegExp>
</div>
      <FeatureIncludeRegExp>◂‖"Ⓟ/FeatureIncludeRegExp"</FeatureIncludeRegExp>
      <FeatureExcludeRegExp>◂‖"Ⓟ/FeatureExcludeRegExp"</FeatureExcludeRegExp>
    </SlotSpecification>
    ⋮«}/∀»…
  </View>
  ⋮«}/∀»…
  ⋮⊏ ➜ this.Extensions(object, null) ⊐…
« ⇾(⊙,WIMLStateMachine) {»</StateMachine>«}∨{»</Class>« }/⇾ »
« if (has_associations) { »…
⋮«∀(‖"/Attributes"){if(‖"/Association" != null){»…
--mimeboundery
Content-type: text/plain; charset=utf-8
Content-Disposition: attachment; filename=◂‖[wc]"Ⓟ/Name"▸Association◂‖"/Name"▸.model
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Association>
  ⋮⊏ ➜ this.Imports(wc) ⊐…
  <Ends>
    <End>
      ⋮«¬∅(‖"Ⓟ/Stereotypes"){»«∀(⊙){»…
      <Stereotype>◂⊙▸</Stereotype>
      ⋮«}/∀»«}/¬∅»…
      ⋮«∃(‖"Ⓟ/OtherName"){»…
      <Role>◂⊙▸</Role>
      ⋮«}/∃»…
      <Type>◂‖[wc]"Ⓟ/Name"▸</Type>
      ⋮«∃(‖"Ⓟ/OtherMultiplicity"){»…
      <Multiplicity>◂⊙▸</Multiplicity>
      <IsNavigable>true</IsNavigable>
      ⋮«}∨{»…
      <Multiplicity>1</Multiplicity>
      <IsNavigable>false</IsNavigable>
      ⋮«}/∃»…
      ⋮«●(‖"Ⓟ/Ends/0"){»⊏ ➜ this.Extensions(object, null) ⊐«}/●»…
    </End>
    <End>
      <Role>◂‖"Ⓟ/Name"</Role>
      <Type>◂((String)(‖"Ⓟ/Type")).replace("/",".")▸</Type>
      <Multiplicity>◂‖"Ⓟ/Multiplicity"</Multiplicity>
      <IsNavigable>true</IsNavigable>
      ⋮«●(‖"Ⓟ/Ends/1"){»⊏ ➜ this.Extensions(object, null) ⊐«}/●»…
    </End>
  </Ends>
  ⋮⊏ ➜ this.Extensions(object, null) ⊐…
</Association>
⋮«}}/∀»…
« } »…
« } »…
« } catch (org.oomodels.OOMStatusCode osc) {
    throw osc;
  } catch (Throwable t) {
    org.oomodels.OOMStatusCode osc = new org.oomodels.OOMStatusCode(500);
    //osc.setCause(t);
    throw osc;
  } »…
⊏ Ⓣ Extensions(Object object, String element) ⊐…
  ⋮«➀:(e)»…
  ⋮«➀:(x)»…
  ⋮«¬∅(‖"Ⓟ/Extensions"){»…
    ⋮«∀(⊙){»…
      ⋮«if(((String)(‖"/Name")).equals("UML")){»…
        ⋮«➀(e){if(element!=null){»>
        ⋮«}}/➀»…
        ⋮«∀(‖"Ⓟ/Properties"){»…
◂((WIMLProperty)(⊙)).dumpToXML("     ",null).toString()▸
        ⋮«}/∀»…
      ⋮«}»…
    ⋮«}/∀»…
  ⋮«}/¬∅»…
  ⋮«¬∅(‖"Ⓟ/Extensions"){»…
    ⋮«∀(⊙){»…
      ⋮«if(((String)(‖"Ⓟ/Name")).equals("UML") == false){»…
        ⋮«➀(e){if(element!=null){»>
        ⋮«}}/➀»…
        ⋮«➀(x)
    <Extensions>
        ⋮«}/➀»…
        ⋮«if(((String)(‖"/Name")).matches("^org/xmodel/[^/]*")){»…
      <◂((String)(‖"/Name")).replaceFirst("org/xmodel/","")▸>
        ⋮«}else{»…
      <Extension CLASS="◂‖"/Name"▸">
        ⋮«}»…
          ⋮«∀(‖"/Properties"){»…
◂((WIMLProperty)(⊙)).dumpToXML("       ",null).toString()
          ⋮«}/∀»…
        ⋮«if(((String)(‖"Ⓟ/Name")).matches("^org/xmodel/[^/]*")){»…
      </◂((String)(‖"Ⓟ/Name")).replaceFirst("org/xmodel/","")▸>
        ⋮«}else{»…
      </Extension>
        ⋮«}»…
      ⋮«}»…
    ⋮«}/∀»…
  ⋮«}/¬∅»…
  ⋮«¬➀(x){»…
    </Extensions>
  ⋮«}/¬➀»…
  ⋮«if(element!=null){»…
    ⋮«¬➀(e){»…
  </◂element▸>
    ⋮«}∨{»/>
    ⋮«}/¬➀»…
  ⋮«}»…
⊏ /Ⓣ ⊐…
⊏ Ⓣ Imports(Object object) ⊐…
  <StereotypeModelImport>org.uml.stereotypes.*</StereotypeModelImport>
  ⋮«∀(‖"Ⓟ/ModelImports"){»…
  <ModelImport>◂⊙▸</ModelImport>
  ⋮«}/∀»…
  ⋮«¬∅(‖"Ⓟ/ExternalImports"){»…
    ⋮«∀(⊙){»…
      ⋮«if(((String)⊙).indexOf('.') != -1){»…
  <ExternalImport>◂⊙▸</ExternalImport>
      ⋮«}else{»…
  <PrimitiveImport>◂⊙▸</PrimitiveImport>
      ⋮«}»…
    ⋮«}/∀»…
  ⋮«}∨{»…
  <ExternalImport>java.lang.Boolean</ExternalImport>
  <ExternalImport>java.lang.Byte</ExternalImport>
  <ExternalImport>java.lang.Short</ExternalImport>
  <ExternalImport>java.lang.Integer</ExternalImport>
  <ExternalImport>java.lang.Long</ExternalImport>
  <ExternalImport>java.lang.Float</ExternalImport>
  <ExternalImport>java.lang.Double</ExternalImport>
  <ExternalImport>java.lang.Character</ExternalImport>
  <ExternalImport>java.lang.String</ExternalImport>
  <ExternalImport>java.util.Date</ExternalImport>
  <ExternalImport>java.lang.Object</ExternalImport>
  <PrimitiveImport>boolean</PrimitiveImport>
  <PrimitiveImport>byte</PrimitiveImport>
  <PrimitiveImport>short</PrimitiveImport>
  <PrimitiveImport>int</PrimitiveImport>
  <PrimitiveImport>long</PrimitiveImport>
  <PrimitiveImport>float</PrimitiveImport>
  <PrimitiveImport>double</PrimitiveImport>
  <PrimitiveImport>char</PrimitiveImport>
  ⋮«}/¬∅»…
⊏ /Ⓣ ⊐…
</OOMCode>

Latest revision as of 09:02, 6 August 2013

Classification
Type Type:org/oogenerator/Template/2.0
Domain Domain:it/development/formatting
Category Type:org/oomodels/wiki/Template
Maturity final
More
Download Code
Namespace (more)

OOEM main package

create new pages

Caution! This is a 98% copy of wiml-1.0-ooem-package-1.0 (todo: wiki subtemplates)

Code[edit]


G-2.0-java_jpp-1.0 -*- coding: utf-8; -*-

import org.oomodels.wiml.*;
▼
⊏ signature(String wiml_code) ⊐
« WIMLClass wc; try { wc = WIMLClass.parseWIML(wiml_code); object = wc; 
  boolean has_associations = false;
  if (wc == null) {
    throw new org.oomodels.OOMStatusCode(204);
  } else {
»
MIME-Version: 1.0
Content-type: multipart/mixed; charset=utf-8; boundary="mimeboundery"

«
    ∀(‖"Ⓟ/Attributes"){
      if (‖"Ⓟ/Association"!=null) { has_associations = true; }
    }/∀
»
--mimeboundery
Content-type: text/plain; charset=utf-8
Content-Disposition: attachment; filename=‖"Ⓟ/Name".model

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
« ⇾(⊙,WIMLStateMachine) {»<StateMachine>«}∨{»<Class>« }/⇾ »⊏ ➜ this.Imports(wc) ⊐
  <Name>‖"Ⓟ/Name"</Name>
  ⋮«∀(‖"Ⓟ/ModelTemplateArguments"){»
  <TemplateParameter Name="‖"Ⓟ/Name"" «∃(‖"Ⓟ/DefaultValue"){»DefaultValue="◂((String)(⊙)).replace("/",".")▸" «}/∃»GenericLevel="MODEL_TEMPLATE"/>
  ⋮«}/∀»«∀(‖"Ⓟ/CodeGeneratorTemplateArguments"){»
  <TemplateParameter Name="‖"Ⓟ/Name"" «∃(‖"Ⓟ/DefaultValue"){»DefaultValue="◂((String)(⊙)).replace("/",".")▸" «}/∃»GenericLevel="CODE_GENERATOR_TEMPLATE"/>
  ⋮«}/∀»«∀(‖"Ⓟ/ImplementationLanguageTemplateArguments"){»
  <TemplateParameter Name="‖"Ⓟ/Name"" «∃(‖"Ⓟ/DefaultValue"){»DefaultValue="◂((String)(⊙)).replace("/",".")▸" «}/∃»GenericLevel="IMPLEMENTATION_LANGUAGE_TEMPLATE"/>
  ⋮«}/∀»«∀(‖"Ⓟ/Bases"){»
  <Base Parent="◂((String)(⊙)).replace("/",".")▸"/>
  ⋮«}/∀»«¬∅(‖"Ⓟ/Stereotypes"){»«∀(⊙){»
  <Stereotype>◂((String)⊙).replaceFirst("org/ooem/stereotypes/.*/","")▸</Stereotype>
  ⋮«}/∀»«}/¬∅»« ⇾(⊙,WIMLStateMachine) {»«¬∅(‖"Ⓟ/States"){»«∀(⊙){»
  <State Name="‖"Ⓟ/0"" Variable="‖"Ⓟ/1""«∃(‖"Ⓟ/2"){» StateType="◂⊙▸"«}/∃»/>
  ⋮«}/∀»«}/¬∅»« }/⇾ »«∀(‖"Ⓟ/Attributes"){if(‖"Ⓟ/Association" == null){»
  <Attribute Name="‖"Ⓟ/Name"" Type="◂((String)(‖"Ⓟ/Type")).replace("/",".")▸"«∀(‖"Ⓟ/Stereotypes"){» Stereotype-◂Ⓘ▸="◂⊙▸"«}/∀»⊏ ➜ this.Extensions(object, "Attribute") ⊐«}}/∀»«∀(‖"Ⓟ/Operations"){»« String op_type; ⇾(⊙,WIMLTransition) { op_type = "Transition"; }∨{ op_type = "Operation"; }/⇾ »
  <◂op_type▸ Name="‖"Ⓟ/Name"" ReturnType="‖"Ⓟ/ReturnType""«∀(‖"Ⓟ/Stereotypes"){» Stereotype-◂Ⓘ▸="◂⊙▸"«}/∀»« ⇾(⊙,WIMLTransition) {»«¬∅(‖"Ⓟ/BeforeStateExpression"){» BeforeStates="◂⊙▸"«}/¬∅»« }/⇾ »⊏ ➜ this.Extensions(object, op_type) ⊐«}/∀»«∀(‖"Ⓟ/Views"){»
  <View Name="‖"Ⓟ/Name"" «¬∅(‖"Ⓟ/Stereotypes"){» Stereotype="«∀(⊙){»◂⊙▸«}/∀»"«}/¬∅» CLASS="UMLView_SlotSpecification">
    <ClassOfView>‖[wc]"Ⓟ/Name"</ClassOfView>
    ⋮⊏ ➜ this.Extensions(object, null) ⊐«∀(‖"Ⓟ/SlotSpecifications"){»
    <SlotSpecification Name="‖"Ⓟ/Name"" Visibility="‖"Ⓟ/Visibility"" Attributes="‖"Ⓟ/Attributes"" Associations="‖"Ⓟ/Associations"" Operations="‖"Ⓟ/Operations"" Expand="‖"Ⓟ/Expand"">
      <EntryIncludeRegExp>‖"Ⓟ/EntryIncludeRegExp"</EntryIncludeRegExp>
      <EntryExcludeRegExp>‖"Ⓟ/EntryExcludeRegExp"</EntryExcludeRegExp>
      <FeatureIncludeRegExp>‖"Ⓟ/FeatureIncludeRegExp"</FeatureIncludeRegExp>
      <FeatureExcludeRegExp>‖"Ⓟ/FeatureExcludeRegExp"</FeatureExcludeRegExp>
    </SlotSpecification>
    ⋮«}/∀»
  </View>
  ⋮«}/∀»⊏ ➜ this.Extensions(object, null) ⊐
« ⇾(⊙,WIMLStateMachine) {»</StateMachine>«}∨{»</Class>« }/⇾ »
« if (has_associations) { »«∀(‖"Ⓟ/Attributes"){if(‖"Ⓟ/Association" != null){»
--mimeboundery
Content-type: text/plain; charset=utf-8
Content-Disposition: attachment; filename=‖[wc]"Ⓟ/Name"Association‖"Ⓟ/Name".model

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Association>
  ⋮⊏ ➜ this.Imports(wc) ⊐
  <Ends>
    <End>
      ⋮«¬∅(‖"Ⓟ/Stereotypes"){»«∀(⊙){»
      <Stereotype>◂⊙▸</Stereotype>
      ⋮«}/∀»«}/¬∅»«∃(‖"Ⓟ/OtherName"){»
      <Role>◂⊙▸</Role>
      ⋮«}/∃»
      <Type>‖[wc]"Ⓟ/Name"</Type>
      ⋮«∃(‖"Ⓟ/OtherMultiplicity"){»
      <Multiplicity>◂⊙▸</Multiplicity>
      <IsNavigable>true</IsNavigable>
      ⋮«}∨{»
      <Multiplicity>1</Multiplicity>
      <IsNavigable>false</IsNavigable>
      ⋮«}/∃»«●(‖"Ⓟ/Ends/0"){»⊏ ➜ this.Extensions(object, null) ⊐«}/●»
    </End>
    <End>
      <Role>‖"Ⓟ/Name"</Role>
      <Type>◂((String)(‖"Ⓟ/Type")).replace("/",".")▸</Type>
      <Multiplicity>‖"Ⓟ/Multiplicity"</Multiplicity>
      <IsNavigable>true</IsNavigable>
      ⋮«●(‖"Ⓟ/Ends/1"){»⊏ ➜ this.Extensions(object, null) ⊐«}/●»
    </End>
  </Ends>
  ⋮⊏ ➜ this.Extensions(object, null) ⊐
</Association>
⋮«}}/∀»
« } »
« } »
« } catch (org.oomodels.OOMStatusCode osc) {
    throw osc;
  } catch (Throwable t) {
    org.oomodels.OOMStatusCode osc = new org.oomodels.OOMStatusCode(500);
    //osc.setCause(t);
    throw osc;
  } »
⊏ Ⓣ Extensions(Object object, String element) ⊐«➀:(e)»«➀:(x)»«¬∅(‖"Ⓟ/Extensions"){»«∀(⊙){»«if(((String)(‖"Ⓟ/Name")).equals("UML")){»«➀(e){if(element!=null){»>
        ⋮«}}/➀»«∀(‖"Ⓟ/Properties"){»
◂((WIMLProperty)(⊙)).dumpToXML("      ",null).toString()▸«}/∀»«}»«}/∀»«}/¬∅»«¬∅(‖"Ⓟ/Extensions"){»«∀(⊙){»«if(((String)(‖"Ⓟ/Name")).equals("UML") == false){»«➀(e){if(element!=null){»>
        ⋮«}}/➀»«➀(x){»
    <Extensions>
        ⋮«}/➀»«if(((String)(‖"Ⓟ/Name")).matches("^org/xmodel/[^/]*")){»
      <◂((String)(‖"Ⓟ/Name")).replaceFirst("org/xmodel/","")▸>
        ⋮«}else{»
      <Extension CLASS="‖"Ⓟ/Name"">
        ⋮«}»«∀(‖"Ⓟ/Properties"){»
◂((WIMLProperty)(⊙)).dumpToXML("        ",null).toString()▸«}/∀»«if(((String)(‖"Ⓟ/Name")).matches("^org/xmodel/[^/]*")){»
      </◂((String)(‖"Ⓟ/Name")).replaceFirst("org/xmodel/","")▸>
        ⋮«}else{»
      </Extension>
        ⋮«}»«}»«}/∀»«}/¬∅»«¬➀(x){»
    </Extensions>
  ⋮«}/¬➀»«if(element!=null){»«¬➀(e){»
  </◂element▸>
    ⋮«}∨{»/>
    ⋮«}/¬➀»«}»
⊏ /Ⓣ ⊐
⊏ Ⓣ Imports(Object object) ⊐
  <StereotypeModelImport>org.uml.stereotypes.*</StereotypeModelImport>
  ⋮«∀(‖"Ⓟ/ModelImports"){»
  <ModelImport>◂⊙▸</ModelImport>
  ⋮«}/∀»«¬∅(‖"Ⓟ/ExternalImports"){»«∀(⊙){»«if(((String)⊙).indexOf('.') != -1){»
  <ExternalImport>◂⊙▸</ExternalImport>
      ⋮«}else{»
  <PrimitiveImport>◂⊙▸</PrimitiveImport>
      ⋮«}»«}/∀»«}∨{»
  <ExternalImport>java.lang.Boolean</ExternalImport>
  <ExternalImport>java.lang.Byte</ExternalImport>
  <ExternalImport>java.lang.Short</ExternalImport>
  <ExternalImport>java.lang.Integer</ExternalImport>
  <ExternalImport>java.lang.Long</ExternalImport>
  <ExternalImport>java.lang.Float</ExternalImport>
  <ExternalImport>java.lang.Double</ExternalImport>
  <ExternalImport>java.lang.Character</ExternalImport>
  <ExternalImport>java.lang.String</ExternalImport>
  <ExternalImport>java.util.Date</ExternalImport>
  <ExternalImport>java.lang.Object</ExternalImport>
  <PrimitiveImport>boolean</PrimitiveImport>
  <PrimitiveImport>byte</PrimitiveImport>
  <PrimitiveImport>short</PrimitiveImport>
  <PrimitiveImport>int</PrimitiveImport>
  <PrimitiveImport>long</PrimitiveImport>
  <PrimitiveImport>float</PrimitiveImport>
  <PrimitiveImport>double</PrimitiveImport>
  <PrimitiveImport>char</PrimitiveImport>
  ⋮«}/¬∅»
⊏ /Ⓣ ⊐