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

From OOModels
Jump to navigationJump to search
(Created page with "{{Metabox | Meta_Type = Type:org/oogenerator/Template/2.0 | Meta_Domain = Domain:it/development/formatting | Meta_Category = Type:org/oomodels/wiki/Template | Meta_Download...")
 
Tag: Manual revert
 
(59 intermediate revisions by the same user not shown)
Line 10: Line 10:


<OOMCode type="org/oogenerator/Template/2.0">
<OOMCode type="org/oogenerator/Template/2.0">
G-2.0-java_jpp-1.0 -*- coding: utf-8; -*-
G-2.0-java_jppi-1.0 -*- coding: utf-8; -*-
▼…
▼…
import org.oomodels.wiml.*;
import org.oomodels.wiml.*;
import java.util.Map;
import java.util.Vector;
▼…
▼…
⊏ signature(String wiml_code) ⊐…
▲…
    public Vector<String> getStatesInRegion(String expression, String region) {
        Vector<String> result = new Vector<String>();
        for (String term : expression.split("\\\u007C\\\u007C")) {
            String[] t = term.split("=");
            if (t.length > 1) {
                if (t[0].equals(region)) { result.add(t[1]); }
            } else {
                if ("main".equals(region)) { result.add(t[0]); }
            }
        }
        return result;
    }
▲…
⊏ signature(String wiml_code, Map<String,String> page_properties,
                              Map<String,String> predefined_arguments,
                              Map<String,String> conversion_arguments,
                              Map<String,String> request_arguments) ⊐…
« WIMLClass wc; try { wc = WIMLClass.parseWIML(wiml_code); object = wc;  
« WIMLClass wc; try { wc = WIMLClass.parseWIML(wiml_code); object = wc;  
   boolean has_associations = false;
   boolean has_associations = false;
Line 20: Line 39:
     throw new org.oomodels.OOMStatusCode(204);
     throw new org.oomodels.OOMStatusCode(204);
   } else {
   } else {
      boolean complete_xml = "true".equals(predefined_arguments.get("CompleteXMLDocument"));
      String xmlns = complete_xml ? " xmlns=\"http://xmlns.sphenon.com/org/ooem\"" : "";
      String indent = complete_xml ? "" : "  ";
»…
»…
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
«if(complete_xml) {»…
« (⊙,WIMLStateMachine) <OOEMStateMachine>«}∨{»<COOEMlass>« }/⇾ »
  ⋮<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  ⋮⊏ ➜ this.Imports(object) ⊐…
«}»…
  <Name>◂‖"/Name"▸</Name>
«¶(indent)»…
<Class>
  <Name>◂conversion_arguments.get("page").replaceFirst("Artefact:Model/","").replace("/",".")▸</Name>
   ⋮«∀(‖"Ⓟ/ModelTemplateArguments"){»…
   ⋮«∀(‖"Ⓟ/ModelTemplateArguments"){»…
   <TemplateParameter Name="◂‖"Ⓟ/Name"▸" «∃(‖"Ⓟ/DefaultValue"){»DefaultValue="◂((String)(⊙)).replace("/",".")▸" «}/∃»GenericLevel="MODEL_TEMPLATE"/>
   <TemplateParameter Name="◂‖"Ⓟ/Name"▸" «∃(‖"Ⓟ/DefaultValue"){»DefaultValue="◂((String)(⊙)).replace("/",".")▸" «}/∃»GenericLevel="MODEL_TEMPLATE"/>
Line 34: Line 58:
   <TemplateParameter Name="◂‖"Ⓟ/Name"▸" «∃(‖"Ⓟ/DefaultValue"){»DefaultValue="◂((String)(⊙)).replace("/",".")▸" «}/∃»GenericLevel="IMPLEMENTATION_LANGUAGE_TEMPLATE"/>
   <TemplateParameter Name="◂‖"Ⓟ/Name"▸" «∃(‖"Ⓟ/DefaultValue"){»DefaultValue="◂((String)(⊙)).replace("/",".")▸" «}/∃»GenericLevel="IMPLEMENTATION_LANGUAGE_TEMPLATE"/>
   ⋮«}/∀»…
   ⋮«}/∀»…
   ⋮«∀(‖"Ⓟ/Bases"){»…
   ⋮«¬∅(‖"Ⓟ/Bases"){»…
   <Base Parent="◂((String)(⊙)).replace("/",".")▸"/>
   <Bases PASS="2">
  ⋮«}/∀»…
    ⋮«∀(⊙){»…
   ⋮«¬∅(‖"Ⓟ/Stereotypes"){»«∀(⊙){»…
    <BaseName>◂((String)(⊙)).replace("/",".")▸</BaseName>
   <Stereotype>◂⊙▸</Stereotype>
    ⋮«}/∀»…
  ⋮«}/∀»«}/¬∅»…
   </Bases>
  ⋮«}/¬∅»…
    ⋮«¬∅(‖"Ⓟ/Stereotypes"){»«∀(⊙){»…
   <StereotypeName>◂((String)⊙).replaceFirst("org/ooem/stereotypes/.*/","")▸</StereotypeName>
    ⋮«}/∀»«}/¬∅»…
   ⋮« ⇾(⊙,WIMLStateMachine) {»…
   ⋮« ⇾(⊙,WIMLStateMachine) {»…
   ⋮«¬∅(‖"Ⓟ/States"){»«∀(⊙){»…
  <HasStateMachine>true</HasStateMachine>
  <State Name="◂‖"Ⓟ/0"▸" Variable="◂‖"Ⓟ/1"▸"«∃(‖"Ⓟ/2"){» StateType="◂⊙▸"«}/∃»/>
  <StateMachine Name="TopLevel" PASS="2" TypeName="TopLevel">
  ⋮«}/∀»«}/¬∅»…
   ⋮«¬∅(‖"Ⓟ/States"){»…
    ⋮«java.util.HashSet names = new java.util.HashSet(); ∀(⊙){ String name = ‖<String>"Ⓟ/1"; names.add(name); }/∀ »…
    ⋮«∀(-name:names){»…
    <Region Name="◂name▸">
      ⋮«∀(⊙){»…
        ⋮«if(name.equals((String) (‖"Ⓟ/1"))){»…
      <State Name="◂‖"Ⓟ/0"▸" OID="S_◂name▸_◂‖"Ⓟ/0"▸" TypeName="«∃(‖"Ⓟ/2"){»◂⊙▸«}∨{»None«}/∃»"/>
        ⋮«}»…
      ⋮«}/∀»…
      ⋮«∀(-o:‖[wc]"Ⓟ/Operations"){»…
        ⋮« ⇾(o,WIMLTransition) { »…
          ⋮«➀:(state_in_region)»…
          ⋮«∀(-sir:getStatesInRegion(((String)(‖[o]"Ⓟ/BeforeStateExpression")), (String) name)){»…
              ⋮«➀(state_in_region){»…
      <Transition>
        <Operation IDREF="O_◂‖[o]"Ⓟ/Name"▸"/>
        <SourceStates>
              ⋮«}/➀»…
          <State IDREF="S_◂name▸_◂sir▸"/>
          ⋮«}/∀»…
          ⋮«¬➀(state_in_region){»…
        </SourceStates>
        <TargetStates/>
      </Transition>
          ⋮«}/¬➀»…
        ⋮« }/⇾ »…
      ⋮«}/∀»…
    </Region>
    ⋮«}/∀»…
  ⋮«}/¬∅»…
  </StateMachine>
   ⋮« }/⇾ »…
   ⋮« }/⇾ »…
   ⋮«∀(‖"Ⓟ/Attributes"){if(‖"Ⓟ/Association" == null){»…
   ⋮«∀(‖"Ⓟ/Attributes"){if(‖"Ⓟ/Association" == null){»…
   <Attribute Name="◂‖"Ⓟ/Name"▸" Type="◂((String)(‖"Ⓟ/Type")).replace("/",".")▸"«∀(‖"Ⓟ/Stereotypes"){» Stereotype-◂Ⓘ▸="◂⊙▸"«}/∀»…
   <Attribute Name="◂‖"Ⓟ/Name"▸" PASS="2" TypeName="◂((String)(‖"Ⓟ/Type")).replace("/",".")▸"«∀(‖"Ⓟ/Stereotypes"){» StereotypeName-◂Ⓘ▸="◂((String)⊙).replaceFirst("org/ooem/stereotypes/.*/","")▸"«}/∀»…
     ⋮⊏ ➜ this.Extensions(object, "Attribute") ⊐…
     ⋮⊏ ➜ this.Extensions(object, "Attribute", "Extensions") ⊐…
   ⋮«}else{»…
   ⋮«}else{»…
   <Association>
   <AssociationEnd PASS="2">
    <Ends>
       ⋮«¬∅(‖"Ⓟ/Stereotypes"){»«∀(⊙){»…
       <End>
    <StereotypeName>◂((String)⊙).replaceFirst("org/ooem/stereotypes/.*/","")▸</StereotypeName>
        ⋮«¬∅(‖"Ⓟ/Stereotypes"){»«∀(⊙){»…
      ⋮«}/∀»«}/¬∅»…
        <Stereotype>◂⊙▸</Stereotype>
      ⋮«∃(‖"Ⓟ/OtherName"){»…
        ⋮«}/∀»«}/¬∅»…
    <Role>◂⊙▸</Role>
        ⋮«∃(‖"Ⓟ/OtherName"){»…
      ⋮«}/∃»…
        <Role>◂⊙▸</Role>
    <!-- <TypeName>◂‖[wc]"Ⓟ/Name"▸</TypeName> -->
        ⋮«}/∃»…
      ⋮«∃(‖"Ⓟ/OtherMultiplicity"){»…
        <Type>◂‖[wc]"Ⓟ/Name"▸</Type>
    <Multiplicity>◂⊙▸</Multiplicity>
        ⋮«∃(‖"Ⓟ/OtherMultiplicity"){»…
    <Navigability>true</Navigability>
        <Multiplicity>◂⊙▸</Multiplicity>
      ⋮«}∨{»…
        <IsNavigable>true</IsNavigable>
    <Multiplicity>1</Multiplicity>
        ⋮«}∨{»…
    <Navigability>false</Navigability>
        <Multiplicity>1</Multiplicity>
      ⋮«}/∃»…
        <IsNavigable>false</IsNavigable>
    ⋮«●(‖"Ⓟ/Ends/1"){»⊏ ➜ this.Extensions(object, null, "Extensions") ⊐«}/●»…
        ⋮«}/∃»…
    <OtherRole>◂‖"Ⓟ/Name"▸</OtherRole>
        ⋮«●(‖"Ⓟ/Ends/0"){»⊏ ➜ this.Extensions(object, null) ⊐«}/●»…
    <OtherTypeName>◂((String)(‖"Ⓟ/Type")).replace("/",".")▸</OtherTypeName>
      </End>
    <OtherMultiplicity>◂‖"Ⓟ/Multiplicity"▸</OtherMultiplicity>
      <End>
    <OtherNavigability>true</OtherNavigability>
        <Role>◂‖"Ⓟ/Name"▸</Role>
    ⋮«●(‖"Ⓟ/Ends/0"){»⊏ ➜ this.Extensions(object, null, "OtherExtensions") ⊐«}/●»…
        <Type>◂((String)(‖"Ⓟ/Type")).replace("/",".")▸</Type>
     ⋮⊏ ➜ this.Extensions(object, null, "Extensions") ⊐…
        <Multiplicity>◂‖"Ⓟ/Multiplicity"▸</Multiplicity>
   </AssociationEnd>
        <IsNavigable>true</IsNavigable>
        ⋮«●(‖"Ⓟ/Ends/1"){»⊏ ➜ this.Extensions(object, null) ⊐«}/●»…
      </End>
    </Ends>
     ⋮⊏ ➜ this.Extensions(object, null) ⊐…
   </Association>
   ⋮«}}/∀»…
   ⋮«}}/∀»…
   ⋮«∀(‖"Ⓟ/Operations"){»…
   ⋮«∀(‖"Ⓟ/Operations"){»…
   ⋮« String op_type; ⇾(⊙,WIMLTransition) { op_type = "Transition"; }∨{ op_type = "Operation"; }/⇾ »…
   ⋮« ⇾(⊙,WIMLTransition) { }/⇾ »…
   <◂op_type▸ Name="◂‖"Ⓟ/Name"▸" ReturnType="◂‖"Ⓟ/ReturnType"▸"«∀(‖"Ⓟ/Stereotypes"){» Stereotype-◂Ⓘ▸="◂⊙▸"«}/∀»…
   <Operation Name="◂‖"Ⓟ/Name"▸" OID="O_◂‖"Ⓟ/Name"▸" ReturnType="◂‖"Ⓟ/ReturnType"▸"«∀(‖"Ⓟ/Stereotypes"){» StereotypeName-◂Ⓘ▸="◂((String)⊙).replaceFirst("org/ooem/stereotypes/.*/","")▸"«}/∀»…
                       ⋮« ⇾(⊙,WIMLTransition) {»«¬∅(‖"Ⓟ/BeforeStateExpression"){» BeforeStates="◂⊙▸"«}/¬∅»« }/⇾ »…
                       ⋮⊰« ⇾(⊙,WIMLTransition) {»«¬∅(‖"Ⓟ/BeforeStateExpression"){» BeforeStates="◂⊙▸"«}/¬∅»« }/⇾ »⊱…
     ⋮⊏ ➜ this.Extensions(object, op_type) ⊐…
     ⋮⊏ ➜ this.Extensions(object, "Operation", "Extensions") ⊐…
   ⋮«}/∀»…
   ⋮«}/∀»…
   ⋮«∀(‖"Ⓟ/Views"){»…
   ⋮«∀(‖"Ⓟ/Views"){»…
   <View Name="◂‖"Ⓟ/Name"▸" «¬∅(‖"Ⓟ/Stereotypes"){» Stereotype="«∀(⊙){»◂⊙▸«}/∀»"«}/¬∅» CLASS="UMLView_SlotSpecification">
   <View Name="◂‖"Ⓟ/Name"▸" «¬∅(‖"Ⓟ/Stereotypes"){» StereotypeName="«∀(⊙){»◂((String)⊙).replaceFirst("org/ooem/stereotypes/.*/","")▸«}/∀»"«}/¬∅» CLASS="UMLView_SlotSpecification">
     <ClassOfView>◂‖[wc]"Ⓟ/Name"▸</ClassOfView>
     <ClassOfView>◂‖[wc]"Ⓟ/Name"▸</ClassOfView>
     ⋮⊏ ➜ this.Extensions(object, null) ⊐…
     ⋮⊏ ➜ this.Extensions(object, null, "Extensions") ⊐…
     ⋮«∀(‖"Ⓟ/SlotSpecifications"){»…
     ⋮«∀(‖"Ⓟ/SlotSpecifications"){»…
     <SlotSpecification Name="◂‖"Ⓟ/Name"▸" Visibility="◂‖"Ⓟ/Visibility"▸" Attributes="◂‖"Ⓟ/Attributes"▸" Associations="◂‖"Ⓟ/Associations"▸" Operations="◂‖"Ⓟ/Operations"▸" Expand="◂‖"Ⓟ/Expand"▸">
     <SlotSpecification Name="◂‖"Ⓟ/Name"▸" Visibility="◂‖"Ⓟ/Visibility"▸" Attributes="◂‖"Ⓟ/Attributes"▸" Associations="◂‖"Ⓟ/Associations"▸" Operations="◂‖"Ⓟ/Operations"▸" Expand="◂‖"Ⓟ/Expand"▸">
Line 99: Line 151:
   </View>
   </View>
   ⋮«}/∀»…
   ⋮«}/∀»…
   ⋮⊏ ➜ this.Extensions(object, null) ⊐…
   ⋮⊏ ➜ this.Extensions(object, null, "Extensions") ⊐…
« ⇾(⊙,WIMLStateMachine) {»</OOEMStateMachine>«}∨{»</OOEMClass}/⇾ »
</Class>
«/¶»…
« } »…
« } »…
« } catch (org.oomodels.OOMStatusCode osc) {
« } catch (org.oomodels.OOMStatusCode osc) {
Line 109: Line 162:
     throw osc;
     throw osc;
   } »…
   } »…
⊏ Ⓣ Extensions(Object object, String element) ⊐…
⊏ Ⓣ Extensions(Object object, String element, String tag) ⊐…
   ⋮«➀:(e)»…
   ⋮«➀:(e)»…
   ⋮«➀:(x)»…
   ⋮«➀:(x)»…
Line 125: Line 178:
   ⋮«¬∅(‖"Ⓟ/Extensions"){»…
   ⋮«¬∅(‖"Ⓟ/Extensions"){»…
     ⋮«∀(⊙){»…
     ⋮«∀(⊙){»…
       ⋮«if(((String)(‖"Ⓟ/Name")).equals("UML") == false){»…
       ⋮«if(((String)(‖"Ⓟ/Name")).matches("UML\u007CWIML") == false){»…
         ⋮«➀(e){if(element!=null){»>
         ⋮«➀(e){if(element!=null){»>
         ⋮«}}/➀»…
         ⋮«}}/➀»…
         ⋮«➀(x){»
         ⋮«➀(x){»
     <Extensions>
     <◂tag▸>
         ⋮«}/➀»…
         ⋮«}/➀»…
         ⋮«if(((String)(‖"Ⓟ/Name")).matches("^org/xmodel/[^/]*")){»…
      <Extension CLASS="OOEMExtension_OCP_XML">
      <◂((String)(‖"Ⓟ/Name")).replaceFirst("org/xmodel/","")▸>
         <XOCP CLASS="String" CONTENT="XML/Text">
        ⋮«}else{»…
            ⋮«if(((String)(‖"Ⓟ/Name")).matches("^org/xmodel/[^/]*")){»…
      <Extension CLASS="◂‖"Ⓟ/Name"▸">
          <◂((String)(‖"Ⓟ/Name")).replaceFirst("org/xmodel/","")▸ CLASS="UMLExtension">
        ⋮«}»…
            ⋮«}else{»…
          ⋮«∀(‖"Ⓟ/Properties"){»…
          <◂‖"Ⓟ/Name"▸ CLASS="UMLExtension">
◂((WIMLProperty)(⊙)).dumpToXML("       ",null).toString()▸
            ⋮«}»…
          ⋮«}/∀»…
            ⋮«∀(‖"Ⓟ/Properties"){»…
        ⋮«if(((String)(‖"Ⓟ/Name")).matches("^org/xmodel/[^/]*")){»…
◂((WIMLProperty)(⊙)).dumpToXML("         ",null).toString()▸
      </◂((String)(‖"Ⓟ/Name")).replaceFirst("org/xmodel/","")▸>
            ⋮«}/∀»…
        ⋮«}else{»…
            ⋮«if(((String)(‖"Ⓟ/Name")).matches("^org/xmodel/[^/]*")){»…
          </◂((String)(‖"Ⓟ/Name")).replaceFirst("org/xmodel/","")▸>
            ⋮«}else{»…
          </◂‖"Ⓟ/Name"▸>
            ⋮«}»…
        </XOCP>
       </Extension>
       </Extension>
        ⋮«}»…
       ⋮«}»…
       ⋮«}»…
     ⋮«}/∀»…
     ⋮«}/∀»…
   ⋮«}/¬∅»…
   ⋮«}/¬∅»…
   ⋮«¬➀(x){»…
   ⋮«¬➀(x){»…
     </Extensions>
     </◂tag▸>
   ⋮«}/¬➀»…
   ⋮«}/¬➀»…
   ⋮«if(element!=null){»…
   ⋮«if(element!=null){»…
Line 156: Line 213:
     ⋮«}/¬➀»…
     ⋮«}/¬➀»…
   ⋮«}»…
   ⋮«}»…
