Skip to content
Snippets Groups Projects
Commit 3c199e26 authored by Gabor Szarnyas's avatar Gabor Szarnyas
Browse files

Migrated EMF metamodel from ecorediag to xcore. Fixes #72

parent bf60f57f
No related branches found
No related tags found
No related merge requests found
Showing
with 9761 additions and 10862 deletions
sourceSets {
main {
java.srcDirs = ['src', 'src-gen']
resources.srcDirs = ['src', 'src-gen']
xtendOutputDir = 'xtend-gen'
}
test {
java.srcDirs = []
resources.srcDirs = []
}
}
sourceSets.all {
resources.exclude '**/*.g', '**/*.xtext', '**/*.mwe2', '**/*.xtend', '**/*._trace'
}
jar {
from('model') {
into('model')
}
manifest {
attributes 'Bundle-SymbolicName': project.name
}
}
plugins.withId('war') {
webAppDirName = "WebRoot"
}
plugins.withId('org.xtext.idea-plugin') {
assembleSandbox.metaInf.from('META-INF')
}
......@@ -20,11 +20,6 @@ jar {
}
}
plugins.withId('war') {
webAppDirName = "src/main/webapp"
}
plugins.withId('org.xtext.idea-plugin') {
assembleSandbox.metaInf.from('src/main/resources/META-INF')
}
Source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java">
<classpathentry kind="src" path="src">
<attributes>
<attribute name="FROM_GRADLE_MODEL" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="build/xcore/main">
<attributes>
<attribute name="FROM_GRADLE_MODEL" value="true"/>
</attributes>
......
......@@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
......@@ -30,5 +35,6 @@
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
......@@ -3,13 +3,3 @@ Bundle-ManifestVersion: 2
Bundle-Name: Railway EMF Model
Bundle-SymbolicName: trainbenchmark-format-emf-model;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: hu.bme.mit.trainbenchmark.railway,
hu.bme.mit.trainbenchmark.railway.impl,
hu.bme.mit.trainbenchmark.railway.util
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
plugins {
id "org.xtext.builder" version "1.0.0"
}
apply plugin: 'org.xtext.xtend'
apply from: "${rootDir}/gradle/source-layout-xcore.gradle"
ext {
xtextVersion = '2.10.0'
}
dependencies {
compile group: 'org.eclipse.emf', name: 'org.eclipse.emf.common', version: emfVersion
compile group: 'org.eclipse.emf', name: 'org.eclipse.emf.ecore.xmi', version: emfVersion
compile group: 'org.eclipse.emf', name: 'org.eclipse.emf.ecore', version: emfVersion
compile "org.eclipse.xtext:org.eclipse.xtext.xbase:${xtextVersion}"
compile 'org.eclipse.emf:org.eclipse.emf.ecore.xcore.lib:+'
testCompile group: 'junit', name: 'junit', version: junitVersion
xtextLanguages 'org.eclipse.emf:org.eclipse.emf.ecore.xcore:+'
xtextLanguages 'org.eclipse.emf:org.eclipse.emf.ecore.xcore.lib:+'
xtextLanguages 'org.eclipse.emf:org.eclipse.emf.codegen.ecore:+'
xtextLanguages 'org.eclipse.emf:org.eclipse.emf.codegen.ecore.xtext:+'
xtextLanguages "org.eclipse.xtext:org.eclipse.xtext.ecore:${xtextVersion}"
}
sourceSets {
main {
resources {
exclude '**/*.xcore'
}
}
}
xtext {
version = "${xtextVersion}"
languages {
ecore {
setup = 'org.eclipse.xtext.ecore.EcoreSupport'
}
codegen {
setup = 'org.eclipse.emf.codegen.ecore.xtext.GenModelSupport'
}
xcore {
setup = 'org.eclipse.emf.ecore.xcore.XcoreStandaloneSetup'
generator.outlet.producesJava = true
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<notation:Diagram 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" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_YIrXkFPbEeCLuajbZvk0sQ" type="EcoreTools" measurementUnit="Pixel">
<children xmi:type="notation:Node" xmi:id="_YIvB8FPbEeCLuajbZvk0sQ" type="1001">
<children xmi:type="notation:Node" xmi:id="_YIvpAFPbEeCLuajbZvk0sQ" type="4001"/>
<children xmi:type="notation:Node" xmi:id="_YIvpAVPbEeCLuajbZvk0sQ" visible="false" type="5001">
<styles xmi:type="notation:DrawerStyle" xmi:id="_YIvpAlPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_YIvpA1PbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_YIwQEFPbEeCLuajbZvk0sQ"/>
</children>
<children xmi:type="notation:Node" xmi:id="_YIwQEVPbEeCLuajbZvk0sQ" visible="false" type="5002">
<styles xmi:type="notation:DrawerStyle" xmi:id="_YIwQElPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_YIwQE1PbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_YIwQFFPbEeCLuajbZvk0sQ"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_YIvB8VPbEeCLuajbZvk0sQ" fontColor="4210752" fontName="Sans" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
<element xmi:type="ecore:EClass" href="railway.ecore#//Segment"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_YIvB8lPbEeCLuajbZvk0sQ" x="300" y="192"/>
</children>
<children xmi:type="notation:Node" xmi:id="_YIw3IlPbEeCLuajbZvk0sQ" type="1001">
<children xmi:type="notation:Node" xmi:id="_YIxeMFPbEeCLuajbZvk0sQ" type="4001"/>
<children xmi:type="notation:Node" xmi:id="_YIxeMVPbEeCLuajbZvk0sQ" visible="false" type="5001">
<styles xmi:type="notation:DrawerStyle" xmi:id="_YIxeMlPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_YIxeM1PbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_YIxeNFPbEeCLuajbZvk0sQ"/>
</children>
<children xmi:type="notation:Node" xmi:id="_YIyFQFPbEeCLuajbZvk0sQ" visible="false" type="5002">
<styles xmi:type="notation:DrawerStyle" xmi:id="_YIyFQVPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_YIyFQlPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_YIyFQ1PbEeCLuajbZvk0sQ"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_YIw3I1PbEeCLuajbZvk0sQ" fontColor="4210752" fontName="Sans" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
<element xmi:type="ecore:EClass" href="railway.ecore#//TrackElement"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_YIw3JFPbEeCLuajbZvk0sQ" x="348" y="120"/>
</children>
<children xmi:type="notation:Node" xmi:id="_YIyFRFPbEeCLuajbZvk0sQ" type="1001">
<children xmi:type="notation:Node" xmi:id="_YIysUFPbEeCLuajbZvk0sQ" type="4001"/>
<children xmi:type="notation:Node" xmi:id="_YIysUVPbEeCLuajbZvk0sQ" visible="false" type="5001">
<styles xmi:type="notation:DrawerStyle" xmi:id="_YIysUlPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_YIysU1PbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_YIysVFPbEeCLuajbZvk0sQ"/>
</children>
<children xmi:type="notation:Node" xmi:id="_YIzTYFPbEeCLuajbZvk0sQ" visible="false" type="5002">
<styles xmi:type="notation:DrawerStyle" xmi:id="_YIzTYVPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_YIzTYlPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_YIzTY1PbEeCLuajbZvk0sQ"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_YIyFRVPbEeCLuajbZvk0sQ" fontColor="4210752" fontName="Sans" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
<element xmi:type="ecore:EClass" href="railway.ecore#//Switch"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_YIyFRlPbEeCLuajbZvk0sQ" x="420" y="192"/>
</children>
<children xmi:type="notation:Node" xmi:id="_YIz6cFPbEeCLuajbZvk0sQ" type="1001">
<children xmi:type="notation:Node" xmi:id="_YI0hgFPbEeCLuajbZvk0sQ" type="4001"/>
<children xmi:type="notation:Node" xmi:id="_YI0hgVPbEeCLuajbZvk0sQ" visible="false" type="5001">
<styles xmi:type="notation:DrawerStyle" xmi:id="_YI0hglPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_YI0hg1PbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_YI0hhFPbEeCLuajbZvk0sQ"/>
</children>
<children xmi:type="notation:Node" xmi:id="_YI0hhVPbEeCLuajbZvk0sQ" visible="false" type="5002">
<styles xmi:type="notation:DrawerStyle" xmi:id="_YI0hhlPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_YI0hh1PbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_YI0hiFPbEeCLuajbZvk0sQ"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_YIz6cVPbEeCLuajbZvk0sQ" fontColor="4210752" fontName="Sans" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
<element xmi:type="ecore:EClass" href="railway.ecore#//Route"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_YIz6clPbEeCLuajbZvk0sQ" x="120" y="120"/>
</children>
<children xmi:type="notation:Node" xmi:id="_YI1IkFPbEeCLuajbZvk0sQ" type="1001">
<children xmi:type="notation:Node" xmi:id="_YI1voFPbEeCLuajbZvk0sQ" type="4001"/>
<children xmi:type="notation:Node" xmi:id="_YI1voVPbEeCLuajbZvk0sQ" visible="false" type="5001">
<styles xmi:type="notation:DrawerStyle" xmi:id="_YI1volPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_YI1vo1PbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_YI1vpFPbEeCLuajbZvk0sQ"/>
</children>
<children xmi:type="notation:Node" xmi:id="_YI1vpVPbEeCLuajbZvk0sQ" visible="false" type="5002">
<styles xmi:type="notation:DrawerStyle" xmi:id="_YI1vplPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_YI1vp1PbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_YI1vqFPbEeCLuajbZvk0sQ"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_YI1IkVPbEeCLuajbZvk0sQ" fontColor="4210752" fontName="Sans" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
<element xmi:type="ecore:EClass" href="railway.ecore#//Semaphore"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_YI1IklPbEeCLuajbZvk0sQ" x="12" y="120"/>
</children>
<children xmi:type="notation:Node" xmi:id="_YI2WslPbEeCLuajbZvk0sQ" type="1001">
<children xmi:type="notation:Node" xmi:id="_YI29wFPbEeCLuajbZvk0sQ" type="4001"/>
<children xmi:type="notation:Node" xmi:id="_YI29wVPbEeCLuajbZvk0sQ" visible="false" type="5001">
<styles xmi:type="notation:DrawerStyle" xmi:id="_YI29wlPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_YI29w1PbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_YI29xFPbEeCLuajbZvk0sQ"/>
</children>
<children xmi:type="notation:Node" xmi:id="_YI3k0FPbEeCLuajbZvk0sQ" visible="false" type="5002">
<styles xmi:type="notation:DrawerStyle" xmi:id="_YI3k0VPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_YI3k0lPbEeCLuajbZvk0sQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_YI3k01PbEeCLuajbZvk0sQ"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_YI2Ws1PbEeCLuajbZvk0sQ" fontColor="4210752" fontName="Sans" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
<element xmi:type="ecore:EClass" href="railway.ecore#//SwitchPosition"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_YI2WtFPbEeCLuajbZvk0sQ" x="228" y="120"/>
</children>
<children xmi:type="notation:Node" xmi:id="_3nS5wL5qEeSb4rvYDoorGA" type="1001">
<children xmi:type="notation:Node" xmi:id="_3nXLML5qEeSb4rvYDoorGA" type="4001"/>
<children xmi:type="notation:Node" xmi:id="_3nXyQL5qEeSb4rvYDoorGA" type="5001">
<children xmi:type="notation:Node" xmi:id="_7jsCQMTKEeSWUvsSPwDMrw" type="2001">
<element xmi:type="ecore:EAttribute" href="railway.ecore#//RailwayElement/id"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_7jsCQcTKEeSWUvsSPwDMrw"/>
</children>
<styles xmi:type="notation:DrawerStyle" xmi:id="_3nXyQb5qEeSb4rvYDoorGA"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_3nXyQr5qEeSb4rvYDoorGA"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_3nXyQ75qEeSb4rvYDoorGA"/>
</children>
<children xmi:type="notation:Node" xmi:id="_3nYZUL5qEeSb4rvYDoorGA" type="5002">
<styles xmi:type="notation:DrawerStyle" xmi:id="_3nYZUb5qEeSb4rvYDoorGA"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_3nYZUr5qEeSb4rvYDoorGA"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_3nYZU75qEeSb4rvYDoorGA"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_3nS5wb5qEeSb4rvYDoorGA" fontColor="4210752" fontName="Sans" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
<element xmi:type="ecore:EClass" href="railway.ecore#//RailwayElement"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_3nS5wr5qEeSb4rvYDoorGA" x="228" y="12"/>
</children>
<children xmi:type="notation:Node" xmi:id="_sBE04MUKEeSWUvsSPwDMrw" type="1001">
<children xmi:type="notation:Node" xmi:id="_sBFb8MUKEeSWUvsSPwDMrw" type="4001"/>
<children xmi:type="notation:Node" xmi:id="_sBGDAMUKEeSWUvsSPwDMrw" visible="false" type="5001">
<styles xmi:type="notation:DrawerStyle" xmi:id="_sBGDAcUKEeSWUvsSPwDMrw"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_sBGDAsUKEeSWUvsSPwDMrw"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_sBGDA8UKEeSWUvsSPwDMrw"/>
</children>
<children xmi:type="notation:Node" xmi:id="_sBGqEMUKEeSWUvsSPwDMrw" visible="false" type="5002">
<styles xmi:type="notation:DrawerStyle" xmi:id="_sBGqEcUKEeSWUvsSPwDMrw"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_sBGqEsUKEeSWUvsSPwDMrw"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_sBGqE8UKEeSWUvsSPwDMrw"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_sBE04cUKEeSWUvsSPwDMrw" fontColor="4210752" fontName="Sans" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
<element xmi:type="ecore:EClass" href="railway.ecore#//Sensor"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_sBE04sUKEeSWUvsSPwDMrw" x="468" y="120"/>
</children>
<children xmi:type="notation:Node" xmi:id="_OWX6sL0MEeWJb8T49F7LJw" type="1001">
<children xmi:type="notation:Node" xmi:id="_OWblEL0MEeWJb8T49F7LJw" type="4001"/>
<children xmi:type="notation:Node" xmi:id="_OWblEb0MEeWJb8T49F7LJw" visible="false" type="5001">
<styles xmi:type="notation:DrawerStyle" xmi:id="_OWblEr0MEeWJb8T49F7LJw"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_OWblE70MEeWJb8T49F7LJw"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_OWblFL0MEeWJb8T49F7LJw"/>
</children>
<children xmi:type="notation:Node" xmi:id="_OWcMIL0MEeWJb8T49F7LJw" visible="false" type="5002">
<styles xmi:type="notation:DrawerStyle" xmi:id="_OWcMIb0MEeWJb8T49F7LJw"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_OWcMIr0MEeWJb8T49F7LJw"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_OWcMI70MEeWJb8T49F7LJw"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_OWX6sb0MEeWJb8T49F7LJw" fontColor="4210752" fontName="Sans" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
<element xmi:type="ecore:EClass" href="railway.ecore#//Region"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_OWX6sr0MEeWJb8T49F7LJw" x="-96" y="120"/>
</children>
<children xmi:type="notation:Node" xmi:id="_LlCAYOuvEeWyvt1fVccpMQ" type="1005">
<children xmi:type="notation:Node" xmi:id="_LlCncOuvEeWyvt1fVccpMQ" type="4010"/>
<children xmi:type="notation:Node" xmi:id="_LlCnceuvEeWyvt1fVccpMQ" type="5008">
<styles xmi:type="notation:DrawerStyle" xmi:id="_LlCncuuvEeWyvt1fVccpMQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_LlCnc-uvEeWyvt1fVccpMQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_LlCndOuvEeWyvt1fVccpMQ"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_LlCAYeuvEeWyvt1fVccpMQ" fontColor="4210752" fontName="Noto Sans" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
<element xmi:type="ecore:EEnum" href="railway.ecore#//Position"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_LlCAYuuvEeWyvt1fVccpMQ" x="-84" y="180" width="123"/>
</children>
<children xmi:type="notation:Node" xmi:id="_LlDOgOuvEeWyvt1fVccpMQ" type="1005">
<children xmi:type="notation:Node" xmi:id="_LlDOg-uvEeWyvt1fVccpMQ" type="4010"/>
<children xmi:type="notation:Node" xmi:id="_LlD1kOuvEeWyvt1fVccpMQ" type="5008">
<styles xmi:type="notation:DrawerStyle" xmi:id="_LlD1keuvEeWyvt1fVccpMQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_LlD1kuuvEeWyvt1fVccpMQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_LlD1k-uvEeWyvt1fVccpMQ"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_LlDOgeuvEeWyvt1fVccpMQ" fontColor="4210752" fontName="Noto Sans" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
<element xmi:type="ecore:EEnum" href="railway.ecore#//Signal"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_LlDOguuvEeWyvt1fVccpMQ" x="48" y="180" width="123"/>
</children>
<styles xmi:type="notation:DiagramStyle" xmi:id="_YIrXkVPbEeCLuajbZvk0sQ"/>
<element xmi:type="ecore:EPackage" href="railway.ecore#/"/>
<edges xmi:type="notation:Edge" xmi:id="_YJAHs1PbEeCLuajbZvk0sQ" type="3003" source="_YIvB8FPbEeCLuajbZvk0sQ" target="_YIw3IlPbEeCLuajbZvk0sQ">
<styles xmi:type="notation:ConnectorStyle" xmi:id="_YJAHtFPbEeCLuajbZvk0sQ" routing="Rectilinear" lineColor="4210752"/>
<styles xmi:type="notation:FontStyle" xmi:id="_YJAHtVPbEeCLuajbZvk0sQ" fontName="Sans"/>
<element xsi:nil="true"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YJAHtlPbEeCLuajbZvk0sQ" points="[-2, 0, -60, 58]$[-2, -24, -60, 34]$[70, -24, 12, 34]$[70, -58, 12, 0]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YLVC8VPbEeCLuajbZvk0sQ" id="(0.5,0.0)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YLVqAFPbEeCLuajbZvk0sQ" id="(0.3274336283185841,1.0)"/>
</edges>
<edges xmi:type="notation:Edge" xmi:id="_YJCj9FPbEeCLuajbZvk0sQ" type="3003" source="_YIyFRFPbEeCLuajbZvk0sQ" target="_YIw3IlPbEeCLuajbZvk0sQ">
<styles xmi:type="notation:ConnectorStyle" xmi:id="_YJCj9VPbEeCLuajbZvk0sQ" routing="Rectilinear" lineColor="4210752"/>
<styles xmi:type="notation:FontStyle" xmi:id="_YJCj9lPbEeCLuajbZvk0sQ" fontName="Sans"/>
<element xsi:nil="true"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YJCj91PbEeCLuajbZvk0sQ" points="[12, 0, 37, 58]$[12, -24, 37, 34]$[-50, -24, -25, 34]$[-50, -58, -25, 0]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YLUb4FPbEeCLuajbZvk0sQ" id="(0.5,0.0)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YLUb4VPbEeCLuajbZvk0sQ" id="(0.6637168141592921,1.0)"/>
</edges>
<edges xmi:type="notation:Edge" xmi:id="_3ng8ML5qEeSb4rvYDoorGA" type="3003" source="_YIw3IlPbEeCLuajbZvk0sQ" target="_3nS5wL5qEeSb4rvYDoorGA">
<styles xmi:type="notation:ConnectorStyle" xmi:id="_3ng8Mb5qEeSb4rvYDoorGA" routing="Rectilinear" lineColor="4210752"/>
<styles xmi:type="notation:FontStyle" xmi:id="_3ng8Mr5qEeSb4rvYDoorGA" fontName="Sans"/>
<element xsi:nil="true"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3ng8M75qEeSb4rvYDoorGA" points="[0, 0, 160, 59]$[0, -24, 160, 35]$[-115, -24, 45, 35]$[-115, -59, 45, 0]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_e7LVoMUKEeSWUvsSPwDMrw" id="(0.49557522123893805,0.0)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_e7LVocUKEeSWUvsSPwDMrw" id="(0.11864406779661017,1.0)"/>
</edges>
<edges xmi:type="notation:Edge" xmi:id="_3nixYL5qEeSb4rvYDoorGA" type="3003" source="_YIz6cFPbEeCLuajbZvk0sQ" target="_3nS5wL5qEeSb4rvYDoorGA">
<styles xmi:type="notation:ConnectorStyle" xmi:id="_3nixYb5qEeSb4rvYDoorGA" routing="Rectilinear" lineColor="4210752"/>
<styles xmi:type="notation:FontStyle" xmi:id="_3nixYr5qEeSb4rvYDoorGA" fontName="Sans"/>
<element xsi:nil="true"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3nixY75qEeSb4rvYDoorGA" points="[1, 0, -117, 62]$[1, -24, -117, 38]$[118, -24, 0, 38]$[118, -59, 0, 3]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_e7L8sMUKEeSWUvsSPwDMrw" id="(0.5,0.0)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_e7L8scUKEeSWUvsSPwDMrw" id="(0.4745762711864407,0.9454545454545454)"/>
</edges>
<edges xmi:type="notation:Edge" xmi:id="_3nj_gL5qEeSb4rvYDoorGA" type="3003" source="_YI1IkFPbEeCLuajbZvk0sQ" target="_3nS5wL5qEeSb4rvYDoorGA">
<styles xmi:type="notation:ConnectorStyle" xmi:id="_3nj_gb5qEeSb4rvYDoorGA" routing="Rectilinear" lineColor="4210752"/>
<styles xmi:type="notation:FontStyle" xmi:id="_3nj_gr5qEeSb4rvYDoorGA" fontName="Sans"/>
<element xsi:nil="true"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3nj_g75qEeSb4rvYDoorGA" points="[-19, -3, -214, 62]$[-19, -27, -214, 38]$[195, -27, 0, 38]$[195, -62, 0, 3]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_e7JgcMUKEeSWUvsSPwDMrw" id="(0.8137254901960784,0.1)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_e7JgccUKEeSWUvsSPwDMrw" id="(0.4745762711864407,0.9454545454545454)"/>
</edges>
<edges xmi:type="notation:Edge" xmi:id="_3nkmkL5qEeSb4rvYDoorGA" type="3003" source="_YI2WslPbEeCLuajbZvk0sQ" target="_3nS5wL5qEeSb4rvYDoorGA">
<styles xmi:type="notation:ConnectorStyle" xmi:id="_3nkmkb5qEeSb4rvYDoorGA" routing="Rectilinear" lineColor="4210752"/>
<styles xmi:type="notation:FontStyle" xmi:id="_3nkmkr5qEeSb4rvYDoorGA" fontName="Sans"/>
<element xsi:nil="true"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3nkmk75qEeSb4rvYDoorGA" points="[3, 0, -19, 60]$[3, -59, -19, 1]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_e7KukMUKEeSWUvsSPwDMrw" id="(0.5,0.0)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_e7KukcUKEeSWUvsSPwDMrw" id="(0.6186440677966102,0.9818181818181818)"/>
</edges>
<edges xmi:type="notation:Edge" xmi:id="_sBMwsMUKEeSWUvsSPwDMrw" type="3003" source="_sBE04MUKEeSWUvsSPwDMrw" target="_3nS5wL5qEeSb4rvYDoorGA">
<styles xmi:type="notation:ConnectorStyle" xmi:id="_sBMwscUKEeSWUvsSPwDMrw" routing="Rectilinear" lineColor="4210752"/>
<styles xmi:type="notation:FontStyle" xmi:id="_sBMwssUKEeSWUvsSPwDMrw" fontName="Sans"/>
<element xsi:nil="true"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_sBMws8UKEeSWUvsSPwDMrw" points="[21, 0, 205, 59]$[21, -24, 205, 35]$[-230, -24, -46, 35]$[-230, -59, -46, 0]"/>
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_wE2MUMUKEeSWUvsSPwDMrw" id="(0.5,0.0)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_wE2MUcUKEeSWUvsSPwDMrw" id="(0.8305084745762712,1.0)"/>
</edges>
<edges xmi:type="notation:Edge" xmi:id="_aocwUL0MEeWJb8T49F7LJw" type="3003" source="_OWX6sL0MEeWJb8T49F7LJw" target="_3nS5wL5qEeSb4rvYDoorGA">
<styles xmi:type="notation:ConnectorStyle" xmi:id="_aocwUb0MEeWJb8T49F7LJw" routing="Rectilinear" lineColor="4210752"/>
<styles xmi:type="notation:FontStyle" xmi:id="_aocwUr0MEeWJb8T49F7LJw" fontName="Sans"/>
<element xsi:nil="true"/>
<bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_aocwU70MEeWJb8T49F7LJw" points="[1, -19, -337, 84]$[1, -43, -337, 60]$[334, -43, -4, 60]$[334, -78, -4, 25]"/>
</edges>
</notation:Diagram>
<?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="railway" nsURI="http://www.semanticweb.org/ontologies/2015/trainbenchmark"
nsPrefix="hu.bme.mit.trainbenchmark">
<eClassifiers xsi:type="ecore:EClass" name="Segment" eSuperTypes="#//TrackElement">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="length" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="semaphores" upperBound="-1"
eType="#//Semaphore" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="TrackElement" abstract="true" eSuperTypes="#//RailwayElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="monitoredBy" upperBound="-1"
eType="#//Sensor" eOpposite="#//Sensor/monitors"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="connectsTo" upperBound="-1"
eType="#//TrackElement"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Switch" eSuperTypes="#//TrackElement">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="currentPosition" lowerBound="1"
eType="#//Position"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="positions" upperBound="-1"
eType="#//SwitchPosition" eOpposite="#//SwitchPosition/target"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Route" eSuperTypes="#//RailwayElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="entry" lowerBound="1" eType="#//Semaphore"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="follows" upperBound="-1"
eType="#//SwitchPosition" containment="true" eOpposite="#//SwitchPosition/route"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="exit" lowerBound="1" eType="#//Semaphore"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="requires" lowerBound="2"
upperBound="-1" eType="#//Sensor"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="active" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Semaphore" eSuperTypes="#//RailwayElement">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="signal" lowerBound="1"
eType="#//Signal"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="SwitchPosition" eSuperTypes="#//RailwayElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="target" lowerBound="1"
eType="#//Switch" eOpposite="#//Switch/positions"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="position" lowerBound="1"
eType="#//Position"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="route" lowerBound="1" eType="#//Route"
eOpposite="#//Route/follows"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="RailwayElement" abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Sensor" eSuperTypes="#//RailwayElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="monitors" upperBound="-1"
eType="#//TrackElement" eOpposite="#//TrackElement/monitoredBy"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="Signal">
<eLiterals name="FAILURE" value="1"/>
<eLiterals name="STOP"/>
<eLiterals name="GO" value="2"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="Position">
<eLiterals name="FAILURE"/>
<eLiterals name="STRAIGHT" value="1"/>
<eLiterals name="DIVERGING" value="2"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="RailwayContainer">
<eStructuralFeatures xsi:type="ecore:EReference" name="routes" upperBound="-1"
eType="#//Route" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="regions" upperBound="-1"
eType="#//Region" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Region" eSuperTypes="#//RailwayElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1"
eType="#//TrackElement" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="sensors" upperBound="-1"
eType="#//Sensor" containment="true"/>
</eClassifiers>
</ecore:EPackage>
<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/trainbenchmark-format-emf-model/src/main/java"
modelPluginID="trainbenchmark-format-emf-model" modelName="Railway" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
importerID="org.eclipse.emf.importer.ecore" complianceLevel="8.0" copyrightFields="false"
operationReflection="true" importOrganizing="true">
<foreignModel>railway.ecore</foreignModel>
<genPackages prefix="Railway" basePackage="hu.bme.mit.trainbenchmark" disposableProviderFactory="true"
ecorePackage="railway.ecore#/" publicationLocation="">
<genEnums typeSafeEnumCompatible="false" ecoreEnum="railway.ecore#//Signal">
<genEnumLiterals ecoreEnumLiteral="railway.ecore#//Signal/FAILURE"/>
<genEnumLiterals ecoreEnumLiteral="railway.ecore#//Signal/STOP"/>
<genEnumLiterals ecoreEnumLiteral="railway.ecore#//Signal/GO"/>
</genEnums>
<genEnums typeSafeEnumCompatible="false" ecoreEnum="railway.ecore#//Position">
<genEnumLiterals ecoreEnumLiteral="railway.ecore#//Position/FAILURE"/>
<genEnumLiterals ecoreEnumLiteral="railway.ecore#//Position/STRAIGHT"/>
<genEnumLiterals ecoreEnumLiteral="railway.ecore#//Position/DIVERGING"/>
</genEnums>
<genClasses ecoreClass="railway.ecore#//Segment">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute railway.ecore#//Segment/length"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference railway.ecore#//Segment/semaphores"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference railway.ecore#//Segment/neighbors"/>
</genClasses>
<genClasses image="false" ecoreClass="railway.ecore#//TrackElement">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference railway.ecore#//TrackElement/monitoredBy"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference railway.ecore#//TrackElement/connectsTo"/>
</genClasses>
<genClasses ecoreClass="railway.ecore#//Switch">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute railway.ecore#//Switch/currentPosition"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference railway.ecore#//Switch/positions"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference railway.ecore#//Switch/left"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference railway.ecore#//Switch/right"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference railway.ecore#//Switch/from"/>
</genClasses>
<genClasses ecoreClass="railway.ecore#//Route">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference railway.ecore#//Route/entry"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference railway.ecore#//Route/follows"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference railway.ecore#//Route/exit"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference railway.ecore#//Route/requires"/>
</genClasses>
<genClasses ecoreClass="railway.ecore#//Semaphore">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute railway.ecore#//Semaphore/signal"/>
</genClasses>
<genClasses ecoreClass="railway.ecore#//SwitchPosition">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference railway.ecore#//SwitchPosition/target"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute railway.ecore#//SwitchPosition/position"/>
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference railway.ecore#//SwitchPosition/route"/>
</genClasses>
<genClasses image="false" ecoreClass="railway.ecore#//RailwayElement">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute railway.ecore#//RailwayElement/id"/>
</genClasses>
<genClasses ecoreClass="railway.ecore#//Sensor">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference railway.ecore#//Sensor/monitors"/>
</genClasses>
<genClasses ecoreClass="railway.ecore#//RailwayContainer">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference railway.ecore#//RailwayContainer/routes"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference railway.ecore#//RailwayContainer/regions"/>
</genClasses>
<genClasses ecoreClass="railway.ecore#//Region">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference railway.ecore#//Region/elements"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference railway.ecore#//Region/sensors"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
......@@ -11,7 +11,7 @@
<package
uri="http://www.semanticweb.org/ontologies/2015/trainbenchmark"
class="hu.bme.mit.trainbenchmark.railway.RailwayPackage"
genModel="model/railway.genmodel"/>
genModel="src/railway.xcore"/>
</extension>
</plugin>
/**
*/
package hu.bme.mit.trainbenchmark.railway;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Position</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see hu.bme.mit.trainbenchmark.railway.RailwayPackage#getPosition()
* @model
* @generated
*/
public enum Position implements Enumerator {
/**
* The '<em><b>FAILURE</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #FAILURE_VALUE
* @generated
* @ordered
*/
FAILURE(0, "FAILURE", "FAILURE"),
/**
* The '<em><b>STRAIGHT</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #STRAIGHT_VALUE
* @generated
* @ordered
*/
STRAIGHT(1, "STRAIGHT", "STRAIGHT"),
/**
* The '<em><b>DIVERGING</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #DIVERGING_VALUE
* @generated
* @ordered
*/
DIVERGING(2, "DIVERGING", "DIVERGING");
/**
* The '<em><b>FAILURE</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>FAILURE</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #FAILURE
* @model
* @generated
* @ordered
*/
public static final int FAILURE_VALUE = 0;
/**
* The '<em><b>STRAIGHT</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>STRAIGHT</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #STRAIGHT
* @model
* @generated
* @ordered
*/
public static final int STRAIGHT_VALUE = 1;
/**
* The '<em><b>DIVERGING</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>DIVERGING</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #DIVERGING
* @model
* @generated
* @ordered
*/
public static final int DIVERGING_VALUE = 2;
/**
* An array of all the '<em><b>Position</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final Position[] VALUES_ARRAY =
new Position[] {
FAILURE,
STRAIGHT,
DIVERGING,
};
/**
* A public read-only list of all the '<em><b>Position</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<Position> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Position</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param literal the literal.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static Position get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
Position result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Position</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name the name.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static Position getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
Position result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Position</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the integer value.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static Position get(int value) {
switch (value) {
case FAILURE_VALUE: return FAILURE;
case STRAIGHT_VALUE: return STRAIGHT;
case DIVERGING_VALUE: return DIVERGING;
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final int value;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String name;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private Position(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //Position
/**
*/
package hu.bme.mit.trainbenchmark.railway;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Container</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link hu.bme.mit.trainbenchmark.railway.RailwayContainer#getRoutes <em>Routes</em>}</li>
* <li>{@link hu.bme.mit.trainbenchmark.railway.RailwayContainer#getRegions <em>Regions</em>}</li>
* </ul>
*
* @see hu.bme.mit.trainbenchmark.railway.RailwayPackage#getRailwayContainer()
* @model
* @generated
*/
public interface RailwayContainer extends EObject {
/**
* Returns the value of the '<em><b>Routes</b></em>' containment reference list.
* The list contents are of type {@link hu.bme.mit.trainbenchmark.railway.Route}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Routes</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Routes</em>' containment reference list.
* @see hu.bme.mit.trainbenchmark.railway.RailwayPackage#getRailwayContainer_Routes()
* @model containment="true"
* @generated
*/
EList<Route> getRoutes();
/**
* Returns the value of the '<em><b>Regions</b></em>' containment reference list.
* The list contents are of type {@link hu.bme.mit.trainbenchmark.railway.Region}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Regions</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Regions</em>' containment reference list.
* @see hu.bme.mit.trainbenchmark.railway.RailwayPackage#getRailwayContainer_Regions()
* @model containment="true"
* @generated
*/
EList<Region> getRegions();
} // RailwayContainer
/**
*/
package hu.bme.mit.trainbenchmark.railway;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Element</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link hu.bme.mit.trainbenchmark.railway.RailwayElement#getId <em>Id</em>}</li>
* </ul>
*
* @see hu.bme.mit.trainbenchmark.railway.RailwayPackage#getRailwayElement()
* @model abstract="true"
* @generated
*/
public interface RailwayElement extends EObject {
/**
* Returns the value of the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Id</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Id</em>' attribute.
* @see #setId(int)
* @see hu.bme.mit.trainbenchmark.railway.RailwayPackage#getRailwayElement_Id()
* @model
* @generated
*/
int getId();
/**
* Sets the value of the '{@link hu.bme.mit.trainbenchmark.railway.RailwayElement#getId <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Id</em>' attribute.
* @see #getId()
* @generated
*/
void setId(int value);
} // RailwayElement
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment