Skip to content
Snippets Groups Projects
Select Git revision
  • 47a5fed39248b1ffb11999ec9d6a063a2a9e46f8
  • master default
  • 1.12
  • 1.11
  • 1.10
  • 1.9
  • 1.8
  • 1.7
  • 1.6-beta
9 results

descriptor-bin.xml

Blame
  • Units.ecore 5.39 KiB
    <?xml version="1.0" encoding="UTF-8"?>
    <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="units" nsURI="http://oceandsl.org/declaration/units" nsPrefix="units">
      <eClassifiers xsi:type="ecore:EClass" name="Unit" eSuperTypes="#//BasicUnit">
        <eOperations name="render" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
          <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
            <details key="body" value="String result = &quot;&quot;;&#xA;for (ElementUnit u : getUnits()) {&#xA;&#x9;result += u.render() + &quot; &quot;;&#xA;}&#xA;return result;"/>
          </eAnnotations>
        </eOperations>
        <eStructuralFeatures xsi:type="ecore:EReference" name="units" upperBound="-1"
            eType="#//ElementUnit" containment="true"/>
      </eClassifiers>
      <eClassifiers xsi:type="ecore:EClass" name="PrimitiveUnit" abstract="true">
        <eStructuralFeatures xsi:type="ecore:EAttribute" name="prefix" eType="#//EPrefix"/>
      </eClassifiers>
      <eClassifiers xsi:type="ecore:EClass" name="BasicUnit" abstract="true" eSuperTypes="#//ElementUnit"/>
      <eClassifiers xsi:type="ecore:EClass" name="ElementUnit">
        <eOperations name="render" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
      </eClassifiers>
      <eClassifiers xsi:type="ecore:EEnum" name="EPrefix">
        <eLiterals name="noP" literal="noP"/>
        <eLiterals name="yotta" value="24" literal="Y"/>
        <eLiterals name="zetta" value="21" literal="Z"/>
        <eLiterals name="exa" value="18" literal="E"/>
        <eLiterals name="peta" value="15" literal="P"/>
        <eLiterals name="tera" value="12" literal="T"/>
        <eLiterals name="giga" value="9" literal="G"/>
        <eLiterals name="mega" value="6" literal="M"/>
        <eLiterals name="kilo" value="3" literal="k"/>
        <eLiterals name="hecto" value="2" literal="h"/>
        <eLiterals name="deca" value="1" literal="da"/>
        <eLiterals name="deci" value="-1" literal="d"/>
        <eLiterals name="centi" value="-2" literal="c"/>
        <eLiterals name="mili" value="-3" literal="m"/>
        <eLiterals name="micro" value="-6" literal="mu"/>
        <eLiterals name="nano" value="-9" literal="n"/>
        <eLiterals name="pico" value="-12" literal="p"/>
        <eLiterals name="femto" value="-15" literal="f"/>
        <eLiterals name="atto" value="-18" literal="a"/>
        <eLiterals name="zepto" value="-21" literal="z"/>
        <eLiterals name="yocto" value="-24" literal="y"/>
      </eClassifiers>
      <eClassifiers xsi:type="ecore:EClass" name="SIUnit" eSuperTypes="#//PrimitiveUnit #//BasicUnit">
        <eOperations name="render" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
          <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
            <details key="body" value="if (this.getPrefix() == org.oceandsl.declaration.units.EPrefix.NO_P)&#xA;    return this.getType().getLiteral();&#xA;else&#xA;   return this.getPrefix().getLiteral() + this.getType().getLiteral();"/>
          </eAnnotations>
        </eOperations>
        <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" lowerBound="1" eType="#//ESIUnitType"/>
      </eClassifiers>
      <eClassifiers xsi:type="ecore:EEnum" name="ESIUnitType">
        <eLiterals name="meter" literal="m"/>
        <eLiterals name="gram" value="1" literal="g"/>
        <eLiterals name="ton" value="2"/>
        <eLiterals name="second" value="3" literal="s"/>
        <eLiterals name="ampere" value="4" literal="A"/>
        <eLiterals name="kelvin" value="5" literal="K"/>
        <eLiterals name="mole" value="6" literal="mol"/>
        <eLiterals name="candela" value="7" literal="ca"/>
        <eLiterals name="pascal" value="8" literal="Pa"/>
        <eLiterals name="joule" value="9" literal="J"/>
        <eLiterals name="celcius" value="10" literal="C°"/>
      </eClassifiers>
      <eClassifiers xsi:type="ecore:EClass" name="CustomUnit" eSuperTypes="#//PrimitiveUnit #//BasicUnit">
        <eOperations name="render" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
          <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
            <details key="body" value="if (this.getPrefix() == org.oceandsl.declaration.units.EPrefix.NO_P)&#xA;    return this.getName();&#xA;else&#xA;   return this.getPrefix().getLiteral() + &quot; &quot; + this.getName();"/>
          </eAnnotations>
        </eOperations>
        <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
      </eClassifiers>
      <eClassifiers xsi:type="ecore:EClass" name="ComposedUnit" eSuperTypes="#//ElementUnit">
        <eOperations name="render" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
          <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
            <details key="body" value="if (exponent != null) {&#xA;&#x9;return numerator.render() + &quot;^&quot; + exponent;&#xA;} else {&#xA;&#x9;return numerator.render() + &quot;/&quot; + denominator.render();&#xA;}"/>
          </eAnnotations>
        </eOperations>
        <eStructuralFeatures xsi:type="ecore:EReference" name="numerator" eType="#//BasicUnit"
            containment="true"/>
        <eStructuralFeatures xsi:type="ecore:EReference" name="denominator" eType="#//BasicUnit"
            containment="true"/>
        <eStructuralFeatures xsi:type="ecore:EAttribute" name="exponent" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELongObject"/>
      </eClassifiers>
    </ecore:EPackage>