⊏ /Ⓣ ⊐…
⊏ Ⓣ Imports(Object object) ⊐…
  <StereotypeModelImport>org.uml.stereotypes.*</StereotypeModelImport>
  <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>
</OOMCode>

Latest revision as of 15:05, 10 February 2022

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

Code[edit]


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

import org.oomodels.wiml.*;
import java.util.Map;
import java.util.Vector;
▼

    public Vector<String> getStatesInRegion(String expression, String region) {
        Vector<String> result = new Vector<String>();
        for (String term : expression.split("\\\u007C\\\u007C")) {
            String[] t = term.split("=");
            if (t.length > 1) {
                if (t[0].equals(region)) { result.add(t[1]); }
            } else {
                if ("main".equals(region)) { result.add(t[0]); }
            }
        }
        return result;
    }
▲
⊏ signature(String wiml_code, Map<String,String> page_properties,
                              Map<String,String> predefined_arguments,
                              Map<String,String> conversion_arguments,
                              Map<String,String> request_arguments) ⊐
« WIMLClass wc; try { wc = WIMLClass.parseWIML(wiml_code); object = wc; 
  boolean has_associations = false;
  if (wc == null) {
    throw new org.oomodels.OOMStatusCode(204);
  } else {
      boolean complete_xml = "true".equals(predefined_arguments.get("CompleteXMLDocument"));
      String xmlns = complete_xml ? " xmlns=\"http://xmlns.sphenon.com/org/ooem\"" : "";
      String indent = complete_xml ? "" : "  ";
»
«if(complete_xml) {»
  ⋮<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
«}»
«¶(indent)»
<Class>
  <Name>◂conversion_arguments.get("page").replaceFirst("Artefact:Model/","").replace("/",".")▸</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"){»
  <Bases PASS="2">
    ⋮«∀(⊙){»
    <BaseName>◂((String)(⊙)).replace("/",".")▸</BaseName>
    ⋮«}/∀»
  </Bases>
  ⋮«}/¬∅»«¬∅(‖"Ⓟ/Stereotypes"){»«∀(⊙){»
  <StereotypeName>◂((String)⊙).replaceFirst("org/ooem/stereotypes/.*/","")▸</StereotypeName>
    ⋮«}/∀»«}/¬∅»« ⇾(⊙,WIMLStateMachine) {»
  <HasStateMachine>true</HasStateMachine>
  <StateMachine Name="TopLevel" PASS="2" TypeName="TopLevel">
  ⋮«¬∅(‖"Ⓟ/States"){»«java.util.HashSet names = new java.util.HashSet(); ∀(⊙){ String name = ‖<String>"Ⓟ/1"; names.add(name); }/∀ »«∀(-name:names){»
    <Region Name="◂name▸">
      ⋮«∀(⊙){»«if(name.equals((String) (‖"Ⓟ/1"))){»
      <State Name="‖"Ⓟ/0"" OID="S_◂name▸_‖"Ⓟ/0"" TypeName="«∃(‖"Ⓟ/2"){»◂⊙▸«}∨{»None«}/∃»"/>
        ⋮«}»«}/∀»«∀(-o:‖[wc]"Ⓟ/Operations"){»« ⇾(o,WIMLTransition) { »«➀:(state_in_region)»«∀(-sir:getStatesInRegion(((String)(‖[o]"Ⓟ/BeforeStateExpression")), (String) name)){»«➀(state_in_region){»
      <Transition>
        <Operation IDREF="O_‖[o]"Ⓟ/Name""/>
        <SourceStates>
              ⋮«}/➀»
          <State IDREF="S_◂name▸_◂sir▸"/>
          ⋮«}/∀»«¬➀(state_in_region){»
        </SourceStates>
        <TargetStates/>
      </Transition>
          ⋮«}/¬➀»« }/⇾ »«}/∀»
    </Region>
    ⋮«}/∀»«}/¬∅»
  </StateMachine>
  ⋮« }/⇾ »«∀(‖"Ⓟ/Attributes"){if(‖"Ⓟ/Association" == null){»
  <Attribute Name="‖"Ⓟ/Name"" PASS="2" TypeName="◂((String)(‖"Ⓟ/Type")).replace("/",".")▸"«∀(‖"Ⓟ/Stereotypes"){» StereotypeName-◂Ⓘ▸="◂((String)⊙).replaceFirst("org/ooem/stereotypes/.*/","")▸"«}/∀»⊏ ➜ this.Extensions(object, "Attribute", "Extensions") ⊐«}else{»
  <AssociationEnd PASS="2">
      ⋮«¬∅(‖"Ⓟ/Stereotypes"){»«∀(⊙){»
    <StereotypeName>◂((String)⊙).replaceFirst("org/ooem/stereotypes/.*/","")▸</StereotypeName>
      ⋮«}/∀»«}/¬∅»«∃(‖"Ⓟ/OtherName"){»
    <Role>◂⊙▸</Role>
      ⋮«}/∃»
    <!-- <TypeName>‖[wc]"Ⓟ/Name"</TypeName> -->
      ⋮«∃(‖"Ⓟ/OtherMultiplicity"){»
    <Multiplicity>◂⊙▸</Multiplicity>
    <Navigability>true</Navigability>
      ⋮«}∨{»
    <Multiplicity>1</Multiplicity>
    <Navigability>false</Navigability>
      ⋮«}/∃»«●(‖"Ⓟ/Ends/1"){»⊏ ➜ this.Extensions(object, null, "Extensions") ⊐«}/●»
    <OtherRole>‖"Ⓟ/Name"</OtherRole>
    <OtherTypeName>◂((String)(‖"Ⓟ/Type")).replace("/",".")▸</OtherTypeName>
    <OtherMultiplicity>‖"Ⓟ/Multiplicity"</OtherMultiplicity>
    <OtherNavigability>true</OtherNavigability>
    ⋮«●(‖"Ⓟ/Ends/0"){»⊏ ➜ this.Extensions(object, null, "OtherExtensions") ⊐«}/●»⊏ ➜ this.Extensions(object, null, "Extensions") ⊐
  </AssociationEnd>
  ⋮«}}/∀»«∀(‖"Ⓟ/Operations"){»« ⇾(⊙,WIMLTransition) { }/⇾ »
  <Operation Name="‖"Ⓟ/Name"" OID="O_‖"Ⓟ/Name"" ReturnType="‖"Ⓟ/ReturnType""«∀(‖"Ⓟ/Stereotypes"){» StereotypeName-◂Ⓘ▸="◂((String)⊙).replaceFirst("org/ooem/stereotypes/.*/","")▸"«}/∀»« ⇾(⊙,WIMLTransition) {»«¬∅(‖"Ⓟ/BeforeStateExpression"){» BeforeStates="◂⊙▸"«}/¬∅»« }/⇾ »⊏ ➜ this.Extensions(object, "Operation", "Extensions") ⊐«}/∀»«∀(‖"Ⓟ/Views"){»
  <View Name="‖"Ⓟ/Name"" «¬∅(‖"Ⓟ/Stereotypes"){» StereotypeName="«∀(⊙){»◂((String)⊙).replaceFirst("org/ooem/stereotypes/.*/","")▸«}/∀»"«}/¬∅» CLASS="UMLView_SlotSpecification">
    <ClassOfView>‖[wc]"Ⓟ/Name"</ClassOfView>
    ⋮⊏ ➜ this.Extensions(object, null, "Extensions") ⊐«∀(‖"Ⓟ/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, "Extensions") ⊐
</Class>
«/¶»
« } »
« } catch (org.oomodels.OOMStatusCode osc) {
    throw osc;
  } catch (Throwable t) {
    org.oomodels.OOMStatusCode osc = new org.oomodels.OOMStatusCode(204);
    //osc.setCause(t);
    throw osc;
  } »
⊏ Ⓣ Extensions(Object object, String element, String tag) ⊐«➀:(e)»«➀:(x)»«¬∅(‖"Ⓟ/Extensions"){»«∀(⊙){»«if(((String)(‖"Ⓟ/Name")).equals("UML")){»«➀(e){if(element!=null){»>
        ⋮«}}/➀»«∀(‖"Ⓟ/Properties"){»
◂((WIMLProperty)(⊙)).dumpToXML("      ",null).toString()▸«}/∀»«}»«}/∀»«}/¬∅»«¬∅(‖"Ⓟ/Extensions"){»«∀(⊙){»«if(((String)(‖"Ⓟ/Name")).matches("UML\u007CWIML") == false){»«➀(e){if(element!=null){»>
        ⋮«}}/➀»«➀(x){»
    <◂tag▸>
        ⋮«}/➀»
      <Extension CLASS="OOEMExtension_OCP_XML">
        <XOCP CLASS="String" CONTENT="XML/Text">
            ⋮«if(((String)(‖"Ⓟ/Name")).matches("^org/xmodel/[^/]*")){»
          <◂((String)(‖"Ⓟ/Name")).replaceFirst("org/xmodel/","")▸ CLASS="UMLExtension">
            ⋮«}else{»
          <‖"Ⓟ/Name" CLASS="UMLExtension">
            ⋮«}»«∀(‖"Ⓟ/Properties"){»
◂((WIMLProperty)(⊙)).dumpToXML("          ",null).toString()▸«}/∀»«if(((String)(‖"Ⓟ/Name")).matches("^org/xmodel/[^/]*")){»
          </◂((String)(‖"Ⓟ/Name")).replaceFirst("org/xmodel/","")▸>
            ⋮«}else{»
          </‖"Ⓟ/Name">
            ⋮«}»
        </XOCP>
      </Extension>
      ⋮«}»«}/∀»«}/¬∅»«¬➀(x){»
    </◂tag▸>
  ⋮«}/¬➀»«if(element!=null){»«¬➀(e){»
  </◂element▸>
    ⋮«}∨{»/>
    ⋮«}/¬➀»«}»
⊏ /Ⓣ ⊐