Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZoltan Ujhelyi2016-04-21 14:49:41 +0000
committerZoltan Ujhelyi2016-04-21 14:49:41 +0000
commit47146ad78755c87e3e6075dde268697a6b431953 (patch)
tree6603fcc6d1172d07dce08af830cb2fa784dec7f8
parente175d683ac9306e85c4bb2217a6f55ffd3d2bd4e (diff)
downloadorg.eclipse.viatra-47146ad78755c87e3e6075dde268697a6b431953.tar.gz
org.eclipse.viatra-47146ad78755c87e3e6075dde268697a6b431953.tar.xz
org.eclipse.viatra-47146ad78755c87e3e6075dde268697a6b431953.zip
[492189] Moved query examples to examples repository
-rw-r--r--examples/bpm/.gitignore11
-rw-r--r--examples/bpm/README.markdown4
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/.project22
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/META-INF/MANIFEST.MF6
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Other.process2
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Simple.operation7
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Simple.process5
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Simple.system13
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/build.properties5
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/pom.xml13
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.parent/.project11
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.parent/bpmtest.target42
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.parent/pom.xml45
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.classpath8
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.project28
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/META-INF/MANIFEST.MF15
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/build.properties6
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/plugin.xml14
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/pom.xml13
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/src-gen/org/eclipse/viatra/examples/bpm/queries/operation/.gitignore3
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/src-gen/org/eclipse/viatra/examples/bpm/queries/system/.gitignore1
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries/.classpath8
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries/.project40
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries/.settings/org.eclipse.incquery.patternlanguage.emf.EMFPatternLanguage.prefs7
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries/META-INF/MANIFEST.MF19
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries/build.properties6
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries/plugin.xml32
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries/pom.xml51
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries/src-gen/.gitignore5
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries/src/org/eclipse/viatra/examples/bpm/queries/operation/derivedFeatures.vql64
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.queries/src/org/eclipse/viatra/examples/bpm/queries/system/derivedFeatures.vql76
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/.classpath9
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/.project40
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/.settings/org.eclipse.xtend.core.Xtend.prefs2
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/META-INF/MANIFEST.MF22
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/build.properties9
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/model/Simple.operation7
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/model/Simple.process5
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/model/Simple.system13
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/plugin.xml5
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/pom.xml64
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/src-gen/.gitignore5
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/BPMTestsAll.java30
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/QueryBasedFeatureTest.xtend248
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/RuntimeListenerTest.xtend275
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/queries/bpmTestQueries.vql21
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/.classpath7
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/.project28
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/.settings/org.eclipse.core.resources.prefs13
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/.settings/org.eclipse.jdt.core.prefs11
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/META-INF/MANIFEST.MF24
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/build.properties14
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/emf-gen/.gitignore5
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/model/derivedModel.ecore39
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/model/derivedModel.ecorediag334
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/model/derivedModel.genmodel93
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/model/integrated.ecore4
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/model/integrated.ecorediag609
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/model/integration.ecore4
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/model/integration.ecorediag50
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/model/operation.ecore55
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/model/operation.ecorediag196
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/model/process.ecore29
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/model/process.ecorediag210
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/model/system.ecore73
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/model/system.ecorediag221
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/plugin.properties8
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/plugin.xml36
-rw-r--r--examples/bpm/org.eclipse.viatra.examples.bpm/pom.xml49
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/.classpath7
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/.project28
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/META-INF/MANIFEST.MF10
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/build.properties4
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoActivationStates.java28
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEvent.java43
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventFilter.java32
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventHandler.java68
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventSource.java68
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventSourceSpecification.java52
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventType.java22
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoRealm.java42
-rw-r--r--examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/protoapp/ProtoApp.java73
-rw-r--r--examples/headless-maven/incquery-demo-generic/.classpath36
-rw-r--r--examples/headless-maven/incquery-demo-generic/.project24
-rw-r--r--examples/headless-maven/incquery-demo-generic/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--examples/headless-maven/incquery-demo-generic/.settings/org.eclipse.m2e.core.prefs4
-rw-r--r--examples/headless-maven/incquery-demo-generic/.settings/org.sonar.ide.eclipse.core.prefs5
-rw-r--r--examples/headless-maven/incquery-demo-generic/pom.xml103
-rw-r--r--examples/headless-maven/incquery-demo-generic/src/main/java/hu/bme/mit/incquery/application/GenericIncQueryApplication.java88
-rw-r--r--examples/headless-maven/incquery-demo-generic/src/main/java/hu/bme/mit/incquery/application/IncQueryHeadlessAdvanced.java243
-rw-r--r--examples/headless-maven/incquery-demo/.classpath36
-rw-r--r--examples/headless-maven/incquery-demo/.project24
-rw-r--r--examples/headless-maven/incquery-demo/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--examples/headless-maven/incquery-demo/.settings/org.eclipse.m2e.core.prefs4
-rw-r--r--examples/headless-maven/incquery-demo/pom.xml92
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageHierarchyMatch.java._tracebin3602 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageHierarchyMatcher.java._tracebin6103 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageMatch.java._tracebin3602 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageMatcher.java._tracebin6103 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.EClassMatch.java._tracebin2741 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.EClassMatcher.java._tracebin3766 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesKeywordMatch.java._tracebin3602 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesKeywordMatcher.java._tracebin6103 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesMatch.java._tracebin3602 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesMatcher.java._tracebin6103 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.EObjectMatch.java._tracebin2495 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.EObjectMatcher.java._tracebin3397 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.EPackageMatch.java._tracebin2741 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.EPackageMatcher.java._tracebin3766 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.HeadlessQueries.java._tracebin240 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.HeadlessQueriesMatchers.java._tracebin527 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.SubPackageMatch.java._tracebin3602 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/.SubPackageMatcher.java._tracebin6103 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageHierarchyMatch.java181
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageHierarchyMatcher.java317
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageMatch.java181
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageMatcher.java310
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/EClassMatch.java157
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/EClassMatcher.java244
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesKeywordMatch.java180
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesKeywordMatcher.java312
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesMatch.java180
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesMatcher.java310
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/EObjectMatch.java157
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/EObjectMatcher.java244
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/EPackageMatch.java157
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/EPackageMatcher.java244
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/HeadlessQueries.java65
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/HeadlessQueriesMatchers.java54
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/SubPackageMatch.java180
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/SubPackageMatcher.java309
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageHierarchyProcessor.java._tracebin732 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageHierarchyQuerySpecification.java._tracebin1388 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageProcessor.java._tracebin732 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageQuerySpecification.java._tracebin1388 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesKeywordProcessor.java._tracebin732 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesKeywordQuerySpecification.java._tracebin1757 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesProcessor.java._tracebin732 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesQuerySpecification.java._tracebin1388 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassProcessor.java._tracebin609 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassQuerySpecification.java._tracebin1388 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.EObjectProcessor.java._tracebin568 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.EObjectQuerySpecification.java._tracebin1388 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.EPackageProcessor.java._tracebin609 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.EPackageQuerySpecification.java._tracebin1388 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.SubPackageProcessor.java._tracebin732 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/.SubPackageQuerySpecification.java._tracebin1388 -> 0 bytes
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageHierarchyProcessor.java29
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageHierarchyQuerySpecification.java150
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageProcessor.java29
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageQuerySpecification.java124
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesKeywordProcessor.java28
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesKeywordQuerySpecification.java142
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesProcessor.java28
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesQuerySpecification.java115
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassProcessor.java27
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassQuerySpecification.java123
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/EObjectProcessor.java27
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/EObjectQuerySpecification.java110
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/EPackageProcessor.java27
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/EPackageQuerySpecification.java124
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/SubPackageProcessor.java28
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/headless/util/SubPackageQuerySpecification.java122
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/hu/bme/mit/incquery/application/IncQueryHeadless.java201
-rw-r--r--examples/headless-maven/incquery-demo/src/main/java/hu/bme/mit/incquery/application/PatternSpecificIncQueryApplication.java67
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/.classpath8
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/.project40
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/META-INF/MANIFEST.MF14
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/build.properties7
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/plugin.xml5
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/.gitignore17
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageHierarchyMatch.java208
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageHierarchyMatcher.java307
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageMatch.java208
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageMatcher.java300
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassMatch.java183
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassMatcher.java229
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesKeywordMatch.java207
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesKeywordMatcher.java302
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesMatch.java207
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesMatcher.java300
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EObjectMatch.java183
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EObjectMatcher.java229
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EPackageMatch.java183
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EPackageMatcher.java229
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/HeadlessQueries.java136
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/SubPackageMatch.java207
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/SubPackageMatcher.java299
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/.gitignore16
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageHierarchyProcessor.java28
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageHierarchyQuerySpecification.java169
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageProcessor.java28
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageQuerySpecification.java148
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesKeywordProcessor.java27
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesKeywordQuerySpecification.java170
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesProcessor.java27
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesQuerySpecification.java141
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassProcessor.java26
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassQuerySpecification.java144
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EObjectProcessor.java26
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EObjectQuerySpecification.java130
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EPackageProcessor.java26
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EPackageQuerySpecification.java145
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/SubPackageProcessor.java27
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/SubPackageQuerySpecification.java148
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src/org/eclipse/viatra/query/application/queries/headlessQueries.vql41
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/src/org/eclipse/viatra/query/application/queries/test.vql1
-rw-r--r--examples/headless/org.eclipse.viatra.query.application.queries/testmodels/Test.ecore14
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/.classpath7
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/.project28
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/META-INF/MANIFEST.MF16
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/build.properties5
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/incquery-generic.product204
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/incquery-specific.product206
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/plugin.xml53
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/DefaultRealm.java45
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/ViatraQueryHeadless.java259
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/ViatraQueryHeadlessAdvanced.java179
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/ViatraQueryHeadlessBenchmark.java158
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/generic/GenericEclipseViatraQueryApplication.java86
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/generic/GenericViatraQueryApplication.java89
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/patternspecific/PatternSpecificEclipseViatraQueryApplication.java76
-rw-r--r--examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/patternspecific/PatternSpecificViatraQueryApplication.java68
-rw-r--r--examples/library/.gitignore6
-rw-r--r--examples/library/library.domain.base/.classpath8
-rw-r--r--examples/library/library.domain.base/.gitignore11
-rw-r--r--examples/library/library.domain.base/.project40
-rw-r--r--examples/library/library.domain.base/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/library/library.domain.base/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--examples/library/library.domain.base/META-INF/MANIFEST.MF20
-rw-r--r--examples/library/library.domain.base/build.properties10
-rw-r--r--examples/library/library.domain.base/model/Library.xmi10
-rw-r--r--examples/library/library.domain.base/plugin.properties4
-rw-r--r--examples/library/library.domain.base/plugin.xml11
-rw-r--r--examples/library/library.domain.base/src/library/base/BaseQueries.vql24
-rw-r--r--examples/library/library.domain.base/src/library/base/Library.xvql52
-rw-r--r--examples/library/library.domain/.classpath8
-rw-r--r--examples/library/library.domain/.project40
-rw-r--r--examples/library/library.domain/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/library/library.domain/META-INF/MANIFEST.MF24
-rw-r--r--examples/library/library.domain/build.properties9
-rw-r--r--examples/library/library.domain/plugin.properties4
-rw-r--r--examples/library/library.domain/plugin.xml39
-rw-r--r--examples/library/library.domain/src-gen/.gitignore5
-rw-r--r--examples/library/library.domain/src/library/Library.xvql58
-rw-r--r--examples/library/library.domain/src/library/LibraryQueries.vql152
-rw-r--r--examples/library/library.domain/src/library/validation/ValidationQueries.vql50
-rw-r--r--examples/library/library.domain/src/library/viewers/ViewersQueries.vql69
-rw-r--r--examples/library/library.ecore.viewers/.classpath8
-rw-r--r--examples/library/library.ecore.viewers/.project40
-rw-r--r--examples/library/library.ecore.viewers/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/library/library.ecore.viewers/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--examples/library/library.ecore.viewers/META-INF/MANIFEST.MF14
-rw-r--r--examples/library/library.ecore.viewers/build.properties7
-rw-r--r--examples/library/library.ecore.viewers/instancemodel/My.library9
-rw-r--r--examples/library/library.ecore.viewers/plugin.xml5
-rw-r--r--examples/library/library.ecore.viewers/src-gen/.gitignore5
-rw-r--r--examples/library/library.ecore.viewers/src/library/viewers/livedemo/ViewersQueries.vql49
-rw-r--r--examples/library/library.ecore/.classpath7
-rw-r--r--examples/library/library.ecore/.project28
-rw-r--r--examples/library/library.ecore/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/library/library.ecore/META-INF/MANIFEST.MF15
-rw-r--r--examples/library/library.ecore/build.properties10
-rw-r--r--examples/library/library.ecore/model/library.ecore20
-rw-r--r--examples/library/library.ecore/model/library.genmodel22
-rw-r--r--examples/library/library.ecore/plugin.properties4
-rw-r--r--examples/library/library.ecore/plugin.xml17
-rw-r--r--examples/library/library.ecore/src/library/Book.java86
-rw-r--r--examples/library/library.ecore/src/library/Library.java59
-rw-r--r--examples/library/library.ecore/src/library/LibraryFactory.java60
-rw-r--r--examples/library/library.ecore/src/library/LibraryPackage.java397
-rw-r--r--examples/library/library.ecore/src/library/Writer.java50
-rw-r--r--examples/library/library.ecore/src/library/impl/BookImpl.java239
-rw-r--r--examples/library/library.ecore/src/library/impl/LibraryFactoryImpl.java117
-rw-r--r--examples/library/library.ecore/src/library/impl/LibraryImpl.java189
-rw-r--r--examples/library/library.ecore/src/library/impl/LibraryPackageImpl.java275
-rw-r--r--examples/library/library.ecore/src/library/impl/WriterImpl.java163
-rw-r--r--examples/library/library.ecore/src/library/util/LibraryAdapterFactory.java156
-rw-r--r--examples/library/library.ecore/src/library/util/LibrarySwitch.java152
-rw-r--r--examples/library/library.ecore/src/library/validation/BookValidator.java24
-rw-r--r--examples/library/library.ecore/src/library/validation/LibraryValidator.java23
-rw-r--r--examples/library/library.ecore/src/library/validation/WriterValidator.java18
-rw-r--r--examples/library/library.ecore/text/description.txt20
-rw-r--r--examples/library/library.instances/.classpath6
-rw-r--r--examples/library/library.instances/.project28
-rw-r--r--examples/library/library.instances/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/library/library.instances/META-INF/MANIFEST.MF7
-rw-r--r--examples/library/library.instances/build.properties2
-rw-r--r--examples/library/library.instances/model/dynamic/Library_domain.xmi12
-rw-r--r--examples/library/library.instances/model/dynamic/Library_domain_viewers_livedemo.xmi10
-rw-r--r--examples/library/library.instances/model/gen/My_domain.library7
-rw-r--r--examples/minilibrary/.gitignore11
-rw-r--r--examples/minilibrary/README.markdown4
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/.classpath7
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/.project28
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/META-INF/MANIFEST.MF15
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/build.properties10
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Book.java117
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/BookCategory.java268
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Library.java139
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryFactory.java60
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryPackage.java680
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Writer.java106
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/BookImpl.java329
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryFactoryImpl.java168
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryImpl.java391
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryPackageImpl.java402
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/WriterImpl.java287
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibraryAdapterFactory.java156
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibrarySwitch.java152
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/model/library.ecore68
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/model/library.genmodel43
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/plugin.properties4
-rw-r--r--examples/minilibrary/org.eclipse.viatra.examples.library/plugin.xml17
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.classpath8
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.project40
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.settings/org.eclipse.incquery.patternlanguage.emf.EMFPatternLanguage.prefs10
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/META-INF/MANIFEST.MF15
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/build.properties7
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/model/test.library20
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/plugin.xml5
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/.gitignore15
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BookAuthorsMatch.java208
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BookAuthorsMatcher.java281
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BooksWithMultipleAuthorsMatch.java183
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BooksWithMultipleAuthorsMatcher.java211
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/Eiqlibrary.java124
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/LongSciFiBooksOfAuthorMatch.java208
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/LongSciFiBooksOfAuthorMatcher.java283
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/RequestCountOfLibraryMatch.java207
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/RequestCountOfLibraryMatcher.java280
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SingleAuthoredFirstBooksMatch.java208
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SingleAuthoredFirstBooksMatcher.java282
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SomeBooksWithTwoAuthorsMatch.java208
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SomeBooksWithTwoAuthorsMatcher.java283
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SumOfPagesInLibraryMatch.java207
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SumOfPagesInLibraryMatcher.java280
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/.gitignore14
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BookAuthorsProcessor.java28
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BookAuthorsQuerySpecification.java142
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BooksWithMultipleAuthorsProcessor.java26
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BooksWithMultipleAuthorsQuerySpecification.java169
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/LongSciFiBooksOfAuthorProcessor.java28
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/LongSciFiBooksOfAuthorQuerySpecification.java175
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/RequestCountOfLibraryProcessor.java27
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/RequestCountOfLibraryQuerySpecification.java141
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SingleAuthoredFirstBooksProcessor.java28
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SingleAuthoredFirstBooksQuerySpecification.java154
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SomeBooksWithTwoAuthorsProcessor.java28
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SomeBooksWithTwoAuthorsQuerySpecification.java158
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SumOfPagesInLibraryProcessor.java27
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SumOfPagesInLibraryQuerySpecification.java141
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src/org/eclipse/viatra/query/runtime/runonce/tests/RunOnceTest.java398
-rw-r--r--examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src/org/eclipse/viatra/query/runtime/runonce/tests/eiqlibrary.vql38
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.classpath8
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.project40
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/META-INF/MANIFEST.MF17
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/build.properties8
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/plugin.xml5
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/src-gen/.gitignore5
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/src/org/eclipse/viatra/examples/uml/evm/UMLexampleForEVM.java241
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/src/org/eclipse/viatra/examples/uml/evm/queries/preconditions.vql66
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/testmodels/Testmodel.uml21
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.classpath8
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.project28
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/META-INF/MANIFEST.MF13
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/build.properties6
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/plugin.xml7
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/src-gen/org/eclipse/viatra/examples/uml/queries/.gitignore1
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.classpath8
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.project40
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.settings/org.eclipse.pde.core.prefs3
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/META-INF/MANIFEST.MF14
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/build.properties6
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/plugin.xml5
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/src-gen/.gitignore5
-rwxr-xr-xexamples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/src/org/eclipse/viatra/examples/uml/queries/EmptyClass.vql66
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/testmodels/Testmodel.uml29
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/.classpath7
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/.project28
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/META-INF/MANIFEST.MF12
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/build.properties4
-rw-r--r--examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/src/org/eclipse/viatra/examples/uml/tests/FlattenerTest.java117
399 files changed, 0 insertions, 29569 deletions
diff --git a/examples/bpm/.gitignore b/examples/bpm/.gitignore
deleted file mode 100644
index 68a16be95..000000000
--- a/examples/bpm/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-plugin.xml_gen
-bin
-target
-plugin.xml_gen
-MANIFEST.MF_gen
-.DS_Store*
-xtend-gen
-+keep.txt
-+.keep.txt
-!src-gen
-!globalEiqModel.xmi \ No newline at end of file
diff --git a/examples/bpm/README.markdown b/examples/bpm/README.markdown
deleted file mode 100644
index 2418efcbf..000000000
--- a/examples/bpm/README.markdown
+++ /dev/null
@@ -1,4 +0,0 @@
-Query-driven soft interconnection for EMF models
-================================================
-
-See https://viatra.inf.mit.bme.hu/incquery/new/examples/query-driven-soft-links for details \ No newline at end of file
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/.project b/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/.project
deleted file mode 100644
index a9fde3869..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.examples.bpm.instancemodels</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/META-INF/MANIFEST.MF b/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/META-INF/MANIFEST.MF
deleted file mode 100644
index 416b056a0..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: BPM Example Instancemodels
-Bundle-SymbolicName: org.eclipse.viatra.examples.bpm.instancemodels
-Bundle-Version: 1.1.0.qualifier
-Bundle-Vendor: Budapest University of Technology and Economics
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Other.process b/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Other.process
deleted file mode 100644
index 210c321dd..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Other.process
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<process:Process xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:process="http://process/1.0" id="otherProcess" name="Other Process"/>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Simple.operation b/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Simple.operation
deleted file mode 100644
index b5a95b608..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Simple.operation
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<operation:Checklist xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:operation="http://operation/1.0" id="chl1" name="First Checklist" processId="rootProcess">
- <entries id="cle1" name="First CLE" taskId="st1">
- <info id="" name="Info1"/>
- <jobPaths>Simple/Job1</jobPaths>
- </entries>
-</operation:Checklist>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Simple.process b/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Simple.process
deleted file mode 100644
index f0f1142c9..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Simple.process
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<process:Process xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:process="http://process/1.0" id="rootProcess" name="Root">
- <contents xsi:type="process:Task" id="st2" name="Other Service Task" kind="service"/>
- <contents xsi:type="process:Task" id="st1" name="First Service Task" kind="service"/>
-</process:Process>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Simple.system b/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Simple.system
deleted file mode 100644
index bc4ed31a4..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/Simple.system
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<system:System xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:system="http://system/1.0" name="Simple">
- <contains name="Job1" runsOn="/">
- <taskIds>st1</taskIds>
- </contains>
- <contains name="Job2" runsOn="/">
- <taskIds>st2</taskIds>
- </contains>
- <data name="Data">
- <readingTaskIds>st1</readingTaskIds>
- <writingTaskIds>st2</writingTaskIds>
- </data>
-</system:System>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/build.properties b/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/build.properties
deleted file mode 100644
index a08385753..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-bin.includes = META-INF/,\
- Other.process,\
- Simple.operation,\
- Simple.system,\
- Simple.process
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/pom.xml b/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/pom.xml
deleted file mode 100644
index 4b1923eff..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.instancemodels/pom.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.incquery.examples.bpm.test.parent</artifactId>
- <groupId>org.eclipse.incquery</groupId>
- <version>1.1.0-SNAPSHOT</version>
- <relativePath>../org.eclipse.incquery.examples.bpm.test.parent/pom.xml</relativePath>
- </parent>
- <artifactId>org.eclipse.incquery.examples.bpm.instancemodel</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.parent/.project b/examples/bpm/org.eclipse.viatra.examples.bpm.parent/.project
deleted file mode 100644
index 7f51fc9cb..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.parent/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.examples.bpm.parent</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.parent/bpmtest.target b/examples/bpm/org.eclipse.viatra.examples.bpm.parent/bpmtest.target
deleted file mode 100644
index 45c43bd00..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.parent/bpmtest.target
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?pde version="3.8"?><target name="emfpattern" sequenceNumber="18">
-<locations>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.platform.sdk" version="3.7.2.M20120208-0800"/>
-<unit id="org.eclipse.sdk.ide" version="3.7.2.M20120208-0800"/>
-<repository location="http://download.eclipse.org/eclipse/updates/3.7"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.gmf.runtime.sdk.feature.group" version="1.5.0.v20110607-1200-67N09E9QnChoWswz-3wf_rz0kQ8Y"/>
-<repository location="http://download.eclipse.org/releases/indigo"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.xtext.sdk.feature.group" version="2.9.0.v201512010527"/>
-<repository location="http://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.9.0"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.emf.mwe2.runtime.sdk.feature.group" version="2.8.2.v201511170833"/>
-<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.8.2/R201511170833/mwe/"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.emf.mwe2.launcher.feature.group" version="2.8.2.v201511170842"/>
-<repository location="http://download.eclipse.org/modeling/emft/mwe/updates/releases/2.8.2/R201511170842/mwe2lang/"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.emf.sdk.feature.group" version="2.11.0.v20150601-0402"/>
-<repository location="http://download.eclipse.org/modeling/emf/emf/updates/releases/"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.junit" version="4.11.0.v201303080030"/>
-<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository/"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="com.google.inject.source" version="3.0.0.v201312141243"/>
-<unit id="com.google.inject.multibindings.source" version="3.0.0.v201402270930"/>
-<unit id="com.google.inject.multibindings" version="3.0.0.v201402270930"/>
-<unit id="com.google.inject" version="3.0.0.v201312141243"/>
-<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20150124073747/repository/"/>
-</location>
-</locations>
-<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-</target>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.parent/pom.xml b/examples/bpm/org.eclipse.viatra.examples.bpm.parent/pom.xml
deleted file mode 100644
index fee78cae8..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.parent/pom.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <artifactId>org.eclipse.viatra.examples.bpm.parent</artifactId>
- <name>VIATRA BPM Example</name>
- <url>http://eclipse.org/viatra</url>
- <parent>
- <artifactId>org.eclipse.viatra.parent</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <groupId>org.eclipse.viatra</groupId>
- <relativePath>../../../releng/org.eclipse.viatra.parent/pom.xml</relativePath>
- </parent>
- <packaging>pom</packaging>
- <properties>
- <jacoco.targetdir>${project.basedir}/../target</jacoco.targetdir>
- <sonar.surefire.reportsPath>../target/surefire-reports/</sonar.surefire.reportsPath>
- </properties>
- <modules>
- <module>../org.eclipse.viatra.examples.bpm</module>
- <module>../org.eclipse.viatra.examples.bpm.queries</module>
- <module>../org.eclipse.viatra.examples.bpm.tests</module>
- </modules>
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho.version}</version>
- <configuration>
- <resolver>p2</resolver>
- <target>
- <artifact>
- <groupId>org.eclipse.viatra</groupId>
- <artifactId>org.eclipse.viatra.target.all</artifactId>
- <version>${project.version}</version>
- </artifact>
- </target>
- <ignoreTychoRepositories>true</ignoreTychoRepositories>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.classpath b/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.classpath
deleted file mode 100644
index af9f360e8..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.project b/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.project
deleted file mode 100644
index db163d41c..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.examples.bpm.queries.validation</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.settings/org.eclipse.jdt.core.prefs b/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de363a..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.settings/org.eclipse.pde.core.prefs b/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 36c29adc3..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-eclipse.preferences.version=1
-pluginProject.equinox=false
-resolve.requirebundle=false
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/META-INF/MANIFEST.MF b/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/META-INF/MANIFEST.MF
deleted file mode 100644
index e474351f1..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: org.eclipse.incquery.examples.bpm.incquery.validation
-Bundle-SymbolicName: org.eclipse.viatra.examples.bpm.queries.validation;singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Bundle-Vendor: Budapest University of Technology and Economics
-Require-Bundle: org.eclipse.viatra.query.runtime,
- org.eclipse.viatra.addon.validation.core,
- org.eclipse.viatra.examples.bpm.queries,
- com.google.guava,
- org.eclipse.viatra.addon.validation.core,
- org.eclipse.emf.ecore,
- org.eclipse.viatra.examples.bpm,
- org.eclipse.viatra.addon.validation.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/build.properties b/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/build.properties
deleted file mode 100644
index 459799971..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-bin.includes = META-INF/,\
- .,\
- plugin.xml
-source.. = src-gen/,\
- src/
-output.. = bin/
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/plugin.xml b/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/plugin.xml
deleted file mode 100644
index a547a5344..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/plugin.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><plugin>
- <extension id="validation.constraint.org.eclipse.viatra.examples.bpm.queries.operation.TaskChecklistEntryJobCorrespondence" point="org.eclipse.viatra.addon.validation.runtime.constraint">
- <constraint class="org.eclipse.viatra.examples.bpm.queries.operation.TaskChecklistEntryJobCorrespondenceConstraint0" name="org.eclipse.viatra.examples.bpm.queries.operation.TaskChecklistEntryJobCorrespondence"/>
- </extension>
- <extension id="validation.constraint.org.eclipse.viatra.examples.bpm.queries.operation.DataReadByChecklistEntry" point="org.eclipse.viatra.addon.validation.runtime.constraint">
- <constraint class="org.eclipse.viatra.examples.bpm.queries.operation.DataReadByChecklistEntryConstraint0" name="org.eclipse.viatra.examples.bpm.queries.operation.DataReadByChecklistEntry"/>
- </extension>
- <extension id="validation.constraint.org.eclipse.viatra.examples.bpm.queries.operation.IncorrectEntryInChecklist" point="org.eclipse.viatra.addon.validation.runtime.constraint">
- <constraint class="org.eclipse.viatra.examples.bpm.queries.operation.IncorrectEntryInChecklistConstraint0" name="org.eclipse.viatra.examples.bpm.queries.operation.IncorrectEntryInChecklist"/>
- </extension>
- <extension id="validation.constraint.org.eclipse.viatra.examples.bpm.queries.system.UndefinedServiceTasks" point="org.eclipse.viatra.addon.validation.runtime.constraint">
- <constraint class="org.eclipse.viatra.examples.bpm.queries.system.UndefinedServiceTasksConstraint0" name="org.eclipse.viatra.examples.bpm.queries.system.UndefinedServiceTasks"/>
- </extension>
-</plugin>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/pom.xml b/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/pom.xml
deleted file mode 100644
index c0d001d50..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/pom.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.viatra.examples.bpm.parent</artifactId>
- <groupId>org.eclipse.incquery</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../org.eclipse.viatra.examples.bpm.parent/pom.xml</relativePath>
- </parent>
- <artifactId>org.eclipse.incquery.examples.bpm.incquery.validation</artifactId>
- <packaging>eclipse-plugin</packaging>
-</project>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/src-gen/org/eclipse/viatra/examples/bpm/queries/operation/.gitignore b/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/src-gen/org/eclipse/viatra/examples/bpm/queries/operation/.gitignore
deleted file mode 100644
index 6adc70736..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/src-gen/org/eclipse/viatra/examples/bpm/queries/operation/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/DataReadByChecklistEntryConstraint0.java
-/IncorrectEntryInChecklistConstraint0.java
-/TaskChecklistEntryJobCorrespondenceConstraint0.java
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/src-gen/org/eclipse/viatra/examples/bpm/queries/system/.gitignore b/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/src-gen/org/eclipse/viatra/examples/bpm/queries/system/.gitignore
deleted file mode 100644
index 23a6d1866..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries.validation/src-gen/org/eclipse/viatra/examples/bpm/queries/system/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/UndefinedServiceTasksConstraint0.java
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.classpath b/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.classpath
deleted file mode 100644
index 6a42377b5..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.project b/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.project
deleted file mode 100644
index 5f065057c..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.project
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.examples.bpm.queries</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.viatra.query.tooling.core.projectbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
- <nature>org.eclipse.viatra.query.projectnature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.settings/org.eclipse.incquery.patternlanguage.emf.EMFPatternLanguage.prefs b/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.settings/org.eclipse.incquery.patternlanguage.emf.EMFPatternLanguage.prefs
deleted file mode 100644
index 9c84610ee..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.settings/org.eclipse.incquery.patternlanguage.emf.EMFPatternLanguage.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-is_project_specific=true
-outlet.DEFAULT_OUTPUT.cleanDirectory=true
-outlet.DEFAULT_OUTPUT.cleanupDerived=true
-outlet.DEFAULT_OUTPUT.createDirectory=true
-outlet.DEFAULT_OUTPUT.derived=false
-outlet.DEFAULT_OUTPUT.override=true
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.settings/org.eclipse.jdt.core.prefs b/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de363a..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.settings/org.eclipse.pde.core.prefs b/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 36c29adc3..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-eclipse.preferences.version=1
-pluginProject.equinox=false
-resolve.requirebundle=false
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/META-INF/MANIFEST.MF b/examples/bpm/org.eclipse.viatra.examples.bpm.queries/META-INF/MANIFEST.MF
deleted file mode 100644
index 34ec1380f..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: EMF-IncQuery Query-based Feature Definitions for BPM Example
-Bundle-SymbolicName: org.eclipse.viatra.examples.bpm.queries;singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Bundle-Vendor: Budapest University of Technology and Economics
-Export-Package: org.eclipse.viatra.examples.bpm.queries.operation,
- org.eclipse.viatra.examples.bpm.queries.operation.util,
- org.eclipse.viatra.examples.bpm.queries.system,
- org.eclipse.viatra.examples.bpm.queries.system.util
-Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime,
- org.eclipse.emf.ecore,
- org.eclipse.emf.transaction,
- org.eclipse.viatra.examples.bpm,
- com.google.guava,
- org.eclipse.viatra.query.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Import-Package: org.apache.log4j
-Bundle-ActivationPolicy: lazy
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/build.properties b/examples/bpm/org.eclipse.viatra.examples.bpm.queries/build.properties
deleted file mode 100644
index 6e00103c8..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-bin.includes = META-INF/,\
- .,\
- plugin.xml
-source.. = src/,\
- src-gen/
-output.. = bin/
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/plugin.xml b/examples/bpm/org.eclipse.viatra.examples.bpm.queries/plugin.xml
deleted file mode 100644
index 78133f12f..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/plugin.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><plugin>
- <extension point="org.eclipse.jdt.core.classpathVariableInitializer">
- <classpathVariableInitializer class="org.eclipse.pde.internal.core.EclipseHomeInitializer" readOnly="true" variable="ECLIPSE_HOME"/>
- </extension>
- <extension id="extension.derived.org.eclipse.viatra.examples.bpm.queries.operation.ChecklistProcessCorrespondence" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Checklist" feature-name="process" package-nsUri="http://operation/1.0"/>
- </extension>
- <extension id="extension.derived.org.eclipse.viatra.examples.bpm.queries.operation.ChecklistEntryJobCorrespondence" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="ChecklistEntry" feature-name="jobs" package-nsUri="http://operation/1.0"/>
- </extension>
- <extension id="extension.derived.org.eclipse.viatra.examples.bpm.queries.operation.ChecklistEntryTaskCorrespondence" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="ChecklistEntry" feature-name="task" package-nsUri="http://operation/1.0"/>
- </extension>
- <extension id="extension.derived.org.eclipse.viatra.examples.bpm.queries.system.DataTaskReadCorrespondence" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Data" feature-name="readingTask" package-nsUri="http://system/1.0"/>
- </extension>
- <extension id="extension.derived.org.eclipse.viatra.examples.bpm.queries.system.DataTaskWriteCorrespondence" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Data" feature-name="writingTask" package-nsUri="http://system/1.0"/>
- </extension>
- <extension id="extension.derived.org.eclipse.viatra.examples.bpm.queries.system.JobInfoCorrespondence" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Job" feature-name="info" package-nsUri="http://system/1.0"/>
- </extension>
- <extension id="extension.derived.org.eclipse.viatra.examples.bpm.queries.system.JobTaskCorrespondence" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Job" feature-name="tasks" package-nsUri="http://system/1.0"/>
- </extension>
- <extension id="org.eclipse.viatra.examples.bpm.queries.system.DerivedFeatures" point="org.eclipse.viatra.query.runtime.queryspecification">
- <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:org.eclipse.viatra.examples.bpm.queries.system.DerivedFeatures" id="org.eclipse.viatra.examples.bpm.queries.system.DerivedFeatures"/>
- </extension>
- <extension id="org.eclipse.viatra.examples.bpm.queries.operation.DerivedFeatures" point="org.eclipse.viatra.query.runtime.queryspecification">
- <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:org.eclipse.viatra.examples.bpm.queries.operation.DerivedFeatures" id="org.eclipse.viatra.examples.bpm.queries.operation.DerivedFeatures"/>
- </extension>
-</plugin>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/pom.xml b/examples/bpm/org.eclipse.viatra.examples.bpm.queries/pom.xml
deleted file mode 100644
index 53093d2e5..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.viatra.examples.bpm.parent</artifactId>
- <groupId>org.eclipse.viatra</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../org.eclipse.viatra.examples.bpm.parent/pom.xml</relativePath>
- </parent>
- <artifactId>org.eclipse.viatra.examples.bpm.queries</artifactId>
- <packaging>eclipse-plugin</packaging>
-<build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.viatra</groupId>
- <artifactId>viatra-maven-plugin</artifactId>
- <version>${viatra.main.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <outputDirectory>src-gen</outputDirectory>
- <metamodels>
- <metamodel>
- <packageClass>org.eclipse.viatra.examples.bpm.operation.OperationPackage</packageClass>
- </metamodel>
- <metamodel>
- <packageClass>org.eclipse.viatra.examples.bpm.process.ProcessPackage</packageClass>
- </metamodel>
- <metamodel>
- <packageClass>org.eclipse.viatra.examples.bpm.system.SystemPackage</packageClass>
- </metamodel>
- </metamodels>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.viatra</groupId>
- <artifactId>org.eclipse.viatra.examples.bpm</artifactId>
- <version>${viatra.main.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/src-gen/.gitignore b/examples/bpm/org.eclipse.viatra.examples.bpm.queries/src-gen/.gitignore
deleted file mode 100644
index ce4a58f9f..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/src-gen/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-#This file is needed to prevent git from omitting this folder that would cause build issues/compile errors.
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore \ No newline at end of file
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/src/org/eclipse/viatra/examples/bpm/queries/operation/derivedFeatures.vql b/examples/bpm/org.eclipse.viatra.examples.bpm.queries/src/org/eclipse/viatra/examples/bpm/queries/operation/derivedFeatures.vql
deleted file mode 100644
index c1b47e592..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/src/org/eclipse/viatra/examples/bpm/queries/operation/derivedFeatures.vql
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.eclipse.viatra.examples.bpm.queries.operation
-
-import "http://process/1.0"
-import "http://system/1.0"
-import "http://operation/1.0"
-import "http://www.eclipse.org/emf/2002/Ecore"
-
-/* ChecklistEntry.jobs relation */
-@QueryBasedFeature(feature = "jobs")
-pattern ChecklistEntryJobCorrespondence(CLE : ChecklistEntry, Job : Job) = {
- Job.name(Job,JobName);
- System.name(System,SysName);
- Job.runsOn(Job,System);
- ChecklistEntry.jobPaths(CLE,JobPath);
- check(JobPath.equals(SysName.concat('/').concat(JobName)));
-}
-
-/* ChecklistEntry.task relation */
-@QueryBasedFeature(feature = "task")
-pattern ChecklistEntryTaskCorrespondence(CLE : ChecklistEntry, Task : Task) = {
- Task.id(Task, TaskId);
- ChecklistEntry.taskId(CLE,TaskId);
-}
-
-/* Checklist.process relation */
-@QueryBasedFeature(feature = "process")
-pattern ChecklistProcessCorrespondence(Checklist : Checklist, Process : Process) = {
- Process.id(Process,ProcessId);
- Checklist.processId(Checklist,ProcessId);
-}
-
-private pattern TaskInProcess(Task : Task, Process : Process) = {
- Process(Process);
- Task(Task);
- Process.contents(Process,Task);
-}
-
-// validation query (checklist entries are connected to tasks in the process of the checklist)
-@Constraint(location = ChecklistEntry,
- message = "Entry $ChecklistEntry.name$ corresponds to Task $Task.name$ outside of process $Process.name$ defined for the checklist!",
- severity = "error")
-pattern IncorrectEntryInChecklist(ChecklistEntry : ChecklistEntry,Task : Task,Process : Process) = {
- Checklist.entries(Checklist,ChecklistEntry);
- find ChecklistProcessCorrespondence(Checklist,Process);
- find ChecklistEntryTaskCorrespondence(ChecklistEntry,Task);
- neg find TaskInProcess(Task,Process);
-}
-
-// hyper-edge (Task <-- CheckListEntry --> Job
-@Constraint(location = CLE,
- message = "Task $Task.name$ connected to Job $Job.name$ through entry $CLE.name$",
- severity = "warning")
-pattern TaskChecklistEntryJobCorrespondence(Task : Task, CLE : ChecklistEntry, Job : Job) = {
- find ChecklistEntryTaskCorrespondence(CLE,Task);
- find ChecklistEntryJobCorrespondence(CLE,Job);
-}
-
-@Constraint(location = CLE,
- message = "Entry $CLE.name$ connected to $Data.name$ through $Task.name$",
- severity = "warning")
-pattern DataReadByChecklistEntry(CLE : ChecklistEntry, Task : Task, Data : Data) = {
- find ChecklistEntryTaskCorrespondence(CLE,Task);
- find org.eclipse.viatra.examples.bpm.queries.system.DataTaskReadCorrespondence(Data, Task);
-}
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/src/org/eclipse/viatra/examples/bpm/queries/system/derivedFeatures.vql b/examples/bpm/org.eclipse.viatra.examples.bpm.queries/src/org/eclipse/viatra/examples/bpm/queries/system/derivedFeatures.vql
deleted file mode 100644
index 2020003b9..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.queries/src/org/eclipse/viatra/examples/bpm/queries/system/derivedFeatures.vql
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.eclipse.viatra.examples.bpm.queries.system
-
-import "http://process/1.0"
-import "http://system/1.0"
-import "http://operation/1.0"
-import "http://www.eclipse.org/emf/2002/Ecore"
-
-// first query n-to-m traceability
-/* Job.tasks relation */
-@QueryBasedFeature(feature = "tasks")
-pattern JobTaskCorrespondence(Job : Job, Task : Task) = {
- Job.taskIds(Job,TaskId);
- Task.id(Task,TaskId);
-}
-
-private pattern TaskHasJob(Task : Task) = {
- find JobTaskCorrespondence(_Job,Task);
-}
-
-/* Data.readingTask relation */
-@QueryBasedFeature(feature = "readingTask")
-pattern DataTaskReadCorrespondence(Data : Data, Task : Task) = {
- Data.readingTaskIds(Data,TaskId);
- Task.id(Task,TaskId);
-}
-
-/* Data.writingTask relation */
-@QueryBasedFeature(feature = "writingTask")
-pattern DataTaskWriteCorrespondence(Data : Data ,Task : Task) = {
- Data.writingTaskIds(Data,TaskId);
- Task.id(Task,TaskId);
-}
-
-/* Job.info relation */
-@QueryBasedFeature(feature = "info")
-pattern JobInfoCorrespondence(Job : Job, Info : RuntimeInformation) = {
- ChecklistEntry.info(CLE, Info);
- ChecklistEntry.jobs(CLE, Job);
-}
-
-// second query (validation view)
-@Constraint(key = {"Task"}, message = "Service Task $Task.name$ has no job", severity = "warning")
-pattern UndefinedServiceTasks(Task : Task) = {
- Task(Task);
- Task.kind(Task, ::service);
- neg find TaskHasJob(Task);
-}
-
-// third query (complex query for additional info in process model)
-pattern TasksAffectedThroughData(SourceTask : Task, AffectedTask : Task) = {
- Task(SourceTask);
- Task(AffectedTask);
- Data(Data);
- find DataTaskWriteCorrespondence(Data, SourceTask);
- find DataTaskReadCorrespondence(Data, AffectedTask);
-}
-
-// extra transitive query, Gaben would probably cry...
-/*pattern TransitiveAffectedTasksThroughData(SourceTask, AffectedTask) = {
- Task(SourceTask);
- Task(AffectedTask);
- find TasksAffectedThroughData(SourceTask, AffectedTask);
-} or {
- Task(SourceTask);
- Task(InnerAffectedTask);
- find TasksAffectedThroughData(SourceTask, InnerAffectedTask);
- Task(AffectedTask);
- find TransitiveAffectedTasksThroughData(InnerAffectedTask, AffectedTask);
-}*/
-
-// transitive query, new style...
-pattern TransitiveAffectedTasksThroughData(SourceTask : Task, AffectedTask : Task) = {
- Task(SourceTask);
- Task(AffectedTask);
- find TasksAffectedThroughData+(SourceTask, AffectedTask);
-} \ No newline at end of file
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/.classpath b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/.classpath
deleted file mode 100644
index b51a74a28..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/.classpath
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="xtend-gen"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/.project b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/.project
deleted file mode 100644
index fb13aa1b8..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/.project
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.examples.bpm.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.viatra.query.tooling.core.projectbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
- <nature>org.eclipse.viatra.query.projectnature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/.settings/org.eclipse.jdt.core.prefs b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de363a..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/.settings/org.eclipse.xtend.core.Xtend.prefs b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/.settings/org.eclipse.xtend.core.Xtend.prefs
deleted file mode 100644
index 851d44bfb..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/.settings/org.eclipse.xtend.core.Xtend.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.xtend.core.Xtend.useProjectSettings=true
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/META-INF/MANIFEST.MF b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 45408c5a1..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: BPM Related Runtime Tests
-Bundle-SymbolicName: org.eclipse.viatra.examples.bpm.tests;singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Bundle-Vendor: Budapest University of Technology and Economics
-Export-Package: org.eclipse.viatra.examples.bpm.tests,
- org.eclipse.viatra.examples.bpm.tests.queries,
- org.eclipse.viatra.examples.bpm.tests.queries.util
-Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime;bundle-version="0.7.0",
- org.eclipse.xtend.lib,
- com.google.guava,
- org.eclipse.xtext.xbase.lib,
- org.eclipse.viatra.examples.bpm,
- org.junit,
- org.eclipse.xtext.junit4,
- org.eclipse.viatra.examples.bpm.queries;bundle-version="0.7.0",
- com.google.inject,
- org.eclipse.viatra.query.runtime;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.viatra.query.testing.core;bundle-version="[1.2.0,2.0.0)"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Import-Package: org.apache.log4j
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/build.properties b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/build.properties
deleted file mode 100644
index 6fde8ddfc..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-bin.includes = META-INF/,\
- .,\
- model/,\
- plugin.xml
-source.. = src/,\
- src-gen/,\
- xtend-gen/
-output.. = bin/
-jars.extra.classpath = platform:/fragment/com.google.inject.multibindings \ No newline at end of file
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/model/Simple.operation b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/model/Simple.operation
deleted file mode 100644
index b5a95b608..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/model/Simple.operation
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<operation:Checklist xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:operation="http://operation/1.0" id="chl1" name="First Checklist" processId="rootProcess">
- <entries id="cle1" name="First CLE" taskId="st1">
- <info id="" name="Info1"/>
- <jobPaths>Simple/Job1</jobPaths>
- </entries>
-</operation:Checklist>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/model/Simple.process b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/model/Simple.process
deleted file mode 100644
index f0f1142c9..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/model/Simple.process
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<process:Process xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:process="http://process/1.0" id="rootProcess" name="Root">
- <contents xsi:type="process:Task" id="st2" name="Other Service Task" kind="service"/>
- <contents xsi:type="process:Task" id="st1" name="First Service Task" kind="service"/>
-</process:Process>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/model/Simple.system b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/model/Simple.system
deleted file mode 100644
index bc4ed31a4..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/model/Simple.system
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<system:System xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:system="http://system/1.0" name="Simple">
- <contains name="Job1" runsOn="/">
- <taskIds>st1</taskIds>
- </contains>
- <contains name="Job2" runsOn="/">
- <taskIds>st2</taskIds>
- </contains>
- <data name="Data">
- <readingTaskIds>st1</readingTaskIds>
- <writingTaskIds>st2</writingTaskIds>
- </data>
-</system:System>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/plugin.xml b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/plugin.xml
deleted file mode 100644
index 760a7933b..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/plugin.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><plugin>
- <extension id="org.eclipse.viatra.examples.bpm.tests.queries.BpmTestQueries" point="org.eclipse.viatra.query.runtime.queryspecification">
- <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:org.eclipse.viatra.examples.bpm.tests.queries.BpmTestQueries" id="org.eclipse.viatra.examples.bpm.tests.queries.BpmTestQueries"/>
- </extension>
-</plugin>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/pom.xml b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/pom.xml
deleted file mode 100644
index b993fb6f9..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/pom.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.viatra.examples.bpm.parent</artifactId>
- <groupId>org.eclipse.viatra</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../org.eclipse.viatra.examples.bpm.parent/pom.xml</relativePath>
- </parent>
- <artifactId>org.eclipse.viatra.examples.bpm.tests</artifactId>
- <packaging>eclipse-test-plugin</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.viatra</groupId>
- <artifactId>viatra-maven-plugin</artifactId>
- <version>${viatra.main.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>generate</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <outputDirectory>src-gen</outputDirectory>
- <metamodels>
- <metamodel>
- <packageClass>org.eclipse.viatra.examples.bpm.operation.OperationPackage</packageClass>
- </metamodel>
- <metamodel>
- <packageClass>org.eclipse.viatra.examples.bpm.process.ProcessPackage</packageClass>
- </metamodel>
- <metamodel>
- <packageClass>org.eclipse.viatra.examples.bpm.system.SystemPackage</packageClass>
- </metamodel>
- </metamodels>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.viatra</groupId>
- <artifactId>org.eclipse.viatra.examples.bpm</artifactId>
- <version>${viatra.main.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.eclipse.xtend</groupId>
- <artifactId>xtend-maven-plugin</artifactId>
- <version>${xtend.compiler.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>compile</goal>
- <goal>testCompile</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src-gen/.gitignore b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src-gen/.gitignore
deleted file mode 100644
index ce4a58f9f..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src-gen/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-#This file is needed to prevent git from omitting this folder that would cause build issues/compile errors.
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore \ No newline at end of file
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/BPMTestsAll.java b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/BPMTestsAll.java
deleted file mode 100644
index 85bfdaf50..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/BPMTestsAll.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.examples.bpm.tests;
-
-import org.eclipse.viatra.examples.bpm.tests.QueryBasedFeatureTest;
-import org.eclipse.viatra.examples.bpm.tests.RuntimeListenerTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-/**
- * @author Abel Hegedus
- *
- */
-@RunWith(value = Suite.class)
-@SuiteClasses({
- RuntimeListenerTest.class,
- QueryBasedFeatureTest.class
-})
-public class BPMTestsAll {
-
-}
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/QueryBasedFeatureTest.xtend b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/QueryBasedFeatureTest.xtend
deleted file mode 100644
index 82dafe088..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/QueryBasedFeatureTest.xtend
+++ /dev/null
@@ -1,248 +0,0 @@
-package org.eclipse.viatra.examples.bpm.tests
-
-import com.google.inject.Inject
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
-import org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureHelper
-import org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureKind
-import org.eclipse.viatra.examples.bpm.operation.Checklist
-import org.eclipse.viatra.examples.bpm.operation.OperationPackage
-import org.eclipse.viatra.examples.bpm.process.Task
-import org.eclipse.viatra.examples.bpm.system.Job
-import org.eclipse.viatra.examples.bpm.system.System
-import org.eclipse.viatra.examples.bpm.system.Data
-import org.eclipse.viatra.examples.bpm.process.Process
-import org.eclipse.viatra.examples.bpm.tests.queries.JobTasksMatcher
-import org.eclipse.viatra.examples.bpm.tests.queries.ProcessTasksMatcher
-import org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine
-import org.eclipse.viatra.query.runtime.emf.EMFScope
-import org.eclipse.viatra.query.runtime.extensibility.QuerySpecificationRegistry
-import org.eclipse.viatra.query.testing.core.ModelLoadHelper
-import org.eclipse.viatra.query.testing.core.TestExecutor
-import org.eclipse.viatra.query.testing.core.injector.EMFPatternLanguageInjectorProvider
-import org.eclipse.xtext.junit4.InjectWith
-import org.eclipse.xtext.junit4.XtextRunner
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-
-import static org.junit.Assert.*
-
-@RunWith(typeof(XtextRunner))
-@InjectWith(typeof(EMFPatternLanguageInjectorProvider))
-class QueryBasedFeatureTest {
-
- @Inject extension TestExecutor
- @Inject extension ModelLoadHelper
-
- @Before
- def prepareQueries(){
-
- assertNotNull(QuerySpecificationRegistry::getQuerySpecification("org.eclipse.viatra.examples.bpm.queries.system.JobTaskCorrespondence"))
- assertNotNull(QuerySpecificationRegistry::getQuerySpecification("org.eclipse.viatra.examples.bpm.queries.system.DataTaskReadCorrespondence"))
- assertNotNull(QuerySpecificationRegistry::getQuerySpecification("org.eclipse.viatra.examples.bpm.queries.system.DataTaskWriteCorrespondence"))
- assertNotNull(QuerySpecificationRegistry::getQuerySpecification("org.eclipse.viatra.examples.bpm.queries.system.JobInfoCorrespondence"))
- assertNotNull(QuerySpecificationRegistry::getQuerySpecification("org.eclipse.viatra.examples.bpm.queries.operation.ChecklistEntryJobCorrespondence"))
- assertNotNull(QuerySpecificationRegistry::getQuerySpecification("org.eclipse.viatra.examples.bpm.queries.operation.ChecklistEntryTaskCorrespondence"))
- assertNotNull(QuerySpecificationRegistry::getQuerySpecification("org.eclipse.viatra.examples.bpm.queries.operation.ChecklistProcessCorrespondence"))
-
- }
-
- @Test
- def simpleGetterTest(){
-
- val rs = new ResourceSetImpl
- val resource = loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.system")
-
- val sys = resource.contents.get(0) as System
- sys.contains.forEach[
- assertTrue(it.tasks.empty)
- ]
- sys.data.forEach[
- assertTrue(it.readingTask.empty)
- assertTrue(it.writingTask.empty)
- ]
-
- loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.process")
- sys.contains.forEach[
- val job = it as Job
- assertTrue(job.taskIds.size == job.tasks.size)
- // all elements resolved
- assertTrue(job.taskIds.filter[tid |
- job.tasks.filter[
- val task = it as Task
- task.id == tid
- ].empty
- ].empty)
- assertTrue(job.tasks.filter[
- val task = it as Task
- !job.taskIds.contains(task.id)
- ].empty)
- ]
- sys.data.forEach[
- val data = it as Data
- assertTrue(data.readingTaskIds.size == data.readingTask.size)
- // all elements resolved
- assertTrue(data.readingTask.filter[
- val task = it as Task
- !data.readingTaskIds.contains(task.id)
- ].empty)
- assertTrue(data.writingTaskIds.size == data.writingTask.size)
- // all elements resolved
- assertTrue(data.writingTask.filter[
- val task = it as Task
- !data.writingTaskIds.contains(task.id)
- ].empty)
- ]
-
- }
-
- @Test
- def simpleModifyTest(){
- val rs = new ResourceSetImpl
- val resource = loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.system")
- loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.process")
-
- val sys = resource.contents.get(0) as System
- sys.contains.forEach[
- assertTrue(it.tasks.size == it.taskIds.size)
- ]
-
- val job = sys.contains.get(0)
-
- val engine = AdvancedViatraQueryEngine::on(new EMFScope(rs))
- val matcher = ProcessTasksMatcher::on(engine)
- matcher.forEachMatch[
- if(!job.tasks.contains(task)){
- job.taskIds += task.id
- }
- assertTrue(job.tasks.contains(task))
- ]
-
- val data = sys.data.get(0)
- data.readingTaskIds.clear
- assertTrue(data.readingTask.empty)
- }
-
- @Test
- def singleFeatureTest(){
- val rs = new ResourceSetImpl
- val resource = loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.operation")
-
- val checklist = resource.contents.get(0) as Checklist
-
- checklist.entries.forEach[
- assertNull(it.task)
- ]
-
- loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.process")
- val engine = AdvancedViatraQueryEngine::on(new EMFScope(rs))
- val procMatcher = ProcessTasksMatcher::on(engine)
-
- checklist.entries.forEach[
- if(it.taskId != null){
- assertTrue(it.task.id == it.taskId)
- }
-
- val t = it.task
- t.id = "changedID"
- assertNull(it.task)
-
- it.taskId = "changedID"
- assertTrue(it.task == t)
-
- it.taskId = null
- assertNull(it.task)
-
- val entry = it
-
- procMatcher.forEachMatch[
- entry.taskId = task.id
- ]
- ]
- }
-
- @Test
- def violateSingleFeatureTest(){
-
- val rs = new ResourceSetImpl
- val resource = loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.operation")
- val resource2 = loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.process")
-
- val checklist = resource.contents.get(0) as Checklist
- val proc = resource2.contents.get(0) as Process
- val entry = checklist.entries.get(0)
- val tid = entry.taskId
- proc.contents.forEach[
- it.id = tid
- ]
-
- val engine = ViatraQueryEngine::on(new EMFScope(rs))
- engine.registerLogger
-
- entry.task
-
- val logOut = engine.retrieveLoggerOutput
- assertTrue(logOut.contains("[QueryBasedFeature] Space-time continuum breached (should never happen): multiple values for single feature!"));
- }
-
- @Test
- def initDuringMatcherBuilding(){
-
- val rs = new ResourceSetImpl
- loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.system")
- loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.process")
-
- val engine = AdvancedViatraQueryEngine::on(new EMFScope(rs))
- engine.registerLogger
-
- val matcher = JobTasksMatcher::on(engine)
-
- assertTrue(matcher.countMatches > 0);
- matcher.forEachMatch[
- job.taskIds.clear
- assertTrue(job.tasks.empty)
- ]
- }
-
- @Test
- def uncachedSingleFeatureTest() {
-
- val rs = new ResourceSetImpl
- loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.system")
- loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.process")
- val resource = loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.operation")
-
- val singleqbf = QueryBasedFeatureHelper::getQueryBasedFeatureHandler(rs,
- OperationPackage::eINSTANCE.checklistEntry_Task,
- "org.eclipse.viatra.examples.bpm.queries.operation.ChecklistEntryTaskCorrespondence",
- "CLE", "Task",
- QueryBasedFeatureKind::SINGLE_REFERENCE, false);
-
-
- val checklist = resource.contents.get(0) as Checklist
-
- checklist.entries.forEach[
- assertEquals(singleqbf.getValue(it),it.task)
- ]
- }
-
- @Test
- def uncachedManyFeatureTest() {
- val rs = new ResourceSetImpl
- loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.system")
- loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.process")
- val resource = loadAdditionalResourceFromUri(rs,"org.eclipse.viatra.examples.bpm.tests/model/Simple.operation")
-
- val manyqbf = QueryBasedFeatureHelper::getQueryBasedFeatureHandler(
- rs, OperationPackage::eINSTANCE.checklistEntry_Jobs,
- "org.eclipse.viatra.examples.bpm.queries.operation.ChecklistEntryJobCorrespondence", "CLE",
- "Job", QueryBasedFeatureKind::MANY_REFERENCE, false);
-
- val checklist = resource.contents.get(0) as Checklist
-
- checklist.entries.forEach[
- assertEquals(manyqbf.getValue(it),it.jobs)
- ]
- }
-}
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/RuntimeListenerTest.xtend b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/RuntimeListenerTest.xtend
deleted file mode 100644
index f0fa863e3..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/RuntimeListenerTest.xtend
+++ /dev/null
@@ -1,275 +0,0 @@
-package org.eclipse.viatra.examples.bpm.tests
-
-import com.google.inject.Inject
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
-import org.eclipse.viatra.examples.bpm.tests.queries.NextActivityMatcher
-import org.eclipse.viatra.examples.bpm.tests.queries.ProcessTasksMatcher
-import org.eclipse.viatra.query.runtime.api.IPatternMatch
-import org.eclipse.viatra.query.runtime.api.ViatraQueryModelUpdateListener.ChangeLevel
-import org.eclipse.viatra.query.testing.core.ModelLoadHelper
-import org.eclipse.viatra.query.testing.core.injector.EMFPatternLanguageInjectorProvider
-import org.eclipse.xtext.junit4.InjectWith
-import org.eclipse.xtext.junit4.XtextRunner
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.eclipse.viatra.examples.bpm.process.ProcessFactory
-
-import static org.junit.Assert.*
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineManager
-import org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine
-import org.eclipse.viatra.query.runtime.emf.EMFScope
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine
-import org.eclipse.viatra.query.runtime.api.ViatraQueryModelUpdateListener
-import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineLifecycleListener
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineInitializationListener
-import org.eclipse.xtend.lib.annotations.Accessors
-
-@RunWith(typeof(XtextRunner))
-@InjectWith(typeof(EMFPatternLanguageInjectorProvider))
-class RuntimeListenerTest {
- @Inject extension ModelLoadHelper
-
- @Test
- def engineInitializationListenerTest(){
-
- val rs = new ResourceSetImpl
- val manager = ViatraQueryEngineManager::instance
- val listener = new InitListener
-
- manager.addQueryEngineInitializationListener(listener)
-
- AdvancedViatraQueryEngine::createUnmanagedEngine(new EMFScope(rs))
- assertTrue(listener.engines.empty)
-
- val e2 = ViatraQueryEngine::on(new EMFScope(rs))
- assertArrayEquals(newArrayList(e2), listener.engines)
-
- manager.removeQueryEngineInitializationListener(listener)
- val e3 = AdvancedViatraQueryEngine::createUnmanagedEngine(new EMFScope(rs))
-
- assertTrue(!listener.engines.contains(e3))
- }
-
- @Test
- def engineLifecycleListenerTest(){
-
- val resource = loadModelFromUri("org.eclipse.viatra.examples.bpm.tests/model/Simple.process")
- val engine = AdvancedViatraQueryEngine::createUnmanagedEngine(new EMFScope(resource))
- val listener = new LifycycleListener
-
- engine.addLifecycleListener(listener)
-
- val matcher = ProcessTasksMatcher::on(engine)
- assertArrayEquals(newArrayList(matcher), listener.matchers)
-
- //Cannot externally taint the engine; turning check off
- //engine.logger.fatal("Tainting in progress")
- //assertTrue(listener.tainted)
-
- engine.wipe
- assertTrue(listener.wiped)
-
- listener.wiped = false
- engine.dispose
- assertTrue(listener.wiped)
- assertTrue(listener.disposed)
-
- engine.removeLifecycleListener(listener)
- listener.disposed = false
- engine.dispose
- assertFalse(listener.disposed)
-
- }
-
- @Test
- def modelUpdateListenerTest(){
-
- val resource = loadModelFromUri("org.eclipse.viatra.examples.bpm.tests/model/Simple.process")
- val engine = AdvancedViatraQueryEngine::createUnmanagedEngine(new EMFScope(resource))
- val model = new ModelUpdateListener(ChangeLevel::MODEL)
-
- engine.addModelUpdateListener(model)
-
- val matcher = ProcessTasksMatcher::on(engine)
- model.changes.clear
-
- matcher.forOneArbitraryMatch[
- task.name = "changedName"
- val task2 = ProcessFactory::eINSTANCE.createTask// => [name = "newName"]
- task.parent.contents += task2
- ]
- /* NOTE: the second change is actually MATCHSET,
- * but since no listener is registered with that level,
- * it will be considered as INDEX */
- assertArrayEquals(newArrayList(ChangeLevel::MODEL,ChangeLevel::INDEX), model.changes)
-
- val index = new ModelUpdateListener(ChangeLevel::INDEX)
- engine.addModelUpdateListener(index)
- matcher.forOneArbitraryMatch[
- task.name = "changedName2"
- val task2 = ProcessFactory::eINSTANCE.createTask// => [name = "newName"]
- task.parent.contents += task2
- ]
- /* NOTE: the change is actually MATCHSET,
- * but since no listener is registered with that level,
- * it will be considered as INDEX */
- assertArrayEquals(newArrayList(ChangeLevel::INDEX), index.changes)
- index.changes.clear
-
- val matchset = new ModelUpdateListener(ChangeLevel::MATCHSET)
- engine.addModelUpdateListener(matchset)
- matcher.forOneArbitraryMatch[
- task.name = "changedName3"
- val task2 = ProcessFactory::eINSTANCE.createTask// => [name = "newName"]
- task.parent.contents += task2
- ]
- assertArrayEquals(newArrayList(ChangeLevel::MATCHSET), matchset.changes)
- assertArrayEquals(newArrayList(ChangeLevel::MATCHSET), index.changes)
-
- matchset.changes.clear
- // test new matcher added
- val nextMatcher = NextActivityMatcher::on(engine)
- matcher.forOneArbitraryMatch[
- val task2 = ProcessFactory::eINSTANCE.createTask// => [name = "newName"]
- task.parent.contents += task2
- task.next += task2
- ]
- assertArrayEquals(newArrayList(ChangeLevel::MATCHSET,ChangeLevel::MATCHSET), matchset.changes)
-
- // test removal
- engine.removeModelUpdateListener(model)
- model.changes.clear
-
- nextMatcher.forOneArbitraryMatch[
- next.name = "changedName4"
- next.previous.remove(act)
- ]
- engine.removeModelUpdateListener(matchset)
-
- index.changes.clear
- matcher.forOneArbitraryMatch[
- val task2 = ProcessFactory::eINSTANCE.createTask// => [name = "newName"]
- task.parent.contents += task2
- ]
- assertArrayEquals(newArrayList(ChangeLevel::INDEX), index.changes)
- assertTrue(model.changes.empty)
-
- //test wipe
- engine.wipe
-
- //test unsuccesful remove
- index.myLevel = ChangeLevel::MATCHSET
- val model2 = new ModelUpdateListener(ChangeLevel::MODEL)
- engine.addModelUpdateListener(model2)
- engine.removeModelUpdateListener(index)
- engine.removeModelUpdateListener(model)
- engine.removeModelUpdateListener(model2)
-
- // test all listeners removed
- val matcher2 = ProcessTasksMatcher::on(engine)
- matcher2.forOneArbitraryMatch[
- val task2 = ProcessFactory::eINSTANCE.createTask// => [name = "newName"]
- task.parent.contents += task2
- ]
-
- // test multi add
- engine.addModelUpdateListener(model)
- engine.addModelUpdateListener(model)
- engine.removeModelUpdateListener(index)
- // test dispose
- engine.dispose
- engine.removeModelUpdateListener(model)
-
- }
-
-}
-
-class InitListener implements ViatraQueryEngineInitializationListener{
-
- @Property val engines = newArrayList()
-
- override engineInitialized(AdvancedViatraQueryEngine engine) {
- assertTrue(AdvancedViatraQueryEngine::from(engine).managed)
- engines += engine
- }
-
-}
-
-class LifycycleListener implements ViatraQueryEngineLifecycleListener{
-
-// @Property
- var tainted = false
-// @Property
- var disposed = false
-// @Property
- var wiped = false
-// @Property
- var matchers = newArrayList
-
- def isTainted() {
- tainted
- }
-
- def setTainted(boolean tainted) {
- this.tainted = tainted
- }
-
- def isDisposed() {
- disposed
- }
-
- def setDisposed(boolean disposed) {
- this.disposed = disposed
- }
-
- def isWiped() {
- wiped
- }
-
- def setWiped(boolean wiped) {
- this.wiped = wiped
- }
-
- def getMatchers() {
- matchers
- }
-
- override engineBecameTainted(String description, Throwable t) {
- tainted = true
- }
-
- override engineDisposed() {
- disposed = true
- }
-
- override engineWiped() {
- wiped = true
- }
-
- override matcherInstantiated(ViatraQueryMatcher<? extends IPatternMatch> matcher) {
- matchers += matcher
- }
-
-}
-
-class ModelUpdateListener implements ViatraQueryModelUpdateListener{
-
- @Accessors ChangeLevel myLevel
-
- @Accessors val changes = newArrayList
-
- new(ChangeLevel level) {
- myLevel = level
- }
-
- override getLevel() {
- myLevel
- }
-
- override notifyChanged(ChangeLevel changeLevel) {
- assertFalse(changeLevel.compareTo(myLevel) < 0)
- changes += changeLevel
- }
-
-} \ No newline at end of file
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/queries/bpmTestQueries.vql b/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/queries/bpmTestQueries.vql
deleted file mode 100644
index 21f4d9528..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm.tests/src/org/eclipse/viatra/examples/bpm/tests/queries/bpmTestQueries.vql
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.eclipse.viatra.examples.bpm.tests.queries
-
-import "http://operation/1.0"
-import "http://process/1.0"
-import "http://system/1.0"
-
-pattern processTasks(Proc : Process , Task : Activity){
- Process.contents(Proc, Task);
-}
-
-pattern nextActivity(Act : Activity,Next : Activity){
- Activity.next(Act,Next);
-}
-
-pattern jobTasks(Job : Job,Task : Task) {
- Job.tasks(Job, Task);
-}
-
-pattern entryTask(Entry : ChecklistEntry, Task : Task) {
- ChecklistEntry.task(Entry, Task);
-} \ No newline at end of file
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/.classpath b/examples/bpm/org.eclipse.viatra.examples.bpm/.classpath
deleted file mode 100644
index 18dbf9075..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="emf-gen"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/.project b/examples/bpm/org.eclipse.viatra.examples.bpm/.project
deleted file mode 100644
index bfbdc4b07..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.examples.bpm</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/.settings/org.eclipse.core.resources.prefs b/examples/bpm/org.eclipse.viatra.examples.bpm/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index fc18606c0..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,13 +0,0 @@
-eclipse.preferences.version=1
-encoding//model/derivedModel.ecore=UTF-8
-encoding//model/derivedModel.ecorediag=UTF-8
-encoding//model/integrated.ecore=UTF-8
-encoding//model/integrated.ecorediag=UTF-8
-encoding//model/integration.ecore=UTF-8
-encoding//model/integration.ecorediag=UTF-8
-encoding//model/operation.ecore=UTF-8
-encoding//model/operation.ecorediag=UTF-8
-encoding//model/process.ecore=UTF-8
-encoding//model/process.ecorediag=UTF-8
-encoding//model/system.ecore=UTF-8
-encoding//model/system.ecorediag=UTF-8
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/.settings/org.eclipse.jdt.core.prefs b/examples/bpm/org.eclipse.viatra.examples.bpm/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 7341ab168..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,11 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/META-INF/MANIFEST.MF b/examples/bpm/org.eclipse.viatra.examples.bpm/META-INF/MANIFEST.MF
deleted file mode 100644
index afa1e4eca..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.viatra.examples.bpm;singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.viatra.examples.bpm.operation,
- org.eclipse.viatra.examples.bpm.operation.impl,
- org.eclipse.viatra.examples.bpm.operation.util,
- org.eclipse.viatra.examples.bpm.process,
- org.eclipse.viatra.examples.bpm.process.impl,
- org.eclipse.viatra.examples.bpm.process.util,
- org.eclipse.viatra.examples.bpm.system,
- org.eclipse.viatra.examples.bpm.system.impl,
- org.eclipse.viatra.examples.bpm.system.util
-Require-Bundle: org.eclipse.viatra.query.runtime,
- org.eclipse.viatra.addon.querybasedfeatures.runtime,
- org.eclipse.core.runtime,
- org.eclipse.emf.ecore;visibility:=reexport
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Bundle-ActivationPolicy: lazy
-Eclipse-LazyStart: true
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/build.properties b/examples/bpm/org.eclipse.viatra.examples.bpm/build.properties
deleted file mode 100644
index 85b120be2..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/build.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id$
-
-bin.includes = .,\
- model/,\
- META-INF/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = .
-source.. = emf-gen/
-output.. = bin/
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/emf-gen/.gitignore b/examples/bpm/org.eclipse.viatra.examples.bpm/emf-gen/.gitignore
deleted file mode 100644
index ce4a58f9f..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/emf-gen/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-#This file is needed to prevent git from omitting this folder that would cause build issues/compile errors.
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore \ No newline at end of file
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/model/derivedModel.ecore b/examples/bpm/org.eclipse.viatra.examples.bpm/model/derivedModel.ecore
deleted file mode 100644
index ef26ed848..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/model/derivedModel.ecore
+++ /dev/null
@@ -1,39 +0,0 @@
-<?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="derivedmodel"
- nsURI="http://derivedmodel/1.0" nsPrefix="derivedmodel">
- <eClassifiers xsi:type="ecore:EClass" name="DerivedOPRModel" eSuperTypes="#//DerivedModel">
- <eStructuralFeatures xsi:type="ecore:EReference" name="undefinedServiceTasks"
- upperBound="-1" eType="ecore:EClass process.ecore#//Task"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="incorrectEntriesInChecklist"
- upperBound="-1" eType="ecore:EClass operation.ecore#//ChecklistEntry"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="DerivedOPRClass"/>
- <eClassifiers xsi:type="ecore:EClass" name="TaskJobCrs" eSuperTypes="#//DerivedClass">
- <eStructuralFeatures xsi:type="ecore:EReference" name="tasks" lowerBound="1" upperBound="-1"
- eType="ecore:EClass process.ecore#//Task"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="jobs" lowerBound="1" upperBound="-1"
- eType="ecore:EClass system.ecore#//Job"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="DataConnection" eSuperTypes="#//DerivedClass">
- <eStructuralFeatures xsi:type="ecore:EReference" name="source" lowerBound="1"
- eType="ecore:EClass process.ecore#//Task"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="targets" lowerBound="1"
- upperBound="-1" eType="ecore:EClass process.ecore#//Task"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="EntryTaskJobCrs" eSuperTypes="#//DerivedClass">
- <eStructuralFeatures xsi:type="ecore:EReference" name="jobs" lowerBound="1" upperBound="-1"
- eType="ecore:EClass system.ecore#//Job"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="task" lowerBound="1" eType="ecore:EClass process.ecore#//Task"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="entry" lowerBound="1" eType="ecore:EClass operation.ecore#//ChecklistEntry"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="DerivedModel">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="queryDefinitions" upperBound="-1"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="contents" upperBound="-1"
- eType="#//DerivedClass" containment="true"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="DerivedClass">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="queryDefinition"/>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/model/derivedModel.ecorediag b/examples/bpm/org.eclipse.viatra.examples.bpm/model/derivedModel.ecorediag
deleted file mode 100644
index 8d8de321f..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/model/derivedModel.ecorediag
+++ /dev/null
@@ -1,334 +0,0 @@
-<?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="_QBBT4HcmEeGXkefMxfswBQ" type="EcoreTools" name="derivedModel" measurementUnit="Pixel">
- <children xmi:type="notation:Node" xmi:id="_0Fg10HcmEeGXkefMxfswBQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_0Fhc4HcmEeGXkefMxfswBQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_0Fhc4XcmEeGXkefMxfswBQ" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_0Fhc4ncmEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_0Fhc43cmEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_0FiD8HcmEeGXkefMxfswBQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_0FiD8XcmEeGXkefMxfswBQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_0FiD8ncmEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_0FiD83cmEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_0FiD9HcmEeGXkefMxfswBQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_0Fg10XcmEeGXkefMxfswBQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="derivedModel.ecore#//DerivedOPRModel"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0Fg10ncmEeGXkefMxfswBQ" x="168" y="120" width="142"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_b7L4YHftEeGN1531GEbqDw" type="1001">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_b7gogHftEeGN1531GEbqDw" source="Shortcut">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_b7gogXftEeGN1531GEbqDw" key="modelID" value="EcoreTools"/>
- </eAnnotations>
- <children xmi:type="notation:Node" xmi:id="_b7NGgHftEeGN1531GEbqDw" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_b7NtkHftEeGN1531GEbqDw" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_b7NtkXftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_b7NtknftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_b7Ntk3ftEeGN1531GEbqDw"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_b7OUoHftEeGN1531GEbqDw" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_b7OUoXftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_b7OUonftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_b7OUo3ftEeGN1531GEbqDw"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_b7L4YXftEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="operation.ecore#//ChecklistEntry"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_b7L4YnftEeGN1531GEbqDw" x="300" y="408" width="135"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_e-mmEHftEeGN1531GEbqDw" type="1001">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_e-w-IHftEeGN1531GEbqDw" source="Shortcut">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_e-xlMHftEeGN1531GEbqDw" key="modelID" value="EcoreTools"/>
- </eAnnotations>
- <children xmi:type="notation:Node" xmi:id="_e-nNIHftEeGN1531GEbqDw" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_e-nNIXftEeGN1531GEbqDw" type="5001">
- <children xmi:type="notation:Node" xmi:id="_e-ppYHftEeGN1531GEbqDw" type="2001">
- <element xmi:type="ecore:EAttribute" href="process.ecore#//Task/kind"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_e-ppYXftEeGN1531GEbqDw"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_e-nNInftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_e-nNI3ftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_e-nNJHftEeGN1531GEbqDw"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_e-nNJXftEeGN1531GEbqDw" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_e-nNJnftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_e-nNJ3ftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_e-nNKHftEeGN1531GEbqDw"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_e-mmEXftEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="process.ecore#//Task"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_e-mmEnftEeGN1531GEbqDw" x="300" y="168"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_fPOcAHftEeGN1531GEbqDw" type="1001">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fPm2gHftEeGN1531GEbqDw" source="Shortcut">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fPm2gXftEeGN1531GEbqDw" key="modelID" value="EcoreTools"/>
- </eAnnotations>
- <children xmi:type="notation:Node" xmi:id="_fPOcA3ftEeGN1531GEbqDw" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_fPPDEHftEeGN1531GEbqDw" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_fPPDEXftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fPPDEnftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fPPDE3ftEeGN1531GEbqDw"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_fPPDFHftEeGN1531GEbqDw" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_fPPDFXftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fPPDFnftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fPPDF3ftEeGN1531GEbqDw"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_fPOcAXftEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="system.ecore#//Job"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fPOcAnftEeGN1531GEbqDw" x="300" y="300"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_vTP5QHftEeGN1531GEbqDw" type="1001">
- <children xmi:type="notation:Node" xmi:id="_vTP5Q3ftEeGN1531GEbqDw" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_vTP5RHftEeGN1531GEbqDw" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_vTP5RXftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_vTP5RnftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_vTP5R3ftEeGN1531GEbqDw"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_vTP5SHftEeGN1531GEbqDw" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_vTP5SXftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_vTP5SnftEeGN1531GEbqDw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_vTP5S3ftEeGN1531GEbqDw"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_vTP5QXftEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="derivedModel.ecore#//TaskJobCrs"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_vTP5QnftEeGN1531GEbqDw" x="528" y="240" width="113"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_F7B-cHfuEeGN1531GEbqDw" type="1001">
- <children xmi:type="notation:Node" xmi:id="_F7ClgHfuEeGN1531GEbqDw" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_F7DMkHfuEeGN1531GEbqDw" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_F7DMkXfuEeGN1531GEbqDw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_F7DMknfuEeGN1531GEbqDw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_F7DMk3fuEeGN1531GEbqDw"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_F7DMlHfuEeGN1531GEbqDw" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_F7DMlXfuEeGN1531GEbqDw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_F7DMlnfuEeGN1531GEbqDw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_F7DMl3fuEeGN1531GEbqDw"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_F7B-cXfuEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="derivedModel.ecore#//DataConnection"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_F7B-cnfuEeGN1531GEbqDw" x="528" y="168"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_r_xkEHfyEeGN1531GEbqDw" type="1001">
- <children xmi:type="notation:Node" xmi:id="_r_yLIHfyEeGN1531GEbqDw" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_r_yLIXfyEeGN1531GEbqDw" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_r_yLInfyEeGN1531GEbqDw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_r_yLI3fyEeGN1531GEbqDw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_r_yLJHfyEeGN1531GEbqDw"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_r_yLJXfyEeGN1531GEbqDw" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_r_yLJnfyEeGN1531GEbqDw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_r_yLJ3fyEeGN1531GEbqDw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_r_yLKHfyEeGN1531GEbqDw"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_r_xkEXfyEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="derivedModel.ecore#//EntryTaskJobCrs"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_r_xkEnfyEeGN1531GEbqDw" x="528" y="348" width="123"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_u5_-wXv-EeGHztdWf87pxQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_u6S5sHv-EeGHztdWf87pxQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_u6cqsHv-EeGHztdWf87pxQ" type="5001">
- <children xmi:type="notation:Node" xmi:id="_wQcNQHv-EeGHztdWf87pxQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="derivedModel.ecore#//DerivedModel/queryDefinitions"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_wQcNQXv-EeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_u6cqsXv-EeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_u6cqsnv-EeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_u6cqs3v-EeGHztdWf87pxQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_u6cqtHv-EeGHztdWf87pxQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_u6cqtXv-EeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_u6cqtnv-EeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_u6cqt3v-EeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_u5_-wnv-EeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="derivedModel.ecore#//DerivedModel"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_u5_-w3v-EeGHztdWf87pxQ" x="180" y="36"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_3s9pMHv-EeGHztdWf87pxQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_3s9pM3v-EeGHztdWf87pxQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_3s9pNHv-EeGHztdWf87pxQ" type="5001">
- <children xmi:type="notation:Node" xmi:id="_6GMxcHv-EeGHztdWf87pxQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="derivedModel.ecore#//DerivedClass/queryDefinition"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_6GMxcXv-EeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_3s9pNXv-EeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_3s9pNnv-EeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_3s9pN3v-EeGHztdWf87pxQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_3tGzIHv-EeGHztdWf87pxQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_3tGzIXv-EeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_3tGzInv-EeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_3tGzI3v-EeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_3s9pMXv-EeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="derivedModel.ecore#//DerivedClass"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3s9pMnv-EeGHztdWf87pxQ" x="552" y="36"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_QBBT4XcmEeGXkefMxfswBQ"/>
- <element xmi:type="ecore:EPackage" href="derivedModel.ecore#/"/>
- <edges xmi:type="notation:Edge" xmi:id="_97WSgHcmEeGXkefMxfswBQ" type="3002" source="_u5_-wXv-EeGHztdWf87pxQ" target="_3s9pMHv-EeGHztdWf87pxQ">
- <children xmi:type="notation:Node" xmi:id="_97W5kHcmEeGXkefMxfswBQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_97W5kXcmEeGXkefMxfswBQ" x="-7" y="-12"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_97W5kncmEeGXkefMxfswBQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_97W5k3cmEeGXkefMxfswBQ" x="18" y="12"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_97WSgXcmEeGXkefMxfswBQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_97WSgncmEeGXkefMxfswBQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="derivedModel.ecore#//DerivedModel/contents"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_97WSg3cmEeGXkefMxfswBQ" points="[-13, 18, 80, -100]$[-92, 121, 1, 3]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_97YHsHcmEeGXkefMxfswBQ" id="(0.896,0.49019607843137253)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_97YHsXcmEeGXkefMxfswBQ" id="(0.125,0.5490196078431373)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_w0lJIHftEeGN1531GEbqDw" type="3003" source="_vTP5QHftEeGN1531GEbqDw" target="_3s9pMHv-EeGHztdWf87pxQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_w0lJIXftEeGN1531GEbqDw" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_w0lJInftEeGN1531GEbqDw" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_w0lJI3ftEeGN1531GEbqDw" points="[17, -36, -40, 200]$[17, -48, -40, 188]$[59, -48, 2, 188]$[59, -227, 2, 9]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_w0m-UHftEeGN1531GEbqDw" id="(0.5515151515151515,0.8837209302325582)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_w0m-UXftEeGN1531GEbqDw" id="(0.8,0.8235294117647058)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_xbQHkHftEeGN1531GEbqDw" type="3002" source="_vTP5QHftEeGN1531GEbqDw" target="_e-mmEHftEeGN1531GEbqDw">
- <children xmi:type="notation:Node" xmi:id="_xbQuo3ftEeGN1531GEbqDw" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_xbQupHftEeGN1531GEbqDw" x="-26" y="-8"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_xbQupXftEeGN1531GEbqDw" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_xbQupnftEeGN1531GEbqDw" x="-3" y="-7"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_xbQuoHftEeGN1531GEbqDw" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_xbQuoXftEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="derivedModel.ecore#//TaskJobCrs/tasks"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_xbQuonftEeGN1531GEbqDw" points="[-10, 13, 89, -142]$[-120, 118, -21, -37]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_xbTK4HftEeGN1531GEbqDw" id="(0.49557522123893805,0.7906976744186046)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PQQEkHfyEeGN1531GEbqDw" id="(0.0423728813559322,0.08823529411764706)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_zD_nAHftEeGN1531GEbqDw" type="3002" source="_vTP5QHftEeGN1531GEbqDw" target="_fPOcAHftEeGN1531GEbqDw">
- <children xmi:type="notation:Node" xmi:id="_zEBcMHftEeGN1531GEbqDw" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_zEBcMXftEeGN1531GEbqDw" x="-12" y="-11"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_zEBcMnftEeGN1531GEbqDw" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_zEBcM3ftEeGN1531GEbqDw" x="-10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_zD_nAXftEeGN1531GEbqDw" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_zD_nAnftEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="derivedModel.ecore#//TaskJobCrs/jobs"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_zD_nA3ftEeGN1531GEbqDw" points="[2, 21, -21, -138]$[-12, 126, -35, -33]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_aWLM8HfuEeGN1531GEbqDw" type="3002" source="_0Fg10HcmEeGXkefMxfswBQ" target="_e-mmEHftEeGN1531GEbqDw">
- <children xmi:type="notation:Node" xmi:id="_aWL0AHfuEeGN1531GEbqDw" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_aWL0AXfuEeGN1531GEbqDw" x="2" y="20"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_aWL0AnfuEeGN1531GEbqDw" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_aWL0A3fuEeGN1531GEbqDw" x="5" y="-9"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_aWLM8XfuEeGN1531GEbqDw" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_aWLM8nfuEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="derivedModel.ecore#//DerivedOPRModel/undefinedServiceTasks"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_aWLM83fuEeGN1531GEbqDw" points="[-7, 4, -45, -60]$[-7, 71, -45, 7]$[29, 71, -9, 7]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_aWOQQHfuEeGN1531GEbqDw" id="(0.7394366197183099,0.9069767441860465)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_RnP0cXjfEeGojPD3AN5c8w" id="(0.0847457627118644,0.8088235294117647)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_qPPXYHfuEeGN1531GEbqDw" type="3002" source="_F7B-cHfuEeGN1531GEbqDw" target="_e-mmEHftEeGN1531GEbqDw">
- <children xmi:type="notation:Node" xmi:id="_qPP-cHfuEeGN1531GEbqDw" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_qPP-cXfuEeGN1531GEbqDw" x="-21" y="-8"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_qPP-cnfuEeGN1531GEbqDw" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_qPP-c3fuEeGN1531GEbqDw" x="6" y="12"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_qPPXYXfuEeGN1531GEbqDw" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_qPPXYnfuEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="derivedModel.ecore#//DataConnection/source"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qPPXY3fuEeGN1531GEbqDw" points="[-7, -3, 174, -8]$[-7, -27, 174, -32]$[-187, -27, -6, -32]$[-187, -3, -6, -8]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qPRzoHfuEeGN1531GEbqDw" id="(0.38596491228070173,0.09302325581395349)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qPRzoXfuEeGN1531GEbqDw" id="(0.7796610169491526,0.1323529411764706)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_r1UkYHfuEeGN1531GEbqDw" type="3002" source="_F7B-cHfuEeGN1531GEbqDw" target="_e-mmEHftEeGN1531GEbqDw">
- <children xmi:type="notation:Node" xmi:id="_r1UkZHfuEeGN1531GEbqDw" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_r1VLcHfuEeGN1531GEbqDw" x="-10" y="12"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_r1VLcXfuEeGN1531GEbqDw" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_r1VLcnfuEeGN1531GEbqDw" x="-13" y="-8"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_r1UkYXfuEeGN1531GEbqDw" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_r1UkYnfuEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="derivedModel.ecore#//DataConnection/targets"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_r1UkY3fuEeGN1531GEbqDw" points="[-19, 2, 170, 0]$[-103, 2, 86, 0]$[-103, 2, 86, 0]$[-131, 2, 58, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_r1XAoHfuEeGN1531GEbqDw" id="(0.17543859649122806,0.7674418604651163)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_FeXTwHfyEeGN1531GEbqDw" type="3003" source="_F7B-cHfuEeGN1531GEbqDw" target="_3s9pMHv-EeGHztdWf87pxQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_FeXTwXfyEeGN1531GEbqDw" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_FeXTwnfyEeGN1531GEbqDw" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_FeXTw3fyEeGN1531GEbqDw" points="[20, -20, -39, 129]$[20, -32, -39, 117]$[64, -32, 5, 117]$[64, -139, 5, 10]"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_G7IcgHv_EeGHztdWf87pxQ" id="(0.775,0.803921568627451)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_cLqLEHfyEeGN1531GEbqDw" type="3002" source="_0Fg10HcmEeGXkefMxfswBQ" target="_b7L4YHftEeGN1531GEbqDw">
- <children xmi:type="notation:Node" xmi:id="_cLtOYHfyEeGN1531GEbqDw" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_cLtOYXfyEeGN1531GEbqDw" x="48" y="-25"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_cLt1cHfyEeGN1531GEbqDw" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_cLt1cXfyEeGN1531GEbqDw" x="45" y="12"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_cLqLEXfyEeGN1531GEbqDw" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_cLqLEnfyEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="derivedModel.ecore#//DerivedOPRModel/incorrectEntriesInChecklist"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_cLqLE3fyEeGN1531GEbqDw" points="[8, 3, -108, -255]$[8, 258, -108, 0]$[104, 258, -12, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qye1EHfzEeGN1531GEbqDw" id="(0.20422535211267606,0.9302325581395349)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WErpEHjfEeGojPD3AN5c8w" id="(0.0962962962962963,0.15)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_vUGbkHfyEeGN1531GEbqDw" type="3002" source="_r_xkEHfyEeGN1531GEbqDw" target="_fPOcAHftEeGN1531GEbqDw">
- <children xmi:type="notation:Node" xmi:id="_vUHCoHfyEeGN1531GEbqDw" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_vUHCoXfyEeGN1531GEbqDw" x="-24" y="-12"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_vUHConfyEeGN1531GEbqDw" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_vUHCo3fyEeGN1531GEbqDw" x="1" y="-13"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_vUGbkXfyEeGN1531GEbqDw" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_vUGbknfyEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="derivedModel.ecore#//EntryTaskJobCrs/jobs"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_vUGbk3fyEeGN1531GEbqDw" points="[-54, 21, 354, -133]$[-406, 136, 2, -18]"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_vUJe4HfyEeGN1531GEbqDw" id="(0.7723577235772358,0.27941176470588236)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_x0Wx0HfyEeGN1531GEbqDw" type="3003" source="_r_xkEHfyEeGN1531GEbqDw" target="_3s9pMHv-EeGHztdWf87pxQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_x0Wx0XfyEeGN1531GEbqDw" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_x0Wx0nfyEeGN1531GEbqDw" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_x0Wx03fyEeGN1531GEbqDw" points="[20, -20, -40, 301]$[20, -32, -40, 289]$[60, -32, 0, 289]$[60, -319, 0, 2]"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_x0YnAHfyEeGN1531GEbqDw" id="(0.8166666666666667,0.9607843137254902)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_5wEEIHfyEeGN1531GEbqDw" type="3002" source="_r_xkEHfyEeGN1531GEbqDw" target="_e-mmEHftEeGN1531GEbqDw">
- <children xmi:type="notation:Node" xmi:id="_5wEEJHfyEeGN1531GEbqDw" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_5wEEJXfyEeGN1531GEbqDw" x="5" y="-16"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_5wErMHfyEeGN1531GEbqDw" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_5wErMXfyEeGN1531GEbqDw" x="23" y="-11"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_5wEEIXfyEeGN1531GEbqDw" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_5wEEInfyEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="derivedModel.ecore#//EntryTaskJobCrs/task"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_5wEEI3fyEeGN1531GEbqDw" points="[0, -1, 170, 161]$[-136, -129, 34, 33]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_aGpJ4HfzEeGN1531GEbqDw" id="(0.21951219512195122,0.16279069767441862)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_HkSpAHfzEeGN1531GEbqDw" type="3002" source="_r_xkEHfyEeGN1531GEbqDw" target="_b7L4YHftEeGN1531GEbqDw">
- <children xmi:type="notation:Node" xmi:id="_HkTQEHfzEeGN1531GEbqDw" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_HkTQEXfzEeGN1531GEbqDw" x="1" y="-14"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_HkTQEnfzEeGN1531GEbqDw" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_HkTQE3fzEeGN1531GEbqDw" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_HkSpAXfzEeGN1531GEbqDw" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_HkSpAnfzEeGN1531GEbqDw" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="derivedModel.ecore#//EntryTaskJobCrs/entry"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_HkSpA3fzEeGN1531GEbqDw" points="[0, 8, 126, -42]$[0, 50, 126, 0]$[-119, 50, 7, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_HkVsUHfzEeGN1531GEbqDw" id="(0.2032520325203252,0.813953488372093)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_HkVsUXfzEeGN1531GEbqDw" id="(0.9481481481481482,0.4)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_9P7igHv-EeGHztdWf87pxQ" type="3003" source="_0Fg10HcmEeGXkefMxfswBQ" target="_u5_-wXv-EeGHztdWf87pxQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_9P7igXv-EeGHztdWf87pxQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_9P7ignv-EeGHztdWf87pxQ" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_9P7ig3v-EeGHztdWf87pxQ" points="[8, -20, 2, 78]$[8, -104, 2, -6]"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_9P7ihHv-EeGHztdWf87pxQ" id="(0.528,0.13725490196078433)"/>
- </edges>
-</notation:Diagram>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/model/derivedModel.genmodel b/examples/bpm/org.eclipse.viatra.examples.bpm/model/derivedModel.genmodel
deleted file mode 100644
index 12d3cbe90..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/model/derivedModel.genmodel
+++ /dev/null
@@ -1,93 +0,0 @@
-<?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="/org.eclipse.viatra.examples.bpm/emf-gen" editDirectory="/org.eclipse.viatra.examples.bpm.edit/emf-gen"
- editorDirectory="/org.eclipse.viatra.examples.bpm.editor/emf-gen" modelPluginID="org.eclipse.viatra.examples.bpm"
- modelName="BPMCombinedModel" testsDirectory="/org.eclipse.viatra.examples.bpm.tests/emf-gen"
- importerID="org.eclipse.emf.importer.ecore" complianceLevel="7.0" copyrightFields="false"
- editPluginID="org.eclipse.viatra.examples.bpm.edit" editorPluginID="org.eclipse.viatra.examples.bpm.editor"
- runtimeVersion="2.10">
- <foreignModel>operation.ecore</foreignModel>
- <foreignModel>system.ecore</foreignModel>
- <foreignModel>process.ecore</foreignModel>
- <genPackages prefix="Operation" basePackage="org.eclipse.viatra.examples.bpm" disposableProviderFactory="true"
- ecorePackage="operation.ecore#/">
- <genClasses ecoreClass="operation.ecore#//MenuItem">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute operation.ecore#//MenuItem/description"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute operation.ecore#//MenuItem/location"/>
- </genClasses>
- <genClasses ecoreClass="operation.ecore#//RuntimeInformation">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute operation.ecore#//RuntimeInformation/contents"/>
- </genClasses>
- <genClasses ecoreClass="operation.ecore#//ChecklistEntry">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference operation.ecore#//ChecklistEntry/menu"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference operation.ecore#//ChecklistEntry/info"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute operation.ecore#//ChecklistEntry/taskId"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute operation.ecore#//ChecklistEntry/jobPaths"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference operation.ecore#//ChecklistEntry/task"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference operation.ecore#//ChecklistEntry/jobs"/>
- </genClasses>
- <genClasses ecoreClass="operation.ecore#//Checklist">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference operation.ecore#//Checklist/entries"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference operation.ecore#//Checklist/menu"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference operation.ecore#//Checklist/process"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute operation.ecore#//Checklist/processId"/>
- </genClasses>
- <genClasses ecoreClass="operation.ecore#//OperationElement">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute operation.ecore#//OperationElement/id"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute operation.ecore#//OperationElement/name"/>
- </genClasses>
- </genPackages>
- <genPackages prefix="System" basePackage="org.eclipse.viatra.examples.bpm" disposableProviderFactory="true"
- ecorePackage="system.ecore#/">
- <genClasses ecoreClass="system.ecore#//System">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference system.ecore#//System/provides"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference system.ecore#//System/uses"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference system.ecore#//System/contains"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference system.ecore#//System/data"/>
- </genClasses>
- <genClasses ecoreClass="system.ecore#//Interface">
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference system.ecore#//Interface/provider"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference system.ecore#//Interface/user"/>
- </genClasses>
- <genClasses ecoreClass="system.ecore#//Job">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference system.ecore#//Job/runsOn"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference system.ecore#//Job/calls"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute system.ecore#//Job/taskIds"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference system.ecore#//Job/tasks"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference system.ecore#//Job/info"/>
- </genClasses>
- <genClasses ecoreClass="system.ecore#//Data">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute system.ecore#//Data/readingTaskIds"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute system.ecore#//Data/writingTaskIds"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference system.ecore#//Data/writingTask"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference system.ecore#//Data/readingTask"/>
- </genClasses>
- <genClasses ecoreClass="system.ecore#//ResourceElement">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute system.ecore#//ResourceElement/name"/>
- </genClasses>
- </genPackages>
- <genPackages prefix="Process" basePackage="org.eclipse.viatra.examples.bpm" disposableProviderFactory="true"
- ecorePackage="process.ecore#/">
- <genEnums typeSafeEnumCompatible="false" ecoreEnum="process.ecore#//TaskKind">
- <genEnumLiterals ecoreEnumLiteral="process.ecore#//TaskKind/user"/>
- <genEnumLiterals ecoreEnumLiteral="process.ecore#//TaskKind/manual"/>
- <genEnumLiterals ecoreEnumLiteral="process.ecore#//TaskKind/service"/>
- </genEnums>
- <genClasses ecoreClass="process.ecore#//Task">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute process.ecore#//Task/kind"/>
- </genClasses>
- <genClasses ecoreClass="process.ecore#//Process">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference process.ecore#//Process/contents"/>
- </genClasses>
- <genClasses ecoreClass="process.ecore#//ProcessElement">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute process.ecore#//ProcessElement/id"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute process.ecore#//ProcessElement/name"/>
- </genClasses>
- <genClasses ecoreClass="process.ecore#//Gateway"/>
- <genClasses ecoreClass="process.ecore#//Activity">
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference process.ecore#//Activity/parent"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference process.ecore#//Activity/next"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference process.ecore#//Activity/previous"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/model/integrated.ecore b/examples/bpm/org.eclipse.viatra.examples.bpm/model/integrated.ecore
deleted file mode 100644
index ee5b6566b..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/model/integrated.ecore
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="integrated"
- nsURI="http://integrated/1.0" nsPrefix="integrated"/>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/model/integrated.ecorediag b/examples/bpm/org.eclipse.viatra.examples.bpm/model/integrated.ecorediag
deleted file mode 100644
index 69e2248ec..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/model/integrated.ecorediag
+++ /dev/null
@@ -1,609 +0,0 @@
-<?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="_l5no8Xw2EeGPP5_jeud4kw" type="EcoreTools" name="integrated" measurementUnit="Pixel">
- <children xmi:type="notation:Node" xmi:id="_dGclsHyPEeGA4J97icaK-Q" type="1002">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dGvgoHyPEeGA4J97icaK-Q" source="Shortcut">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dGvgoXyPEeGA4J97icaK-Q" key="modelID" value="EcoreTools"/>
- </eAnnotations>
- <children xmi:type="notation:Node" xmi:id="_dGcltHyPEeGA4J97icaK-Q" type="4006"/>
- <children xmi:type="notation:Node" xmi:id="_dGcltXyPEeGA4J97icaK-Q" type="5003">
- <children xmi:type="notation:Node" xmi:id="_elgksHyPEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_elqVsHyPEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_elqVsXyPEeGA4J97icaK-Q" type="5004">
- <children xmi:type="notation:Node" xmi:id="_emGakHyPEeGA4J97icaK-Q" type="2001">
- <element xmi:type="ecore:EAttribute" href="operation.ecore#//MenuItem/description"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_emGakXyPEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_emGaknyPEeGA4J97icaK-Q" type="2001">
- <element xmi:type="ecore:EAttribute" href="operation.ecore#//MenuItem/location"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_emGak3yPEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_elqVsnyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_elqVs3yPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_elqVtHyPEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_elqVtXyPEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_elqVtnyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_elqVt3yPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_elqVuHyPEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_elgksXyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="operation.ecore#//MenuItem"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_elgksnyPEeGA4J97icaK-Q" x="7" y="172"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_Ah_4UHyQEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_Ah_4U3yQEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_Ah_4VHyQEeGA4J97icaK-Q" type="5004">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_Ah_4VXyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_Ah_4VnyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_Ah_4V3yQEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_Ah_4WHyQEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_Ah_4WXyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_Ah_4WnyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_Ah_4W3yQEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_Ah_4UXyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="operation.ecore#//OperationElement"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Ah_4UnyQEeGA4J97icaK-Q" x="163" y="5"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_tKvTQHyQEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_tKvTQ3yQEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_tKvTRHyQEeGA4J97icaK-Q" type="5004">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_tKvTRXyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_tKvTRnyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_tKvTR3yQEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_tKvTSHyQEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_tKvTSXyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_tKvTSnyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_tKvTS3yQEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_tKvTQXyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="operation.ecore#//RuntimeInformation"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKvTQnyQEeGA4J97icaK-Q" x="391" y="101"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_veeQcHyQEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_veeQc3yQEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_veeQdHyQEeGA4J97icaK-Q" type="5004">
- <children xmi:type="notation:Node" xmi:id="_venaYHyQEeGA4J97icaK-Q" type="2001">
- <element xmi:type="ecore:EAttribute" href="operation.ecore#//Checklist/processId"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_venaYXyQEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_veeQdXyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_veeQdnyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_veeQd3yQEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_veeQeHyQEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_veeQeXyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_veeQenyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_veeQe3yQEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_veeQcXyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="operation.ecore#//Checklist"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_veeQcnyQEeGA4J97icaK-Q" x="19" y="101"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_xB2HsHyQEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_xB2Hs3yQEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_xB2HtHyQEeGA4J97icaK-Q" type="5004">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_xB2HtXyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_xB2HtnyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_xB2Ht3yQEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_xB_4sHyQEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_xB_4sXyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_xB_4snyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_xB_4s3yQEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_xB2HsXyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="operation.ecore#//ChecklistEntry"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xB2HsnyQEeGA4J97icaK-Q" x="211" y="101"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_dGcltnyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_dGclt3yPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_dGcluHyPEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_dGclsXyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="12632256" lineColor="4210752"/>
- <styles xmi:type="notation:MultiDiagramLinkStyle" xmi:id="_dGclsnyPEeGA4J97icaK-Q"/>
- <element xmi:type="ecore:EPackage" href="operation.ecore#/"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dGcls3yPEeGA4J97icaK-Q" x="12" y="360" width="543" height="303"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_fuaGcHyPEeGA4J97icaK-Q" type="1002">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_futBYHyPEeGA4J97icaK-Q" source="Shortcut">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_futBYXyPEeGA4J97icaK-Q" key="modelID" value="EcoreTools"/>
- </eAnnotations>
- <children xmi:type="notation:Node" xmi:id="_fuaGdHyPEeGA4J97icaK-Q" type="4006"/>
- <children xmi:type="notation:Node" xmi:id="_fuaGdXyPEeGA4J97icaK-Q" type="5003">
- <children xmi:type="notation:Node" xmi:id="_mD1XcHyPEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_mD1Xc3yPEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_mD1XdHyPEeGA4J97icaK-Q" type="5004">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_mD1XdXyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_mD1XdnyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_mD1Xd3yPEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_mD1XeHyPEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_mD1XeXyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_mD1XenyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_mD1Xe3yPEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_mD1XcXyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="process.ecore#//ProcessElement"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mD1XcnyPEeGA4J97icaK-Q" x="127" y="5"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_nMb-QHyPEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_nMb-Q3yPEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_nMlIMHyPEeGA4J97icaK-Q" type="5004">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_nMlIMXyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_nMlIMnyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_nMlIM3yPEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_nMlINHyPEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_nMlINXyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_nMlINnyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_nMlIN3yPEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_nMb-QXyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="process.ecore#//Process"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nMb-QnyPEeGA4J97icaK-Q" x="223" y="101"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_ptQ8QHyPEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_ptQ8Q3yPEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_ptQ8RHyPEeGA4J97icaK-Q" type="5004">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_ptQ8RXyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_ptQ8RnyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_ptQ8R3yPEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_ptQ8SHyPEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_ptQ8SXyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_ptQ8SnyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_ptQ8S3yPEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_ptQ8QXyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="process.ecore#//Activity"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ptQ8QnyPEeGA4J97icaK-Q" x="55" y="101"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_qn4KYHyPEeGA4J97icaK-Q" type="2005">
- <children xmi:type="notation:Node" xmi:id="_qn4KY3yPEeGA4J97icaK-Q" type="4005"/>
- <children xmi:type="notation:Node" xmi:id="_qn4KZHyPEeGA4J97icaK-Q" type="5006">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_qn4KZXyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_qn4KZnyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_qn4KZ3yPEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_qn4KYXyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EEnum" href="process.ecore#//TaskKind"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qn4KYnyPEeGA4J97icaK-Q" x="7" y="5"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_3D4_IHyPEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_3ECwIHyPEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_3ECwIXyPEeGA4J97icaK-Q" type="5004">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_3ECwInyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_3ECwI3yPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_3ECwJHyPEeGA4J97icaK-Q"/>
- <layoutConstraint xmi:type="notation:Ratio" xmi:id="_9m1uwHyPEeGA4J97icaK-Q" value="0.2926829268292683"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_3ECwJXyPEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_3ECwJnyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_3ECwJ3yPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_3ECwKHyPEeGA4J97icaK-Q"/>
- <layoutConstraint xmi:type="notation:Ratio" xmi:id="_9m1uwXyPEeGA4J97icaK-Q" value="0.2926829268292683"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_3D4_IXyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="process.ecore#//Gateway"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3D4_InyPEeGA4J97icaK-Q" x="7" y="197"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_3h8NEHyPEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_3h8NE3yPEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_3h8NFHyPEeGA4J97icaK-Q" type="5004">
- <children xmi:type="notation:Node" xmi:id="_3iF-EHyPEeGA4J97icaK-Q" type="2001">
- <element xmi:type="ecore:EAttribute" href="process.ecore#//Task/kind"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_3iF-EXyPEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_3h8NFXyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_3h8NFnyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_3h8NF3yPEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_3h8NGHyPEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_3h8NGXyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_3h8NGnyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_3h8NG3yPEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_3h8NEXyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="process.ecore#//Task"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3h8NEnyPEeGA4J97icaK-Q" x="115" y="197"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_fuaGdnyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fuaGd3yPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fuaGeHyPEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_fuaGcXyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="12632256" lineColor="4210752"/>
- <styles xmi:type="notation:MultiDiagramLinkStyle" xmi:id="_fuaGcnyPEeGA4J97icaK-Q"/>
- <element xmi:type="ecore:EPackage" href="process.ecore#/"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fuaGc3yPEeGA4J97icaK-Q" x="12" y="12" width="339" height="327"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_jIhc4HyPEeGA4J97icaK-Q" type="1002">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_jI0X0HyPEeGA4J97icaK-Q" source="Shortcut">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_jI0X0XyPEeGA4J97icaK-Q" key="modelID" value="EcoreTools"/>
- </eAnnotations>
- <children xmi:type="notation:Node" xmi:id="_jIhc5HyPEeGA4J97icaK-Q" type="4006"/>
- <children xmi:type="notation:Node" xmi:id="_jIhc5XyPEeGA4J97icaK-Q" type="5003">
- <children xmi:type="notation:Node" xmi:id="_kVlF4HyPEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_kVlF43yPEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_kVlF5HyPEeGA4J97icaK-Q" type="5004">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_kVlF5XyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_kVlF5nyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_kVlF53yPEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_kVlF6HyPEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_kVlF6XyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_kVlF6nyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_kVlF63yPEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_kVlF4XyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="system.ecore#//System"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kVlF4nyPEeGA4J97icaK-Q" x="223" y="89"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_FvssQHyQEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_FvssQ3yQEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_FvssRHyQEeGA4J97icaK-Q" type="5004">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_FvssRXyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_FvssRnyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_FvssR3yQEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_FvssSHyQEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_FvssSXyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_Fv2dQHyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_Fv2dQXyQEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_FvssQXyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="system.ecore#//ResourceElement"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_FvssQnyQEeGA4J97icaK-Q" x="151" y="5"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_G-QxIHyQEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_G-QxI3yQEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_G-QxJHyQEeGA4J97icaK-Q" type="5004">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_G-QxJXyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_G-QxJnyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_G-QxJ3yQEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_G-QxKHyQEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_G-QxKXyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_G-QxKnyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_G-QxK3yQEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_G-QxIXyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="system.ecore#//Data"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_G-QxInyQEeGA4J97icaK-Q" x="7" y="89"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_JDle4HyQEeGA4J97icaK-Q" type="2003">
- <children xmi:type="notation:Node" xmi:id="_JDle43yQEeGA4J97icaK-Q" type="4002"/>
- <children xmi:type="notation:Node" xmi:id="_JDle5HyQEeGA4J97icaK-Q" type="5004">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_JDle5XyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_JDle5nyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_JDle53yQEeGA4J97icaK-Q"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_JDle6HyQEeGA4J97icaK-Q" type="5005">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_JDle6XyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_JDle6nyQEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_JDle63yQEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_JDle4XyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="system.ecore#//Job"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_JDle4nyQEeGA4J97icaK-Q" x="163" y="185"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_jIhc5nyPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_jIhc53yPEeGA4J97icaK-Q"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_jIhc6HyPEeGA4J97icaK-Q"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_jIhc4XyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="12632256" lineColor="4210752"/>
- <styles xmi:type="notation:MultiDiagramLinkStyle" xmi:id="_jIhc4nyPEeGA4J97icaK-Q"/>
- <element xmi:type="ecore:EPackage" href="system.ecore#/"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jIhc43yPEeGA4J97icaK-Q" x="360" y="12" width="339" height="327"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_l5no8nw2EeGPP5_jeud4kw"/>
- <element xmi:type="ecore:EPackage" href="integrated.ecore#/"/>
- <edges xmi:type="notation:Edge" xmi:id="_nNB0IHyPEeGA4J97icaK-Q" type="3003" source="_nMb-QHyPEeGA4J97icaK-Q" target="_mD1XcHyPEeGA4J97icaK-Q">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_nNB0IXyPEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_nNB0InyPEeGA4J97icaK-Q" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_nNB0I3yPEeGA4J97icaK-Q" points="[-14, -20, 28, 63]$[-14, -50, 28, 33]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_ptaGMHyPEeGA4J97icaK-Q" type="3002" source="_ptQ8QHyPEeGA4J97icaK-Q" target="_nMb-QHyPEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_ptj3MHyPEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_ptj3MXyPEeGA4J97icaK-Q" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_ptj3MnyPEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_ptj3M3yPEeGA4J97icaK-Q" x="-1" y="12"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_ptaGMXyPEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_ptaGMnyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="process.ecore#//Activity/parent"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ptaGM3yPEeGA4J97icaK-Q" points="[50, 4, -106, 4]$[106, 4, -50, 4]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_z4pyMHyPEeGA4J97icaK-Q" id="(0.5,0.5)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_z4pyMXyPEeGA4J97icaK-Q" id="(0.5,0.5)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_ptj3NHyPEeGA4J97icaK-Q" type="3002" source="_ptQ8QHyPEeGA4J97icaK-Q" target="_ptQ8QHyPEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_ptj3OHyPEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_ptj3OXyPEeGA4J97icaK-Q" x="16" y="-17"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_ptj3OnyPEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_ptj3O3yPEeGA4J97icaK-Q" x="17" y="13"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_ptj3NXyPEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_ptj3NnyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="process.ecore#//Activity/next"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ptj3N3yPEeGA4J97icaK-Q" points="[-50, -5, -8, -19]$[-85, -5, -43, -19]$[-85, 52, -43, 38]$[-42, 52, 0, 38]$[-42, 21, 0, 7]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_tMcY4HyPEeGA4J97icaK-Q" id="(0.5,0.5)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_tMcY4XyPEeGA4J97icaK-Q" id="(0.08823529411764706,0.8372093023255814)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_ptj3PHyPEeGA4J97icaK-Q" type="3002" source="_ptQ8QHyPEeGA4J97icaK-Q" target="_ptQ8QHyPEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_ptj3QHyPEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_ptj3QXyPEeGA4J97icaK-Q" x="-3" y="-11"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_ptj3QnyPEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_ptj3Q3yPEeGA4J97icaK-Q" x="7" y="11"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_ptj3PXyPEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_ptj3PnyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="process.ecore#//Activity/previous"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ptj3P3yPEeGA4J97icaK-Q" points="[0, 7, -42, 21]$[0, 38, -42, 52]$[-43, 38, -85, 52]$[-43, -19, -85, -5]$[-8, -19, -50, -5]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5hvhonyPEeGA4J97icaK-Q" id="(0.08823529411764706,0.8372093023255814)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5hvho3yPEeGA4J97icaK-Q" id="(0.5,0.5)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_ptj3RHyPEeGA4J97icaK-Q" type="3003" source="_ptQ8QHyPEeGA4J97icaK-Q" target="_mD1XcHyPEeGA4J97icaK-Q">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_ptj3RXyPEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_ptj3RnyPEeGA4J97icaK-Q" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ptj3R3yPEeGA4J97icaK-Q" points="[46, -20, -44, 63]$[46, -50, -44, 33]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_pttBIHyPEeGA4J97icaK-Q" type="3002" source="_nMb-QHyPEeGA4J97icaK-Q" target="_ptQ8QHyPEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_pttBJHyPEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_pttBJXyPEeGA4J97icaK-Q" x="-15" y="-11"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_pttBJnyPEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_pttBJ3yPEeGA4J97icaK-Q" x="1" y="8"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_pttBIXyPEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_pttBInyPEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="process.ecore#//Process/contents"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_pttBI3yPEeGA4J97icaK-Q" points="[-50, 4, 106, 4]$[-106, 4, 50, 4]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_puJtEHyPEeGA4J97icaK-Q" id="(0.5,0.5)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_puJtEXyPEeGA4J97icaK-Q" id="(0.5,0.5)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_3EL6EHyPEeGA4J97icaK-Q" type="3003" source="_3D4_IHyPEeGA4J97icaK-Q" target="_ptQ8QHyPEeGA4J97icaK-Q">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_3EL6EXyPEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_3EL6EnyPEeGA4J97icaK-Q" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3EL6E3yPEeGA4J97icaK-Q" points="[34, -20, -14, 76]$[34, -75, -14, 21]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_3iPIAHyPEeGA4J97icaK-Q" type="3003" source="_3h8NEHyPEeGA4J97icaK-Q" target="_ptQ8QHyPEeGA4J97icaK-Q">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_3iPIAXyPEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_3iPIAnyPEeGA4J97icaK-Q" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3iPIA3yPEeGA4J97icaK-Q" points="[-46, -24, 22, 76]$[-46, -79, 22, 21]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_AiSzQHyQEeGA4J97icaK-Q" type="3003" source="_elgksHyPEeGA4J97icaK-Q" target="_Ah_4UHyQEeGA4J97icaK-Q">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_AiSzQXyQEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_AiSzQnyQEeGA4J97icaK-Q" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_AiSzQ3yQEeGA4J97icaK-Q" points="[-73, -33, -218, 134]$[-73, -116, -218, 51]$[167, -116, 22, 51]$[167, -134, 22, 33]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_FwAOQHyQEeGA4J97icaK-Q" type="3003" source="_kVlF4HyPEeGA4J97icaK-Q" target="_FvssQHyQEeGA4J97icaK-Q">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_FwAOQXyQEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_FwAOQnyQEeGA4J97icaK-Q" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_FwAOQ3yQEeGA4J97icaK-Q" points="[-14, -20, 48, 60]$[-14, -55, 48, 25]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_G-jsEHyQEeGA4J97icaK-Q" type="3002" source="_G-QxIHyQEeGA4J97icaK-Q" target="_3h8NEHyPEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_G-jsFHyQEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_G-jsFXyQEeGA4J97icaK-Q" x="-140" y="10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_G-jsFnyQEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_G-jsF3yQEeGA4J97icaK-Q" x="-91" y="9"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_G-jsEXyQEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_G-jsEnyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="system.ecore#//Data/writingTask"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_G-jsE3yQEeGA4J97icaK-Q" points="[-8, 3, 221, -54]$[-8, 57, 221, 0]$[-228, 57, 1, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bVM1EHyQEeGA4J97icaK-Q" id="(0.6198830409356725,0.9558823529411765)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_cMGA0HyQEeGA4J97icaK-Q" id="(0.9915254237288136,0.2549019607843137)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_G-jsGHyQEeGA4J97icaK-Q" type="3002" source="_G-QxIHyQEeGA4J97icaK-Q" target="_3h8NEHyPEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_G-jsHHyQEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_G-jsHXyQEeGA4J97icaK-Q" x="-135" y="10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_G-jsHnyQEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_G-jsH3yQEeGA4J97icaK-Q" x="-84" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_G-jsGXyQEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_G-jsGnyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="system.ecore#//Data/readingTask"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_G-jsG3yQEeGA4J97icaK-Q" points="[0, 14, 251, -72]$[0, 86, 251, 0]$[-245, 86, 6, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_lecV8HyQEeGA4J97icaK-Q" id="(0.7192982456140351,0.7941176470588235)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_hfl6wHyQEeGA4J97icaK-Q" id="(0.9491525423728814,0.6274509803921569)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_G-jsIHyQEeGA4J97icaK-Q" type="3003" source="_G-QxIHyQEeGA4J97icaK-Q" target="_FvssQHyQEeGA4J97icaK-Q">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_G-jsIXyQEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_G-jsInyQEeGA4J97icaK-Q" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_G-jsI3yQEeGA4J97icaK-Q" points="[72, -33, -48, 60]$[72, -68, -48, 25]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_JDuo0HyQEeGA4J97icaK-Q" type="3002" source="_JDle4HyQEeGA4J97icaK-Q" target="_kVlF4HyPEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_JDuo1HyQEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_JDuo1XyQEeGA4J97icaK-Q" x="-11" y="-23"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_JDuo1nyQEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_JDuo13yQEeGA4J97icaK-Q" x="-7" y="9"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_JDuo0XyQEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_JDuo0nyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="system.ecore#//Job/runsOn"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_JDuo03yQEeGA4J97icaK-Q" points="[1, 0, -345, -98]$[296, 84, -50, -14]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_QwrtcHyQEeGA4J97icaK-Q" id="(0.7317073170731707,0.04411764705882353)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PZgfIHyQEeGA4J97icaK-Q" id="(0.3627450980392157,0.9534883720930233)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_JDuo2HyQEeGA4J97icaK-Q" type="3002" source="_JDle4HyQEeGA4J97icaK-Q" target="_3h8NEHyPEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_JDuo3HyQEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_JDuo3XyQEeGA4J97icaK-Q" x="-115" y="8"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_JDuo3nyQEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_JDuo33yQEeGA4J97icaK-Q" x="-87" y="9"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_JDuo2XyQEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_JDuo2nyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="system.ecore#//Job/tasks"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_JDuo23yQEeGA4J97icaK-Q" points="[0, 3, 286, -3]$[0, 14, 286, 8]$[-285, 14, 1, 8]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dzWSgHyQEeGA4J97icaK-Q" id="(0.04878048780487805,0.9411764705882353)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_eXfhYHyQEeGA4J97icaK-Q" id="(0.9915254237288136,0.8235294117647058)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_JDuo4HyQEeGA4J97icaK-Q" type="3003" source="_JDle4HyQEeGA4J97icaK-Q" target="_FvssQHyQEeGA4J97icaK-Q">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_JDuo4XyQEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_JDuo4nyQEeGA4J97icaK-Q" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_JDuo43yQEeGA4J97icaK-Q" points="[-12, -33, 0, 156]$[-12, -164, 0, 25]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_JDuo5HyQEeGA4J97icaK-Q" type="3002" source="_kVlF4HyPEeGA4J97icaK-Q" target="_JDle4HyQEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_JDuo6HyQEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_JDuo6XyQEeGA4J97icaK-Q" x="-22" y="-26"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_JDuo6nyQEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_JDuo63yQEeGA4J97icaK-Q" x="-7" y="-14"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_JDuo5XyQEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_JDuo5nyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="system.ecore#//System/contains"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_JDuo53yQEeGA4J97icaK-Q" points="[6, 21, -6, -49]$[12, 40, 0, -30]$[12, 64, 0, -6]"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_NvsBoHyQEeGA4J97icaK-Q" id="(0.9105691056910569,0.10294117647058823)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_tK4dMHyQEeGA4J97icaK-Q" type="3003" source="_tKvTQHyQEeGA4J97icaK-Q" target="_Ah_4UHyQEeGA4J97icaK-Q">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_tK4dMXyQEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_tK4dMnyQEeGA4J97icaK-Q" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_tK4dM3yQEeGA4J97icaK-Q" points="[6, -24, 239, 63]$[6, -36, 239, 51]$[-211, -36, 22, 51]$[-211, -54, 22, 33]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_tK4dNHyQEeGA4J97icaK-Q" type="3002" source="_JDle4HyQEeGA4J97icaK-Q" target="_tKvTQHyQEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_tK4dOHyQEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_tK4dOXyQEeGA4J97icaK-Q" x="5" y="-8"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_tK4dOnyQEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_tK4dO3yQEeGA4J97icaK-Q" x="7" y="12"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_tK4dNXyQEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_tK4dNnyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="system.ecore#//Job/info"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_tK4dN3yQEeGA4J97icaK-Q" points="[0, 25, 113, -239]$[0, 264, 113, 0]$[-46, 264, 67, 0]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_vexLYHyQEeGA4J97icaK-Q" type="3002" source="_veeQcHyQEeGA4J97icaK-Q" target="_elgksHyPEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_vexLZHyQEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_vexLZXyQEeGA4J97icaK-Q" x="-6" y="-20"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_vexLZnyQEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_vexLZ3yQEeGA4J97icaK-Q" x="-6" y="15"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_vexLYXyQEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_vexLYnyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="operation.ecore#//Checklist/menu"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_vexLY3yQEeGA4J97icaK-Q" points="[0, 1, -105, -194]$[87, 162, -18, -33]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_ve6VUHyQEeGA4J97icaK-Q" type="3002" source="_veeQcHyQEeGA4J97icaK-Q" target="_nMb-QHyPEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_ve6VVHyQEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_ve6VVXyQEeGA4J97icaK-Q" x="-118" y="-31"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_ve6VVnyQEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_ve6VV3yQEeGA4J97icaK-Q" x="47" y="12"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_ve6VUXyQEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_ve6VUnyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="operation.ecore#//Checklist/process"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ve6VU3yQEeGA4J97icaK-Q" points="[0, 0, -121, 328]$[0, -128, -121, 200]$[121, -128, 0, 200]$[121, -307, 0, 21]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dmJHgHyREeGA4J97icaK-Q" id="(0.9642857142857143,0.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_ve6VWHyQEeGA4J97icaK-Q" type="3003" source="_veeQcHyQEeGA4J97icaK-Q" target="_Ah_4UHyQEeGA4J97icaK-Q">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_ve6VWXyQEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_ve6VWnyQEeGA4J97icaK-Q" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ve6VW3yQEeGA4J97icaK-Q" points="[36, -24, -101, 63]$[36, -36, -101, 51]$[159, -36, 22, 51]$[159, -54, 22, 33]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_xCJpsHyQEeGA4J97icaK-Q" type="3002" source="_xB2HsHyQEeGA4J97icaK-Q" target="_elgksHyPEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_xCJptHyQEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_xCJptXyQEeGA4J97icaK-Q" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_xCJptnyQEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_xCJpt3yQEeGA4J97icaK-Q" x="-8" y="9"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_xCJpsXyQEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_xCJpsnyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="operation.ecore#//ChecklistEntry/menu"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_xCJps3yQEeGA4J97icaK-Q" points="[0, 1, -105, -194]$[87, 162, -18, -33]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_xCJpuHyQEeGA4J97icaK-Q" type="3002" source="_xB2HsHyQEeGA4J97icaK-Q" target="_tKvTQHyQEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_xCJpvHyQEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_xCJpvXyQEeGA4J97icaK-Q" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_xCJpvnyQEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_xCJpv3yQEeGA4J97icaK-Q" x="-8" y="13"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_xCJpuXyQEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_xCJpunyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="operation.ecore#//ChecklistEntry/info"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_xCJpu3yQEeGA4J97icaK-Q" points="[1, 0, -410, -174]$[353, 150, -58, -24]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_xCJpwHyQEeGA4J97icaK-Q" type="3002" source="_xB2HsHyQEeGA4J97icaK-Q" target="_3h8NEHyPEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_xCJpxHyQEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_xCJpxXyQEeGA4J97icaK-Q" x="2" y="151"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_xCJpxnyQEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_xCJpx3yQEeGA4J97icaK-Q" x="44" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_xCJpwXyQEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_xCJpwnyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="operation.ecore#//ChecklistEntry/task"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_xCJpw3yQEeGA4J97icaK-Q" points="[10, 0, 167, 204]$[10, -140, 167, 64]$[-157, -140, 0, 64]$[-157, -203, 0, 1]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_KjPeUHyREeGA4J97icaK-Q" id="(0.7518796992481203,0.014705882352941176)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_M4wkMHyREeGA4J97icaK-Q" id="(0.3220338983050847,0.9803921568627451)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_xCJpyHyQEeGA4J97icaK-Q" type="3002" source="_xB2HsHyQEeGA4J97icaK-Q" target="_JDle4HyQEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_xCJpzHyQEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_xCJpzXyQEeGA4J97icaK-Q" x="-1" y="-190"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_xCJpznyQEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_xCJpz3yQEeGA4J97icaK-Q" x="40" y="11"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_xCJpyXyQEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_xCJpynyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="operation.ecore#//ChecklistEntry/jobs"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_xCJpy3yQEeGA4J97icaK-Q" points="[8, -3, -212, 216]$[8, -143, -212, 76]$[212, -143, -8, 76]$[212, -218, -8, 1]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_HGKTcHyREeGA4J97icaK-Q" id="(0.8571428571428571,0.058823529411764705)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Ig6aMHyREeGA4J97icaK-Q" id="(0.2682926829268293,0.9803921568627451)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_xCJp0HyQEeGA4J97icaK-Q" type="3003" source="_xB2HsHyQEeGA4J97icaK-Q" target="_Ah_4UHyQEeGA4J97icaK-Q">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_xCJp0XyQEeGA4J97icaK-Q" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_xCJp0nyQEeGA4J97icaK-Q" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_xCJp03yQEeGA4J97icaK-Q" points="[-29, -33, 22, 63]$[-29, -63, 22, 33]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_xCSzoHyQEeGA4J97icaK-Q" type="3002" source="_veeQcHyQEeGA4J97icaK-Q" target="_xB2HsHyQEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_xCSzpHyQEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_xCSzpXyQEeGA4J97icaK-Q" x="-12" y="-12"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_xCSzpnyQEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_xCSzp3yQEeGA4J97icaK-Q" x="1" y="11"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_xCSzoXyQEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_xCSzonyQEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="operation.ecore#//Checklist/entries"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_xCSzo3yQEeGA4J97icaK-Q" points="[-22, -24, 79, 90]$[-100, -113, 1, 1]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_r-mlYHySEeGA4J97icaK-Q" type="3002" source="_kVlF4HyPEeGA4J97icaK-Q" target="_G-QxIHyQEeGA4J97icaK-Q">
- <children xmi:type="notation:Node" xmi:id="_r-nzgHySEeGA4J97icaK-Q" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_r-nzgXySEeGA4J97icaK-Q" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_r-nzgnySEeGA4J97icaK-Q" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_r-nzg3ySEeGA4J97icaK-Q" x="-5" y="13"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_r-mlYXySEeGA4J97icaK-Q" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_r-mlYnySEeGA4J97icaK-Q" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="system.ecore#//System/data"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_r-mlY3ySEeGA4J97icaK-Q" points="[-10, 0, 43, 1]$[-51, -20, 2, -19]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_r-t6IHySEeGA4J97icaK-Q" id="(0.10784313725490197,0.5116279069767442)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_r-t6IXySEeGA4J97icaK-Q" id="(0.9532163742690059,0.29411764705882354)"/>
- </edges>
-</notation:Diagram>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/model/integration.ecore b/examples/bpm/org.eclipse.viatra.examples.bpm/model/integration.ecore
deleted file mode 100644
index cd380c09a..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/model/integration.ecore
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="integration"
- nsURI="http://integration/1.0" nsPrefix="integration"/>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/model/integration.ecorediag b/examples/bpm/org.eclipse.viatra.examples.bpm/model/integration.ecorediag
deleted file mode 100644
index acd2eb48b..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/model/integration.ecorediag
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_P_SOsHwtEeGHztdWf87pxQ" type="EcoreTools" name="integration.ecorediag" measurementUnit="Pixel">
- <children xmi:type="notation:Node" xmi:id="_SuiqQHwtEeGHztdWf87pxQ" type="1002">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Su1lMHwtEeGHztdWf87pxQ" source="Shortcut">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Su1lMXwtEeGHztdWf87pxQ" key="modelID" value="EcoreTools"/>
- </eAnnotations>
- <children xmi:type="notation:Node" xmi:id="_SusbQHwtEeGHztdWf87pxQ" type="4006"/>
- <children xmi:type="notation:Node" xmi:id="_SusbQXwtEeGHztdWf87pxQ" type="5003">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_SusbQnwtEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_SusbQ3wtEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_SusbRHwtEeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_SuiqQXwtEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13150135" lineColor="4210752"/>
- <styles xmi:type="notation:MultiDiagramLinkStyle" xmi:id="_SuiqQnwtEeGHztdWf87pxQ"/>
- <element xmi:type="ecore:EPackage" href="operation.ecore#/"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SuiqQ3wtEeGHztdWf87pxQ" x="240" y="96"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_TMwQQHwtEeGHztdWf87pxQ" type="1002">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_TNDLMHwtEeGHztdWf87pxQ" source="Shortcut">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_TNDLMXwtEeGHztdWf87pxQ" key="modelID" value="EcoreTools"/>
- </eAnnotations>
- <children xmi:type="notation:Node" xmi:id="_TMwQRHwtEeGHztdWf87pxQ" type="4006"/>
- <children xmi:type="notation:Node" xmi:id="_TMwQRXwtEeGHztdWf87pxQ" type="5003">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_TMwQRnwtEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_TMwQR3wtEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_TMwQSHwtEeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_TMwQQXwtEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13150135" lineColor="4210752"/>
- <styles xmi:type="notation:MultiDiagramLinkStyle" xmi:id="_TMwQQnwtEeGHztdWf87pxQ"/>
- <element xmi:type="ecore:EPackage" href="process.ecore#/"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TMwQQ3wtEeGHztdWf87pxQ" x="24" y="48"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_UBk_cHwtEeGHztdWf87pxQ" type="1002">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UBk_eXwtEeGHztdWf87pxQ" source="Shortcut">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UBk_enwtEeGHztdWf87pxQ" key="modelID" value="EcoreTools"/>
- </eAnnotations>
- <children xmi:type="notation:Node" xmi:id="_UBk_dHwtEeGHztdWf87pxQ" type="4006"/>
- <children xmi:type="notation:Node" xmi:id="_UBk_dXwtEeGHztdWf87pxQ" type="5003">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_UBk_dnwtEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_UBk_d3wtEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_UBk_eHwtEeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_UBk_cXwtEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13150135" lineColor="4210752"/>
- <styles xmi:type="notation:MultiDiagramLinkStyle" xmi:id="_UBk_cnwtEeGHztdWf87pxQ"/>
- <element xmi:type="ecore:EPackage" href="system.ecore#/"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UBk_c3wtEeGHztdWf87pxQ" x="468" y="48"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_P_SOsXwtEeGHztdWf87pxQ"/>
- <element xmi:type="ecore:EPackage" href="integration.ecore#/"/>
-</notation:Diagram>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/model/operation.ecore b/examples/bpm/org.eclipse.viatra.examples.bpm/model/operation.ecore
deleted file mode 100644
index c5000017d..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/model/operation.ecore
+++ /dev/null
@@ -1,55 +0,0 @@
-<?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="operation" nsURI="http://operation/1.0" nsPrefix="operation">
- <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
- <details key="settingDelegates" value="org.eclipse.viatra.query.querybasedfeature"/>
- </eAnnotations>
- <eClassifiers xsi:type="ecore:EClass" name="MenuItem" eSuperTypes="#//OperationElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="location" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="RuntimeInformation" eSuperTypes="#//OperationElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="contents" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap"
- transient="true"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ChecklistEntry" eSuperTypes="#//OperationElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="menu" eType="#//MenuItem"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="info" eType="#//RuntimeInformation"
- containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="taskId" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="jobPaths" upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="task" lowerBound="1" eType="ecore:EClass process.ecore#//Task"
- changeable="false" volatile="true" transient="true" derived="true">
- <eAnnotations source="org.eclipse.viatra.query.querybasedfeature">
- <details key="patternFQN" value="org.eclipse.viatra.examples.bpm.queries.operation.ChecklistEntryTaskCorrespondence"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="jobs" upperBound="-1" eType="ecore:EClass system.ecore#//Job"
- changeable="false" volatile="true" transient="true" derived="true">
- <eAnnotations source="org.eclipse.viatra.query.querybasedfeature">
- <details key="patternFQN" value="org.eclipse.viatra.examples.bpm.queries.operation.ChecklistEntryJobCorrespondence"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Checklist" eSuperTypes="#//OperationElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="entries" upperBound="-1"
- eType="#//ChecklistEntry" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="menu" upperBound="-1" eType="#//MenuItem"
- containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="process" lowerBound="1"
- eType="ecore:EClass process.ecore#//Process" changeable="false" volatile="true"
- transient="true" derived="true">
- <eAnnotations source="org.eclipse.viatra.query.querybasedfeature">
- <details key="patternFQN" value="org.eclipse.viatra.examples.bpm.queries.operation.ChecklistProcessCorrespondence"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="processId" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="OperationElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/model/operation.ecorediag b/examples/bpm/org.eclipse.viatra.examples.bpm/model/operation.ecorediag
deleted file mode 100644
index 3c1e8bc36..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/model/operation.ecorediag
+++ /dev/null
@@ -1,196 +0,0 @@
-<?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="_iHp_gXfeEeGiIY_p0MVomA" type="EcoreTools" name="operation" measurementUnit="Pixel">
- <children xmi:type="notation:Node" xmi:id="_k8Q1IHfeEeGiIY_p0MVomA" type="1001">
- <children xmi:type="notation:Node" xmi:id="_k8rr4HfeEeGiIY_p0MVomA" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_k8zAoHfeEeGiIY_p0MVomA" type="5001">
- <children xmi:type="notation:Node" xmi:id="_PP5kcHfgEeGiIY_p0MVomA" type="2001">
- <element xmi:type="ecore:EAttribute" href="operation.ecore#//MenuItem/description"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_PP5kcXfgEeGiIY_p0MVomA"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_Q2ypwHfgEeGiIY_p0MVomA" type="2001">
- <element xmi:type="ecore:EAttribute" href="operation.ecore#//MenuItem/location"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_Q2ypwXfgEeGiIY_p0MVomA"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_k8zAoXfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_k8zAonfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_k8zAo3feEeGiIY_p0MVomA"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_k80OwHfeEeGiIY_p0MVomA" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_k80OwXfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_k80OwnfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_k80Ow3feEeGiIY_p0MVomA"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_k8Q1IXfeEeGiIY_p0MVomA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="operation.ecore#//MenuItem"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k8Q1InfeEeGiIY_p0MVomA" x="276" y="324"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_oBGfIHfeEeGiIY_p0MVomA" type="1001">
- <children xmi:type="notation:Node" xmi:id="_oBHtQHfeEeGiIY_p0MVomA" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_oBIUUHfeEeGiIY_p0MVomA" type="5001">
- <children xmi:type="notation:Node" xmi:id="_cYlucHffEeGiIY_p0MVomA" type="2001">
- <element xmi:type="ecore:EAttribute" href="operation.ecore#//RuntimeInformation/contents"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_cYlucXffEeGiIY_p0MVomA"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_oBIUUXfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_oBIUUnfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_oBIUU3feEeGiIY_p0MVomA"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_oBI7YHfeEeGiIY_p0MVomA" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_oBI7YXfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_oBI7YnfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_oBI7Y3feEeGiIY_p0MVomA"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_oBGfIXfeEeGiIY_p0MVomA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="operation.ecore#//RuntimeInformation"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oBGfInfeEeGiIY_p0MVomA" x="528" y="336" width="147"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_1lG2sHfeEeGiIY_p0MVomA" type="1001">
- <children xmi:type="notation:Node" xmi:id="_1lG2s3feEeGiIY_p0MVomA" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_1lG2tHfeEeGiIY_p0MVomA" type="5001">
- <children xmi:type="notation:Node" xmi:id="_EIoKgHffEeGiIY_p0MVomA" type="2001">
- <element xmi:type="ecore:EAttribute" href="operation.ecore#//ChecklistEntry/taskId"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_EIoKgXffEeGiIY_p0MVomA"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_F87kQHfgEeGiIY_p0MVomA" type="2001">
- <element xmi:type="ecore:EAttribute" href="operation.ecore#//ChecklistEntry/jobIds"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_F87kQXfgEeGiIY_p0MVomA"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_1lG2tXfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_1lG2tnfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_1lG2t3feEeGiIY_p0MVomA"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_1lG2uHfeEeGiIY_p0MVomA" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_1lG2uXfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_1lG2unfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_1lG2u3feEeGiIY_p0MVomA"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_1lG2sXfeEeGiIY_p0MVomA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="operation.ecore#//ChecklistEntry"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1lG2snfeEeGiIY_p0MVomA" x="492" y="240"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_66IaoHfeEeGiIY_p0MVomA" type="1001">
- <children xmi:type="notation:Node" xmi:id="_66JowHfeEeGiIY_p0MVomA" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_66KP0HfeEeGiIY_p0MVomA" type="5001">
- <children xmi:type="notation:Node" xmi:id="_NFoFQHfgEeGiIY_p0MVomA" type="2001">
- <element xmi:type="ecore:EAttribute" href="operation.ecore#//Checklist/processId"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_NFoFQXfgEeGiIY_p0MVomA"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_66KP0XfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_66KP0nfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_66KP03feEeGiIY_p0MVomA"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_66Ld8HfeEeGiIY_p0MVomA" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_66Ld8XfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_66Ld8nfeEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_66Ld83feEeGiIY_p0MVomA"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_66IaoXfeEeGiIY_p0MVomA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="operation.ecore#//Checklist"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_66IaonfeEeGiIY_p0MVomA" x="288" y="240"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="__XJtoHfgEeGiIY_p0MVomA" type="1001">
- <children xmi:type="notation:Node" xmi:id="__XQbUHfgEeGiIY_p0MVomA" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="__XRCYHfgEeGiIY_p0MVomA" type="5001">
- <children xmi:type="notation:Node" xmi:id="_ah4nUHfmEeGiIY_p0MVomA" type="2001">
- <element xmi:type="ecore:EAttribute" href="operation.ecore#//OperationElement/id"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_ah4nUXfmEeGiIY_p0MVomA"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bKeRUHfmEeGiIY_p0MVomA" type="2001">
- <element xmi:type="ecore:EAttribute" href="operation.ecore#//OperationElement/name"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bKeRUXfmEeGiIY_p0MVomA"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="__XRCYXfgEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="__XRCYnfgEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="__XRCY3fgEeGiIY_p0MVomA"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="__XRCZHfgEeGiIY_p0MVomA" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="__XRCZXfgEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="__XRCZnfgEeGiIY_p0MVomA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="__XRCZ3fgEeGiIY_p0MVomA"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="__XJtoXfgEeGiIY_p0MVomA" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="operation.ecore#//OperationElement"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="__XJtonfgEeGiIY_p0MVomA" x="456" y="96"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_iHp_gnfeEeGiIY_p0MVomA"/>
- <element xmi:type="ecore:EPackage" href="operation.ecore#/"/>
- <edges xmi:type="notation:Edge" xmi:id="_8cXCYHfeEeGiIY_p0MVomA" type="3002" source="_66IaoHfeEeGiIY_p0MVomA" target="_1lG2sHfeEeGiIY_p0MVomA">
- <children xmi:type="notation:Node" xmi:id="_8cXCZHfeEeGiIY_p0MVomA" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_8cXCZXfeEeGiIY_p0MVomA" x="-18" y="-13"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_8cdJAHfeEeGiIY_p0MVomA" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_8cdJAXfeEeGiIY_p0MVomA" x="-11" y="12"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_8cXCYXfeEeGiIY_p0MVomA" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_8cXCYnfeEeGiIY_p0MVomA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="operation.ecore#//Checklist/entries"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_8cXCY3feEeGiIY_p0MVomA" points="[50, -2, -154, -2]$[254, -2, 50, -2]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_BU7T0HffEeGiIY_p0MVomA" type="3002" source="_1lG2sHfeEeGiIY_p0MVomA" target="_k8Q1IHfeEeGiIY_p0MVomA">
- <children xmi:type="notation:Node" xmi:id="_BU7T1HffEeGiIY_p0MVomA" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_BU7T1XffEeGiIY_p0MVomA" x="-4" y="-8"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_BVBacHffEeGiIY_p0MVomA" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_BVBacXffEeGiIY_p0MVomA" x="-5" y="16"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_BU7T0XffEeGiIY_p0MVomA" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_BU7T0nffEeGiIY_p0MVomA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="operation.ecore#//ChecklistEntry/menu"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_BU7T03ffEeGiIY_p0MVomA" points="[0, 6, 147, -51]$[0, 57, 147, 0]$[-74, 57, 73, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_BVHhEHffEeGiIY_p0MVomA" id="(0.042735042735042736,0.9117647058823529)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_P6lVoHffEeGiIY_p0MVomA" type="3002" source="_66IaoHfeEeGiIY_p0MVomA" target="_k8Q1IHfeEeGiIY_p0MVomA">
- <children xmi:type="notation:Node" xmi:id="_P6mjwHffEeGiIY_p0MVomA" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_P6mjwXffEeGiIY_p0MVomA" x="-11" y="-27"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_P6mjwnffEeGiIY_p0MVomA" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_P6mjw3ffEeGiIY_p0MVomA" x="-11" y="16"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_P6lVoXffEeGiIY_p0MVomA" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_P6lVonffEeGiIY_p0MVomA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="operation.ecore#//Checklist/menu"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_P6lVo3ffEeGiIY_p0MVomA" points="[-69, 9, 119, 0]$[-115, 9, 73, 0]"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_YykqAHffEeGiIY_p0MVomA" type="3002" source="_1lG2sHfeEeGiIY_p0MVomA" target="_oBGfIHfeEeGiIY_p0MVomA">
- <children xmi:type="notation:Node" xmi:id="_YylREHffEeGiIY_p0MVomA" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_YylREXffEeGiIY_p0MVomA" x="-12" y="-30"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_YylREnffEeGiIY_p0MVomA" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_YylRE3ffEeGiIY_p0MVomA" x="-12" y="19"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_YykqAXffEeGiIY_p0MVomA" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_YykqAnffEeGiIY_p0MVomA" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="operation.ecore#//ChecklistEntry/info"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YykqA3ffEeGiIY_p0MVomA" points="[12, 0, -142, 2]$[155, 18, 1, 20]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Yyo7cHffEeGiIY_p0MVomA" id="(0.6324786324786325,0.9411764705882353)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Yyo7cXffEeGiIY_p0MVomA" id="(0.20408163265306123,0.5348837209302325)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_BglfUHfhEeGiIY_p0MVomA" type="3003" source="_66IaoHfeEeGiIY_p0MVomA" target="__XJtoHfgEeGiIY_p0MVomA">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_BglfUXfhEeGiIY_p0MVomA" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_BglfUnfhEeGiIY_p0MVomA" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_BglfU3fhEeGiIY_p0MVomA" points="[14, -11, -118, 111]$[14, -59, -118, 63]$[142, -59, 10, 63]$[142, -89, 10, 33]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_BgsNAHfhEeGiIY_p0MVomA" id="(0.7142857142857143,0.23529411764705882)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_B08lwHfhEeGiIY_p0MVomA" type="3003" source="_1lG2sHfeEeGiIY_p0MVomA" target="__XJtoHfgEeGiIY_p0MVomA">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_B08lwXfhEeGiIY_p0MVomA" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_B08lwnfhEeGiIY_p0MVomA" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_B08lw3fhEeGiIY_p0MVomA" points="[-9, -12, 10, 111]$[-9, -90, 10, 33]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_B08lxHfhEeGiIY_p0MVomA" id="(0.38461538461538464,0.19117647058823528)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_CNoLgHfhEeGiIY_p0MVomA" type="3003" source="_oBGfIHfeEeGiIY_p0MVomA" target="__XJtoHfgEeGiIY_p0MVomA">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_CNoLgXfhEeGiIY_p0MVomA" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_CNoLgnfhEeGiIY_p0MVomA" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_CNoLg3fhEeGiIY_p0MVomA" points="[83, -15, 127, 207]$[83, -159, 127, 63]$[-34, -159, 10, 63]$[-34, -189, 10, 33]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CNsc8HfhEeGiIY_p0MVomA" id="(0.23809523809523808,0.3137254901960784)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_DCog4HfhEeGiIY_p0MVomA" type="3003" source="_k8Q1IHfeEeGiIY_p0MVomA" target="__XJtoHfgEeGiIY_p0MVomA">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_DCog4XfhEeGiIY_p0MVomA" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_DCog4nfhEeGiIY_p0MVomA" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_DCog43fhEeGiIY_p0MVomA" points="[1, -3, -234, 195]$[1, -135, -234, 63]$[245, -135, 10, 63]$[245, -165, 10, 33]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_f9gS4HjgEeGojPD3AN5c8w" id="(0.05405405405405406,0.058823529411764705)"/>
- </edges>
-</notation:Diagram>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/model/process.ecore b/examples/bpm/org.eclipse.viatra.examples.bpm/model/process.ecore
deleted file mode 100644
index b116f07a3..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/model/process.ecore
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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="process" nsURI="http://process/1.0" nsPrefix="process">
- <eClassifiers xsi:type="ecore:EClass" name="Task" eSuperTypes="#//Activity">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" lowerBound="1" eType="#//TaskKind"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Process" eSuperTypes="#//ProcessElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="contents" upperBound="-1"
- eType="#//Activity" containment="true" eOpposite="#//Activity/parent"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ProcessElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <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="Gateway" eSuperTypes="#//Activity"/>
- <eClassifiers xsi:type="ecore:EClass" name="Activity" eSuperTypes="#//ProcessElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="parent" lowerBound="1"
- eType="#//Process" eOpposite="#//Process/contents"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="next" upperBound="-1" eType="#//Activity"
- eOpposite="#//Activity/previous"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="previous" upperBound="-1"
- eType="#//Activity" eOpposite="#//Activity/next"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EEnum" name="TaskKind">
- <eLiterals name="user"/>
- <eLiterals name="manual" value="1"/>
- <eLiterals name="service" value="2"/>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/model/process.ecorediag b/examples/bpm/org.eclipse.viatra.examples.bpm/model/process.ecorediag
deleted file mode 100644
index c8794fc28..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/model/process.ecorediag
+++ /dev/null
@@ -1,210 +0,0 @@
-<?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="_6GxcYHcgEeGXkefMxfswBQ" type="EcoreTools" measurementUnit="Pixel">
- <children xmi:type="notation:Node" xmi:id="_6HDwQHcgEeGXkefMxfswBQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_6HEXUHcgEeGXkefMxfswBQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_6HEXUXcgEeGXkefMxfswBQ" type="5001">
- <children xmi:type="notation:Node" xmi:id="_g3cWEHc0EeGXkefMxfswBQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="process.ecore#//Task/kind"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_g3cWEXc0EeGXkefMxfswBQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_6HEXUncgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6HEXU3cgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6HEXVHcgEeGXkefMxfswBQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HEXVXcgEeGXkefMxfswBQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_6HEXVncgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6HEXV3cgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6HEXWHcgEeGXkefMxfswBQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_6HDwQXcgEeGXkefMxfswBQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="process.ecore#//Task"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6HDwQncgEeGXkefMxfswBQ" x="132" y="216"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HE-YHcgEeGXkefMxfswBQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_6HFlcHcgEeGXkefMxfswBQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_6HFlcXcgEeGXkefMxfswBQ" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_6HFlcncgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6HFlc3cgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6HFldHcgEeGXkefMxfswBQ"/>
- <layoutConstraint xmi:type="notation:Ratio" xmi:id="_-tz48HcgEeGXkefMxfswBQ" value="0.2926829268292683"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HFldXcgEeGXkefMxfswBQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_6HFldncgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6HFld3cgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6HFleHcgEeGXkefMxfswBQ"/>
- <layoutConstraint xmi:type="notation:Ratio" xmi:id="_-t0gAHcgEeGXkefMxfswBQ" value="0.2926829268292683"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_6HE-YXcgEeGXkefMxfswBQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="process.ecore#//Process"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6HE-YncgEeGXkefMxfswBQ" x="384" y="144"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HFleXcgEeGXkefMxfswBQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_6HGMgHcgEeGXkefMxfswBQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_6HGMgXcgEeGXkefMxfswBQ" type="5001">
- <children xmi:type="notation:Node" xmi:id="_6HGzkHcgEeGXkefMxfswBQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="process.ecore#//ProcessElement/id"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_6HGzkXcgEeGXkefMxfswBQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HGzkncgEeGXkefMxfswBQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="process.ecore#//ProcessElement/name"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_6HGzk3cgEeGXkefMxfswBQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_6HGMgncgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6HGMg3cgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6HGMhHcgEeGXkefMxfswBQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HGMhXcgEeGXkefMxfswBQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_6HGMhncgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6HGMh3cgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6HGMiHcgEeGXkefMxfswBQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_6HFlencgEeGXkefMxfswBQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="process.ecore#//ProcessElement"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6HFle3cgEeGXkefMxfswBQ" x="276"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HGzlHcgEeGXkefMxfswBQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_6HHaoHcgEeGXkefMxfswBQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_6HHaoXcgEeGXkefMxfswBQ" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_6HHaoncgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6HHao3cgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6HHapHcgEeGXkefMxfswBQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HHapXcgEeGXkefMxfswBQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_6HHapncgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6HHap3cgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6HHaqHcgEeGXkefMxfswBQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_6HGzlXcgEeGXkefMxfswBQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="process.ecore#//Gateway"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6HGzlncgEeGXkefMxfswBQ" x="264" y="216"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HIBsHcgEeGXkefMxfswBQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_6HIBs3cgEeGXkefMxfswBQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_6HIowHcgEeGXkefMxfswBQ" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_6HIowXcgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6HIowncgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6HIow3cgEeGXkefMxfswBQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HIoxHcgEeGXkefMxfswBQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_6HIoxXcgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6HIoxncgEeGXkefMxfswBQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6HIox3cgEeGXkefMxfswBQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_6HIBsXcgEeGXkefMxfswBQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="process.ecore#//Activity"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6HIBsncgEeGXkefMxfswBQ" x="180" y="144"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bOE50Hc0EeGXkefMxfswBQ" type="1005">
- <children xmi:type="notation:Node" xmi:id="_bOFg4Hc0EeGXkefMxfswBQ" type="4010"/>
- <children xmi:type="notation:Node" xmi:id="_bOGH8Hc0EeGXkefMxfswBQ" type="5008">
- <children xmi:type="notation:Node" xmi:id="_cZj1gHc0EeGXkefMxfswBQ" type="2006">
- <element xmi:type="ecore:EEnumLiteral" href="process.ecore#//TaskKind/user"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_cZj1gXc0EeGXkefMxfswBQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_da7L4Hc0EeGXkefMxfswBQ" type="2006">
- <element xmi:type="ecore:EEnumLiteral" href="process.ecore#//TaskKind/manual"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_da7L4Xc0EeGXkefMxfswBQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_eQ808Hc0EeGXkefMxfswBQ" type="2006">
- <element xmi:type="ecore:EEnumLiteral" href="process.ecore#//TaskKind/service"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_eQ808Xc0EeGXkefMxfswBQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_bOGH8Xc0EeGXkefMxfswBQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bOGH8nc0EeGXkefMxfswBQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bOGH83c0EeGXkefMxfswBQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_bOE50Xc0EeGXkefMxfswBQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EEnum" href="process.ecore#//TaskKind"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bOE50nc0EeGXkefMxfswBQ" x="144"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_6GxcYXcgEeGXkefMxfswBQ"/>
- <element xmi:type="ecore:EPackage" href="process.ecore#/"/>
- <edges xmi:type="notation:Edge" xmi:id="_6HIoyHcgEeGXkefMxfswBQ" type="3003" source="_6HDwQHcgEeGXkefMxfswBQ" target="_6HIBsHcgEeGXkefMxfswBQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_6HIoyXcgEeGXkefMxfswBQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_6HIoyncgEeGXkefMxfswBQ" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6HIoy3cgEeGXkefMxfswBQ" points="[0, 0, -9, 31]$[0, -7, -9, 24]$[38, -7, 29, 24]$[38, -31, 29, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6IZNAHcgEeGXkefMxfswBQ" id="(0.5,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6IZNAXcgEeGXkefMxfswBQ" id="(0.19607843137254902,1.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_6HJP0HcgEeGXkefMxfswBQ" type="3002" source="_6HE-YHcgEeGXkefMxfswBQ" target="_6HIBsHcgEeGXkefMxfswBQ">
- <children xmi:type="notation:Node" xmi:id="_6HJP1HcgEeGXkefMxfswBQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_6HJP1XcgEeGXkefMxfswBQ" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HJP1ncgEeGXkefMxfswBQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_6HJP13cgEeGXkefMxfswBQ" x="4" y="16"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_6HJP0XcgEeGXkefMxfswBQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_6HJP0ncgEeGXkefMxfswBQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="process.ecore#//Process/contents"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6HJP03cgEeGXkefMxfswBQ" points="[-4, 2, 161, 4]$[-144, 2, 21, 4]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_KDGWMHchEeGXkefMxfswBQ" id="(0.049019607843137254,0.5581395348837209)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_KDGWMXchEeGXkefMxfswBQ" id="(0.7941176470588235,0.4883720930232558)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_6HJ24HcgEeGXkefMxfswBQ" type="3003" source="_6HE-YHcgEeGXkefMxfswBQ" target="_6HFleXcgEeGXkefMxfswBQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_6HJ24XcgEeGXkefMxfswBQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_6HJ24ncgEeGXkefMxfswBQ" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6HJ243cgEeGXkefMxfswBQ" points="[-2, 0, 100, 78]$[-2, -33, 100, 45]$[-98, -33, 4, 45]$[-98, -78, 4, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6IbCMncgEeGXkefMxfswBQ" id="(0.5,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6IbpQHcgEeGXkefMxfswBQ" id="(0.4956521739130435,1.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_6HJ25HcgEeGXkefMxfswBQ" type="3003" source="_6HGzlHcgEeGXkefMxfswBQ" target="_6HIBsHcgEeGXkefMxfswBQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_6HJ25XcgEeGXkefMxfswBQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_6HJ25ncgEeGXkefMxfswBQ" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6HJ253cgEeGXkefMxfswBQ" points="[1, 0, 96, 31]$[1, -7, 96, 24]$[-86, -7, 9, 24]$[-86, -31, 9, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6IZ0EHcgEeGXkefMxfswBQ" id="(0.5,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6IZ0EXcgEeGXkefMxfswBQ" id="(0.39215686274509803,1.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_6HKd8HcgEeGXkefMxfswBQ" type="3002" source="_6HIBsHcgEeGXkefMxfswBQ" target="_6HE-YHcgEeGXkefMxfswBQ">
- <children xmi:type="notation:Node" xmi:id="_6HKd9HcgEeGXkefMxfswBQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_6HKd9XcgEeGXkefMxfswBQ" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HKd9ncgEeGXkefMxfswBQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_6HKd93cgEeGXkefMxfswBQ" x="-4" y="8"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_6HKd8XcgEeGXkefMxfswBQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_6HKd8ncgEeGXkefMxfswBQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="process.ecore#//Activity/parent"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6HKd83cgEeGXkefMxfswBQ" points="[21, 4, -144, 2]$[161, 4, -4, 2]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6IZ0EncgEeGXkefMxfswBQ" id="(0.7941176470588235,0.4883720930232558)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6IZ0E3cgEeGXkefMxfswBQ" id="(0.049019607843137254,0.5581395348837209)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_6HLFAHcgEeGXkefMxfswBQ" type="3002" source="_6HIBsHcgEeGXkefMxfswBQ" target="_6HIBsHcgEeGXkefMxfswBQ">
- <children xmi:type="notation:Node" xmi:id="_6HLFBHcgEeGXkefMxfswBQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_6HLsEHcgEeGXkefMxfswBQ" x="4" y="-12"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HLsEXcgEeGXkefMxfswBQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_6HLsEncgEeGXkefMxfswBQ" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_6HLFAXcgEeGXkefMxfswBQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_6HLFAncgEeGXkefMxfswBQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="process.ecore#//Activity/next"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6HLFA3cgEeGXkefMxfswBQ" points="[0, -2, -25, -20]$[0, -26, -25, -44]$[-73, -26, -98, -44]$[-73, 18, -98, 0]$[-73, 18, -98, 0]$[-25, 18, -50, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_VjeSEHjiEeGojPD3AN5c8w" id="(0.2549019607843137,0.06976744186046512)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_VjeSEXjiEeGojPD3AN5c8w" id="(0.5,0.5)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_6HLsE3cgEeGXkefMxfswBQ" type="3002" source="_6HIBsHcgEeGXkefMxfswBQ" target="_6HIBsHcgEeGXkefMxfswBQ">
- <children xmi:type="notation:Node" xmi:id="_6HLsF3cgEeGXkefMxfswBQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_6HLsGHcgEeGXkefMxfswBQ" x="-22" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_6HMTIHcgEeGXkefMxfswBQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_6HMTIXcgEeGXkefMxfswBQ" x="-13" y="8"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_6HLsFHcgEeGXkefMxfswBQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_6HLsFXcgEeGXkefMxfswBQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="process.ecore#//Activity/previous"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6HLsFncgEeGXkefMxfswBQ" points="[-50, 0, -25, 18]$[-98, 0, -73, 18]$[-98, 0, -73, 18]$[-98, -44, -73, -26]$[-25, -44, 0, -26]$[-25, -20, 0, -2]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_7C_0EHcgEeGXkefMxfswBQ" id="(0.5,0.5)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_7C_0EXcgEeGXkefMxfswBQ" id="(0.2549019607843137,0.06976744186046512)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_6HMTIncgEeGXkefMxfswBQ" type="3003" source="_6HIBsHcgEeGXkefMxfswBQ" target="_6HFleXcgEeGXkefMxfswBQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_6HMTI3cgEeGXkefMxfswBQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_6HMTJHcgEeGXkefMxfswBQ" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6HMTJXcgEeGXkefMxfswBQ" points="[2, 0, -71, 78]$[2, -33, -71, 45]$[106, -33, 33, 45]$[106, -78, 33, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6IabIHcgEeGXkefMxfswBQ" id="(0.5,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6IabIXcgEeGXkefMxfswBQ" id="(0.24347826086956523,1.0)"/>
- </edges>
-</notation:Diagram>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/model/system.ecore b/examples/bpm/org.eclipse.viatra.examples.bpm/model/system.ecore
deleted file mode 100644
index 5d8fb048c..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/model/system.ecore
+++ /dev/null
@@ -1,73 +0,0 @@
-<?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="system" nsURI="http://system/1.0" nsPrefix="system">
- <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
- <details key="settingDelegates" value="org.eclipse.viatra.query.querybasedfeature"/>
- </eAnnotations>
- <eClassifiers xsi:type="ecore:EClass" name="System" eSuperTypes="#//ResourceElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="provides" upperBound="-1"
- eType="#//Interface" containment="true" eOpposite="#//Interface/provider"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="uses" upperBound="-1" eType="#//Interface"
- eOpposite="#//Interface/user"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="contains" upperBound="-1"
- eType="#//Job" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="data" upperBound="-1" eType="#//Data"
- containment="true"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Interface" eSuperTypes="#//ResourceElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="provider" eType="#//System"
- eOpposite="#//System/provides"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="user" upperBound="-1" eType="#//System"
- eOpposite="#//System/uses"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Job" eSuperTypes="#//ResourceElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="runsOn" lowerBound="1"
- eType="#//System"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="calls" upperBound="-1"
- eType="#//Interface"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="taskIds" upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="tasks" upperBound="-1"
- eType="ecore:EClass process.ecore#//Task" changeable="false" volatile="true"
- transient="true" derived="true">
- <eAnnotations source="org.eclipse.viatra.query.querybasedfeature">
- <details key="patternFQN" value="org.eclipse.viatra.examples.bpm.queries.system.JobTaskCorrespondence"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="info" upperBound="-1" eType="ecore:EClass operation.ecore#//RuntimeInformation"
- changeable="false" volatile="true" transient="true" derived="true">
- <eAnnotations source="org.eclipse.viatra.query.querybasedfeature">
- <details key="patternFQN" value="org.eclipse.viatra.examples.bpm.queries.system.JobInfoCorrespondence"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Data" eSuperTypes="#//ResourceElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="readingTaskIds" upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="writingTaskIds" upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="writingTask" upperBound="-1"
- eType="ecore:EClass process.ecore#//Task" changeable="false" volatile="true"
- transient="true" derived="true">
- <eAnnotations source="org.eclipse.incquery.querybasedfeature">
- <details key="patternFQN" value="org.eclipse.viatra.examples.bpm.queries.system.DataTaskWriteCorrespondence"/>
- </eAnnotations>
- <eAnnotations source="org.eclipse.viatra.query.querybasedfeature">
- <details key="patternFQN" value="org.eclipse.viatra.examples.bpm.queries.system.DataTaskWriteCorrespondence"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="readingTask" upperBound="-1"
- eType="ecore:EClass process.ecore#//Task" changeable="false" volatile="true"
- transient="true" derived="true">
- <eAnnotations source="org.eclipse.incquery.querybasedfeature">
- <details key="patternFQN" value="org.eclipse.viatra.examples.bpm.queries.system.DataTaskReadCorrespondence"/>
- </eAnnotations>
- <eAnnotations source="org.eclipse.viatra.query.querybasedfeature">
- <details key="patternFQN" value="org.eclipse.viatra.examples.bpm.queries.system.DataTaskReadCorrespondence"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ResourceElement">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/model/system.ecorediag b/examples/bpm/org.eclipse.viatra.examples.bpm/model/system.ecorediag
deleted file mode 100644
index 7ceaaf6c9..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/model/system.ecorediag
+++ /dev/null
@@ -1,221 +0,0 @@
-<?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="_bsTJEHwlEeGHztdWf87pxQ" type="EcoreTools" name="system.ecorediag" measurementUnit="Pixel">
- <children xmi:type="notation:Node" xmi:id="_bsv1AHwlEeGHztdWf87pxQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_bsv1A3wlEeGHztdWf87pxQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_bsv1BHwlEeGHztdWf87pxQ" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_bsv1BXwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bsv1BnwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bsv1B3wlEeGHztdWf87pxQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bsv1CHwlEeGHztdWf87pxQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_bsv1CXwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bsv1CnwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bsv1C3wlEeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_bsv1AXwlEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="system.ecore#//System"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bsv1AnwlEeGHztdWf87pxQ" y="256"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bsv1DHwlEeGHztdWf87pxQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_bsv1D3wlEeGHztdWf87pxQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_bsv1EHwlEeGHztdWf87pxQ" type="5001">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_bsv1EXwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bsv1EnwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bsv1E3wlEeGHztdWf87pxQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bsv1FHwlEeGHztdWf87pxQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_bsv1FXwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bsv1FnwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bsv1F3wlEeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_bsv1DXwlEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="system.ecore#//Interface"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bsv1DnwlEeGHztdWf87pxQ" y="128"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bsv1GHwlEeGHztdWf87pxQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_bsv1G3wlEeGHztdWf87pxQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_bsv1HHwlEeGHztdWf87pxQ" type="5001">
- <children xmi:type="notation:Node" xmi:id="_bsv1JHwlEeGHztdWf87pxQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="system.ecore#//Job/taskIds"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bsv1JXwlEeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_bsv1HXwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bsv1HnwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bsv1H3wlEeGHztdWf87pxQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bsv1IHwlEeGHztdWf87pxQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_bsv1IXwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bsv1InwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bsv1I3wlEeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_bsv1GXwlEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="system.ecore#//Job"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bsv1GnwlEeGHztdWf87pxQ" x="109" y="359"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bsv1JnwlEeGHztdWf87pxQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_bsv1KXwlEeGHztdWf87pxQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_bsv1KnwlEeGHztdWf87pxQ" type="5001">
- <children xmi:type="notation:Node" xmi:id="_bsv1MnwlEeGHztdWf87pxQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="system.ecore#//Data/readingTaskIds"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bsv1M3wlEeGHztdWf87pxQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bsv1NHwlEeGHztdWf87pxQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="system.ecore#//Data/writingTaskIds"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bsv1NXwlEeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_bsv1K3wlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bsv1LHwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bsv1LXwlEeGHztdWf87pxQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bsv1LnwlEeGHztdWf87pxQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_bsv1L3wlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bsv1MHwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bsv1MXwlEeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_bsv1J3wlEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="system.ecore#//Data"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bsv1KHwlEeGHztdWf87pxQ" x="162" y="128"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bsv1NnwlEeGHztdWf87pxQ" type="1001">
- <children xmi:type="notation:Node" xmi:id="_bsv1OXwlEeGHztdWf87pxQ" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_bsv1OnwlEeGHztdWf87pxQ" type="5001">
- <children xmi:type="notation:Node" xmi:id="_bsv1QnwlEeGHztdWf87pxQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="system.ecore#//ResourceElement/id"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bsv1Q3wlEeGHztdWf87pxQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bsv1RHwlEeGHztdWf87pxQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="system.ecore#//ResourceElement/name"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bsv1RXwlEeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_bsv1O3wlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bsv1PHwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bsv1PXwlEeGHztdWf87pxQ"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bsv1PnwlEeGHztdWf87pxQ" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_bsv1P3wlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_bsv1QHwlEeGHztdWf87pxQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_bsv1QXwlEeGHztdWf87pxQ"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_bsv1N3wlEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="system.ecore#//ResourceElement"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bsv1OHwlEeGHztdWf87pxQ" x="99"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_bsTJEXwlEeGHztdWf87pxQ"/>
- <element xmi:type="ecore:EPackage" href="system.ecore#/"/>
- <edges xmi:type="notation:Edge" xmi:id="_bsv1RnwlEeGHztdWf87pxQ" type="3002" source="_bsv1AHwlEeGHztdWf87pxQ" target="_bsv1DHwlEeGHztdWf87pxQ">
- <children xmi:type="notation:Node" xmi:id="_bs5mAHwlEeGHztdWf87pxQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bs5mAXwlEeGHztdWf87pxQ" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bs5mAnwlEeGHztdWf87pxQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bs5mA3wlEeGHztdWf87pxQ" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_bsv1R3wlEeGHztdWf87pxQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_bsv1SHwlEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="system.ecore#//System/provides"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bsv1SXwlEeGHztdWf87pxQ" points="[0, 0, 0, 85]$[0, -85, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_buF40XwlEeGHztdWf87pxQ" id="(0.5,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_buF40nwlEeGHztdWf87pxQ" id="(0.5,1.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_bs5mBHwlEeGHztdWf87pxQ" type="3002" source="_bsv1AHwlEeGHztdWf87pxQ" target="_bsv1DHwlEeGHztdWf87pxQ">
- <children xmi:type="notation:Node" xmi:id="_bs5mCHwlEeGHztdWf87pxQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bs5mCXwlEeGHztdWf87pxQ" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bs5mCnwlEeGHztdWf87pxQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bs5mC3wlEeGHztdWf87pxQ" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_bs5mBXwlEeGHztdWf87pxQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_bs5mBnwlEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="system.ecore#//System/uses"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bs5mB3wlEeGHztdWf87pxQ" points="[0, 0, 0, 85]$[0, -85, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bt8H2nwlEeGHztdWf87pxQ" id="(0.5,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_buF40HwlEeGHztdWf87pxQ" id="(0.5,1.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_bs5mDHwlEeGHztdWf87pxQ" type="3003" source="_bsv1AHwlEeGHztdWf87pxQ" target="_bsv1NnwlEeGHztdWf87pxQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_bs5mDXwlEeGHztdWf87pxQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_bs5mDnwlEeGHztdWf87pxQ" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bs5mD3wlEeGHztdWf87pxQ" points="[0, 0, -98, 188]$[0, -30, -98, 158]$[-71, -30, -169, 158]$[-71, -158, -169, 30]$[98, -158, 0, 30]$[98, -188, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_buF413wlEeGHztdWf87pxQ" id="(0.24509803921568626,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_buF42HwlEeGHztdWf87pxQ" id="(0.19672131147540983,1.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_bs5mEHwlEeGHztdWf87pxQ" type="3002" source="_bsv1DHwlEeGHztdWf87pxQ" target="_bsv1AHwlEeGHztdWf87pxQ">
- <children xmi:type="notation:Node" xmi:id="_bs5mFHwlEeGHztdWf87pxQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bs5mFXwlEeGHztdWf87pxQ" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bs5mFnwlEeGHztdWf87pxQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bs5mF3wlEeGHztdWf87pxQ" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_bs5mEXwlEeGHztdWf87pxQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_bs5mEnwlEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="system.ecore#//Interface/provider"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bs5mE3wlEeGHztdWf87pxQ" points="[0, 0, 0, -85]$[0, 85, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bt8H0nwlEeGHztdWf87pxQ" id="(0.5,1.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bt8H03wlEeGHztdWf87pxQ" id="(0.5,0.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_bs5mGHwlEeGHztdWf87pxQ" type="3002" source="_bsv1DHwlEeGHztdWf87pxQ" target="_bsv1AHwlEeGHztdWf87pxQ">
- <children xmi:type="notation:Node" xmi:id="_bs5mHHwlEeGHztdWf87pxQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bs5mHXwlEeGHztdWf87pxQ" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bs5mHnwlEeGHztdWf87pxQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bs5mH3wlEeGHztdWf87pxQ" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_bs5mGXwlEeGHztdWf87pxQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_bs5mGnwlEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="system.ecore#//Interface/user"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bs5mG3wlEeGHztdWf87pxQ" points="[0, 0, 0, -85]$[0, 85, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bt8H1HwlEeGHztdWf87pxQ" id="(0.5,1.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bt8H1XwlEeGHztdWf87pxQ" id="(0.5,0.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_bs5mIHwlEeGHztdWf87pxQ" type="3003" source="_bsv1DHwlEeGHztdWf87pxQ" target="_bsv1NnwlEeGHztdWf87pxQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_bs5mIXwlEeGHztdWf87pxQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_bs5mInwlEeGHztdWf87pxQ" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bs5mI3wlEeGHztdWf87pxQ" points="[0, 0, -96, 60]$[0, -30, -96, 30]$[96, -30, 0, 30]$[96, -60, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bt8H0HwlEeGHztdWf87pxQ" id="(0.5,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bt8H0XwlEeGHztdWf87pxQ" id="(0.39344262295081966,1.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_bs5mJHwlEeGHztdWf87pxQ" type="3002" source="_bsv1GHwlEeGHztdWf87pxQ" target="_bsv1AHwlEeGHztdWf87pxQ">
- <children xmi:type="notation:Node" xmi:id="_bs5mKHwlEeGHztdWf87pxQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bs5mKXwlEeGHztdWf87pxQ" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bs5mKnwlEeGHztdWf87pxQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bs5mK3wlEeGHztdWf87pxQ" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_bs5mJXwlEeGHztdWf87pxQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_bs5mJnwlEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="system.ecore#//Job/runsOn"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bs5mJ3wlEeGHztdWf87pxQ" points="[0, 0, 88, 60]$[-88, -60, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bt8H2HwlEeGHztdWf87pxQ" id="(0.24390243902439024,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bt8H2XwlEeGHztdWf87pxQ" id="(0.5,1.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_bs5mLHwlEeGHztdWf87pxQ" type="3002" source="_bsv1GHwlEeGHztdWf87pxQ" target="_bsv1DHwlEeGHztdWf87pxQ">
- <children xmi:type="notation:Node" xmi:id="_bs5mMHwlEeGHztdWf87pxQ" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bs5mMXwlEeGHztdWf87pxQ" x="-10" y="-10"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_bs5mMnwlEeGHztdWf87pxQ" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_bs5mM3wlEeGHztdWf87pxQ" x="10" y="10"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_bs5mLXwlEeGHztdWf87pxQ" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_bs5mLnwlEeGHztdWf87pxQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="system.ecore#//Job/calls"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bs5mL3wlEeGHztdWf87pxQ" points="[0, 0, 93, 188]$[0, -103, 93, 85]$[-75, -164, 18, 24]$[-93, -188, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_buF403wlEeGHztdWf87pxQ" id="(0.4878048780487805,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_buF41HwlEeGHztdWf87pxQ" id="(0.7450980392156863,1.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_bs5mNHwlEeGHztdWf87pxQ" type="3003" source="_bsv1GHwlEeGHztdWf87pxQ" target="_bsv1NnwlEeGHztdWf87pxQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_bs5mNXwlEeGHztdWf87pxQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_bs5mNnwlEeGHztdWf87pxQ" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bs5mN3wlEeGHztdWf87pxQ" points="[0, 0, 4, 291]$[0, -30, 4, 261]$[178, -30, 182, 261]$[178, -261, 182, 30]$[-4, -261, 0, 30]$[-4, -291, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_buF41XwlEeGHztdWf87pxQ" id="(0.7398373983739838,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_buF41nwlEeGHztdWf87pxQ" id="(0.7950819672131147,1.0)"/>
- </edges>
- <edges xmi:type="notation:Edge" xmi:id="_bs5mOHwlEeGHztdWf87pxQ" type="3003" source="_bsv1JnwlEeGHztdWf87pxQ" target="_bsv1NnwlEeGHztdWf87pxQ">
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_bs5mOXwlEeGHztdWf87pxQ" routing="Rectilinear" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_bs5mOnwlEeGHztdWf87pxQ" fontName="Segoe UI"/>
- <element xsi:nil="true"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bs5mO3wlEeGHztdWf87pxQ" points="[0, 0, 0, 60]$[0, -60, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bt8H1nwlEeGHztdWf87pxQ" id="(0.05847953216374269,0.0)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bt8H13wlEeGHztdWf87pxQ" id="(0.5983606557377049,1.0)"/>
- </edges>
-</notation:Diagram>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/plugin.properties b/examples/bpm/org.eclipse.viatra.examples.bpm/plugin.properties
deleted file mode 100644
index a69e6d8ca..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/plugin.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id$
-
-pluginName = EMF-IncQeury Query-based Feature BPM Model
-providerName = Budapest University of Technology and Economics
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/plugin.xml b/examples/bpm/org.eclipse.viatra.examples.bpm/plugin.xml
deleted file mode 100644
index 74c716dcb..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/plugin.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!--
- <copyright>
- </copyright>
-
- $Id$
--->
-
-<plugin>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <!-- @generated derivedModel -->
- <package
- uri="http://operation/1.0"
- class="org.eclipse.viatra.examples.bpm.operation.OperationPackage"
- genModel="model/derivedModel.genmodel"/>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <!-- @generated derivedModel -->
- <package
- uri="http://system/1.0"
- class="org.eclipse.viatra.examples.bpm.system.SystemPackage"
- genModel="model/derivedModel.genmodel"/>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <!-- @generated derivedModel -->
- <package
- uri="http://process/1.0"
- class="org.eclipse.viatra.examples.bpm.process.ProcessPackage"
- genModel="model/derivedModel.genmodel"/>
- </extension>
-</plugin>
diff --git a/examples/bpm/org.eclipse.viatra.examples.bpm/pom.xml b/examples/bpm/org.eclipse.viatra.examples.bpm/pom.xml
deleted file mode 100644
index eb0741497..000000000
--- a/examples/bpm/org.eclipse.viatra.examples.bpm/pom.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.eclipse.viatra.examples.bpm.parent</artifactId>
- <groupId>org.eclipse.viatra</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../org.eclipse.viatra.examples.bpm.parent/pom.xml</relativePath>
- </parent>
- <artifactId>org.eclipse.viatra.examples.bpm</artifactId>
- <packaging>eclipse-plugin</packaging>
- <properties>
- <emf.workspace.location>${project.basedir}/../../target/workspace</emf.workspace.location>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-eclipserun-plugin</artifactId>
- <version>${tycho.version}</version>
- <configuration>
- <appArgLine>-data ${emf.workspace.location} -application org.eclipse.emf.codegen.ecore.Generator -projects ${project.basedir} -model ${project.basedir}/model/derivedModel.genmodel ${project.basedir}</appArgLine>
- <dependencies>
- <dependency>
- <artifactId>org.eclipse.emf.codegen.ecore</artifactId>
- <type>eclipse-plugin</type>
- </dependency>
- </dependencies>
- <repositories>
- <repository>
- <id>indigo</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/releases/mars</url>
- </repository>
- </repositories>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>eclipse-run</goal>
- </goals>
- <phase>generate-sources</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/.classpath b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/.classpath
deleted file mode 100644
index ad32c83a7..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/.project b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/.project
deleted file mode 100644
index 595d468cb..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.transformation.evm.proto</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/.settings/org.eclipse.jdt.core.prefs b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c537b6306..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/META-INF/MANIFEST.MF b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/META-INF/MANIFEST.MF
deleted file mode 100644
index f02d2e505..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,10 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: EVM Prototype Event Realm
-Bundle-SymbolicName: org.eclipse.viatra.transformation.evm.proto
-Bundle-Version: 1.2.0.qualifier
-Require-Bundle: org.eclipse.viatra.transformation.evm;bundle-version="0.7.0",
- com.google.guava;bundle-version="10.0.1",
- org.junit,
- org.apache.log4j;bundle-version="1.2.15"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/build.properties b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/build.properties
deleted file mode 100644
index 34d2e4d2d..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoActivationStates.java b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoActivationStates.java
deleted file mode 100644
index 704257447..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoActivationStates.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.transformation.evm.proto;
-
-import org.eclipse.viatra.transformation.evm.api.event.ActivationState;
-
-/**
- * @author Abel Hegedus
- *
- */
-public enum ProtoActivationStates implements ActivationState {
-
- IS_NOT, IS;
-
- @Override
- public boolean isInactive() {
- return this.equals(IS_NOT);
- }
-
-}
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEvent.java b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEvent.java
deleted file mode 100644
index 051bd7d82..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEvent.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.transformation.evm.proto;
-
-import org.eclipse.viatra.transformation.evm.api.event.Event;
-import org.eclipse.viatra.transformation.evm.api.event.EventType;
-
-/**
- * @author Abel Hegedus
- *
- */
-public class ProtoEvent implements Event<String> {
-
- private ProtoEventType type;
- private String atom;
-
- @Override
- public EventType getEventType() {
- return type;
- }
-
- @Override
- public String getEventAtom() {
- return atom;
- }
-
- /**
- *
- */
- public ProtoEvent(ProtoEventType type, String atom) {
- this.type = type;
- this.atom = atom;
- }
-
-}
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventFilter.java b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventFilter.java
deleted file mode 100644
index 7db53e7ca..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventFilter.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.transformation.evm.proto;
-
-import org.eclipse.viatra.transformation.evm.api.event.EventFilter;
-
-/**
- * @author Abel Hegedus
- *
- */
-public class ProtoEventFilter implements EventFilter<String> {
-
- private String regexp;
-
- @Override
- public boolean isProcessable(String eventAtom) {
- return eventAtom.matches(regexp);
- }
-
- public ProtoEventFilter(String regexp) {
- this.regexp = regexp;
- }
-
-}
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventHandler.java b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventHandler.java
deleted file mode 100644
index c3241e1ca..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventHandler.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.transformation.evm.proto;
-
-import org.eclipse.viatra.transformation.evm.api.Activation;
-import org.eclipse.viatra.transformation.evm.api.RuleInstance;
-import org.eclipse.viatra.transformation.evm.api.event.Event;
-import org.eclipse.viatra.transformation.evm.api.event.EventFilter;
-import org.eclipse.viatra.transformation.evm.api.event.EventHandler;
-import org.eclipse.viatra.transformation.evm.api.event.EventSource;
-
-/**
- * @author Abel Hegedus
- *
- */
-public class ProtoEventHandler implements EventHandler<String> {
-
- private ProtoEventFilter filter;
- private ProtoEventSource source;
- private RuleInstance<String> instance;
-
- @Override
- public void handleEvent(Event<String> event) {
- ProtoEventType type = (ProtoEventType) event.getEventType();
- String eventAtom = event.getEventAtom();
- switch (type) {
- case PUSH:
- Activation<String> activation = instance.createActivation(eventAtom);
- instance.activationStateTransition(activation, type);
- break;
- default:
- System.err.println("Never happens!");
- break;
- }
- }
-
- @Override
- public EventSource<String> getSource() {
- return source;
- }
-
- @Override
- public EventFilter<String> getEventFilter() {
- return filter;
- }
-
- @Override
- public void dispose() {
- }
-
- /**
- *
- */
- public ProtoEventHandler(ProtoEventSource source, ProtoEventFilter filter, RuleInstance<String> instance) {
- this.source = source;
- this.filter = filter;
- this.instance = instance;
- }
-
-}
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventSource.java b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventSource.java
deleted file mode 100644
index e79e2d957..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventSource.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.transformation.evm.proto;
-
-import java.util.Set;
-
-import org.eclipse.viatra.transformation.evm.api.event.EventRealm;
-import org.eclipse.viatra.transformation.evm.api.event.EventSource;
-import org.eclipse.viatra.transformation.evm.api.event.EventSourceSpecification;
-
-import com.google.common.collect.Sets;
-
-/**
- * @author Abel Hegedus
- *
- */
-public class ProtoEventSource implements EventSource<String> {
-
- private ProtoEventSourceSpecification spec;
- private ProtoRealm realm;
- private Set<ProtoEventHandler> handlers = Sets.newHashSet();
-
- @Override
- public EventSourceSpecification<String> getSourceSpecification() {
- return spec;
- }
-
- @Override
- public EventRealm getRealm() {
- return realm;
- }
-
- @Override
- public void dispose() {
- }
-
- /**
- *
- */
- public ProtoEventSource(ProtoEventSourceSpecification spec, ProtoRealm realm) {
- this.spec = spec;
- this.realm = realm;
- realm.addSource(this);
- }
-
- protected void addHandler(ProtoEventHandler handler) {
- handlers.add(handler);
- }
-
- /**
- * @param push
- */
- protected void pushString(String push) {
- ProtoEvent event = new ProtoEvent(ProtoEventType.PUSH, push);
- for (ProtoEventHandler handler : handlers) {
- handler.handleEvent(event);
- }
- }
-
-}
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventSourceSpecification.java b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventSourceSpecification.java
deleted file mode 100644
index 12103e189..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventSourceSpecification.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.transformation.evm.proto;
-
-import org.eclipse.viatra.transformation.evm.api.RuleInstance;
-import org.eclipse.viatra.transformation.evm.api.event.AbstractRuleInstanceBuilder;
-import org.eclipse.viatra.transformation.evm.api.event.EventFilter;
-import org.eclipse.viatra.transformation.evm.api.event.EventRealm;
-import org.eclipse.viatra.transformation.evm.api.event.EventSourceSpecification;
-
-/**
- * @author Abel Hegedus
- *
- */
-public class ProtoEventSourceSpecification implements EventSourceSpecification<String> {
-
- private String prefix;
-
- @Override
- public EventFilter<String> createEmptyFilter() {
- return new ProtoEventFilter(prefix);
- }
-
- @Override
- public AbstractRuleInstanceBuilder<String> getRuleInstanceBuilder(final EventRealm realm) {
- return new AbstractRuleInstanceBuilder<String>() {
-
- @Override
- public void prepareRuleInstance(RuleInstance<String> ruleInstance, EventFilter<? super String> filter) {
- ProtoEventSource source = new ProtoEventSource(ProtoEventSourceSpecification.this, (ProtoRealm) realm);
- ProtoEventHandler handler = new ProtoEventHandler(source, (ProtoEventFilter) filter, ruleInstance);
- source.addHandler(handler);
- }
- };
- }
-
- /**
- *
- */
- public ProtoEventSourceSpecification(String prefix) {
- this.prefix = prefix;
- }
-
-}
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventType.java b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventType.java
deleted file mode 100644
index e293e9fc6..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoEventType.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.transformation.evm.proto;
-
-import org.eclipse.viatra.transformation.evm.api.event.EventType;
-
-/**
- * @author Abel Hegedus
- *
- */
-public enum ProtoEventType implements EventType {
-
- PUSH
-}
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoRealm.java b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoRealm.java
deleted file mode 100644
index 42ebbb883..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/proto/ProtoRealm.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.transformation.evm.proto;
-
-import java.util.Set;
-
-import org.eclipse.viatra.transformation.evm.api.event.EventRealm;
-
-import com.google.common.collect.Sets;
-
-/**
- * @author Abel Hegedus
- *
- */
-public class ProtoRealm implements EventRealm {
-
- private Set<ProtoEventSource> sources = Sets.newHashSet();
-
- /**
- *
- */
- public ProtoRealm() {
- }
-
- public void pushString(String push) {
- for (ProtoEventSource source : sources) {
- source.pushString(push);
- }
- }
-
- protected void addSource(ProtoEventSource source) {
- sources.add(source);
- }
-}
diff --git a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/protoapp/ProtoApp.java b/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/protoapp/ProtoApp.java
deleted file mode 100644
index 2b775996d..000000000
--- a/examples/evm-proto/org.eclipse.viatra.transformation.evm.proto/src/org/eclipse/viatra/transformation/evm/protoapp/ProtoApp.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.transformation.evm.protoapp;
-
-import org.apache.log4j.Level;
-import org.eclipse.viatra.transformation.evm.api.Activation;
-import org.eclipse.viatra.transformation.evm.api.ActivationLifeCycle;
-import org.eclipse.viatra.transformation.evm.api.Context;
-import org.eclipse.viatra.transformation.evm.api.EventDrivenVM;
-import org.eclipse.viatra.transformation.evm.api.Job;
-import org.eclipse.viatra.transformation.evm.api.RuleEngine;
-import org.eclipse.viatra.transformation.evm.api.RuleSpecification;
-import org.eclipse.viatra.transformation.evm.api.event.EventType.RuleEngineEventType;
-import org.eclipse.viatra.transformation.evm.proto.ProtoActivationStates;
-import org.eclipse.viatra.transformation.evm.proto.ProtoEventFilter;
-import org.eclipse.viatra.transformation.evm.proto.ProtoEventSourceSpecification;
-import org.eclipse.viatra.transformation.evm.proto.ProtoEventType;
-import org.eclipse.viatra.transformation.evm.proto.ProtoRealm;
-import org.junit.Test;
-
-import com.google.common.collect.Sets;
-
-/**
- * @author Abel Hegedus
- *
- */
-public class ProtoApp {
-
- @Test
- public void testProtoEventRealm() {
-
- final ProtoRealm protoRealm = new ProtoRealm();
- final RuleEngine engine = EventDrivenVM.createRuleEngine(protoRealm);
- engine.getLogger().setLevel(Level.DEBUG);
-
- final ActivationLifeCycle lifeCycle = ActivationLifeCycle.create(ProtoActivationStates.IS_NOT);
- lifeCycle.addStateTransition(ProtoActivationStates.IS_NOT, ProtoEventType.PUSH, ProtoActivationStates.IS);
- lifeCycle.addStateTransition(ProtoActivationStates.IS, RuleEngineEventType.FIRE, ProtoActivationStates.IS_NOT);
-
- final Job<String> job = new Job<String>(ProtoActivationStates.IS) {
- @Override
- protected void execute(final Activation<? extends String> activation, final Context context) {
- System.out.println("String pushed" + activation.getAtom());
- }
- @Override
- protected void handleError(final Activation<? extends String> activation, final Exception exception, final Context context) {
- // not gonna happen
- }
- };
-
- final ProtoEventSourceSpecification sourceSpec = new ProtoEventSourceSpecification("test");
-
- final RuleSpecification<String> ruleSpec = new RuleSpecification<String>(sourceSpec, lifeCycle, Sets.newHashSet(job));
-
- final ProtoEventFilter filter = new ProtoEventFilter("t");
- engine.addRule(ruleSpec, filter);
-
- protoRealm.pushString("PUSH THIS!");
-
- engine.getNextActivation().fire(Context.create());
-
- }
-
-
-}
diff --git a/examples/headless-maven/incquery-demo-generic/.classpath b/examples/headless-maven/incquery-demo-generic/.classpath
deleted file mode 100644
index efcf778ba..000000000
--- a/examples/headless-maven/incquery-demo-generic/.classpath
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/examples/headless-maven/incquery-demo-generic/.project b/examples/headless-maven/incquery-demo-generic/.project
deleted file mode 100644
index 931dd88b8..000000000
--- a/examples/headless-maven/incquery-demo-generic/.project
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>incquery-demo-generic</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.sonar.ide.eclipse.core.sonarNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/headless-maven/incquery-demo-generic/.settings/org.eclipse.jdt.core.prefs b/examples/headless-maven/incquery-demo-generic/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 60105c1b9..000000000
--- a/examples/headless-maven/incquery-demo-generic/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,5 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/examples/headless-maven/incquery-demo-generic/.settings/org.eclipse.m2e.core.prefs b/examples/headless-maven/incquery-demo-generic/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f1c..000000000
--- a/examples/headless-maven/incquery-demo-generic/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/examples/headless-maven/incquery-demo-generic/.settings/org.sonar.ide.eclipse.core.prefs b/examples/headless-maven/incquery-demo-generic/.settings/org.sonar.ide.eclipse.core.prefs
deleted file mode 100644
index e8d5854c7..000000000
--- a/examples/headless-maven/incquery-demo-generic/.settings/org.sonar.ide.eclipse.core.prefs
+++ /dev/null
@@ -1,5 +0,0 @@
-eclipse.preferences.version=1
-extraProperties=
-projectKey=hu.bme.mit.incquery\:incquery-demo-generic
-serverUrl=http\://localhost\:9000
-version=2
diff --git a/examples/headless-maven/incquery-demo-generic/pom.xml b/examples/headless-maven/incquery-demo-generic/pom.xml
deleted file mode 100644
index 995686347..000000000
--- a/examples/headless-maven/incquery-demo-generic/pom.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>hu.bme.mit.incquery</groupId>
- <artifactId>incquery-demo-generic</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <repositories>
- <repository>
- <id>incquery-snapshot</id>
- <name>IncQuery Snapshots</name>
- <url>https://repo.eclipse.org/content/repositories/emf-incquery-snapshots/</url>
- </repository>
- <repository>
- <id>acceleo</id>
- <name>Acceleo Repository (with EMF)</name>
- <url>https://repo.eclipse.org/content/groups/acceleo</url>
- </repository>
- </repositories>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/lib</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- <overWriteIfNewer>true</overWriteIfNewer>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <classpathPrefix>lib/</classpathPrefix>
- <useUniqueVersions>false</useUniqueVersions>
- <mainClass>hu.bme.mit.incquery.application.PatternSpecificIncQueryApplication</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.incquery</groupId>
- <artifactId>runtime</artifactId>
- <version>0.8.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.incquery</groupId>
- <artifactId>patternlanguage</artifactId>
- <version>0.8.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>org.eclipse.emf.ecore</artifactId>
- <version>2.9.1.v20130827-0309</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>org.eclipse.emf.common</artifactId>
- <version>2.9.1.v20130827-0309</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>org.eclipse.emf.ecore.xmi</artifactId>
- <version>2.9.1.v20130827-0309</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.17</version>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>16.0.1</version>
- </dependency>
- <dependency>
- <groupId>com.google.inject</groupId>
- <artifactId>guice</artifactId>
- <version>3.0</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- <properties>
- <maven.compiler.source>1.6</maven.compiler.source>
- <maven.compiler.target>1.6</maven.compiler.target>
- </properties>
-</project> \ No newline at end of file
diff --git a/examples/headless-maven/incquery-demo-generic/src/main/java/hu/bme/mit/incquery/application/GenericIncQueryApplication.java b/examples/headless-maven/incquery-demo-generic/src/main/java/hu/bme/mit/incquery/application/GenericIncQueryApplication.java
deleted file mode 100644
index d5c9f7111..000000000
--- a/examples/headless-maven/incquery-demo-generic/src/main/java/hu/bme/mit/incquery/application/GenericIncQueryApplication.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2011 Abel Hegedus and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package hu.bme.mit.incquery.application;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl;
-
-/**
- * @author Abel Hegedus
- *
- */
-public class GenericIncQueryApplication {
-
- private static String modelParam = "-m";
- private static String patternParam = "-p";
- private static String eiqFileParam = "-e";
-
-
- public static void main(String[] args) {
- String model = null;
- String eiqFile = null;
- String patternFQN = null;
- if (args == null || args.length == 0) {
- displayHelp();
- return;
- }
- int i = 0;
- while (i < args.length) {
- if (args[i].equals(modelParam)) {
- model = args[i + 1];
- i += 2;
- continue;
- } else if (args[i].equals(patternParam)) {
- patternFQN = args[i + 1];
- i += 2;
- continue;
- } else if (args[i].equals(eiqFileParam)) {
- eiqFile = args[i + 1];
- i += 2;
- continue;
- } else {
- i++;
- continue;
- }
- }
-
- if (model == null) {
- System.out.println("Model parameter not set");
- displayHelp();
- return;
- }
- if (patternFQN == null) {
- System.out.println("PatternFQN parameter not set");
- displayHelp();
- return;
- }
- if (eiqFile == null) {
- System.out.println("EIQ file parameter not set");
- displayHelp();
- return;
- }
-
- IncQueryHeadlessAdvanced hla = new IncQueryHeadlessAdvanced();
- // Initializing metamodel
- Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ecore", new EcoreResourceFactoryImpl());
- URI fileURI = URI.createFileURI(eiqFile);
- URI modelURI = URI.createFileURI(model);
- System.out.println(hla.executeDemo_GenericAPI_LoadFromEIQ(modelURI, fileURI, patternFQN));
- System.out.println(hla.executeTrackChangesDemo_Advanced(modelURI, patternFQN));
-
- }
-
- private static void displayHelp() {
- System.out.println("Usage:\n<call> -m <modelFilePath> -e <eiqFilePath> -p <patternFQN>");
- System.out.println(" -m : Required, the model to match on.");
- System.out.println(" -e : Required, the pattern definition file (.eiq) to match on.");
- System.out.println(" -p : Required, the pattern fqn to match");
- }
-}
diff --git a/examples/headless-maven/incquery-demo-generic/src/main/java/hu/bme/mit/incquery/application/IncQueryHeadlessAdvanced.java b/examples/headless-maven/incquery-demo-generic/src/main/java/hu/bme/mit/incquery/application/IncQueryHeadlessAdvanced.java
deleted file mode 100644
index 88f19f533..000000000
--- a/examples/headless-maven/incquery-demo-generic/src/main/java/hu/bme/mit/incquery/application/IncQueryHeadlessAdvanced.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2011 Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- * Istvan Rath - refactorings to accommodate to generic/patternspecific API differences
- *******************************************************************************/
-package hu.bme.mit.incquery.application;
-
-
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.incquery.patternlanguage.emf.EMFPatternLanguageStandaloneSetup;
-import org.eclipse.incquery.patternlanguage.emf.eMFPatternLanguage.PatternModel;
-import org.eclipse.incquery.patternlanguage.emf.specification.SpecificationBuilder;
-import org.eclipse.incquery.patternlanguage.helper.CorePatternLanguageHelper;
-import org.eclipse.incquery.patternlanguage.patternLanguage.Pattern;
-import org.eclipse.incquery.runtime.api.AdvancedIncQueryEngine;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-import org.eclipse.incquery.runtime.api.IMatchUpdateListener;
-import org.eclipse.incquery.runtime.api.IPatternMatch;
-import org.eclipse.incquery.runtime.api.IQuerySpecification;
-import org.eclipse.incquery.runtime.api.IncQueryMatcher;
-import org.eclipse.incquery.runtime.api.IncQueryModelUpdateListener;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.extensibility.QuerySpecificationRegistry;
-import org.eclipse.incquery.runtime.rete.misc.DeltaMonitor;
-
-/**
- * @author Abel Hegedus
- * @author Istvan Rath
- *
- */
-public class IncQueryHeadlessAdvanced {
-
- protected Resource loadModel(URI fileURI) {
- // Loads the resource
- ResourceSet resourceSet = new ResourceSetImpl();
- Resource resource = resourceSet.getResource(fileURI, true);
- return resource;
- }
-
- protected void prettyPrintMatches(StringBuilder results, Collection<? extends IPatternMatch> matches) {
- for (IPatternMatch match : matches) {
- results.append(match.prettyPrint()+"; ");
- }
- if(matches.size() == 0) {
- results.append("Empty match set");
- }
- results.append("\n");
- }
-
- protected void performModelModification(Resource res) {
- // somewhat brittle code, assumes there is a root EPackage in the Resource
- EPackage rootPackage = (EPackage)res.getContents().get(0);
- // add a new EPackage
- EPackage newPackage = EcoreFactory.eINSTANCE.createEPackage();
- newPackage.setName("NewPackage");
- rootPackage.getESubpackages().add(newPackage);
- }
-
- /**
- * Returns the match set for patternFQN over the model in modelPath in pretty printed form
- *
- * @param modelPath
- * @param patternFQN
- * @return
- */
- public String executeDemo_GenericAPI_LoadFromEIQ(URI modelURI, URI fileURI, String patternFQN) {
- final StringBuilder results = new StringBuilder();
- Resource resource = loadModel(modelURI);
- if (resource != null) {
- try {
- // get all matches of the pattern
- // create an *unmanaged* engine to ensure that noone else is going
- // to use our engine
- AdvancedIncQueryEngine engine = AdvancedIncQueryEngine.createUnmanagedEngine(resource);
- // instantiate a pattern matcher through the registry, by only knowing its FQN
- // assuming that there is a pattern definition registered matching 'patternFQN'
-
- Pattern p = null;
-
- // Initializing Xtext-based resource parser
- new EMFPatternLanguageStandaloneSetup().createInjectorAndDoEMFRegistration();
-
- //Loading pattern resource from file
- ResourceSet resourceSet = new ResourceSetImpl();
-
- Resource patternResource = resourceSet.getResource(fileURI, true);
-
- // navigate to the pattern definition that we want
- if (patternResource != null) {
- if (patternResource.getErrors().size() == 0 && patternResource.getContents().size() >= 1) {
- EObject topElement = patternResource.getContents().get(0);
- if (topElement instanceof PatternModel) {
- for (Pattern _p : ((PatternModel) topElement).getPatterns()) {
- if (patternFQN.equals(CorePatternLanguageHelper.getFullyQualifiedName(_p))) {
- p = _p; break;
- }
- }
- }
- }
- }
- if (p == null) {
- throw new RuntimeException(String.format("Pattern %s not found", patternFQN));
- }
- SpecificationBuilder builder = new SpecificationBuilder();
- final IQuerySpecification<? extends IncQueryMatcher<? extends IPatternMatch>> specification = builder.getOrCreateSpecification(p);
- QuerySpecificationRegistry.registerQuerySpecification(specification);
-
- // Initialize matcher from specification
- IncQueryMatcher<? extends IPatternMatch> matcher = engine.getMatcher(specification);
-
- if (matcher!=null) {
- Collection<? extends IPatternMatch> matches = matcher.getAllMatches();
- prettyPrintMatches(results, matches);
- }
-
- // wipe the engine
- engine.wipe();
- // after a wipe, new patterns can be rebuilt with much less overhead than
- // complete traversal (as the base indexes will be kept)
-
- // completely dispose of the engine once's it is not needed
- engine.dispose();
- resource.unload();
- } catch (IncQueryException e) {
- e.printStackTrace();
- results.append(e.getMessage());
- }
- } else {
- results.append("Resource not found");
- }
- return results.toString();
- }
-
-
- // incrementally track changes
-
-
- public String executeTrackChangesDemo_Advanced(URI modelURI, String patternFQN)
- {
- final StringBuilder results = new StringBuilder();
- Resource resource = loadModel(modelURI);
- if (resource != null) {
- try {
- // initialization
- // phase 1: (managed) IncQueryEngine
- AdvancedIncQueryEngine engine = AdvancedIncQueryEngine.createUnmanagedEngine(resource);
- // phase 2: pattern matcher for packages
- IncQueryMatcher<? extends IPatternMatch> matcher = QuerySpecificationRegistry.getQuerySpecification(patternFQN).getMatcher(engine);
- matcher.forEachMatch(new IMatchProcessor<IPatternMatch>() {
- @Override
- public void process(IPatternMatch match) {
- results.append("\tMatch before modification: " + match.prettyPrint()+"\n");
- }
- });
- // phase 3: prepare for advanced change processing
- changeProcessing_lowlevel(results, matcher, engine);
- changeProcessing_deltaMonitor(results, matcher, engine);
- // phase 4: modify model, change processor will update results accordingly
- performModelModification(resource);
- }
- catch (IncQueryException e) {
- e.printStackTrace();
- results.append(e.getMessage());
- }
- } else {
- results.append("Resource not found");
- }
- return results.toString();
- }
-
- private void changeProcessing_lowlevel(final StringBuilder results,
- IncQueryMatcher<? extends IPatternMatch> matcher,
- AdvancedIncQueryEngine engine) {
- // (+) these update callbacks are called whenever there is an actual change in the
- // result set of the pattern you are interested in. Hence, they are called fewer times
- // than the "afterUpdates" option, giving better performance.
- // (-) the downside is that the callbacks are *not* guaranteed to be called in a consistent
- // state (i.e. when the update propagation is settled), hence
- // * you must not invoke pattern matching and model manipulation _inside_ the callback method
- // * the callbacks might encounter "hazards", i.e. when an appearance is followed immediately by a disappearance.
- engine.addMatchUpdateListener(matcher, new IMatchUpdateListener<IPatternMatch>() {
- @Override
- public void notifyDisappearance(IPatternMatch match) {
- // left empty
- }
- @Override
- public void notifyAppearance(IPatternMatch match) {
- results.append("\tNew match found by changeset low level callback: " + match.prettyPrint()+"\n");
- }
- }, false);
- }
-
- @Deprecated
- private void changeProcessing_deltaMonitor(final StringBuilder results,
- IncQueryMatcher<? extends IPatternMatch> matcher,
- AdvancedIncQueryEngine engine) {
- final DeltaMonitor<? extends IPatternMatch> dm = matcher.newDeltaMonitor(false);
- // (+) these updates are guaranteed to be called in a *consistent* state,
- // i.e. when the pattern matcher is guaranteed to be consistent with the model
- // anything can be written into the callback method
- // (-) the downside is that the callback is called after *every* update
- // that propagates through the matcher, i.e. also when the updates do not actually
- // influence the result set you are interested in. Hence, the performance is somewhat
- // lower than for the "lowlevel" option.
- engine.addModelUpdateListener(new IncQueryModelUpdateListener() {
-
- @Override
- public void notifyChanged(ChangeLevel changeLevel) {
- for (IPatternMatch newMatch : dm.matchFoundEvents) {
- results.append("\tNew match found by changeset delta monitor: " + newMatch.prettyPrint()+"\n");
- }
- for (IPatternMatch lostMatch : dm.matchLostEvents) {
- // left empty
- }
- dm.clear();
- }
-
- @Override
- public ChangeLevel getLevel() {
- return ChangeLevel.MATCHSET;
- }
-
- });
-
- }
-
-
-}
diff --git a/examples/headless-maven/incquery-demo/.classpath b/examples/headless-maven/incquery-demo/.classpath
deleted file mode 100644
index efcf778ba..000000000
--- a/examples/headless-maven/incquery-demo/.classpath
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/examples/headless-maven/incquery-demo/.project b/examples/headless-maven/incquery-demo/.project
deleted file mode 100644
index 63323b130..000000000
--- a/examples/headless-maven/incquery-demo/.project
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>incquery-demo</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.sonar.ide.eclipse.core.sonarNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/headless-maven/incquery-demo/.settings/org.eclipse.jdt.core.prefs b/examples/headless-maven/incquery-demo/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 60105c1b9..000000000
--- a/examples/headless-maven/incquery-demo/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,5 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/examples/headless-maven/incquery-demo/.settings/org.eclipse.m2e.core.prefs b/examples/headless-maven/incquery-demo/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f1c..000000000
--- a/examples/headless-maven/incquery-demo/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/examples/headless-maven/incquery-demo/pom.xml b/examples/headless-maven/incquery-demo/pom.xml
deleted file mode 100644
index 6721b7774..000000000
--- a/examples/headless-maven/incquery-demo/pom.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>hu.bme.mit.incquery</groupId>
- <artifactId>incquery-demo</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/lib</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>true</overWriteSnapshots>
- <overWriteIfNewer>true</overWriteIfNewer>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- <classpathPrefix>lib/</classpathPrefix>
- <useUniqueVersions>false</useUniqueVersions>
- <mainClass>hu.bme.mit.incquery.application.PatternSpecificIncQueryApplication</mainClass>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <repositories>
- <repository>
- <id>incquery-snapshot</id>
- <name>IncQuery Snapshots</name>
- <url>https://repo.eclipse.org/content/repositories/emf-incquery-snapshots/</url>
- </repository>
- <repository>
- <id>acceleo</id>
- <name>Acceleo Repository (with EMF)</name>
- <url>https://repo.eclipse.org/content/groups/acceleo</url>
- </repository>
- </repositories>
- <dependencies>
- <dependency>
- <groupId>org.eclipse.incquery</groupId>
- <artifactId>runtime</artifactId>
- <version>0.8.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>org.eclipse.emf.ecore</artifactId>
- <version>2.9.1.v20130827-0309</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>org.eclipse.emf.common</artifactId>
- <version>2.9.1.v20130827-0309</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.emf</groupId>
- <artifactId>org.eclipse.emf.ecore.xmi</artifactId>
- <version>2.9.1.v20130827-0309</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.17</version>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>16.0.1</version>
- </dependency>
- </dependencies>
- <properties>
- <maven.compiler.source>1.6</maven.compiler.source>
- <maven.compiler.target>1.6</maven.compiler.target>
- </properties>
-</project> \ No newline at end of file
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageHierarchyMatch.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageHierarchyMatch.java._trace
deleted file mode 100644
index 765d67252..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageHierarchyMatch.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageHierarchyMatcher.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageHierarchyMatcher.java._trace
deleted file mode 100644
index eec5093ea..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageHierarchyMatcher.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageMatch.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageMatch.java._trace
deleted file mode 100644
index e76129529..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageMatch.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageMatcher.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageMatcher.java._trace
deleted file mode 100644
index 1f5095f35..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.ClassesInPackageMatcher.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassMatch.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassMatch.java._trace
deleted file mode 100644
index 341925451..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassMatch.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassMatcher.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassMatcher.java._trace
deleted file mode 100644
index 25aab0115..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassMatcher.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesKeywordMatch.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesKeywordMatch.java._trace
deleted file mode 100644
index a07ff775d..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesKeywordMatch.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesKeywordMatcher.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesKeywordMatcher.java._trace
deleted file mode 100644
index 4972254f4..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesKeywordMatcher.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesMatch.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesMatch.java._trace
deleted file mode 100644
index 7c10fe6ca..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesMatch.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesMatcher.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesMatcher.java._trace
deleted file mode 100644
index 12ae99c84..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.EClassNamesMatcher.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.EObjectMatch.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.EObjectMatch.java._trace
deleted file mode 100644
index 78bab0ac5..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.EObjectMatch.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.EObjectMatcher.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.EObjectMatcher.java._trace
deleted file mode 100644
index 8a9145159..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.EObjectMatcher.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.EPackageMatch.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.EPackageMatch.java._trace
deleted file mode 100644
index ea961f4fe..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.EPackageMatch.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.EPackageMatcher.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.EPackageMatcher.java._trace
deleted file mode 100644
index 55115c7a4..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.EPackageMatcher.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.HeadlessQueries.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.HeadlessQueries.java._trace
deleted file mode 100644
index 53572aa84..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.HeadlessQueries.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.HeadlessQueriesMatchers.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.HeadlessQueriesMatchers.java._trace
deleted file mode 100644
index 0128ae8ac..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.HeadlessQueriesMatchers.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.SubPackageMatch.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.SubPackageMatch.java._trace
deleted file mode 100644
index 6701fbcae..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.SubPackageMatch.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/.SubPackageMatcher.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/.SubPackageMatcher.java._trace
deleted file mode 100644
index 40f3949df..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/.SubPackageMatcher.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageHierarchyMatch.java b/examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageHierarchyMatch.java
deleted file mode 100644
index 1f85f35a6..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageHierarchyMatch.java
+++ /dev/null
@@ -1,181 +0,0 @@
-package headless;
-
-import headless.util.ClassesInPackageHierarchyQuerySpecification;
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.incquery.runtime.api.IPatternMatch;
-import org.eclipse.incquery.runtime.api.impl.BasePatternMatch;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-
-/**
- * Pattern-specific match representation of the headless.classesInPackageHierarchy pattern,
- * to be used in conjunction with {@link ClassesInPackageHierarchyMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see ClassesInPackageHierarchyMatcher
- * @see ClassesInPackageHierarchyProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class ClassesInPackageHierarchyMatch extends BasePatternMatch {
- private EPackage fRootP;
-
- private EClass fContainedClass;
-
- private static List<String> parameterNames = makeImmutableList("rootP", "containedClass");
-
- private ClassesInPackageHierarchyMatch(final EPackage pRootP, final EClass pContainedClass) {
- this.fRootP = pRootP;
- this.fContainedClass = pContainedClass;
-
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("rootP".equals(parameterName)) return this.fRootP;
- if ("containedClass".equals(parameterName)) return this.fContainedClass;
- return null;
-
- }
-
- public EPackage getRootP() {
- return this.fRootP;
-
- }
-
- public EClass getContainedClass() {
- return this.fContainedClass;
-
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("rootP".equals(parameterName) ) {
- this.fRootP = (org.eclipse.emf.ecore.EPackage) newValue;
- return true;
- }
- if ("containedClass".equals(parameterName) ) {
- this.fContainedClass = (org.eclipse.emf.ecore.EClass) newValue;
- return true;
- }
- return false;
-
- }
-
- public void setRootP(final EPackage pRootP) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fRootP = pRootP;
-
- }
-
- public void setContainedClass(final EClass pContainedClass) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fContainedClass = pContainedClass;
-
- }
-
- @Override
- public String patternName() {
- return "headless.classesInPackageHierarchy";
-
- }
-
- @Override
- public List<String> parameterNames() {
- return ClassesInPackageHierarchyMatch.parameterNames;
-
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fRootP, fContainedClass};
-
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"rootP\"=" + prettyPrintValue(fRootP) + ", ");
- result.append("\"containedClass\"=" + prettyPrintValue(fContainedClass));
- return result.toString();
-
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fRootP == null) ? 0 : fRootP.hashCode());
- result = prime * result + ((fContainedClass == null) ? 0 : fContainedClass.hashCode());
- return result;
-
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof ClassesInPackageHierarchyMatch)) { // this should be infrequent
- if (obj == null)
- return false;
- if (!(obj instanceof IPatternMatch))
- return false;
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- ClassesInPackageHierarchyMatch other = (ClassesInPackageHierarchyMatch) obj;
- if (fRootP == null) {if (other.fRootP != null) return false;}
- else if (!fRootP.equals(other.fRootP)) return false;
- if (fContainedClass == null) {if (other.fContainedClass != null) return false;}
- else if (!fContainedClass.equals(other.fContainedClass)) return false;
- return true;
- }
-
- @Override
- public ClassesInPackageHierarchyQuerySpecification specification() {
- try {
- return ClassesInPackageHierarchyQuerySpecification.instance();
- } catch (IncQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
-
- }
-
- @SuppressWarnings("all")
- static final class Mutable extends ClassesInPackageHierarchyMatch {
- Mutable(final EPackage pRootP, final EClass pContainedClass) {
- super(pRootP, pContainedClass);
-
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
-
- @SuppressWarnings("all")
- static final class Immutable extends ClassesInPackageHierarchyMatch {
- Immutable(final EPackage pRootP, final EClass pContainedClass) {
- super(pRootP, pContainedClass);
-
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageHierarchyMatcher.java b/examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageHierarchyMatcher.java
deleted file mode 100644
index 1a9b0fd2c..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageHierarchyMatcher.java
+++ /dev/null
@@ -1,317 +0,0 @@
-package headless;
-
-import headless.ClassesInPackageHierarchyMatch;
-import headless.util.ClassesInPackageHierarchyQuerySpecification;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-import org.eclipse.incquery.runtime.api.IQuerySpecification;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseMatcher;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.matchers.tuple.Tuple;
-import org.eclipse.incquery.runtime.rete.misc.DeltaMonitor;
-
-/**
- * Generated pattern matcher API of the headless.classesInPackageHierarchy pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(IncQueryEngine)},
- * e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link ClassesInPackageHierarchyMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * {@literal @}Edge(source = rootP, target = containedClass, label = "classIn+")
- * {@literal @}Format(color = "#0033ff")
- * pattern classesInPackageHierarchy(rootP: EPackage, containedClass: EClass)
- * {
- * find classesInPackage(rootP,containedClass);
- * } or {
- * find subPackage+(rootP,somePackage);
- * find classesInPackage(somePackage,containedClass);
- * }
- * </pre></code>
- *
- * @see ClassesInPackageHierarchyMatch
- * @see ClassesInPackageHierarchyProcessor
- * @see ClassesInPackageHierarchyQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class ClassesInPackageHierarchyMatcher extends BaseMatcher<ClassesInPackageHierarchyMatch> {
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<ClassesInPackageHierarchyMatcher> querySpecification() throws IncQueryException {
- return ClassesInPackageHierarchyQuerySpecification.instance();
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- *
- */
- public static ClassesInPackageHierarchyMatcher on(final IncQueryEngine engine) throws IncQueryException {
- // check if matcher already exists
- ClassesInPackageHierarchyMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new ClassesInPackageHierarchyMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_ROOTP = 0;
-
- private final static int POSITION_CONTAINEDCLASS = 1;
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link IncQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead, e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public ClassesInPackageHierarchyMatcher(final Notifier emfRoot) throws IncQueryException {
- this(IncQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead
- *
- */
- @Deprecated
- public ClassesInPackageHierarchyMatcher(final IncQueryEngine engine) throws IncQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @return matches represented as a ClassesInPackageHierarchyMatch object.
- *
- */
- public Collection<ClassesInPackageHierarchyMatch> getAllMatches(final EPackage pRootP, final EClass pContainedClass) {
- return rawGetAllMatches(new Object[]{pRootP, pContainedClass});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @return a match represented as a ClassesInPackageHierarchyMatch object, or null if no match is found.
- *
- */
- public ClassesInPackageHierarchyMatch getOneArbitraryMatch(final EPackage pRootP, final EClass pContainedClass) {
- return rawGetOneArbitraryMatch(new Object[]{pRootP, pContainedClass});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EPackage pRootP, final EClass pContainedClass) {
- return rawHasMatch(new Object[]{pRootP, pContainedClass});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EPackage pRootP, final EClass pContainedClass) {
- return rawCountMatches(new Object[]{pRootP, pContainedClass});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EPackage pRootP, final EClass pContainedClass, final IMatchProcessor<? super ClassesInPackageHierarchyMatch> processor) {
- rawForEachMatch(new Object[]{pRootP, pContainedClass}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EPackage pRootP, final EClass pContainedClass, final IMatchProcessor<? super ClassesInPackageHierarchyMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pRootP, pContainedClass}, processor);
- }
-
- /**
- * Registers a new filtered delta monitor on this pattern matcher.
- * The DeltaMonitor can be used to track changes (delta) in the set of filtered pattern matches from now on, considering those matches only that conform to the given fixed values of some parameters.
- * It can also be reset to track changes from a later point in time,
- * and changes can even be acknowledged on an individual basis.
- * See {@link DeltaMonitor} for details.
- * @param fillAtStart if true, all current matches are reported as new match events; if false, the delta monitor starts empty.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @return the delta monitor.
- * @deprecated use the IncQuery Databinding API (IncQueryObservables) instead.
- *
- */
- @Deprecated
- public DeltaMonitor<ClassesInPackageHierarchyMatch> newFilteredDeltaMonitor(final boolean fillAtStart, final EPackage pRootP, final EClass pContainedClass) {
- return rawNewFilteredDeltaMonitor(fillAtStart, new Object[]{pRootP, pContainedClass});
- }
-
- /**
- * Returns a new (partial) Match object for the matcher.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public ClassesInPackageHierarchyMatch newMatch(final EPackage pRootP, final EClass pContainedClass) {
- return new ClassesInPackageHierarchyMatch.Immutable(pRootP, pContainedClass);
-
- }
-
- /**
- * Retrieve the set of values that occur in matches for rootP.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EPackage> rawAccumulateAllValuesOfrootP(final Object[] parameters) {
- Set<EPackage> results = new HashSet<EPackage>();
- rawAccumulateAllValues(POSITION_ROOTP, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for rootP.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfrootP() {
- return rawAccumulateAllValuesOfrootP(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for rootP.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfrootP(final ClassesInPackageHierarchyMatch partialMatch) {
- return rawAccumulateAllValuesOfrootP(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for rootP.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfrootP(final EClass pContainedClass) {
- return rawAccumulateAllValuesOfrootP(new Object[]{null, pContainedClass});
- }
-
- /**
- * Retrieve the set of values that occur in matches for containedClass.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EClass> rawAccumulateAllValuesOfcontainedClass(final Object[] parameters) {
- Set<EClass> results = new HashSet<EClass>();
- rawAccumulateAllValues(POSITION_CONTAINEDCLASS, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for containedClass.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfcontainedClass() {
- return rawAccumulateAllValuesOfcontainedClass(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for containedClass.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfcontainedClass(final ClassesInPackageHierarchyMatch partialMatch) {
- return rawAccumulateAllValuesOfcontainedClass(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for containedClass.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfcontainedClass(final EPackage pRootP) {
- return rawAccumulateAllValuesOfcontainedClass(new Object[]{pRootP, null});
- }
-
- @Override
- protected ClassesInPackageHierarchyMatch tupleToMatch(final Tuple t) {
- try {
- return new ClassesInPackageHierarchyMatch.Immutable((org.eclipse.emf.ecore.EPackage) t.get(POSITION_ROOTP), (org.eclipse.emf.ecore.EClass) t.get(POSITION_CONTAINEDCLASS));
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in tuple not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected ClassesInPackageHierarchyMatch arrayToMatch(final Object[] match) {
- try {
- return new ClassesInPackageHierarchyMatch.Immutable((org.eclipse.emf.ecore.EPackage) match[POSITION_ROOTP], (org.eclipse.emf.ecore.EClass) match[POSITION_CONTAINEDCLASS]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected ClassesInPackageHierarchyMatch arrayToMatchMutable(final Object[] match) {
- try {
- return new ClassesInPackageHierarchyMatch.Mutable((org.eclipse.emf.ecore.EPackage) match[POSITION_ROOTP], (org.eclipse.emf.ecore.EClass) match[POSITION_CONTAINEDCLASS]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageMatch.java b/examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageMatch.java
deleted file mode 100644
index 88e1d99c7..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageMatch.java
+++ /dev/null
@@ -1,181 +0,0 @@
-package headless;
-
-import headless.util.ClassesInPackageQuerySpecification;
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.incquery.runtime.api.IPatternMatch;
-import org.eclipse.incquery.runtime.api.impl.BasePatternMatch;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-
-/**
- * Pattern-specific match representation of the headless.classesInPackage pattern,
- * to be used in conjunction with {@link ClassesInPackageMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see ClassesInPackageMatcher
- * @see ClassesInPackageProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class ClassesInPackageMatch extends BasePatternMatch {
- private EPackage fP;
-
- private EClass fEc;
-
- private static List<String> parameterNames = makeImmutableList("p", "ec");
-
- private ClassesInPackageMatch(final EPackage pP, final EClass pEc) {
- this.fP = pP;
- this.fEc = pEc;
-
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("p".equals(parameterName)) return this.fP;
- if ("ec".equals(parameterName)) return this.fEc;
- return null;
-
- }
-
- public EPackage getP() {
- return this.fP;
-
- }
-
- public EClass getEc() {
- return this.fEc;
-
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("p".equals(parameterName) ) {
- this.fP = (org.eclipse.emf.ecore.EPackage) newValue;
- return true;
- }
- if ("ec".equals(parameterName) ) {
- this.fEc = (org.eclipse.emf.ecore.EClass) newValue;
- return true;
- }
- return false;
-
- }
-
- public void setP(final EPackage pP) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fP = pP;
-
- }
-
- public void setEc(final EClass pEc) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fEc = pEc;
-
- }
-
- @Override
- public String patternName() {
- return "headless.classesInPackage";
-
- }
-
- @Override
- public List<String> parameterNames() {
- return ClassesInPackageMatch.parameterNames;
-
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fP, fEc};
-
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"p\"=" + prettyPrintValue(fP) + ", ");
- result.append("\"ec\"=" + prettyPrintValue(fEc));
- return result.toString();
-
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fP == null) ? 0 : fP.hashCode());
- result = prime * result + ((fEc == null) ? 0 : fEc.hashCode());
- return result;
-
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof ClassesInPackageMatch)) { // this should be infrequent
- if (obj == null)
- return false;
- if (!(obj instanceof IPatternMatch))
- return false;
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- ClassesInPackageMatch other = (ClassesInPackageMatch) obj;
- if (fP == null) {if (other.fP != null) return false;}
- else if (!fP.equals(other.fP)) return false;
- if (fEc == null) {if (other.fEc != null) return false;}
- else if (!fEc.equals(other.fEc)) return false;
- return true;
- }
-
- @Override
- public ClassesInPackageQuerySpecification specification() {
- try {
- return ClassesInPackageQuerySpecification.instance();
- } catch (IncQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
-
- }
-
- @SuppressWarnings("all")
- static final class Mutable extends ClassesInPackageMatch {
- Mutable(final EPackage pP, final EClass pEc) {
- super(pP, pEc);
-
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
-
- @SuppressWarnings("all")
- static final class Immutable extends ClassesInPackageMatch {
- Immutable(final EPackage pP, final EClass pEc) {
- super(pP, pEc);
-
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageMatcher.java b/examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageMatcher.java
deleted file mode 100644
index 545ed99e2..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/ClassesInPackageMatcher.java
+++ /dev/null
@@ -1,310 +0,0 @@
-package headless;
-
-import headless.ClassesInPackageMatch;
-import headless.util.ClassesInPackageQuerySpecification;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-import org.eclipse.incquery.runtime.api.IQuerySpecification;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseMatcher;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.matchers.tuple.Tuple;
-import org.eclipse.incquery.runtime.rete.misc.DeltaMonitor;
-
-/**
- * Generated pattern matcher API of the headless.classesInPackage pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(IncQueryEngine)},
- * e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link ClassesInPackageMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * {@literal @}Edge(source = p, target = ec, label = "classIn")
- * pattern classesInPackage(p : EPackage, ec: EClass) { EPackage.eClassifiers(p,ec); }
- * </pre></code>
- *
- * @see ClassesInPackageMatch
- * @see ClassesInPackageProcessor
- * @see ClassesInPackageQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class ClassesInPackageMatcher extends BaseMatcher<ClassesInPackageMatch> {
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<ClassesInPackageMatcher> querySpecification() throws IncQueryException {
- return ClassesInPackageQuerySpecification.instance();
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- *
- */
- public static ClassesInPackageMatcher on(final IncQueryEngine engine) throws IncQueryException {
- // check if matcher already exists
- ClassesInPackageMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new ClassesInPackageMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_P = 0;
-
- private final static int POSITION_EC = 1;
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link IncQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead, e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public ClassesInPackageMatcher(final Notifier emfRoot) throws IncQueryException {
- this(IncQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead
- *
- */
- @Deprecated
- public ClassesInPackageMatcher(final IncQueryEngine engine) throws IncQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return matches represented as a ClassesInPackageMatch object.
- *
- */
- public Collection<ClassesInPackageMatch> getAllMatches(final EPackage pP, final EClass pEc) {
- return rawGetAllMatches(new Object[]{pP, pEc});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return a match represented as a ClassesInPackageMatch object, or null if no match is found.
- *
- */
- public ClassesInPackageMatch getOneArbitraryMatch(final EPackage pP, final EClass pEc) {
- return rawGetOneArbitraryMatch(new Object[]{pP, pEc});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EPackage pP, final EClass pEc) {
- return rawHasMatch(new Object[]{pP, pEc});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EPackage pP, final EClass pEc) {
- return rawCountMatches(new Object[]{pP, pEc});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EPackage pP, final EClass pEc, final IMatchProcessor<? super ClassesInPackageMatch> processor) {
- rawForEachMatch(new Object[]{pP, pEc}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EPackage pP, final EClass pEc, final IMatchProcessor<? super ClassesInPackageMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pP, pEc}, processor);
- }
-
- /**
- * Registers a new filtered delta monitor on this pattern matcher.
- * The DeltaMonitor can be used to track changes (delta) in the set of filtered pattern matches from now on, considering those matches only that conform to the given fixed values of some parameters.
- * It can also be reset to track changes from a later point in time,
- * and changes can even be acknowledged on an individual basis.
- * See {@link DeltaMonitor} for details.
- * @param fillAtStart if true, all current matches are reported as new match events; if false, the delta monitor starts empty.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the delta monitor.
- * @deprecated use the IncQuery Databinding API (IncQueryObservables) instead.
- *
- */
- @Deprecated
- public DeltaMonitor<ClassesInPackageMatch> newFilteredDeltaMonitor(final boolean fillAtStart, final EPackage pP, final EClass pEc) {
- return rawNewFilteredDeltaMonitor(fillAtStart, new Object[]{pP, pEc});
- }
-
- /**
- * Returns a new (partial) Match object for the matcher.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public ClassesInPackageMatch newMatch(final EPackage pP, final EClass pEc) {
- return new ClassesInPackageMatch.Immutable(pP, pEc);
-
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EPackage> rawAccumulateAllValuesOfp(final Object[] parameters) {
- Set<EPackage> results = new HashSet<EPackage>();
- rawAccumulateAllValues(POSITION_P, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp() {
- return rawAccumulateAllValuesOfp(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp(final ClassesInPackageMatch partialMatch) {
- return rawAccumulateAllValuesOfp(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp(final EClass pEc) {
- return rawAccumulateAllValuesOfp(new Object[]{null, pEc});
- }
-
- /**
- * Retrieve the set of values that occur in matches for ec.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EClass> rawAccumulateAllValuesOfec(final Object[] parameters) {
- Set<EClass> results = new HashSet<EClass>();
- rawAccumulateAllValues(POSITION_EC, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for ec.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfec() {
- return rawAccumulateAllValuesOfec(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for ec.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfec(final ClassesInPackageMatch partialMatch) {
- return rawAccumulateAllValuesOfec(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for ec.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfec(final EPackage pP) {
- return rawAccumulateAllValuesOfec(new Object[]{pP, null});
- }
-
- @Override
- protected ClassesInPackageMatch tupleToMatch(final Tuple t) {
- try {
- return new ClassesInPackageMatch.Immutable((org.eclipse.emf.ecore.EPackage) t.get(POSITION_P), (org.eclipse.emf.ecore.EClass) t.get(POSITION_EC));
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in tuple not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected ClassesInPackageMatch arrayToMatch(final Object[] match) {
- try {
- return new ClassesInPackageMatch.Immutable((org.eclipse.emf.ecore.EPackage) match[POSITION_P], (org.eclipse.emf.ecore.EClass) match[POSITION_EC]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected ClassesInPackageMatch arrayToMatchMutable(final Object[] match) {
- try {
- return new ClassesInPackageMatch.Mutable((org.eclipse.emf.ecore.EPackage) match[POSITION_P], (org.eclipse.emf.ecore.EClass) match[POSITION_EC]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/EClassMatch.java b/examples/headless-maven/incquery-demo/src/main/java/headless/EClassMatch.java
deleted file mode 100644
index 36b4790e5..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/EClassMatch.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package headless;
-
-import headless.util.EClassQuerySpecification;
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.incquery.runtime.api.IPatternMatch;
-import org.eclipse.incquery.runtime.api.impl.BasePatternMatch;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-
-/**
- * Pattern-specific match representation of the headless.eClass pattern,
- * to be used in conjunction with {@link EClassMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see EClassMatcher
- * @see EClassProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class EClassMatch extends BasePatternMatch {
- private EClass fEc;
-
- private static List<String> parameterNames = makeImmutableList("ec");
-
- private EClassMatch(final EClass pEc) {
- this.fEc = pEc;
-
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("ec".equals(parameterName)) return this.fEc;
- return null;
-
- }
-
- public EClass getEc() {
- return this.fEc;
-
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("ec".equals(parameterName) ) {
- this.fEc = (org.eclipse.emf.ecore.EClass) newValue;
- return true;
- }
- return false;
-
- }
-
- public void setEc(final EClass pEc) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fEc = pEc;
-
- }
-
- @Override
- public String patternName() {
- return "headless.eClass";
-
- }
-
- @Override
- public List<String> parameterNames() {
- return EClassMatch.parameterNames;
-
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fEc};
-
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"ec\"=" + prettyPrintValue(fEc));
- return result.toString();
-
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fEc == null) ? 0 : fEc.hashCode());
- return result;
-
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof EClassMatch)) { // this should be infrequent
- if (obj == null)
- return false;
- if (!(obj instanceof IPatternMatch))
- return false;
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- EClassMatch other = (EClassMatch) obj;
- if (fEc == null) {if (other.fEc != null) return false;}
- else if (!fEc.equals(other.fEc)) return false;
- return true;
- }
-
- @Override
- public EClassQuerySpecification specification() {
- try {
- return EClassQuerySpecification.instance();
- } catch (IncQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
-
- }
-
- @SuppressWarnings("all")
- static final class Mutable extends EClassMatch {
- Mutable(final EClass pEc) {
- super(pEc);
-
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
-
- @SuppressWarnings("all")
- static final class Immutable extends EClassMatch {
- Immutable(final EClass pEc) {
- super(pEc);
-
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/EClassMatcher.java b/examples/headless-maven/incquery-demo/src/main/java/headless/EClassMatcher.java
deleted file mode 100644
index db49677a8..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/EClassMatcher.java
+++ /dev/null
@@ -1,244 +0,0 @@
-package headless;
-
-import headless.EClassMatch;
-import headless.util.EClassQuerySpecification;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-import org.eclipse.incquery.runtime.api.IQuerySpecification;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseMatcher;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.matchers.tuple.Tuple;
-import org.eclipse.incquery.runtime.rete.misc.DeltaMonitor;
-
-/**
- * Generated pattern matcher API of the headless.eClass pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(IncQueryEngine)},
- * e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link EClassMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * {@literal @}Item(item = ec, label = "EC: $ec.name$")
- * {@literal @}Format(color = "#e8da2c")
- * pattern eClass(ec : EClass) { EClass(ec); }
- * </pre></code>
- *
- * @see EClassMatch
- * @see EClassProcessor
- * @see EClassQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class EClassMatcher extends BaseMatcher<EClassMatch> {
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<EClassMatcher> querySpecification() throws IncQueryException {
- return EClassQuerySpecification.instance();
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- *
- */
- public static EClassMatcher on(final IncQueryEngine engine) throws IncQueryException {
- // check if matcher already exists
- EClassMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new EClassMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_EC = 0;
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link IncQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead, e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public EClassMatcher(final Notifier emfRoot) throws IncQueryException {
- this(IncQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead
- *
- */
- @Deprecated
- public EClassMatcher(final IncQueryEngine engine) throws IncQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return matches represented as a EClassMatch object.
- *
- */
- public Collection<EClassMatch> getAllMatches(final EClass pEc) {
- return rawGetAllMatches(new Object[]{pEc});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return a match represented as a EClassMatch object, or null if no match is found.
- *
- */
- public EClassMatch getOneArbitraryMatch(final EClass pEc) {
- return rawGetOneArbitraryMatch(new Object[]{pEc});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EClass pEc) {
- return rawHasMatch(new Object[]{pEc});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EClass pEc) {
- return rawCountMatches(new Object[]{pEc});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EClass pEc, final IMatchProcessor<? super EClassMatch> processor) {
- rawForEachMatch(new Object[]{pEc}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EClass pEc, final IMatchProcessor<? super EClassMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pEc}, processor);
- }
-
- /**
- * Registers a new filtered delta monitor on this pattern matcher.
- * The DeltaMonitor can be used to track changes (delta) in the set of filtered pattern matches from now on, considering those matches only that conform to the given fixed values of some parameters.
- * It can also be reset to track changes from a later point in time,
- * and changes can even be acknowledged on an individual basis.
- * See {@link DeltaMonitor} for details.
- * @param fillAtStart if true, all current matches are reported as new match events; if false, the delta monitor starts empty.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the delta monitor.
- * @deprecated use the IncQuery Databinding API (IncQueryObservables) instead.
- *
- */
- @Deprecated
- public DeltaMonitor<EClassMatch> newFilteredDeltaMonitor(final boolean fillAtStart, final EClass pEc) {
- return rawNewFilteredDeltaMonitor(fillAtStart, new Object[]{pEc});
- }
-
- /**
- * Returns a new (partial) Match object for the matcher.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public EClassMatch newMatch(final EClass pEc) {
- return new EClassMatch.Immutable(pEc);
-
- }
-
- /**
- * Retrieve the set of values that occur in matches for ec.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EClass> rawAccumulateAllValuesOfec(final Object[] parameters) {
- Set<EClass> results = new HashSet<EClass>();
- rawAccumulateAllValues(POSITION_EC, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for ec.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfec() {
- return rawAccumulateAllValuesOfec(emptyArray());
- }
-
- @Override
- protected EClassMatch tupleToMatch(final Tuple t) {
- try {
- return new EClassMatch.Immutable((org.eclipse.emf.ecore.EClass) t.get(POSITION_EC));
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in tuple not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected EClassMatch arrayToMatch(final Object[] match) {
- try {
- return new EClassMatch.Immutable((org.eclipse.emf.ecore.EClass) match[POSITION_EC]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected EClassMatch arrayToMatchMutable(final Object[] match) {
- try {
- return new EClassMatch.Mutable((org.eclipse.emf.ecore.EClass) match[POSITION_EC]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesKeywordMatch.java b/examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesKeywordMatch.java
deleted file mode 100644
index 9275dd407..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesKeywordMatch.java
+++ /dev/null
@@ -1,180 +0,0 @@
-package headless;
-
-import headless.util.EClassNamesKeywordQuerySpecification;
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.incquery.runtime.api.IPatternMatch;
-import org.eclipse.incquery.runtime.api.impl.BasePatternMatch;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-
-/**
- * Pattern-specific match representation of the headless.eClassNamesKeyword pattern,
- * to be used in conjunction with {@link EClassNamesKeywordMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see EClassNamesKeywordMatcher
- * @see EClassNamesKeywordProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class EClassNamesKeywordMatch extends BasePatternMatch {
- private EClass fC;
-
- private String fN;
-
- private static List<String> parameterNames = makeImmutableList("c", "n");
-
- private EClassNamesKeywordMatch(final EClass pC, final String pN) {
- this.fC = pC;
- this.fN = pN;
-
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("c".equals(parameterName)) return this.fC;
- if ("n".equals(parameterName)) return this.fN;
- return null;
-
- }
-
- public EClass getC() {
- return this.fC;
-
- }
-
- public String getN() {
- return this.fN;
-
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("c".equals(parameterName) ) {
- this.fC = (org.eclipse.emf.ecore.EClass) newValue;
- return true;
- }
- if ("n".equals(parameterName) ) {
- this.fN = (java.lang.String) newValue;
- return true;
- }
- return false;
-
- }
-
- public void setC(final EClass pC) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fC = pC;
-
- }
-
- public void setN(final String pN) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fN = pN;
-
- }
-
- @Override
- public String patternName() {
- return "headless.eClassNamesKeyword";
-
- }
-
- @Override
- public List<String> parameterNames() {
- return EClassNamesKeywordMatch.parameterNames;
-
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fC, fN};
-
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"c\"=" + prettyPrintValue(fC) + ", ");
- result.append("\"n\"=" + prettyPrintValue(fN));
- return result.toString();
-
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fC == null) ? 0 : fC.hashCode());
- result = prime * result + ((fN == null) ? 0 : fN.hashCode());
- return result;
-
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof EClassNamesKeywordMatch)) { // this should be infrequent
- if (obj == null)
- return false;
- if (!(obj instanceof IPatternMatch))
- return false;
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- EClassNamesKeywordMatch other = (EClassNamesKeywordMatch) obj;
- if (fC == null) {if (other.fC != null) return false;}
- else if (!fC.equals(other.fC)) return false;
- if (fN == null) {if (other.fN != null) return false;}
- else if (!fN.equals(other.fN)) return false;
- return true;
- }
-
- @Override
- public EClassNamesKeywordQuerySpecification specification() {
- try {
- return EClassNamesKeywordQuerySpecification.instance();
- } catch (IncQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
-
- }
-
- @SuppressWarnings("all")
- static final class Mutable extends EClassNamesKeywordMatch {
- Mutable(final EClass pC, final String pN) {
- super(pC, pN);
-
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
-
- @SuppressWarnings("all")
- static final class Immutable extends EClassNamesKeywordMatch {
- Immutable(final EClass pC, final String pN) {
- super(pC, pN);
-
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesKeywordMatcher.java b/examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesKeywordMatcher.java
deleted file mode 100644
index 18501b6ca..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesKeywordMatcher.java
+++ /dev/null
@@ -1,312 +0,0 @@
-package headless;
-
-import headless.EClassNamesKeywordMatch;
-import headless.util.EClassNamesKeywordQuerySpecification;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-import org.eclipse.incquery.runtime.api.IQuerySpecification;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseMatcher;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.matchers.tuple.Tuple;
-import org.eclipse.incquery.runtime.rete.misc.DeltaMonitor;
-
-/**
- * Generated pattern matcher API of the headless.eClassNamesKeyword pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(IncQueryEngine)},
- * e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link EClassNamesKeywordMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * pattern eClassNamesKeyword(c: EClass, n: EString)
- * {
- * EClass.name(c,n);
- * check("A" == n);
- * }
- * </pre></code>
- *
- * @see EClassNamesKeywordMatch
- * @see EClassNamesKeywordProcessor
- * @see EClassNamesKeywordQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class EClassNamesKeywordMatcher extends BaseMatcher<EClassNamesKeywordMatch> {
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<EClassNamesKeywordMatcher> querySpecification() throws IncQueryException {
- return EClassNamesKeywordQuerySpecification.instance();
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- *
- */
- public static EClassNamesKeywordMatcher on(final IncQueryEngine engine) throws IncQueryException {
- // check if matcher already exists
- EClassNamesKeywordMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new EClassNamesKeywordMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_C = 0;
-
- private final static int POSITION_N = 1;
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link IncQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead, e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public EClassNamesKeywordMatcher(final Notifier emfRoot) throws IncQueryException {
- this(IncQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead
- *
- */
- @Deprecated
- public EClassNamesKeywordMatcher(final IncQueryEngine engine) throws IncQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return matches represented as a EClassNamesKeywordMatch object.
- *
- */
- public Collection<EClassNamesKeywordMatch> getAllMatches(final EClass pC, final String pN) {
- return rawGetAllMatches(new Object[]{pC, pN});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return a match represented as a EClassNamesKeywordMatch object, or null if no match is found.
- *
- */
- public EClassNamesKeywordMatch getOneArbitraryMatch(final EClass pC, final String pN) {
- return rawGetOneArbitraryMatch(new Object[]{pC, pN});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EClass pC, final String pN) {
- return rawHasMatch(new Object[]{pC, pN});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EClass pC, final String pN) {
- return rawCountMatches(new Object[]{pC, pN});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EClass pC, final String pN, final IMatchProcessor<? super EClassNamesKeywordMatch> processor) {
- rawForEachMatch(new Object[]{pC, pN}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EClass pC, final String pN, final IMatchProcessor<? super EClassNamesKeywordMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pC, pN}, processor);
- }
-
- /**
- * Registers a new filtered delta monitor on this pattern matcher.
- * The DeltaMonitor can be used to track changes (delta) in the set of filtered pattern matches from now on, considering those matches only that conform to the given fixed values of some parameters.
- * It can also be reset to track changes from a later point in time,
- * and changes can even be acknowledged on an individual basis.
- * See {@link DeltaMonitor} for details.
- * @param fillAtStart if true, all current matches are reported as new match events; if false, the delta monitor starts empty.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the delta monitor.
- * @deprecated use the IncQuery Databinding API (IncQueryObservables) instead.
- *
- */
- @Deprecated
- public DeltaMonitor<EClassNamesKeywordMatch> newFilteredDeltaMonitor(final boolean fillAtStart, final EClass pC, final String pN) {
- return rawNewFilteredDeltaMonitor(fillAtStart, new Object[]{pC, pN});
- }
-
- /**
- * Returns a new (partial) Match object for the matcher.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public EClassNamesKeywordMatch newMatch(final EClass pC, final String pN) {
- return new EClassNamesKeywordMatch.Immutable(pC, pN);
-
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EClass> rawAccumulateAllValuesOfc(final Object[] parameters) {
- Set<EClass> results = new HashSet<EClass>();
- rawAccumulateAllValues(POSITION_C, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfc() {
- return rawAccumulateAllValuesOfc(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfc(final EClassNamesKeywordMatch partialMatch) {
- return rawAccumulateAllValuesOfc(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfc(final String pN) {
- return rawAccumulateAllValuesOfc(new Object[]{null, pN});
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<String> rawAccumulateAllValuesOfn(final Object[] parameters) {
- Set<String> results = new HashSet<String>();
- rawAccumulateAllValues(POSITION_N, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<String> getAllValuesOfn() {
- return rawAccumulateAllValuesOfn(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<String> getAllValuesOfn(final EClassNamesKeywordMatch partialMatch) {
- return rawAccumulateAllValuesOfn(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<String> getAllValuesOfn(final EClass pC) {
- return rawAccumulateAllValuesOfn(new Object[]{pC, null});
- }
-
- @Override
- protected EClassNamesKeywordMatch tupleToMatch(final Tuple t) {
- try {
- return new EClassNamesKeywordMatch.Immutable((org.eclipse.emf.ecore.EClass) t.get(POSITION_C), (java.lang.String) t.get(POSITION_N));
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in tuple not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected EClassNamesKeywordMatch arrayToMatch(final Object[] match) {
- try {
- return new EClassNamesKeywordMatch.Immutable((org.eclipse.emf.ecore.EClass) match[POSITION_C], (java.lang.String) match[POSITION_N]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected EClassNamesKeywordMatch arrayToMatchMutable(final Object[] match) {
- try {
- return new EClassNamesKeywordMatch.Mutable((org.eclipse.emf.ecore.EClass) match[POSITION_C], (java.lang.String) match[POSITION_N]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesMatch.java b/examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesMatch.java
deleted file mode 100644
index 53e6f28d0..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesMatch.java
+++ /dev/null
@@ -1,180 +0,0 @@
-package headless;
-
-import headless.util.EClassNamesQuerySpecification;
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.incquery.runtime.api.IPatternMatch;
-import org.eclipse.incquery.runtime.api.impl.BasePatternMatch;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-
-/**
- * Pattern-specific match representation of the headless.eClassNames pattern,
- * to be used in conjunction with {@link EClassNamesMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see EClassNamesMatcher
- * @see EClassNamesProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class EClassNamesMatch extends BasePatternMatch {
- private EClass fC;
-
- private String fN;
-
- private static List<String> parameterNames = makeImmutableList("c", "n");
-
- private EClassNamesMatch(final EClass pC, final String pN) {
- this.fC = pC;
- this.fN = pN;
-
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("c".equals(parameterName)) return this.fC;
- if ("n".equals(parameterName)) return this.fN;
- return null;
-
- }
-
- public EClass getC() {
- return this.fC;
-
- }
-
- public String getN() {
- return this.fN;
-
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("c".equals(parameterName) ) {
- this.fC = (org.eclipse.emf.ecore.EClass) newValue;
- return true;
- }
- if ("n".equals(parameterName) ) {
- this.fN = (java.lang.String) newValue;
- return true;
- }
- return false;
-
- }
-
- public void setC(final EClass pC) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fC = pC;
-
- }
-
- public void setN(final String pN) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fN = pN;
-
- }
-
- @Override
- public String patternName() {
- return "headless.eClassNames";
-
- }
-
- @Override
- public List<String> parameterNames() {
- return EClassNamesMatch.parameterNames;
-
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fC, fN};
-
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"c\"=" + prettyPrintValue(fC) + ", ");
- result.append("\"n\"=" + prettyPrintValue(fN));
- return result.toString();
-
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fC == null) ? 0 : fC.hashCode());
- result = prime * result + ((fN == null) ? 0 : fN.hashCode());
- return result;
-
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof EClassNamesMatch)) { // this should be infrequent
- if (obj == null)
- return false;
- if (!(obj instanceof IPatternMatch))
- return false;
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- EClassNamesMatch other = (EClassNamesMatch) obj;
- if (fC == null) {if (other.fC != null) return false;}
- else if (!fC.equals(other.fC)) return false;
- if (fN == null) {if (other.fN != null) return false;}
- else if (!fN.equals(other.fN)) return false;
- return true;
- }
-
- @Override
- public EClassNamesQuerySpecification specification() {
- try {
- return EClassNamesQuerySpecification.instance();
- } catch (IncQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
-
- }
-
- @SuppressWarnings("all")
- static final class Mutable extends EClassNamesMatch {
- Mutable(final EClass pC, final String pN) {
- super(pC, pN);
-
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
-
- @SuppressWarnings("all")
- static final class Immutable extends EClassNamesMatch {
- Immutable(final EClass pC, final String pN) {
- super(pC, pN);
-
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesMatcher.java b/examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesMatcher.java
deleted file mode 100644
index 8680eae48..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/EClassNamesMatcher.java
+++ /dev/null
@@ -1,310 +0,0 @@
-package headless;
-
-import headless.EClassNamesMatch;
-import headless.util.EClassNamesQuerySpecification;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-import org.eclipse.incquery.runtime.api.IQuerySpecification;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseMatcher;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.matchers.tuple.Tuple;
-import org.eclipse.incquery.runtime.rete.misc.DeltaMonitor;
-
-/**
- * Generated pattern matcher API of the headless.eClassNames pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(IncQueryEngine)},
- * e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link EClassNamesMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * pattern eClassNames(c: EClass, n : EString)= {
- * EClass.name(c,n);
- * }
- * </pre></code>
- *
- * @see EClassNamesMatch
- * @see EClassNamesProcessor
- * @see EClassNamesQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class EClassNamesMatcher extends BaseMatcher<EClassNamesMatch> {
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<EClassNamesMatcher> querySpecification() throws IncQueryException {
- return EClassNamesQuerySpecification.instance();
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- *
- */
- public static EClassNamesMatcher on(final IncQueryEngine engine) throws IncQueryException {
- // check if matcher already exists
- EClassNamesMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new EClassNamesMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_C = 0;
-
- private final static int POSITION_N = 1;
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link IncQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead, e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public EClassNamesMatcher(final Notifier emfRoot) throws IncQueryException {
- this(IncQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead
- *
- */
- @Deprecated
- public EClassNamesMatcher(final IncQueryEngine engine) throws IncQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return matches represented as a EClassNamesMatch object.
- *
- */
- public Collection<EClassNamesMatch> getAllMatches(final EClass pC, final String pN) {
- return rawGetAllMatches(new Object[]{pC, pN});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return a match represented as a EClassNamesMatch object, or null if no match is found.
- *
- */
- public EClassNamesMatch getOneArbitraryMatch(final EClass pC, final String pN) {
- return rawGetOneArbitraryMatch(new Object[]{pC, pN});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EClass pC, final String pN) {
- return rawHasMatch(new Object[]{pC, pN});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EClass pC, final String pN) {
- return rawCountMatches(new Object[]{pC, pN});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EClass pC, final String pN, final IMatchProcessor<? super EClassNamesMatch> processor) {
- rawForEachMatch(new Object[]{pC, pN}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EClass pC, final String pN, final IMatchProcessor<? super EClassNamesMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pC, pN}, processor);
- }
-
- /**
- * Registers a new filtered delta monitor on this pattern matcher.
- * The DeltaMonitor can be used to track changes (delta) in the set of filtered pattern matches from now on, considering those matches only that conform to the given fixed values of some parameters.
- * It can also be reset to track changes from a later point in time,
- * and changes can even be acknowledged on an individual basis.
- * See {@link DeltaMonitor} for details.
- * @param fillAtStart if true, all current matches are reported as new match events; if false, the delta monitor starts empty.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the delta monitor.
- * @deprecated use the IncQuery Databinding API (IncQueryObservables) instead.
- *
- */
- @Deprecated
- public DeltaMonitor<EClassNamesMatch> newFilteredDeltaMonitor(final boolean fillAtStart, final EClass pC, final String pN) {
- return rawNewFilteredDeltaMonitor(fillAtStart, new Object[]{pC, pN});
- }
-
- /**
- * Returns a new (partial) Match object for the matcher.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public EClassNamesMatch newMatch(final EClass pC, final String pN) {
- return new EClassNamesMatch.Immutable(pC, pN);
-
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EClass> rawAccumulateAllValuesOfc(final Object[] parameters) {
- Set<EClass> results = new HashSet<EClass>();
- rawAccumulateAllValues(POSITION_C, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfc() {
- return rawAccumulateAllValuesOfc(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfc(final EClassNamesMatch partialMatch) {
- return rawAccumulateAllValuesOfc(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfc(final String pN) {
- return rawAccumulateAllValuesOfc(new Object[]{null, pN});
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<String> rawAccumulateAllValuesOfn(final Object[] parameters) {
- Set<String> results = new HashSet<String>();
- rawAccumulateAllValues(POSITION_N, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<String> getAllValuesOfn() {
- return rawAccumulateAllValuesOfn(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<String> getAllValuesOfn(final EClassNamesMatch partialMatch) {
- return rawAccumulateAllValuesOfn(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<String> getAllValuesOfn(final EClass pC) {
- return rawAccumulateAllValuesOfn(new Object[]{pC, null});
- }
-
- @Override
- protected EClassNamesMatch tupleToMatch(final Tuple t) {
- try {
- return new EClassNamesMatch.Immutable((org.eclipse.emf.ecore.EClass) t.get(POSITION_C), (java.lang.String) t.get(POSITION_N));
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in tuple not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected EClassNamesMatch arrayToMatch(final Object[] match) {
- try {
- return new EClassNamesMatch.Immutable((org.eclipse.emf.ecore.EClass) match[POSITION_C], (java.lang.String) match[POSITION_N]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected EClassNamesMatch arrayToMatchMutable(final Object[] match) {
- try {
- return new EClassNamesMatch.Mutable((org.eclipse.emf.ecore.EClass) match[POSITION_C], (java.lang.String) match[POSITION_N]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/EObjectMatch.java b/examples/headless-maven/incquery-demo/src/main/java/headless/EObjectMatch.java
deleted file mode 100644
index bfbe23637..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/EObjectMatch.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package headless;
-
-import headless.util.EObjectQuerySpecification;
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.incquery.runtime.api.IPatternMatch;
-import org.eclipse.incquery.runtime.api.impl.BasePatternMatch;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-
-/**
- * Pattern-specific match representation of the headless.eObject pattern,
- * to be used in conjunction with {@link EObjectMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see EObjectMatcher
- * @see EObjectProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class EObjectMatch extends BasePatternMatch {
- private EObject fO;
-
- private static List<String> parameterNames = makeImmutableList("o");
-
- private EObjectMatch(final EObject pO) {
- this.fO = pO;
-
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("o".equals(parameterName)) return this.fO;
- return null;
-
- }
-
- public EObject getO() {
- return this.fO;
-
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("o".equals(parameterName) ) {
- this.fO = (org.eclipse.emf.ecore.EObject) newValue;
- return true;
- }
- return false;
-
- }
-
- public void setO(final EObject pO) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fO = pO;
-
- }
-
- @Override
- public String patternName() {
- return "headless.eObject";
-
- }
-
- @Override
- public List<String> parameterNames() {
- return EObjectMatch.parameterNames;
-
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fO};
-
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"o\"=" + prettyPrintValue(fO));
- return result.toString();
-
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fO == null) ? 0 : fO.hashCode());
- return result;
-
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof EObjectMatch)) { // this should be infrequent
- if (obj == null)
- return false;
- if (!(obj instanceof IPatternMatch))
- return false;
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- EObjectMatch other = (EObjectMatch) obj;
- if (fO == null) {if (other.fO != null) return false;}
- else if (!fO.equals(other.fO)) return false;
- return true;
- }
-
- @Override
- public EObjectQuerySpecification specification() {
- try {
- return EObjectQuerySpecification.instance();
- } catch (IncQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
-
- }
-
- @SuppressWarnings("all")
- static final class Mutable extends EObjectMatch {
- Mutable(final EObject pO) {
- super(pO);
-
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
-
- @SuppressWarnings("all")
- static final class Immutable extends EObjectMatch {
- Immutable(final EObject pO) {
- super(pO);
-
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/EObjectMatcher.java b/examples/headless-maven/incquery-demo/src/main/java/headless/EObjectMatcher.java
deleted file mode 100644
index 85281778f..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/EObjectMatcher.java
+++ /dev/null
@@ -1,244 +0,0 @@
-package headless;
-
-import headless.EObjectMatch;
-import headless.util.EObjectQuerySpecification;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-import org.eclipse.incquery.runtime.api.IQuerySpecification;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseMatcher;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.matchers.tuple.Tuple;
-import org.eclipse.incquery.runtime.rete.misc.DeltaMonitor;
-
-/**
- * Generated pattern matcher API of the headless.eObject pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(IncQueryEngine)},
- * e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link EObjectMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * pattern eObject(o) {
- * EObject(o);
- * }
- * </pre></code>
- *
- * @see EObjectMatch
- * @see EObjectProcessor
- * @see EObjectQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class EObjectMatcher extends BaseMatcher<EObjectMatch> {
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<EObjectMatcher> querySpecification() throws IncQueryException {
- return EObjectQuerySpecification.instance();
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- *
- */
- public static EObjectMatcher on(final IncQueryEngine engine) throws IncQueryException {
- // check if matcher already exists
- EObjectMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new EObjectMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_O = 0;
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link IncQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead, e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public EObjectMatcher(final Notifier emfRoot) throws IncQueryException {
- this(IncQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead
- *
- */
- @Deprecated
- public EObjectMatcher(final IncQueryEngine engine) throws IncQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @return matches represented as a EObjectMatch object.
- *
- */
- public Collection<EObjectMatch> getAllMatches(final EObject pO) {
- return rawGetAllMatches(new Object[]{pO});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @return a match represented as a EObjectMatch object, or null if no match is found.
- *
- */
- public EObjectMatch getOneArbitraryMatch(final EObject pO) {
- return rawGetOneArbitraryMatch(new Object[]{pO});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EObject pO) {
- return rawHasMatch(new Object[]{pO});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EObject pO) {
- return rawCountMatches(new Object[]{pO});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EObject pO, final IMatchProcessor<? super EObjectMatch> processor) {
- rawForEachMatch(new Object[]{pO}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EObject pO, final IMatchProcessor<? super EObjectMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pO}, processor);
- }
-
- /**
- * Registers a new filtered delta monitor on this pattern matcher.
- * The DeltaMonitor can be used to track changes (delta) in the set of filtered pattern matches from now on, considering those matches only that conform to the given fixed values of some parameters.
- * It can also be reset to track changes from a later point in time,
- * and changes can even be acknowledged on an individual basis.
- * See {@link DeltaMonitor} for details.
- * @param fillAtStart if true, all current matches are reported as new match events; if false, the delta monitor starts empty.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @return the delta monitor.
- * @deprecated use the IncQuery Databinding API (IncQueryObservables) instead.
- *
- */
- @Deprecated
- public DeltaMonitor<EObjectMatch> newFilteredDeltaMonitor(final boolean fillAtStart, final EObject pO) {
- return rawNewFilteredDeltaMonitor(fillAtStart, new Object[]{pO});
- }
-
- /**
- * Returns a new (partial) Match object for the matcher.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public EObjectMatch newMatch(final EObject pO) {
- return new EObjectMatch.Immutable(pO);
-
- }
-
- /**
- * Retrieve the set of values that occur in matches for o.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EObject> rawAccumulateAllValuesOfo(final Object[] parameters) {
- Set<EObject> results = new HashSet<EObject>();
- rawAccumulateAllValues(POSITION_O, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for o.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EObject> getAllValuesOfo() {
- return rawAccumulateAllValuesOfo(emptyArray());
- }
-
- @Override
- protected EObjectMatch tupleToMatch(final Tuple t) {
- try {
- return new EObjectMatch.Immutable((org.eclipse.emf.ecore.EObject) t.get(POSITION_O));
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in tuple not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected EObjectMatch arrayToMatch(final Object[] match) {
- try {
- return new EObjectMatch.Immutable((org.eclipse.emf.ecore.EObject) match[POSITION_O]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected EObjectMatch arrayToMatchMutable(final Object[] match) {
- try {
- return new EObjectMatch.Mutable((org.eclipse.emf.ecore.EObject) match[POSITION_O]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/EPackageMatch.java b/examples/headless-maven/incquery-demo/src/main/java/headless/EPackageMatch.java
deleted file mode 100644
index dbea20e28..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/EPackageMatch.java
+++ /dev/null
@@ -1,157 +0,0 @@
-package headless;
-
-import headless.util.EPackageQuerySpecification;
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.incquery.runtime.api.IPatternMatch;
-import org.eclipse.incquery.runtime.api.impl.BasePatternMatch;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-
-/**
- * Pattern-specific match representation of the headless.ePackage pattern,
- * to be used in conjunction with {@link EPackageMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see EPackageMatcher
- * @see EPackageProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class EPackageMatch extends BasePatternMatch {
- private EPackage fP;
-
- private static List<String> parameterNames = makeImmutableList("p");
-
- private EPackageMatch(final EPackage pP) {
- this.fP = pP;
-
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("p".equals(parameterName)) return this.fP;
- return null;
-
- }
-
- public EPackage getP() {
- return this.fP;
-
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("p".equals(parameterName) ) {
- this.fP = (org.eclipse.emf.ecore.EPackage) newValue;
- return true;
- }
- return false;
-
- }
-
- public void setP(final EPackage pP) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fP = pP;
-
- }
-
- @Override
- public String patternName() {
- return "headless.ePackage";
-
- }
-
- @Override
- public List<String> parameterNames() {
- return EPackageMatch.parameterNames;
-
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fP};
-
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"p\"=" + prettyPrintValue(fP));
- return result.toString();
-
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fP == null) ? 0 : fP.hashCode());
- return result;
-
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof EPackageMatch)) { // this should be infrequent
- if (obj == null)
- return false;
- if (!(obj instanceof IPatternMatch))
- return false;
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- EPackageMatch other = (EPackageMatch) obj;
- if (fP == null) {if (other.fP != null) return false;}
- else if (!fP.equals(other.fP)) return false;
- return true;
- }
-
- @Override
- public EPackageQuerySpecification specification() {
- try {
- return EPackageQuerySpecification.instance();
- } catch (IncQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
-
- }
-
- @SuppressWarnings("all")
- static final class Mutable extends EPackageMatch {
- Mutable(final EPackage pP) {
- super(pP);
-
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
-
- @SuppressWarnings("all")
- static final class Immutable extends EPackageMatch {
- Immutable(final EPackage pP) {
- super(pP);
-
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/EPackageMatcher.java b/examples/headless-maven/incquery-demo/src/main/java/headless/EPackageMatcher.java
deleted file mode 100644
index 984dcf3a2..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/EPackageMatcher.java
+++ /dev/null
@@ -1,244 +0,0 @@
-package headless;
-
-import headless.EPackageMatch;
-import headless.util.EPackageQuerySpecification;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-import org.eclipse.incquery.runtime.api.IQuerySpecification;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseMatcher;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.matchers.tuple.Tuple;
-import org.eclipse.incquery.runtime.rete.misc.DeltaMonitor;
-
-/**
- * Generated pattern matcher API of the headless.ePackage pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(IncQueryEngine)},
- * e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link EPackageMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * {@literal @}Item(item = p, label = "P: $p.name$")
- * {@literal @}Format(color = "#791662", textColor = "#ffffff")
- * pattern ePackage(p : EPackage) { EPackage(p); }
- * </pre></code>
- *
- * @see EPackageMatch
- * @see EPackageProcessor
- * @see EPackageQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class EPackageMatcher extends BaseMatcher<EPackageMatch> {
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<EPackageMatcher> querySpecification() throws IncQueryException {
- return EPackageQuerySpecification.instance();
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- *
- */
- public static EPackageMatcher on(final IncQueryEngine engine) throws IncQueryException {
- // check if matcher already exists
- EPackageMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new EPackageMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_P = 0;
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link IncQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead, e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public EPackageMatcher(final Notifier emfRoot) throws IncQueryException {
- this(IncQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead
- *
- */
- @Deprecated
- public EPackageMatcher(final IncQueryEngine engine) throws IncQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @return matches represented as a EPackageMatch object.
- *
- */
- public Collection<EPackageMatch> getAllMatches(final EPackage pP) {
- return rawGetAllMatches(new Object[]{pP});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @return a match represented as a EPackageMatch object, or null if no match is found.
- *
- */
- public EPackageMatch getOneArbitraryMatch(final EPackage pP) {
- return rawGetOneArbitraryMatch(new Object[]{pP});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EPackage pP) {
- return rawHasMatch(new Object[]{pP});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EPackage pP) {
- return rawCountMatches(new Object[]{pP});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EPackage pP, final IMatchProcessor<? super EPackageMatch> processor) {
- rawForEachMatch(new Object[]{pP}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EPackage pP, final IMatchProcessor<? super EPackageMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pP}, processor);
- }
-
- /**
- * Registers a new filtered delta monitor on this pattern matcher.
- * The DeltaMonitor can be used to track changes (delta) in the set of filtered pattern matches from now on, considering those matches only that conform to the given fixed values of some parameters.
- * It can also be reset to track changes from a later point in time,
- * and changes can even be acknowledged on an individual basis.
- * See {@link DeltaMonitor} for details.
- * @param fillAtStart if true, all current matches are reported as new match events; if false, the delta monitor starts empty.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @return the delta monitor.
- * @deprecated use the IncQuery Databinding API (IncQueryObservables) instead.
- *
- */
- @Deprecated
- public DeltaMonitor<EPackageMatch> newFilteredDeltaMonitor(final boolean fillAtStart, final EPackage pP) {
- return rawNewFilteredDeltaMonitor(fillAtStart, new Object[]{pP});
- }
-
- /**
- * Returns a new (partial) Match object for the matcher.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public EPackageMatch newMatch(final EPackage pP) {
- return new EPackageMatch.Immutable(pP);
-
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EPackage> rawAccumulateAllValuesOfp(final Object[] parameters) {
- Set<EPackage> results = new HashSet<EPackage>();
- rawAccumulateAllValues(POSITION_P, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp() {
- return rawAccumulateAllValuesOfp(emptyArray());
- }
-
- @Override
- protected EPackageMatch tupleToMatch(final Tuple t) {
- try {
- return new EPackageMatch.Immutable((org.eclipse.emf.ecore.EPackage) t.get(POSITION_P));
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in tuple not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected EPackageMatch arrayToMatch(final Object[] match) {
- try {
- return new EPackageMatch.Immutable((org.eclipse.emf.ecore.EPackage) match[POSITION_P]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected EPackageMatch arrayToMatchMutable(final Object[] match) {
- try {
- return new EPackageMatch.Mutable((org.eclipse.emf.ecore.EPackage) match[POSITION_P]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/HeadlessQueries.java b/examples/headless-maven/incquery-demo/src/main/java/headless/HeadlessQueries.java
deleted file mode 100644
index 1422e5b4e..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/HeadlessQueries.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package headless;
-
-import headless.ClassesInPackageHierarchyMatcher;
-import headless.ClassesInPackageMatcher;
-import headless.EClassMatcher;
-import headless.EClassNamesKeywordMatcher;
-import headless.EClassNamesMatcher;
-import headless.EObjectMatcher;
-import headless.EPackageMatcher;
-import headless.SubPackageMatcher;
-import org.eclipse.incquery.runtime.api.impl.BaseGeneratedPatternGroup;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-
-/**
- * A pattern group formed of all patterns defined in headlessQueries.eiq.
- *
- * <p>Use the static instance as any {@link org.eclipse.incquery.runtime.api.IPatternGroup}, to conveniently prepare
- * an EMF-IncQuery engine for matching all patterns originally defined in file headlessQueries.eiq,
- * in order to achieve better performance than one-by-one on-demand matcher initialization.
- *
- * <p> From package headless, the group contains the definition of the following patterns: <ul>
- * <li>eClassNames</li>
- * <li>eClassNamesKeyword</li>
- * <li>eObject</li>
- * <li>classesInPackage</li>
- * <li>subPackage</li>
- * <li>classesInPackageHierarchy</li>
- * <li>ePackage</li>
- * <li>eClass</li>
- * </ul>
- *
- * @see IPatternGroup
- *
- */
-@SuppressWarnings("all")
-public final class HeadlessQueries extends BaseGeneratedPatternGroup {
- /**
- * Access the pattern group.
- *
- * @return the singleton instance of the group
- * @throws IncQueryException if there was an error loading the generated code of pattern specifications
- *
- */
- public static HeadlessQueries instance() throws IncQueryException {
- if (INSTANCE == null) {
- INSTANCE = new HeadlessQueries();
- }
- return INSTANCE;
-
- }
-
- private static HeadlessQueries INSTANCE;
-
- private HeadlessQueries() throws IncQueryException {
- querySpecifications.add(EClassNamesKeywordMatcher.querySpecification());
- querySpecifications.add(EObjectMatcher.querySpecification());
- querySpecifications.add(SubPackageMatcher.querySpecification());
- querySpecifications.add(ClassesInPackageMatcher.querySpecification());
- querySpecifications.add(EClassNamesMatcher.querySpecification());
- querySpecifications.add(ClassesInPackageHierarchyMatcher.querySpecification());
- querySpecifications.add(EPackageMatcher.querySpecification());
- querySpecifications.add(EClassMatcher.querySpecification());
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/HeadlessQueriesMatchers.java b/examples/headless-maven/incquery-demo/src/main/java/headless/HeadlessQueriesMatchers.java
deleted file mode 100644
index f621bc06b..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/HeadlessQueriesMatchers.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package headless;
-
-import headless.ClassesInPackageHierarchyMatcher;
-import headless.ClassesInPackageMatcher;
-import headless.EClassMatcher;
-import headless.EClassNamesKeywordMatcher;
-import headless.EClassNamesMatcher;
-import headless.EObjectMatcher;
-import headless.EPackageMatcher;
-import headless.SubPackageMatcher;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-
-@SuppressWarnings("all")
-public final class HeadlessQueriesMatchers {
- private IncQueryEngine engine;
-
- public HeadlessQueriesMatchers(final IncQueryEngine engine) {
- this.engine = engine;
-
- }
-
- public ClassesInPackageMatcher getClassesInPackageMatcher() throws IncQueryException {
- return ClassesInPackageMatcher.on(engine);
- }
-
- public EClassNamesKeywordMatcher getEClassNamesKeywordMatcher() throws IncQueryException {
- return EClassNamesKeywordMatcher.on(engine);
- }
-
- public EPackageMatcher getEPackageMatcher() throws IncQueryException {
- return EPackageMatcher.on(engine);
- }
-
- public SubPackageMatcher getSubPackageMatcher() throws IncQueryException {
- return SubPackageMatcher.on(engine);
- }
-
- public EClassMatcher getEClassMatcher() throws IncQueryException {
- return EClassMatcher.on(engine);
- }
-
- public EObjectMatcher getEObjectMatcher() throws IncQueryException {
- return EObjectMatcher.on(engine);
- }
-
- public EClassNamesMatcher getEClassNamesMatcher() throws IncQueryException {
- return EClassNamesMatcher.on(engine);
- }
-
- public ClassesInPackageHierarchyMatcher getClassesInPackageHierarchyMatcher() throws IncQueryException {
- return ClassesInPackageHierarchyMatcher.on(engine);
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/SubPackageMatch.java b/examples/headless-maven/incquery-demo/src/main/java/headless/SubPackageMatch.java
deleted file mode 100644
index ef025c83e..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/SubPackageMatch.java
+++ /dev/null
@@ -1,180 +0,0 @@
-package headless;
-
-import headless.util.SubPackageQuerySpecification;
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.incquery.runtime.api.IPatternMatch;
-import org.eclipse.incquery.runtime.api.impl.BasePatternMatch;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-
-/**
- * Pattern-specific match representation of the headless.subPackage pattern,
- * to be used in conjunction with {@link SubPackageMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see SubPackageMatcher
- * @see SubPackageProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class SubPackageMatch extends BasePatternMatch {
- private EPackage fP;
-
- private EPackage fSp;
-
- private static List<String> parameterNames = makeImmutableList("p", "sp");
-
- private SubPackageMatch(final EPackage pP, final EPackage pSp) {
- this.fP = pP;
- this.fSp = pSp;
-
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("p".equals(parameterName)) return this.fP;
- if ("sp".equals(parameterName)) return this.fSp;
- return null;
-
- }
-
- public EPackage getP() {
- return this.fP;
-
- }
-
- public EPackage getSp() {
- return this.fSp;
-
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("p".equals(parameterName) ) {
- this.fP = (org.eclipse.emf.ecore.EPackage) newValue;
- return true;
- }
- if ("sp".equals(parameterName) ) {
- this.fSp = (org.eclipse.emf.ecore.EPackage) newValue;
- return true;
- }
- return false;
-
- }
-
- public void setP(final EPackage pP) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fP = pP;
-
- }
-
- public void setSp(final EPackage pSp) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fSp = pSp;
-
- }
-
- @Override
- public String patternName() {
- return "headless.subPackage";
-
- }
-
- @Override
- public List<String> parameterNames() {
- return SubPackageMatch.parameterNames;
-
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fP, fSp};
-
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"p\"=" + prettyPrintValue(fP) + ", ");
- result.append("\"sp\"=" + prettyPrintValue(fSp));
- return result.toString();
-
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fP == null) ? 0 : fP.hashCode());
- result = prime * result + ((fSp == null) ? 0 : fSp.hashCode());
- return result;
-
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof SubPackageMatch)) { // this should be infrequent
- if (obj == null)
- return false;
- if (!(obj instanceof IPatternMatch))
- return false;
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- SubPackageMatch other = (SubPackageMatch) obj;
- if (fP == null) {if (other.fP != null) return false;}
- else if (!fP.equals(other.fP)) return false;
- if (fSp == null) {if (other.fSp != null) return false;}
- else if (!fSp.equals(other.fSp)) return false;
- return true;
- }
-
- @Override
- public SubPackageQuerySpecification specification() {
- try {
- return SubPackageQuerySpecification.instance();
- } catch (IncQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
-
- }
-
- @SuppressWarnings("all")
- static final class Mutable extends SubPackageMatch {
- Mutable(final EPackage pP, final EPackage pSp) {
- super(pP, pSp);
-
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
-
- @SuppressWarnings("all")
- static final class Immutable extends SubPackageMatch {
- Immutable(final EPackage pP, final EPackage pSp) {
- super(pP, pSp);
-
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/SubPackageMatcher.java b/examples/headless-maven/incquery-demo/src/main/java/headless/SubPackageMatcher.java
deleted file mode 100644
index f6efd184e..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/SubPackageMatcher.java
+++ /dev/null
@@ -1,309 +0,0 @@
-package headless;
-
-import headless.SubPackageMatch;
-import headless.util.SubPackageQuerySpecification;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-import org.eclipse.incquery.runtime.api.IQuerySpecification;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseMatcher;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.matchers.tuple.Tuple;
-import org.eclipse.incquery.runtime.rete.misc.DeltaMonitor;
-
-/**
- * Generated pattern matcher API of the headless.subPackage pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(IncQueryEngine)},
- * e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link SubPackageMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * {@literal @}Edge(source = p, target = sp, label = "sub")
- * pattern subPackage(p: EPackage, sp: EPackage){ EPackage.eSubpackages(p,sp); }
- * </pre></code>
- *
- * @see SubPackageMatch
- * @see SubPackageProcessor
- * @see SubPackageQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class SubPackageMatcher extends BaseMatcher<SubPackageMatch> {
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<SubPackageMatcher> querySpecification() throws IncQueryException {
- return SubPackageQuerySpecification.instance();
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- *
- */
- public static SubPackageMatcher on(final IncQueryEngine engine) throws IncQueryException {
- // check if matcher already exists
- SubPackageMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new SubPackageMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_P = 0;
-
- private final static int POSITION_SP = 1;
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link IncQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead, e.g. in conjunction with {@link IncQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public SubPackageMatcher(final Notifier emfRoot) throws IncQueryException {
- this(IncQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing EMF-IncQuery engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing EMF-IncQuery engine in which this matcher will be created.
- * @throws IncQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(IncQueryEngine)} instead
- *
- */
- @Deprecated
- public SubPackageMatcher(final IncQueryEngine engine) throws IncQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @return matches represented as a SubPackageMatch object.
- *
- */
- public Collection<SubPackageMatch> getAllMatches(final EPackage pP, final EPackage pSp) {
- return rawGetAllMatches(new Object[]{pP, pSp});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @return a match represented as a SubPackageMatch object, or null if no match is found.
- *
- */
- public SubPackageMatch getOneArbitraryMatch(final EPackage pP, final EPackage pSp) {
- return rawGetOneArbitraryMatch(new Object[]{pP, pSp});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EPackage pP, final EPackage pSp) {
- return rawHasMatch(new Object[]{pP, pSp});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EPackage pP, final EPackage pSp) {
- return rawCountMatches(new Object[]{pP, pSp});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EPackage pP, final EPackage pSp, final IMatchProcessor<? super SubPackageMatch> processor) {
- rawForEachMatch(new Object[]{pP, pSp}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EPackage pP, final EPackage pSp, final IMatchProcessor<? super SubPackageMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pP, pSp}, processor);
- }
-
- /**
- * Registers a new filtered delta monitor on this pattern matcher.
- * The DeltaMonitor can be used to track changes (delta) in the set of filtered pattern matches from now on, considering those matches only that conform to the given fixed values of some parameters.
- * It can also be reset to track changes from a later point in time,
- * and changes can even be acknowledged on an individual basis.
- * See {@link DeltaMonitor} for details.
- * @param fillAtStart if true, all current matches are reported as new match events; if false, the delta monitor starts empty.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @return the delta monitor.
- * @deprecated use the IncQuery Databinding API (IncQueryObservables) instead.
- *
- */
- @Deprecated
- public DeltaMonitor<SubPackageMatch> newFilteredDeltaMonitor(final boolean fillAtStart, final EPackage pP, final EPackage pSp) {
- return rawNewFilteredDeltaMonitor(fillAtStart, new Object[]{pP, pSp});
- }
-
- /**
- * Returns a new (partial) Match object for the matcher.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public SubPackageMatch newMatch(final EPackage pP, final EPackage pSp) {
- return new SubPackageMatch.Immutable(pP, pSp);
-
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EPackage> rawAccumulateAllValuesOfp(final Object[] parameters) {
- Set<EPackage> results = new HashSet<EPackage>();
- rawAccumulateAllValues(POSITION_P, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp() {
- return rawAccumulateAllValuesOfp(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp(final SubPackageMatch partialMatch) {
- return rawAccumulateAllValuesOfp(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp(final EPackage pSp) {
- return rawAccumulateAllValuesOfp(new Object[]{null, pSp});
- }
-
- /**
- * Retrieve the set of values that occur in matches for sp.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EPackage> rawAccumulateAllValuesOfsp(final Object[] parameters) {
- Set<EPackage> results = new HashSet<EPackage>();
- rawAccumulateAllValues(POSITION_SP, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for sp.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfsp() {
- return rawAccumulateAllValuesOfsp(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for sp.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfsp(final SubPackageMatch partialMatch) {
- return rawAccumulateAllValuesOfsp(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for sp.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfsp(final EPackage pP) {
- return rawAccumulateAllValuesOfsp(new Object[]{pP, null});
- }
-
- @Override
- protected SubPackageMatch tupleToMatch(final Tuple t) {
- try {
- return new SubPackageMatch.Immutable((org.eclipse.emf.ecore.EPackage) t.get(POSITION_P), (org.eclipse.emf.ecore.EPackage) t.get(POSITION_SP));
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in tuple not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected SubPackageMatch arrayToMatch(final Object[] match) {
- try {
- return new SubPackageMatch.Immutable((org.eclipse.emf.ecore.EPackage) match[POSITION_P], (org.eclipse.emf.ecore.EPackage) match[POSITION_SP]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-
- @Override
- protected SubPackageMatch arrayToMatchMutable(final Object[] match) {
- try {
- return new SubPackageMatch.Mutable((org.eclipse.emf.ecore.EPackage) match[POSITION_P], (org.eclipse.emf.ecore.EPackage) match[POSITION_SP]);
- } catch(ClassCastException e) {engine.getLogger().error("Element(s) in array not properly typed!",e); //throw new IncQueryRuntimeException(e.getMessage());
- return null;
- }
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageHierarchyProcessor.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageHierarchyProcessor.java._trace
deleted file mode 100644
index a62fc233b..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageHierarchyProcessor.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageHierarchyQuerySpecification.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageHierarchyQuerySpecification.java._trace
deleted file mode 100644
index 720d37133..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageHierarchyQuerySpecification.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageProcessor.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageProcessor.java._trace
deleted file mode 100644
index 8d4eca078..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageProcessor.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageQuerySpecification.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageQuerySpecification.java._trace
deleted file mode 100644
index ade6f3f53..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.ClassesInPackageQuerySpecification.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesKeywordProcessor.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesKeywordProcessor.java._trace
deleted file mode 100644
index 6c1ede283..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesKeywordProcessor.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesKeywordQuerySpecification.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesKeywordQuerySpecification.java._trace
deleted file mode 100644
index fe755febf..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesKeywordQuerySpecification.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesProcessor.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesProcessor.java._trace
deleted file mode 100644
index ec767c05f..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesProcessor.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesQuerySpecification.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesQuerySpecification.java._trace
deleted file mode 100644
index e1bdf7342..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassNamesQuerySpecification.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassProcessor.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassProcessor.java._trace
deleted file mode 100644
index c240f9837..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassProcessor.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassQuerySpecification.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassQuerySpecification.java._trace
deleted file mode 100644
index dad8fb125..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EClassQuerySpecification.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EObjectProcessor.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EObjectProcessor.java._trace
deleted file mode 100644
index 652509383..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EObjectProcessor.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EObjectQuerySpecification.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EObjectQuerySpecification.java._trace
deleted file mode 100644
index 29577970d..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EObjectQuerySpecification.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EPackageProcessor.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EPackageProcessor.java._trace
deleted file mode 100644
index 018e3717b..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EPackageProcessor.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EPackageQuerySpecification.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EPackageQuerySpecification.java._trace
deleted file mode 100644
index 0b789a50d..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.EPackageQuerySpecification.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.SubPackageProcessor.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.SubPackageProcessor.java._trace
deleted file mode 100644
index 2514a9349..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.SubPackageProcessor.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.SubPackageQuerySpecification.java._trace b/examples/headless-maven/incquery-demo/src/main/java/headless/util/.SubPackageQuerySpecification.java._trace
deleted file mode 100644
index b8e00ac71..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/.SubPackageQuerySpecification.java._trace
+++ /dev/null
Binary files differ
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageHierarchyProcessor.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageHierarchyProcessor.java
deleted file mode 100644
index 57aa6228e..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageHierarchyProcessor.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package headless.util;
-
-import headless.ClassesInPackageHierarchyMatch;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the headless.classesInPackageHierarchy pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class ClassesInPackageHierarchyProcessor implements IMatchProcessor<ClassesInPackageHierarchyMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pRootP the value of pattern parameter rootP in the currently processed match
- * @param pContainedClass the value of pattern parameter containedClass in the currently processed match
- *
- */
- public abstract void process(final EPackage pRootP, final EClass pContainedClass);
-
- @Override
- public void process(final ClassesInPackageHierarchyMatch match) {
- process(match.getRootP(), match.getContainedClass());
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageHierarchyQuerySpecification.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageHierarchyQuerySpecification.java
deleted file mode 100644
index a23bb91cf..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageHierarchyQuerySpecification.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package headless.util;
-
-import com.google.common.collect.Sets;
-import headless.ClassesInPackageHierarchyMatcher;
-import headless.util.ClassesInPackageQuerySpecification;
-import headless.util.SubPackageQuerySpecification;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseGeneratedQuerySpecification;
-import org.eclipse.incquery.runtime.context.EMFPatternMatcherContext;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.extensibility.IQuerySpecificationProvider;
-import org.eclipse.incquery.runtime.matchers.psystem.PBody;
-import org.eclipse.incquery.runtime.matchers.psystem.PParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.PQuery.PQueryStatus;
-import org.eclipse.incquery.runtime.matchers.psystem.PVariable;
-import org.eclipse.incquery.runtime.matchers.psystem.annotations.PAnnotation;
-import org.eclipse.incquery.runtime.matchers.psystem.annotations.ParameterReference;
-import org.eclipse.incquery.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.BinaryTransitiveClosure;
-import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
-import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.TypeUnary;
-import org.eclipse.incquery.runtime.matchers.tuple.FlatTuple;
-
-/**
- * A pattern-specific query specification that can instantiate ClassesInPackageHierarchyMatcher in a type-safe way.
- *
- * @see ClassesInPackageHierarchyMatcher
- * @see ClassesInPackageHierarchyMatch
- *
- */
-@SuppressWarnings("all")
-public final class ClassesInPackageHierarchyQuerySpecification extends BaseGeneratedQuerySpecification<ClassesInPackageHierarchyMatcher> {
- /**
- * @return the singleton instance of the query specification
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static ClassesInPackageHierarchyQuerySpecification instance() throws IncQueryException {
- try {
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- processInitializerError(err);
- throw err;
- }
-
- }
-
- @Override
- protected ClassesInPackageHierarchyMatcher instantiate(final IncQueryEngine engine) throws IncQueryException {
- return ClassesInPackageHierarchyMatcher.on(engine);
- }
-
- @Override
- public String getFullyQualifiedName() {
- return "headless.classesInPackageHierarchy";
-
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("rootP","containedClass");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("rootP", "org.eclipse.emf.ecore.EPackage"),new PParameter("containedClass", "org.eclipse.emf.ecore.EClass"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws IncQueryException {
- EMFPatternMatcherContext context = new EMFPatternMatcherContext();
- Set<PBody> bodies = Sets.newHashSet();
- {
- PBody body = new PBody(this);
- PVariable var_rootP = body.getOrCreateVariableByName("rootP");
- PVariable var_containedClass = body.getOrCreateVariableByName("containedClass");
- body.setExportedParameters(Arrays.asList(
- new ExportedParameter(body, var_rootP, "rootP"),
- new ExportedParameter(body, var_containedClass, "containedClass")
- ));
-
- new TypeUnary(body, var_rootP, getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage"), "http://www.eclipse.org/emf/2002/Ecore/EPackage");
-
- new TypeUnary(body, var_containedClass, getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass"), "http://www.eclipse.org/emf/2002/Ecore/EClass");
- new PositivePatternCall(body, new FlatTuple(var_rootP, var_containedClass), ClassesInPackageQuerySpecification.instance());
- bodies.add(body);
- }{
- PBody body = new PBody(this);
- PVariable var_rootP = body.getOrCreateVariableByName("rootP");
- PVariable var_containedClass = body.getOrCreateVariableByName("containedClass");
- PVariable var_somePackage = body.getOrCreateVariableByName("somePackage");
- body.setExportedParameters(Arrays.asList(
- new ExportedParameter(body, var_rootP, "rootP"),
- new ExportedParameter(body, var_containedClass, "containedClass")
- ));
-
- new TypeUnary(body, var_rootP, getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage"), "http://www.eclipse.org/emf/2002/Ecore/EPackage");
-
- new TypeUnary(body, var_containedClass, getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass"), "http://www.eclipse.org/emf/2002/Ecore/EClass");
- new BinaryTransitiveClosure(body, new FlatTuple(var_rootP, var_somePackage), SubPackageQuerySpecification.instance().instance());
- new PositivePatternCall(body, new FlatTuple(var_somePackage, var_containedClass), ClassesInPackageQuerySpecification.instance());
- bodies.add(body);
- }{
- PAnnotation annotation = new PAnnotation("Edge");
- annotation.addAttribute("source",new ParameterReference("rootP"));
- annotation.addAttribute("target",new ParameterReference("containedClass"));
- annotation.addAttribute("label","classIn+");
- addAnnotation(annotation);
- }
- {
- PAnnotation annotation = new PAnnotation("Format");
- annotation.addAttribute("color","#0033ff");
- addAnnotation(annotation);
- }
- setStatus(PQueryStatus.OK);
- return bodies;
- }
-
- private ClassesInPackageHierarchyQuerySpecification() throws IncQueryException {
- super();
- setStatus(PQueryStatus.UNINITIALIZED);
- }
-
- @SuppressWarnings("all")
- public static class Provider implements IQuerySpecificationProvider<ClassesInPackageHierarchyQuerySpecification> {
- @Override
- public ClassesInPackageHierarchyQuerySpecification get() throws IncQueryException {
- return instance();
- }
- }
-
-
- @SuppressWarnings("all")
- private static class LazyHolder {
- private final static ClassesInPackageHierarchyQuerySpecification INSTANCE = make();
-
- public static ClassesInPackageHierarchyQuerySpecification make() {
- try {
- return new ClassesInPackageHierarchyQuerySpecification();
- } catch (IncQueryException ex) {
- throw new RuntimeException (ex);
- }
-
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageProcessor.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageProcessor.java
deleted file mode 100644
index cc79754c6..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageProcessor.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package headless.util;
-
-import headless.ClassesInPackageMatch;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the headless.classesInPackage pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class ClassesInPackageProcessor implements IMatchProcessor<ClassesInPackageMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pP the value of pattern parameter p in the currently processed match
- * @param pEc the value of pattern parameter ec in the currently processed match
- *
- */
- public abstract void process(final EPackage pP, final EClass pEc);
-
- @Override
- public void process(final ClassesInPackageMatch match) {
- process(match.getP(), match.getEc());
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageQuerySpecification.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageQuerySpecification.java
deleted file mode 100644
index 3c99c1514..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/ClassesInPackageQuerySpecification.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package headless.util;
-
-import com.google.common.collect.Sets;
-import headless.ClassesInPackageMatcher;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseGeneratedQuerySpecification;
-import org.eclipse.incquery.runtime.context.EMFPatternMatcherContext;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.extensibility.IQuerySpecificationProvider;
-import org.eclipse.incquery.runtime.matchers.psystem.PBody;
-import org.eclipse.incquery.runtime.matchers.psystem.PParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.PQuery.PQueryStatus;
-import org.eclipse.incquery.runtime.matchers.psystem.PVariable;
-import org.eclipse.incquery.runtime.matchers.psystem.annotations.PAnnotation;
-import org.eclipse.incquery.runtime.matchers.psystem.annotations.ParameterReference;
-import org.eclipse.incquery.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.TypeBinary;
-import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.TypeUnary;
-
-/**
- * A pattern-specific query specification that can instantiate ClassesInPackageMatcher in a type-safe way.
- *
- * @see ClassesInPackageMatcher
- * @see ClassesInPackageMatch
- *
- */
-@SuppressWarnings("all")
-public final class ClassesInPackageQuerySpecification extends BaseGeneratedQuerySpecification<ClassesInPackageMatcher> {
- /**
- * @return the singleton instance of the query specification
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static ClassesInPackageQuerySpecification instance() throws IncQueryException {
- try {
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- processInitializerError(err);
- throw err;
- }
-
- }
-
- @Override
- protected ClassesInPackageMatcher instantiate(final IncQueryEngine engine) throws IncQueryException {
- return ClassesInPackageMatcher.on(engine);
- }
-
- @Override
- public String getFullyQualifiedName() {
- return "headless.classesInPackage";
-
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("p","ec");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("p", "org.eclipse.emf.ecore.EPackage"),new PParameter("ec", "org.eclipse.emf.ecore.EClass"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws IncQueryException {
- EMFPatternMatcherContext context = new EMFPatternMatcherContext();
- Set<PBody> bodies = Sets.newHashSet();
- {
- PBody body = new PBody(this);
- PVariable var_p = body.getOrCreateVariableByName("p");
- PVariable var_ec = body.getOrCreateVariableByName("ec");
- body.setExportedParameters(Arrays.asList(
- new ExportedParameter(body, var_p, "p"),
- new ExportedParameter(body, var_ec, "ec")
- ));
-
-
- new TypeUnary(body, var_ec, getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass"), "http://www.eclipse.org/emf/2002/Ecore/EClass");
- new TypeBinary(body, context, var_p, var_ec, getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage", "eClassifiers"), "http://www.eclipse.org/emf/2002/Ecore/EPackage.eClassifiers");
- bodies.add(body);
- }{
- PAnnotation annotation = new PAnnotation("Edge");
- annotation.addAttribute("source",new ParameterReference("p"));
- annotation.addAttribute("target",new ParameterReference("ec"));
- annotation.addAttribute("label","classIn");
- addAnnotation(annotation);
- }
- setStatus(PQueryStatus.OK);
- return bodies;
- }
-
- private ClassesInPackageQuerySpecification() throws IncQueryException {
- super();
- setStatus(PQueryStatus.UNINITIALIZED);
- }
-
- @SuppressWarnings("all")
- public static class Provider implements IQuerySpecificationProvider<ClassesInPackageQuerySpecification> {
- @Override
- public ClassesInPackageQuerySpecification get() throws IncQueryException {
- return instance();
- }
- }
-
-
- @SuppressWarnings("all")
- private static class LazyHolder {
- private final static ClassesInPackageQuerySpecification INSTANCE = make();
-
- public static ClassesInPackageQuerySpecification make() {
- try {
- return new ClassesInPackageQuerySpecification();
- } catch (IncQueryException ex) {
- throw new RuntimeException (ex);
- }
-
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesKeywordProcessor.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesKeywordProcessor.java
deleted file mode 100644
index 01c559dbb..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesKeywordProcessor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package headless.util;
-
-import headless.EClassNamesKeywordMatch;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the headless.eClassNamesKeyword pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class EClassNamesKeywordProcessor implements IMatchProcessor<EClassNamesKeywordMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pC the value of pattern parameter c in the currently processed match
- * @param pN the value of pattern parameter n in the currently processed match
- *
- */
- public abstract void process(final EClass pC, final String pN);
-
- @Override
- public void process(final EClassNamesKeywordMatch match) {
- process(match.getC(), match.getN());
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesKeywordQuerySpecification.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesKeywordQuerySpecification.java
deleted file mode 100644
index cdccb8ef9..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesKeywordQuerySpecification.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package headless.util;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.Sets;
-import headless.EClassNamesKeywordMatcher;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseGeneratedQuerySpecification;
-import org.eclipse.incquery.runtime.context.EMFPatternMatcherContext;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.extensibility.IQuerySpecificationProvider;
-import org.eclipse.incquery.runtime.matchers.psystem.IExpressionEvaluator;
-import org.eclipse.incquery.runtime.matchers.psystem.IValueProvider;
-import org.eclipse.incquery.runtime.matchers.psystem.PBody;
-import org.eclipse.incquery.runtime.matchers.psystem.PParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.PQuery.PQueryStatus;
-import org.eclipse.incquery.runtime.matchers.psystem.PVariable;
-import org.eclipse.incquery.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
-import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.TypeBinary;
-import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.TypeUnary;
-
-/**
- * A pattern-specific query specification that can instantiate EClassNamesKeywordMatcher in a type-safe way.
- *
- * @see EClassNamesKeywordMatcher
- * @see EClassNamesKeywordMatch
- *
- */
-@SuppressWarnings("all")
-public final class EClassNamesKeywordQuerySpecification extends BaseGeneratedQuerySpecification<EClassNamesKeywordMatcher> {
- /**
- * @return the singleton instance of the query specification
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static EClassNamesKeywordQuerySpecification instance() throws IncQueryException {
- try {
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- processInitializerError(err);
- throw err;
- }
-
- }
-
- @Override
- protected EClassNamesKeywordMatcher instantiate(final IncQueryEngine engine) throws IncQueryException {
- return EClassNamesKeywordMatcher.on(engine);
- }
-
- @Override
- public String getFullyQualifiedName() {
- return "headless.eClassNamesKeyword";
-
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("c","n");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("c", "org.eclipse.emf.ecore.EClass"),new PParameter("n", "java.lang.String"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws IncQueryException {
- EMFPatternMatcherContext context = new EMFPatternMatcherContext();
- Set<PBody> bodies = Sets.newHashSet();
- {
- PBody body = new PBody(this);
- PVariable var_c = body.getOrCreateVariableByName("c");
- PVariable var_n = body.getOrCreateVariableByName("n");
- body.setExportedParameters(Arrays.asList(
- new ExportedParameter(body, var_c, "c"),
- new ExportedParameter(body, var_n, "n")
- ));
-
-
- new TypeUnary(body, var_c, getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass"), "http://www.eclipse.org/emf/2002/Ecore/EClass");
- new TypeBinary(body, context, var_c, var_n, getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "ENamedElement", "name"), "http://www.eclipse.org/emf/2002/Ecore/ENamedElement.name");
- new ExpressionEvaluation(body, new IExpressionEvaluator() {
- @Override
- public String getShortDescription() {
- return "Expression evaluation from pattern eClassNamesKeyword";
- }
-
- @Override
- public Iterable<String> getInputParameterNames() {
- return Arrays.asList("n");
- }
-
- @Override
- public Object evaluateExpression(IValueProvider provider) throws Exception {
- java.lang.String n = (java.lang.String) provider.getValue("n");
- return evaluateExpression_1_1(n);
- }
-
- }, null);
- bodies.add(body);
- }setStatus(PQueryStatus.OK);
- return bodies;
- }
-
- private EClassNamesKeywordQuerySpecification() throws IncQueryException {
- super();
- setStatus(PQueryStatus.UNINITIALIZED);
- }
-
- @SuppressWarnings("all")
- public static class Provider implements IQuerySpecificationProvider<EClassNamesKeywordQuerySpecification> {
- @Override
- public EClassNamesKeywordQuerySpecification get() throws IncQueryException {
- return instance();
- }
- }
-
-
- @SuppressWarnings("all")
- private static class LazyHolder {
- private final static EClassNamesKeywordQuerySpecification INSTANCE = make();
-
- public static EClassNamesKeywordQuerySpecification make() {
- try {
- return new EClassNamesKeywordQuerySpecification();
- } catch (IncQueryException ex) {
- throw new RuntimeException (ex);
- }
-
- }
- }
-
-
- private boolean evaluateExpression_1_1(final String n) {
- boolean _equals = Objects.equal("A", n);
- return _equals;
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesProcessor.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesProcessor.java
deleted file mode 100644
index 86e743794..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesProcessor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package headless.util;
-
-import headless.EClassNamesMatch;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the headless.eClassNames pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class EClassNamesProcessor implements IMatchProcessor<EClassNamesMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pC the value of pattern parameter c in the currently processed match
- * @param pN the value of pattern parameter n in the currently processed match
- *
- */
- public abstract void process(final EClass pC, final String pN);
-
- @Override
- public void process(final EClassNamesMatch match) {
- process(match.getC(), match.getN());
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesQuerySpecification.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesQuerySpecification.java
deleted file mode 100644
index 6915095f0..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassNamesQuerySpecification.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package headless.util;
-
-import com.google.common.collect.Sets;
-import headless.EClassNamesMatcher;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseGeneratedQuerySpecification;
-import org.eclipse.incquery.runtime.context.EMFPatternMatcherContext;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.extensibility.IQuerySpecificationProvider;
-import org.eclipse.incquery.runtime.matchers.psystem.PBody;
-import org.eclipse.incquery.runtime.matchers.psystem.PParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.PQuery.PQueryStatus;
-import org.eclipse.incquery.runtime.matchers.psystem.PVariable;
-import org.eclipse.incquery.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.TypeBinary;
-import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.TypeUnary;
-
-/**
- * A pattern-specific query specification that can instantiate EClassNamesMatcher in a type-safe way.
- *
- * @see EClassNamesMatcher
- * @see EClassNamesMatch
- *
- */
-@SuppressWarnings("all")
-public final class EClassNamesQuerySpecification extends BaseGeneratedQuerySpecification<EClassNamesMatcher> {
- /**
- * @return the singleton instance of the query specification
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static EClassNamesQuerySpecification instance() throws IncQueryException {
- try {
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- processInitializerError(err);
- throw err;
- }
-
- }
-
- @Override
- protected EClassNamesMatcher instantiate(final IncQueryEngine engine) throws IncQueryException {
- return EClassNamesMatcher.on(engine);
- }
-
- @Override
- public String getFullyQualifiedName() {
- return "headless.eClassNames";
-
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("c","n");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("c", "org.eclipse.emf.ecore.EClass"),new PParameter("n", "java.lang.String"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws IncQueryException {
- EMFPatternMatcherContext context = new EMFPatternMatcherContext();
- Set<PBody> bodies = Sets.newHashSet();
- {
- PBody body = new PBody(this);
- PVariable var_c = body.getOrCreateVariableByName("c");
- PVariable var_n = body.getOrCreateVariableByName("n");
- body.setExportedParameters(Arrays.asList(
- new ExportedParameter(body, var_c, "c"),
- new ExportedParameter(body, var_n, "n")
- ));
-
-
- new TypeUnary(body, var_c, getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass"), "http://www.eclipse.org/emf/2002/Ecore/EClass");
- new TypeBinary(body, context, var_c, var_n, getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "ENamedElement", "name"), "http://www.eclipse.org/emf/2002/Ecore/ENamedElement.name");
- bodies.add(body);
- }setStatus(PQueryStatus.OK);
- return bodies;
- }
-
- private EClassNamesQuerySpecification() throws IncQueryException {
- super();
- setStatus(PQueryStatus.UNINITIALIZED);
- }
-
- @SuppressWarnings("all")
- public static class Provider implements IQuerySpecificationProvider<EClassNamesQuerySpecification> {
- @Override
- public EClassNamesQuerySpecification get() throws IncQueryException {
- return instance();
- }
- }
-
-
- @SuppressWarnings("all")
- private static class LazyHolder {
- private final static EClassNamesQuerySpecification INSTANCE = make();
-
- public static EClassNamesQuerySpecification make() {
- try {
- return new EClassNamesQuerySpecification();
- } catch (IncQueryException ex) {
- throw new RuntimeException (ex);
- }
-
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassProcessor.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassProcessor.java
deleted file mode 100644
index b51520e79..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassProcessor.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package headless.util;
-
-import headless.EClassMatch;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the headless.eClass pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class EClassProcessor implements IMatchProcessor<EClassMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pEc the value of pattern parameter ec in the currently processed match
- *
- */
- public abstract void process(final EClass pEc);
-
- @Override
- public void process(final EClassMatch match) {
- process(match.getEc());
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassQuerySpecification.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassQuerySpecification.java
deleted file mode 100644
index add0288c7..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EClassQuerySpecification.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package headless.util;
-
-import com.google.common.collect.Sets;
-import headless.EClassMatcher;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseGeneratedQuerySpecification;
-import org.eclipse.incquery.runtime.context.EMFPatternMatcherContext;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.extensibility.IQuerySpecificationProvider;
-import org.eclipse.incquery.runtime.matchers.psystem.PBody;
-import org.eclipse.incquery.runtime.matchers.psystem.PParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.PQuery.PQueryStatus;
-import org.eclipse.incquery.runtime.matchers.psystem.PVariable;
-import org.eclipse.incquery.runtime.matchers.psystem.annotations.PAnnotation;
-import org.eclipse.incquery.runtime.matchers.psystem.annotations.ParameterReference;
-import org.eclipse.incquery.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.TypeUnary;
-
-/**
- * A pattern-specific query specification that can instantiate EClassMatcher in a type-safe way.
- *
- * @see EClassMatcher
- * @see EClassMatch
- *
- */
-@SuppressWarnings("all")
-public final class EClassQuerySpecification extends BaseGeneratedQuerySpecification<EClassMatcher> {
- /**
- * @return the singleton instance of the query specification
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static EClassQuerySpecification instance() throws IncQueryException {
- try {
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- processInitializerError(err);
- throw err;
- }
-
- }
-
- @Override
- protected EClassMatcher instantiate(final IncQueryEngine engine) throws IncQueryException {
- return EClassMatcher.on(engine);
- }
-
- @Override
- public String getFullyQualifiedName() {
- return "headless.eClass";
-
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("ec");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("ec", "org.eclipse.emf.ecore.EClass"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws IncQueryException {
- EMFPatternMatcherContext context = new EMFPatternMatcherContext();
- Set<PBody> bodies = Sets.newHashSet();
- {
- PBody body = new PBody(this);
- PVariable var_ec = body.getOrCreateVariableByName("ec");
- body.setExportedParameters(Arrays.asList(
- new ExportedParameter(body, var_ec, "ec")
- ));
-
- new TypeUnary(body, var_ec, getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass"), "http://www.eclipse.org/emf/2002/Ecore/EClass");
- bodies.add(body);
- }{
- PAnnotation annotation = new PAnnotation("Item");
- annotation.addAttribute("item",new ParameterReference("ec"));
- annotation.addAttribute("label","EC: $ec.name$");
- addAnnotation(annotation);
- }
- {
- PAnnotation annotation = new PAnnotation("Format");
- annotation.addAttribute("color","#e8da2c");
- addAnnotation(annotation);
- }
- setStatus(PQueryStatus.OK);
- return bodies;
- }
-
- private EClassQuerySpecification() throws IncQueryException {
- super();
- setStatus(PQueryStatus.UNINITIALIZED);
- }
-
- @SuppressWarnings("all")
- public static class Provider implements IQuerySpecificationProvider<EClassQuerySpecification> {
- @Override
- public EClassQuerySpecification get() throws IncQueryException {
- return instance();
- }
- }
-
-
- @SuppressWarnings("all")
- private static class LazyHolder {
- private final static EClassQuerySpecification INSTANCE = make();
-
- public static EClassQuerySpecification make() {
- try {
- return new EClassQuerySpecification();
- } catch (IncQueryException ex) {
- throw new RuntimeException (ex);
- }
-
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EObjectProcessor.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/EObjectProcessor.java
deleted file mode 100644
index a04765100..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EObjectProcessor.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package headless.util;
-
-import headless.EObjectMatch;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the headless.eObject pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class EObjectProcessor implements IMatchProcessor<EObjectMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pO the value of pattern parameter o in the currently processed match
- *
- */
- public abstract void process(final EObject pO);
-
- @Override
- public void process(final EObjectMatch match) {
- process(match.getO());
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EObjectQuerySpecification.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/EObjectQuerySpecification.java
deleted file mode 100644
index 68382ff72..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EObjectQuerySpecification.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package headless.util;
-
-import com.google.common.collect.Sets;
-import headless.EObjectMatcher;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseGeneratedQuerySpecification;
-import org.eclipse.incquery.runtime.context.EMFPatternMatcherContext;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.extensibility.IQuerySpecificationProvider;
-import org.eclipse.incquery.runtime.matchers.psystem.PBody;
-import org.eclipse.incquery.runtime.matchers.psystem.PParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.PQuery.PQueryStatus;
-import org.eclipse.incquery.runtime.matchers.psystem.PVariable;
-import org.eclipse.incquery.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.TypeUnary;
-
-/**
- * A pattern-specific query specification that can instantiate EObjectMatcher in a type-safe way.
- *
- * @see EObjectMatcher
- * @see EObjectMatch
- *
- */
-@SuppressWarnings("all")
-public final class EObjectQuerySpecification extends BaseGeneratedQuerySpecification<EObjectMatcher> {
- /**
- * @return the singleton instance of the query specification
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static EObjectQuerySpecification instance() throws IncQueryException {
- try {
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- processInitializerError(err);
- throw err;
- }
-
- }
-
- @Override
- protected EObjectMatcher instantiate(final IncQueryEngine engine) throws IncQueryException {
- return EObjectMatcher.on(engine);
- }
-
- @Override
- public String getFullyQualifiedName() {
- return "headless.eObject";
-
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("o");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("o", "org.eclipse.emf.ecore.EObject"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws IncQueryException {
- EMFPatternMatcherContext context = new EMFPatternMatcherContext();
- Set<PBody> bodies = Sets.newHashSet();
- {
- PBody body = new PBody(this);
- PVariable var_o = body.getOrCreateVariableByName("o");
- body.setExportedParameters(Arrays.asList(
- new ExportedParameter(body, var_o, "o")
- ));
-
- new TypeUnary(body, var_o, getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EObject"), "http://www.eclipse.org/emf/2002/Ecore/EObject");
- bodies.add(body);
- }setStatus(PQueryStatus.OK);
- return bodies;
- }
-
- private EObjectQuerySpecification() throws IncQueryException {
- super();
- setStatus(PQueryStatus.UNINITIALIZED);
- }
-
- @SuppressWarnings("all")
- public static class Provider implements IQuerySpecificationProvider<EObjectQuerySpecification> {
- @Override
- public EObjectQuerySpecification get() throws IncQueryException {
- return instance();
- }
- }
-
-
- @SuppressWarnings("all")
- private static class LazyHolder {
- private final static EObjectQuerySpecification INSTANCE = make();
-
- public static EObjectQuerySpecification make() {
- try {
- return new EObjectQuerySpecification();
- } catch (IncQueryException ex) {
- throw new RuntimeException (ex);
- }
-
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EPackageProcessor.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/EPackageProcessor.java
deleted file mode 100644
index 61e315e5a..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EPackageProcessor.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package headless.util;
-
-import headless.EPackageMatch;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the headless.ePackage pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class EPackageProcessor implements IMatchProcessor<EPackageMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pP the value of pattern parameter p in the currently processed match
- *
- */
- public abstract void process(final EPackage pP);
-
- @Override
- public void process(final EPackageMatch match) {
- process(match.getP());
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EPackageQuerySpecification.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/EPackageQuerySpecification.java
deleted file mode 100644
index e0ca9cc86..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/EPackageQuerySpecification.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package headless.util;
-
-import com.google.common.collect.Sets;
-import headless.EPackageMatcher;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseGeneratedQuerySpecification;
-import org.eclipse.incquery.runtime.context.EMFPatternMatcherContext;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.extensibility.IQuerySpecificationProvider;
-import org.eclipse.incquery.runtime.matchers.psystem.PBody;
-import org.eclipse.incquery.runtime.matchers.psystem.PParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.PQuery.PQueryStatus;
-import org.eclipse.incquery.runtime.matchers.psystem.PVariable;
-import org.eclipse.incquery.runtime.matchers.psystem.annotations.PAnnotation;
-import org.eclipse.incquery.runtime.matchers.psystem.annotations.ParameterReference;
-import org.eclipse.incquery.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.TypeUnary;
-
-/**
- * A pattern-specific query specification that can instantiate EPackageMatcher in a type-safe way.
- *
- * @see EPackageMatcher
- * @see EPackageMatch
- *
- */
-@SuppressWarnings("all")
-public final class EPackageQuerySpecification extends BaseGeneratedQuerySpecification<EPackageMatcher> {
- /**
- * @return the singleton instance of the query specification
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static EPackageQuerySpecification instance() throws IncQueryException {
- try {
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- processInitializerError(err);
- throw err;
- }
-
- }
-
- @Override
- protected EPackageMatcher instantiate(final IncQueryEngine engine) throws IncQueryException {
- return EPackageMatcher.on(engine);
- }
-
- @Override
- public String getFullyQualifiedName() {
- return "headless.ePackage";
-
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("p");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("p", "org.eclipse.emf.ecore.EPackage"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws IncQueryException {
- EMFPatternMatcherContext context = new EMFPatternMatcherContext();
- Set<PBody> bodies = Sets.newHashSet();
- {
- PBody body = new PBody(this);
- PVariable var_p = body.getOrCreateVariableByName("p");
- body.setExportedParameters(Arrays.asList(
- new ExportedParameter(body, var_p, "p")
- ));
-
- new TypeUnary(body, var_p, getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage"), "http://www.eclipse.org/emf/2002/Ecore/EPackage");
- bodies.add(body);
- }{
- PAnnotation annotation = new PAnnotation("Item");
- annotation.addAttribute("item",new ParameterReference("p"));
- annotation.addAttribute("label","P: $p.name$");
- addAnnotation(annotation);
- }
- {
- PAnnotation annotation = new PAnnotation("Format");
- annotation.addAttribute("textColor","#ffffff");
- annotation.addAttribute("color","#791662");
- addAnnotation(annotation);
- }
- setStatus(PQueryStatus.OK);
- return bodies;
- }
-
- private EPackageQuerySpecification() throws IncQueryException {
- super();
- setStatus(PQueryStatus.UNINITIALIZED);
- }
-
- @SuppressWarnings("all")
- public static class Provider implements IQuerySpecificationProvider<EPackageQuerySpecification> {
- @Override
- public EPackageQuerySpecification get() throws IncQueryException {
- return instance();
- }
- }
-
-
- @SuppressWarnings("all")
- private static class LazyHolder {
- private final static EPackageQuerySpecification INSTANCE = make();
-
- public static EPackageQuerySpecification make() {
- try {
- return new EPackageQuerySpecification();
- } catch (IncQueryException ex) {
- throw new RuntimeException (ex);
- }
-
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/SubPackageProcessor.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/SubPackageProcessor.java
deleted file mode 100644
index 8a28463b5..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/SubPackageProcessor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package headless.util;
-
-import headless.SubPackageMatch;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.incquery.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the headless.subPackage pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class SubPackageProcessor implements IMatchProcessor<SubPackageMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pP the value of pattern parameter p in the currently processed match
- * @param pSp the value of pattern parameter sp in the currently processed match
- *
- */
- public abstract void process(final EPackage pP, final EPackage pSp);
-
- @Override
- public void process(final SubPackageMatch match) {
- process(match.getP(), match.getSp());
-
- }
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/headless/util/SubPackageQuerySpecification.java b/examples/headless-maven/incquery-demo/src/main/java/headless/util/SubPackageQuerySpecification.java
deleted file mode 100644
index 8456e7bd3..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/headless/util/SubPackageQuerySpecification.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package headless.util;
-
-import com.google.common.collect.Sets;
-import headless.SubPackageMatcher;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.api.impl.BaseGeneratedQuerySpecification;
-import org.eclipse.incquery.runtime.context.EMFPatternMatcherContext;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-import org.eclipse.incquery.runtime.extensibility.IQuerySpecificationProvider;
-import org.eclipse.incquery.runtime.matchers.psystem.PBody;
-import org.eclipse.incquery.runtime.matchers.psystem.PParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.PQuery.PQueryStatus;
-import org.eclipse.incquery.runtime.matchers.psystem.PVariable;
-import org.eclipse.incquery.runtime.matchers.psystem.annotations.PAnnotation;
-import org.eclipse.incquery.runtime.matchers.psystem.annotations.ParameterReference;
-import org.eclipse.incquery.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.incquery.runtime.matchers.psystem.basicenumerables.TypeBinary;
-
-/**
- * A pattern-specific query specification that can instantiate SubPackageMatcher in a type-safe way.
- *
- * @see SubPackageMatcher
- * @see SubPackageMatch
- *
- */
-@SuppressWarnings("all")
-public final class SubPackageQuerySpecification extends BaseGeneratedQuerySpecification<SubPackageMatcher> {
- /**
- * @return the singleton instance of the query specification
- * @throws IncQueryException if the pattern definition could not be loaded
- *
- */
- public static SubPackageQuerySpecification instance() throws IncQueryException {
- try {
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- processInitializerError(err);
- throw err;
- }
-
- }
-
- @Override
- protected SubPackageMatcher instantiate(final IncQueryEngine engine) throws IncQueryException {
- return SubPackageMatcher.on(engine);
- }
-
- @Override
- public String getFullyQualifiedName() {
- return "headless.subPackage";
-
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("p","sp");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("p", "org.eclipse.emf.ecore.EPackage"),new PParameter("sp", "org.eclipse.emf.ecore.EPackage"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws IncQueryException {
- EMFPatternMatcherContext context = new EMFPatternMatcherContext();
- Set<PBody> bodies = Sets.newHashSet();
- {
- PBody body = new PBody(this);
- PVariable var_p = body.getOrCreateVariableByName("p");
- PVariable var_sp = body.getOrCreateVariableByName("sp");
- body.setExportedParameters(Arrays.asList(
- new ExportedParameter(body, var_p, "p"),
- new ExportedParameter(body, var_sp, "sp")
- ));
-
-
- new TypeBinary(body, context, var_p, var_sp, getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage", "eSubpackages"), "http://www.eclipse.org/emf/2002/Ecore/EPackage.eSubpackages");
- bodies.add(body);
- }{
- PAnnotation annotation = new PAnnotation("Edge");
- annotation.addAttribute("source",new ParameterReference("p"));
- annotation.addAttribute("target",new ParameterReference("sp"));
- annotation.addAttribute("label","sub");
- addAnnotation(annotation);
- }
- setStatus(PQueryStatus.OK);
- return bodies;
- }
-
- private SubPackageQuerySpecification() throws IncQueryException {
- super();
- setStatus(PQueryStatus.UNINITIALIZED);
- }
-
- @SuppressWarnings("all")
- public static class Provider implements IQuerySpecificationProvider<SubPackageQuerySpecification> {
- @Override
- public SubPackageQuerySpecification get() throws IncQueryException {
- return instance();
- }
- }
-
-
- @SuppressWarnings("all")
- private static class LazyHolder {
- private final static SubPackageQuerySpecification INSTANCE = make();
-
- public static SubPackageQuerySpecification make() {
- try {
- return new SubPackageQuerySpecification();
- } catch (IncQueryException ex) {
- throw new RuntimeException (ex);
- }
-
- }
- }
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/hu/bme/mit/incquery/application/IncQueryHeadless.java b/examples/headless-maven/incquery-demo/src/main/java/hu/bme/mit/incquery/application/IncQueryHeadless.java
deleted file mode 100644
index c66cfb9c6..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/hu/bme/mit/incquery/application/IncQueryHeadless.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2011 Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- * Istvan Rath - refactorings to accommodate to generic/patternspecific API differences
- *******************************************************************************/
-package hu.bme.mit.incquery.application;
-
-
-import headless.EClassNamesMatcher;
-import headless.EObjectMatch;
-import headless.EObjectMatcher;
-import headless.EPackageMatcher;
-import headless.HeadlessQueries;
-import headless.util.EClassNamesProcessor;
-import headless.util.EObjectProcessor;
-import headless.util.EPackageProcessor;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.incquery.runtime.api.IPatternMatch;
-import org.eclipse.incquery.runtime.api.IncQueryEngine;
-import org.eclipse.incquery.runtime.exception.IncQueryException;
-
-/**
- * @author Abel Hegedus
- * @author Istvan Rath
- *
- */
-public class IncQueryHeadless {
-
- protected Resource loadModel(String modelPath) {
- URI fileURI = URI.createFileURI(modelPath);
- return loadModel(fileURI);
- }
-
- protected Resource loadModel(URI fileURI) {
- // Loads the resource
- ResourceSet resourceSet = new ResourceSetImpl();
- Resource resource = resourceSet.getResource(fileURI, true);
- return resource;
- }
-
- protected void prettyPrintMatches(StringBuilder results, Collection<? extends IPatternMatch> matches) {
- for (IPatternMatch match : matches) {
- results.append(match.prettyPrint()+"; ");
- }
- if(matches.size() == 0) {
- results.append("Empty match set");
- }
- results.append("\n");
- }
-
-
- public String executeDemo(String modelPath) {
- final StringBuilder results = new StringBuilder();
- Resource resource = loadModel(modelPath);
- if (resource != null) {
- try {
- // get all matches of the pattern
- // initialization
- // phase 1: (managed) IncQueryEngine
- IncQueryEngine engine = IncQueryEngine.on(resource);
- // phase 2: the matcher itself
- EObjectMatcher matcher = EObjectMatcher.on(engine);
- // get all matches of the pattern
- Collection<EObjectMatch> matches = matcher.getAllMatches();
- prettyPrintMatches(results, matches);
- // using a match processor
- matcher.forEachMatch(new EObjectProcessor() {
- @Override
- public void process(EObject o) {
- results.append("\tEObject: " + o.toString() + "\n");
- }
- });
- // matching with partially bound input parameters
- // a new matcher initialization will trigger a new traversal of the model
- // unless you use pattern groups, see executePatternSpecific_PatternGroups below
- EClassNamesMatcher matcher2 = EClassNamesMatcher.on(engine);
- // defining an input mask by binding "name" to "A" ->
- matcher2.forEachMatch( matcher2.newMatch(null, "A") , new EClassNamesProcessor() {
- @Override
- public void process(EClass c, String n) {
- results.append("\tEClass with name A: " + c.toString() + "\n");
- }
- });
- } catch (IncQueryException e) {
- e.printStackTrace();
- results.append(e.getMessage());
- }
- } else {
- results.append("Resource not found");
- }
- return results.toString();
- }
-
- public String executeDemo_PatternGroups(String modelPath) {
- final StringBuilder results = new StringBuilder();
- Resource resource = loadModel(modelPath);
- if (resource != null) {
- try {
- // initialization
- // phase 1: (managed) IncQueryEngine
- IncQueryEngine engine = IncQueryEngine.on(resource);
- // phase 2: the group of pattern matchers
- HeadlessQueries patternGroup = HeadlessQueries.instance();
- patternGroup.prepare(engine);
- // from here on everything is the same
- EObjectMatcher matcher = EObjectMatcher.on(engine);
- // get all matches of the pattern
- Collection<EObjectMatch> matches = matcher.getAllMatches();
- prettyPrintMatches(results, matches);
- // using a match processor
- matcher.forEachMatch(new EObjectProcessor() {
- @Override
- public void process(EObject o) {
- results.append("\tEObject: " + o.toString() + "\n");
- }
- });
- // matching with partially bound input parameters
- // because EClassNamesMatcher is included in the patterngroup, *no new traversal* will be done here
- EClassNamesMatcher matcher2 = EClassNamesMatcher.on(engine);
- // defining an input mask by binding "name" to "A" ->
- matcher2.forEachMatch(null, "A" , new EClassNamesProcessor() {
- @Override
- public void process(EClass c, String n) {
- results.append("\tEClass with name A: " + c.toString() + "\n");
- }
- });
- // projections
- for (EClass ec: matcher2.getAllValuesOfc(matcher2.newMatch(null,"A")))
- {
- results.append("\tEClass with name A: " + ec.toString() + "\n");
- }
- } catch (IncQueryException e) {
- e.printStackTrace();
- results.append(e.getMessage());
- }
- } else {
- results.append("Resource not found");
- }
- return results.toString();
- }
-
- // incrementally track changes
-
- protected void performModelModification(Resource res) {
- // somewhat brittle code, assumes there is a root EPackage in the Resource
- EPackage rootPackage = (EPackage)res.getContents().get(0);
- // add a new EPackage
- EPackage newPackage = EcoreFactory.eINSTANCE.createEPackage();
- newPackage.setName("NewPackage");
- rootPackage.getESubpackages().add(newPackage);
- }
-
- public String executeTrackChangesDemo(String modelPath)
- {
- final StringBuilder results = new StringBuilder();
- Resource resource = loadModel(modelPath);
- if (resource != null) {
- try {
- // initialization
- // phase 1: (managed) IncQueryEngine
- IncQueryEngine engine = IncQueryEngine.on(resource);
- // phase 2: pattern matcher for packages
- EPackageMatcher matcher = EPackageMatcher.on(engine);
- matcher.forEachMatch(new EPackageProcessor() {
- @Override
- public void process(EPackage p) {
- results.append("\tEPackage before modification: " + p.getName()+"\n");
- }
- });
- // phase 3: modify model, change processor will update results accordingly
- performModelModification(resource);
- }
- catch (IncQueryException e) {
- e.printStackTrace();
- results.append(e.getMessage());
- }
- } else {
- results.append("Resource not found");
- }
- return results.toString();
- }
-
-
-
-}
diff --git a/examples/headless-maven/incquery-demo/src/main/java/hu/bme/mit/incquery/application/PatternSpecificIncQueryApplication.java b/examples/headless-maven/incquery-demo/src/main/java/hu/bme/mit/incquery/application/PatternSpecificIncQueryApplication.java
deleted file mode 100644
index c0e1c04be..000000000
--- a/examples/headless-maven/incquery-demo/src/main/java/hu/bme/mit/incquery/application/PatternSpecificIncQueryApplication.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2011 Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- * Istvan Rath - modifications for pattern-specific API demonstration
- *******************************************************************************/
-package hu.bme.mit.incquery.application;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl;
-
-/**
- * @author Abel Hegedus
- * @author Istvan Rath
- *
- */
-public class PatternSpecificIncQueryApplication {
-
- private static String modelParam = "-m";
-
- public static void main(String[] args) {
-
- String model = null;
- if (args == null || args.length == 0) {
- displayHelp();
- return;
- }
- int i = 0;
- while (i < args.length) {
- if (args[i].equals(modelParam)) {
- model = args[i + 1];
- i += 2;
- continue;
- }
- else {
- i++;
- continue;
- }
- }
-
- if (model == null) {
- System.out.println("Model parameter not set");
- displayHelp();
- return;
- }
-
- // Initializing metamodel
- Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ecore", new EcoreResourceFactoryImpl());
-
- IncQueryHeadless hl = new IncQueryHeadless();
- System.out.println(hl.executeDemo(model));
- System.out.println(hl.executeDemo_PatternGroups(model));
- System.out.println(hl.executeTrackChangesDemo(model));
-
-
-
- }
-
- private static void displayHelp() {
- System.out.println("Usage:\n<call> -m <modelFilePAth> \n -m : Required, the model to match on.");
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/.classpath b/examples/headless/org.eclipse.viatra.query.application.queries/.classpath
deleted file mode 100644
index 9a39368d9..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/.project b/examples/headless/org.eclipse.viatra.query.application.queries/.project
deleted file mode 100644
index a0d7537c8..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/.project
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.query.application.queries</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.viatra.query.tooling.core.projectbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
- <nature>org.eclipse.viatra.query.projectnature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/.settings/org.eclipse.jdt.core.prefs b/examples/headless/org.eclipse.viatra.query.application.queries/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f287d53cf..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/.settings/org.eclipse.pde.core.prefs b/examples/headless/org.eclipse.viatra.query.application.queries/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 13325c951..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-eclipse.preferences.version=1
-pluginProject.equinox=false
-resolve.requirebundle=false
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/META-INF/MANIFEST.MF b/examples/headless/org.eclipse.viatra.query.application.queries/META-INF/MANIFEST.MF
deleted file mode 100644
index 0a72467eb..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: VIATRA Headless Example
-Bundle-SymbolicName: org.eclipse.viatra.query.application.queries;singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Export-Package: org.eclipse.viatra.query.application.queries,
- org.eclipse.viatra.query.application.queries.util
-Require-Bundle: org.eclipse.pde.core,
- org.eclipse.emf.ecore,
- org.eclipse.emf.transaction,
- org.eclipse.xtext.xbase.lib,
- org.eclipse.viatra.query.runtime;bundle-version="[1.2.0,2.0.0)"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.apache.log4j
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/build.properties b/examples/headless/org.eclipse.viatra.query.application.queries/build.properties
deleted file mode 100644
index 74c4830d6..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- src/
-source.. = src/,\
- src-gen/
-output.. = bin/
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/plugin.xml b/examples/headless/org.eclipse.viatra.query.application.queries/plugin.xml
deleted file mode 100644
index 305a03158..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/plugin.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><plugin>
- <extension id="org.eclipse.viatra.query.application.queries.HeadlessQueries" point="org.eclipse.viatra.query.runtime.queryspecification">
- <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:org.eclipse.viatra.query.application.queries.HeadlessQueries" id="org.eclipse.viatra.query.application.queries.HeadlessQueries"/>
- </extension>
-</plugin>
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/.gitignore b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/.gitignore
deleted file mode 100644
index 4c9fa5042..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-/.ClassesInPackageHierarchyMatch.java._trace
-/.ClassesInPackageHierarchyMatcher.java._trace
-/.ClassesInPackageMatch.java._trace
-/.ClassesInPackageMatcher.java._trace
-/.EClassMatch.java._trace
-/.EClassMatcher.java._trace
-/.EClassNamesKeywordMatch.java._trace
-/.EClassNamesKeywordMatcher.java._trace
-/.EClassNamesMatch.java._trace
-/.EClassNamesMatcher.java._trace
-/.EObjectMatch.java._trace
-/.EObjectMatcher.java._trace
-/.EPackageMatch.java._trace
-/.EPackageMatcher.java._trace
-/.HeadlessQueries.java._trace
-/.SubPackageMatch.java._trace
-/.SubPackageMatcher.java._trace
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageHierarchyMatch.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageHierarchyMatch.java
deleted file mode 100644
index cf2d46a6b..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageHierarchyMatch.java
+++ /dev/null
@@ -1,208 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.viatra.query.application.queries.util.ClassesInPackageHierarchyQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.application.queries.classesInPackageHierarchy pattern,
- * to be used in conjunction with {@link ClassesInPackageHierarchyMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see ClassesInPackageHierarchyMatcher
- * @see ClassesInPackageHierarchyProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class ClassesInPackageHierarchyMatch extends BasePatternMatch {
- private EPackage fRootP;
-
- private EClass fContainedClass;
-
- private static List<String> parameterNames = makeImmutableList("rootP", "containedClass");
-
- private ClassesInPackageHierarchyMatch(final EPackage pRootP, final EClass pContainedClass) {
- this.fRootP = pRootP;
- this.fContainedClass = pContainedClass;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("rootP".equals(parameterName)) return this.fRootP;
- if ("containedClass".equals(parameterName)) return this.fContainedClass;
- return null;
- }
-
- public EPackage getRootP() {
- return this.fRootP;
- }
-
- public EClass getContainedClass() {
- return this.fContainedClass;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("rootP".equals(parameterName) ) {
- this.fRootP = (EPackage) newValue;
- return true;
- }
- if ("containedClass".equals(parameterName) ) {
- this.fContainedClass = (EClass) newValue;
- return true;
- }
- return false;
- }
-
- public void setRootP(final EPackage pRootP) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fRootP = pRootP;
- }
-
- public void setContainedClass(final EClass pContainedClass) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fContainedClass = pContainedClass;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.application.queries.classesInPackageHierarchy";
- }
-
- @Override
- public List<String> parameterNames() {
- return ClassesInPackageHierarchyMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fRootP, fContainedClass};
- }
-
- @Override
- public ClassesInPackageHierarchyMatch toImmutable() {
- return isMutable() ? newMatch(fRootP, fContainedClass) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"rootP\"=" + prettyPrintValue(fRootP) + ", ");
-
- result.append("\"containedClass\"=" + prettyPrintValue(fContainedClass)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fRootP == null) ? 0 : fRootP.hashCode());
- result = prime * result + ((fContainedClass == null) ? 0 : fContainedClass.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof ClassesInPackageHierarchyMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- ClassesInPackageHierarchyMatch other = (ClassesInPackageHierarchyMatch) obj;
- if (fRootP == null) {if (other.fRootP != null) return false;}
- else if (!fRootP.equals(other.fRootP)) return false;
- if (fContainedClass == null) {if (other.fContainedClass != null) return false;}
- else if (!fContainedClass.equals(other.fContainedClass)) return false;
- return true;
- }
-
- @Override
- public ClassesInPackageHierarchyQuerySpecification specification() {
- try {
- return ClassesInPackageHierarchyQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static ClassesInPackageHierarchyMatch newEmptyMatch() {
- return new Mutable(null, null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static ClassesInPackageHierarchyMatch newMutableMatch(final EPackage pRootP, final EClass pContainedClass) {
- return new Mutable(pRootP, pContainedClass);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static ClassesInPackageHierarchyMatch newMatch(final EPackage pRootP, final EClass pContainedClass) {
- return new Immutable(pRootP, pContainedClass);
- }
-
- private static final class Mutable extends ClassesInPackageHierarchyMatch {
- Mutable(final EPackage pRootP, final EClass pContainedClass) {
- super(pRootP, pContainedClass);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends ClassesInPackageHierarchyMatch {
- Immutable(final EPackage pRootP, final EClass pContainedClass) {
- super(pRootP, pContainedClass);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageHierarchyMatcher.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageHierarchyMatcher.java
deleted file mode 100644
index 8f61ca42b..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageHierarchyMatcher.java
+++ /dev/null
@@ -1,307 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.viatra.query.application.queries.ClassesInPackageHierarchyMatch;
-import org.eclipse.viatra.query.application.queries.util.ClassesInPackageHierarchyQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.application.queries.classesInPackageHierarchy pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link ClassesInPackageHierarchyMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * {@literal @}Edge(source = rootP, target = containedClass, label = "classIn+")
- * {@literal @}Format(color = "#0033ff")
- * pattern classesInPackageHierarchy(rootP: EPackage, containedClass: EClass)
- * {
- * find classesInPackage(rootP,containedClass);
- * } or {
- * find subPackage+(rootP,somePackage);
- * find classesInPackage(somePackage,containedClass);
- * }
- * </pre></code>
- *
- * @see ClassesInPackageHierarchyMatch
- * @see ClassesInPackageHierarchyProcessor
- * @see ClassesInPackageHierarchyQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class ClassesInPackageHierarchyMatcher extends BaseMatcher<ClassesInPackageHierarchyMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static ClassesInPackageHierarchyMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- ClassesInPackageHierarchyMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new ClassesInPackageHierarchyMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_ROOTP = 0;
-
- private final static int POSITION_CONTAINEDCLASS = 1;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(ClassesInPackageHierarchyMatcher.class);
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link ViatraQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead, e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public ClassesInPackageHierarchyMatcher(final Notifier emfRoot) throws ViatraQueryException {
- this(ViatraQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead
- *
- */
- @Deprecated
- public ClassesInPackageHierarchyMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @return matches represented as a ClassesInPackageHierarchyMatch object.
- *
- */
- public Collection<ClassesInPackageHierarchyMatch> getAllMatches(final EPackage pRootP, final EClass pContainedClass) {
- return rawGetAllMatches(new Object[]{pRootP, pContainedClass});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @return a match represented as a ClassesInPackageHierarchyMatch object, or null if no match is found.
- *
- */
- public ClassesInPackageHierarchyMatch getOneArbitraryMatch(final EPackage pRootP, final EClass pContainedClass) {
- return rawGetOneArbitraryMatch(new Object[]{pRootP, pContainedClass});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EPackage pRootP, final EClass pContainedClass) {
- return rawHasMatch(new Object[]{pRootP, pContainedClass});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EPackage pRootP, final EClass pContainedClass) {
- return rawCountMatches(new Object[]{pRootP, pContainedClass});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EPackage pRootP, final EClass pContainedClass, final IMatchProcessor<? super ClassesInPackageHierarchyMatch> processor) {
- rawForEachMatch(new Object[]{pRootP, pContainedClass}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EPackage pRootP, final EClass pContainedClass, final IMatchProcessor<? super ClassesInPackageHierarchyMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pRootP, pContainedClass}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pRootP the fixed value of pattern parameter rootP, or null if not bound.
- * @param pContainedClass the fixed value of pattern parameter containedClass, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public ClassesInPackageHierarchyMatch newMatch(final EPackage pRootP, final EClass pContainedClass) {
- return ClassesInPackageHierarchyMatch.newMatch(pRootP, pContainedClass);
- }
-
- /**
- * Retrieve the set of values that occur in matches for rootP.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EPackage> rawAccumulateAllValuesOfrootP(final Object[] parameters) {
- Set<EPackage> results = new HashSet<EPackage>();
- rawAccumulateAllValues(POSITION_ROOTP, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for rootP.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfrootP() {
- return rawAccumulateAllValuesOfrootP(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for rootP.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfrootP(final ClassesInPackageHierarchyMatch partialMatch) {
- return rawAccumulateAllValuesOfrootP(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for rootP.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfrootP(final EClass pContainedClass) {
- return rawAccumulateAllValuesOfrootP(new Object[]{
- null,
- pContainedClass
- });
- }
-
- /**
- * Retrieve the set of values that occur in matches for containedClass.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EClass> rawAccumulateAllValuesOfcontainedClass(final Object[] parameters) {
- Set<EClass> results = new HashSet<EClass>();
- rawAccumulateAllValues(POSITION_CONTAINEDCLASS, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for containedClass.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfcontainedClass() {
- return rawAccumulateAllValuesOfcontainedClass(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for containedClass.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfcontainedClass(final ClassesInPackageHierarchyMatch partialMatch) {
- return rawAccumulateAllValuesOfcontainedClass(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for containedClass.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfcontainedClass(final EPackage pRootP) {
- return rawAccumulateAllValuesOfcontainedClass(new Object[]{
- pRootP,
- null
- });
- }
-
- @Override
- protected ClassesInPackageHierarchyMatch tupleToMatch(final Tuple t) {
- try {
- return ClassesInPackageHierarchyMatch.newMatch((EPackage) t.get(POSITION_ROOTP), (EClass) t.get(POSITION_CONTAINEDCLASS));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected ClassesInPackageHierarchyMatch arrayToMatch(final Object[] match) {
- try {
- return ClassesInPackageHierarchyMatch.newMatch((EPackage) match[POSITION_ROOTP], (EClass) match[POSITION_CONTAINEDCLASS]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected ClassesInPackageHierarchyMatch arrayToMatchMutable(final Object[] match) {
- try {
- return ClassesInPackageHierarchyMatch.newMutableMatch((EPackage) match[POSITION_ROOTP], (EClass) match[POSITION_CONTAINEDCLASS]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<ClassesInPackageHierarchyMatcher> querySpecification() throws ViatraQueryException {
- return ClassesInPackageHierarchyQuerySpecification.instance();
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageMatch.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageMatch.java
deleted file mode 100644
index d700694a1..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageMatch.java
+++ /dev/null
@@ -1,208 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.viatra.query.application.queries.util.ClassesInPackageQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.application.queries.classesInPackage pattern,
- * to be used in conjunction with {@link ClassesInPackageMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see ClassesInPackageMatcher
- * @see ClassesInPackageProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class ClassesInPackageMatch extends BasePatternMatch {
- private EPackage fP;
-
- private EClass fEc;
-
- private static List<String> parameterNames = makeImmutableList("p", "ec");
-
- private ClassesInPackageMatch(final EPackage pP, final EClass pEc) {
- this.fP = pP;
- this.fEc = pEc;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("p".equals(parameterName)) return this.fP;
- if ("ec".equals(parameterName)) return this.fEc;
- return null;
- }
-
- public EPackage getP() {
- return this.fP;
- }
-
- public EClass getEc() {
- return this.fEc;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("p".equals(parameterName) ) {
- this.fP = (EPackage) newValue;
- return true;
- }
- if ("ec".equals(parameterName) ) {
- this.fEc = (EClass) newValue;
- return true;
- }
- return false;
- }
-
- public void setP(final EPackage pP) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fP = pP;
- }
-
- public void setEc(final EClass pEc) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fEc = pEc;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.application.queries.classesInPackage";
- }
-
- @Override
- public List<String> parameterNames() {
- return ClassesInPackageMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fP, fEc};
- }
-
- @Override
- public ClassesInPackageMatch toImmutable() {
- return isMutable() ? newMatch(fP, fEc) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"p\"=" + prettyPrintValue(fP) + ", ");
-
- result.append("\"ec\"=" + prettyPrintValue(fEc)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fP == null) ? 0 : fP.hashCode());
- result = prime * result + ((fEc == null) ? 0 : fEc.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof ClassesInPackageMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- ClassesInPackageMatch other = (ClassesInPackageMatch) obj;
- if (fP == null) {if (other.fP != null) return false;}
- else if (!fP.equals(other.fP)) return false;
- if (fEc == null) {if (other.fEc != null) return false;}
- else if (!fEc.equals(other.fEc)) return false;
- return true;
- }
-
- @Override
- public ClassesInPackageQuerySpecification specification() {
- try {
- return ClassesInPackageQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static ClassesInPackageMatch newEmptyMatch() {
- return new Mutable(null, null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static ClassesInPackageMatch newMutableMatch(final EPackage pP, final EClass pEc) {
- return new Mutable(pP, pEc);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static ClassesInPackageMatch newMatch(final EPackage pP, final EClass pEc) {
- return new Immutable(pP, pEc);
- }
-
- private static final class Mutable extends ClassesInPackageMatch {
- Mutable(final EPackage pP, final EClass pEc) {
- super(pP, pEc);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends ClassesInPackageMatch {
- Immutable(final EPackage pP, final EClass pEc) {
- super(pP, pEc);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageMatcher.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageMatcher.java
deleted file mode 100644
index 884bfcfce..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/ClassesInPackageMatcher.java
+++ /dev/null
@@ -1,300 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.viatra.query.application.queries.ClassesInPackageMatch;
-import org.eclipse.viatra.query.application.queries.util.ClassesInPackageQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.application.queries.classesInPackage pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link ClassesInPackageMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * {@literal @}Edge(source = p, target = ec, label = "classIn")
- * pattern classesInPackage(p : EPackage, ec: EClass) { EPackage.eClassifiers(p,ec); }
- * </pre></code>
- *
- * @see ClassesInPackageMatch
- * @see ClassesInPackageProcessor
- * @see ClassesInPackageQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class ClassesInPackageMatcher extends BaseMatcher<ClassesInPackageMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static ClassesInPackageMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- ClassesInPackageMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new ClassesInPackageMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_P = 0;
-
- private final static int POSITION_EC = 1;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(ClassesInPackageMatcher.class);
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link ViatraQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead, e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public ClassesInPackageMatcher(final Notifier emfRoot) throws ViatraQueryException {
- this(ViatraQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead
- *
- */
- @Deprecated
- public ClassesInPackageMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return matches represented as a ClassesInPackageMatch object.
- *
- */
- public Collection<ClassesInPackageMatch> getAllMatches(final EPackage pP, final EClass pEc) {
- return rawGetAllMatches(new Object[]{pP, pEc});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return a match represented as a ClassesInPackageMatch object, or null if no match is found.
- *
- */
- public ClassesInPackageMatch getOneArbitraryMatch(final EPackage pP, final EClass pEc) {
- return rawGetOneArbitraryMatch(new Object[]{pP, pEc});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EPackage pP, final EClass pEc) {
- return rawHasMatch(new Object[]{pP, pEc});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EPackage pP, final EClass pEc) {
- return rawCountMatches(new Object[]{pP, pEc});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EPackage pP, final EClass pEc, final IMatchProcessor<? super ClassesInPackageMatch> processor) {
- rawForEachMatch(new Object[]{pP, pEc}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EPackage pP, final EClass pEc, final IMatchProcessor<? super ClassesInPackageMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pP, pEc}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public ClassesInPackageMatch newMatch(final EPackage pP, final EClass pEc) {
- return ClassesInPackageMatch.newMatch(pP, pEc);
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EPackage> rawAccumulateAllValuesOfp(final Object[] parameters) {
- Set<EPackage> results = new HashSet<EPackage>();
- rawAccumulateAllValues(POSITION_P, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp() {
- return rawAccumulateAllValuesOfp(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp(final ClassesInPackageMatch partialMatch) {
- return rawAccumulateAllValuesOfp(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp(final EClass pEc) {
- return rawAccumulateAllValuesOfp(new Object[]{
- null,
- pEc
- });
- }
-
- /**
- * Retrieve the set of values that occur in matches for ec.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EClass> rawAccumulateAllValuesOfec(final Object[] parameters) {
- Set<EClass> results = new HashSet<EClass>();
- rawAccumulateAllValues(POSITION_EC, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for ec.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfec() {
- return rawAccumulateAllValuesOfec(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for ec.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfec(final ClassesInPackageMatch partialMatch) {
- return rawAccumulateAllValuesOfec(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for ec.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfec(final EPackage pP) {
- return rawAccumulateAllValuesOfec(new Object[]{
- pP,
- null
- });
- }
-
- @Override
- protected ClassesInPackageMatch tupleToMatch(final Tuple t) {
- try {
- return ClassesInPackageMatch.newMatch((EPackage) t.get(POSITION_P), (EClass) t.get(POSITION_EC));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected ClassesInPackageMatch arrayToMatch(final Object[] match) {
- try {
- return ClassesInPackageMatch.newMatch((EPackage) match[POSITION_P], (EClass) match[POSITION_EC]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected ClassesInPackageMatch arrayToMatchMutable(final Object[] match) {
- try {
- return ClassesInPackageMatch.newMutableMatch((EPackage) match[POSITION_P], (EClass) match[POSITION_EC]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<ClassesInPackageMatcher> querySpecification() throws ViatraQueryException {
- return ClassesInPackageQuerySpecification.instance();
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassMatch.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassMatch.java
deleted file mode 100644
index e92d3d69e..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassMatch.java
+++ /dev/null
@@ -1,183 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.util.EClassQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.application.queries.eClass pattern,
- * to be used in conjunction with {@link EClassMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see EClassMatcher
- * @see EClassProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class EClassMatch extends BasePatternMatch {
- private EClass fEc;
-
- private static List<String> parameterNames = makeImmutableList("ec");
-
- private EClassMatch(final EClass pEc) {
- this.fEc = pEc;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("ec".equals(parameterName)) return this.fEc;
- return null;
- }
-
- public EClass getEc() {
- return this.fEc;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("ec".equals(parameterName) ) {
- this.fEc = (EClass) newValue;
- return true;
- }
- return false;
- }
-
- public void setEc(final EClass pEc) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fEc = pEc;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.application.queries.eClass";
- }
-
- @Override
- public List<String> parameterNames() {
- return EClassMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fEc};
- }
-
- @Override
- public EClassMatch toImmutable() {
- return isMutable() ? newMatch(fEc) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"ec\"=" + prettyPrintValue(fEc)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fEc == null) ? 0 : fEc.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof EClassMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- EClassMatch other = (EClassMatch) obj;
- if (fEc == null) {if (other.fEc != null) return false;}
- else if (!fEc.equals(other.fEc)) return false;
- return true;
- }
-
- @Override
- public EClassQuerySpecification specification() {
- try {
- return EClassQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static EClassMatch newEmptyMatch() {
- return new Mutable(null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static EClassMatch newMutableMatch(final EClass pEc) {
- return new Mutable(pEc);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static EClassMatch newMatch(final EClass pEc) {
- return new Immutable(pEc);
- }
-
- private static final class Mutable extends EClassMatch {
- Mutable(final EClass pEc) {
- super(pEc);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends EClassMatch {
- Immutable(final EClass pEc) {
- super(pEc);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassMatcher.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassMatcher.java
deleted file mode 100644
index 7085c0ac9..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassMatcher.java
+++ /dev/null
@@ -1,229 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.EClassMatch;
-import org.eclipse.viatra.query.application.queries.util.EClassQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.application.queries.eClass pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link EClassMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * {@literal @}Item(item = ec, label = "EC: $ec.name$")
- * {@literal @}Format(color = "#e8da2c")
- * pattern eClass(ec : EClass) { EClass(ec); }
- * </pre></code>
- *
- * @see EClassMatch
- * @see EClassProcessor
- * @see EClassQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class EClassMatcher extends BaseMatcher<EClassMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static EClassMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- EClassMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new EClassMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_EC = 0;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(EClassMatcher.class);
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link ViatraQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead, e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public EClassMatcher(final Notifier emfRoot) throws ViatraQueryException {
- this(ViatraQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead
- *
- */
- @Deprecated
- public EClassMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return matches represented as a EClassMatch object.
- *
- */
- public Collection<EClassMatch> getAllMatches(final EClass pEc) {
- return rawGetAllMatches(new Object[]{pEc});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return a match represented as a EClassMatch object, or null if no match is found.
- *
- */
- public EClassMatch getOneArbitraryMatch(final EClass pEc) {
- return rawGetOneArbitraryMatch(new Object[]{pEc});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EClass pEc) {
- return rawHasMatch(new Object[]{pEc});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EClass pEc) {
- return rawCountMatches(new Object[]{pEc});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EClass pEc, final IMatchProcessor<? super EClassMatch> processor) {
- rawForEachMatch(new Object[]{pEc}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EClass pEc, final IMatchProcessor<? super EClassMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pEc}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pEc the fixed value of pattern parameter ec, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public EClassMatch newMatch(final EClass pEc) {
- return EClassMatch.newMatch(pEc);
- }
-
- /**
- * Retrieve the set of values that occur in matches for ec.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EClass> rawAccumulateAllValuesOfec(final Object[] parameters) {
- Set<EClass> results = new HashSet<EClass>();
- rawAccumulateAllValues(POSITION_EC, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for ec.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfec() {
- return rawAccumulateAllValuesOfec(emptyArray());
- }
-
- @Override
- protected EClassMatch tupleToMatch(final Tuple t) {
- try {
- return EClassMatch.newMatch((EClass) t.get(POSITION_EC));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected EClassMatch arrayToMatch(final Object[] match) {
- try {
- return EClassMatch.newMatch((EClass) match[POSITION_EC]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected EClassMatch arrayToMatchMutable(final Object[] match) {
- try {
- return EClassMatch.newMutableMatch((EClass) match[POSITION_EC]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<EClassMatcher> querySpecification() throws ViatraQueryException {
- return EClassQuerySpecification.instance();
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesKeywordMatch.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesKeywordMatch.java
deleted file mode 100644
index 46c7eca08..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesKeywordMatch.java
+++ /dev/null
@@ -1,207 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.util.EClassNamesKeywordQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.application.queries.eClassNamesKeyword pattern,
- * to be used in conjunction with {@link EClassNamesKeywordMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see EClassNamesKeywordMatcher
- * @see EClassNamesKeywordProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class EClassNamesKeywordMatch extends BasePatternMatch {
- private EClass fC;
-
- private String fN;
-
- private static List<String> parameterNames = makeImmutableList("c", "n");
-
- private EClassNamesKeywordMatch(final EClass pC, final String pN) {
- this.fC = pC;
- this.fN = pN;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("c".equals(parameterName)) return this.fC;
- if ("n".equals(parameterName)) return this.fN;
- return null;
- }
-
- public EClass getC() {
- return this.fC;
- }
-
- public String getN() {
- return this.fN;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("c".equals(parameterName) ) {
- this.fC = (EClass) newValue;
- return true;
- }
- if ("n".equals(parameterName) ) {
- this.fN = (String) newValue;
- return true;
- }
- return false;
- }
-
- public void setC(final EClass pC) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fC = pC;
- }
-
- public void setN(final String pN) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fN = pN;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.application.queries.eClassNamesKeyword";
- }
-
- @Override
- public List<String> parameterNames() {
- return EClassNamesKeywordMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fC, fN};
- }
-
- @Override
- public EClassNamesKeywordMatch toImmutable() {
- return isMutable() ? newMatch(fC, fN) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"c\"=" + prettyPrintValue(fC) + ", ");
-
- result.append("\"n\"=" + prettyPrintValue(fN)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fC == null) ? 0 : fC.hashCode());
- result = prime * result + ((fN == null) ? 0 : fN.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof EClassNamesKeywordMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- EClassNamesKeywordMatch other = (EClassNamesKeywordMatch) obj;
- if (fC == null) {if (other.fC != null) return false;}
- else if (!fC.equals(other.fC)) return false;
- if (fN == null) {if (other.fN != null) return false;}
- else if (!fN.equals(other.fN)) return false;
- return true;
- }
-
- @Override
- public EClassNamesKeywordQuerySpecification specification() {
- try {
- return EClassNamesKeywordQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static EClassNamesKeywordMatch newEmptyMatch() {
- return new Mutable(null, null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static EClassNamesKeywordMatch newMutableMatch(final EClass pC, final String pN) {
- return new Mutable(pC, pN);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static EClassNamesKeywordMatch newMatch(final EClass pC, final String pN) {
- return new Immutable(pC, pN);
- }
-
- private static final class Mutable extends EClassNamesKeywordMatch {
- Mutable(final EClass pC, final String pN) {
- super(pC, pN);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends EClassNamesKeywordMatch {
- Immutable(final EClass pC, final String pN) {
- super(pC, pN);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesKeywordMatcher.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesKeywordMatcher.java
deleted file mode 100644
index 35b9134dc..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesKeywordMatcher.java
+++ /dev/null
@@ -1,302 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.EClassNamesKeywordMatch;
-import org.eclipse.viatra.query.application.queries.util.EClassNamesKeywordQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.application.queries.eClassNamesKeyword pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link EClassNamesKeywordMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * pattern eClassNamesKeyword(c: EClass, n: EString)
- * {
- * EClass.name(c,n);
- * check("A" == n);
- * }
- * </pre></code>
- *
- * @see EClassNamesKeywordMatch
- * @see EClassNamesKeywordProcessor
- * @see EClassNamesKeywordQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class EClassNamesKeywordMatcher extends BaseMatcher<EClassNamesKeywordMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static EClassNamesKeywordMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- EClassNamesKeywordMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new EClassNamesKeywordMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_C = 0;
-
- private final static int POSITION_N = 1;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(EClassNamesKeywordMatcher.class);
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link ViatraQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead, e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public EClassNamesKeywordMatcher(final Notifier emfRoot) throws ViatraQueryException {
- this(ViatraQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead
- *
- */
- @Deprecated
- public EClassNamesKeywordMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return matches represented as a EClassNamesKeywordMatch object.
- *
- */
- public Collection<EClassNamesKeywordMatch> getAllMatches(final EClass pC, final String pN) {
- return rawGetAllMatches(new Object[]{pC, pN});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return a match represented as a EClassNamesKeywordMatch object, or null if no match is found.
- *
- */
- public EClassNamesKeywordMatch getOneArbitraryMatch(final EClass pC, final String pN) {
- return rawGetOneArbitraryMatch(new Object[]{pC, pN});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EClass pC, final String pN) {
- return rawHasMatch(new Object[]{pC, pN});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EClass pC, final String pN) {
- return rawCountMatches(new Object[]{pC, pN});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EClass pC, final String pN, final IMatchProcessor<? super EClassNamesKeywordMatch> processor) {
- rawForEachMatch(new Object[]{pC, pN}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EClass pC, final String pN, final IMatchProcessor<? super EClassNamesKeywordMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pC, pN}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public EClassNamesKeywordMatch newMatch(final EClass pC, final String pN) {
- return EClassNamesKeywordMatch.newMatch(pC, pN);
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EClass> rawAccumulateAllValuesOfc(final Object[] parameters) {
- Set<EClass> results = new HashSet<EClass>();
- rawAccumulateAllValues(POSITION_C, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfc() {
- return rawAccumulateAllValuesOfc(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfc(final EClassNamesKeywordMatch partialMatch) {
- return rawAccumulateAllValuesOfc(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfc(final String pN) {
- return rawAccumulateAllValuesOfc(new Object[]{
- null,
- pN
- });
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<String> rawAccumulateAllValuesOfn(final Object[] parameters) {
- Set<String> results = new HashSet<String>();
- rawAccumulateAllValues(POSITION_N, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<String> getAllValuesOfn() {
- return rawAccumulateAllValuesOfn(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<String> getAllValuesOfn(final EClassNamesKeywordMatch partialMatch) {
- return rawAccumulateAllValuesOfn(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<String> getAllValuesOfn(final EClass pC) {
- return rawAccumulateAllValuesOfn(new Object[]{
- pC,
- null
- });
- }
-
- @Override
- protected EClassNamesKeywordMatch tupleToMatch(final Tuple t) {
- try {
- return EClassNamesKeywordMatch.newMatch((EClass) t.get(POSITION_C), (String) t.get(POSITION_N));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected EClassNamesKeywordMatch arrayToMatch(final Object[] match) {
- try {
- return EClassNamesKeywordMatch.newMatch((EClass) match[POSITION_C], (String) match[POSITION_N]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected EClassNamesKeywordMatch arrayToMatchMutable(final Object[] match) {
- try {
- return EClassNamesKeywordMatch.newMutableMatch((EClass) match[POSITION_C], (String) match[POSITION_N]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<EClassNamesKeywordMatcher> querySpecification() throws ViatraQueryException {
- return EClassNamesKeywordQuerySpecification.instance();
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesMatch.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesMatch.java
deleted file mode 100644
index bf7d57e6d..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesMatch.java
+++ /dev/null
@@ -1,207 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.util.EClassNamesQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.application.queries.eClassNames pattern,
- * to be used in conjunction with {@link EClassNamesMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see EClassNamesMatcher
- * @see EClassNamesProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class EClassNamesMatch extends BasePatternMatch {
- private EClass fC;
-
- private String fN;
-
- private static List<String> parameterNames = makeImmutableList("c", "n");
-
- private EClassNamesMatch(final EClass pC, final String pN) {
- this.fC = pC;
- this.fN = pN;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("c".equals(parameterName)) return this.fC;
- if ("n".equals(parameterName)) return this.fN;
- return null;
- }
-
- public EClass getC() {
- return this.fC;
- }
-
- public String getN() {
- return this.fN;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("c".equals(parameterName) ) {
- this.fC = (EClass) newValue;
- return true;
- }
- if ("n".equals(parameterName) ) {
- this.fN = (String) newValue;
- return true;
- }
- return false;
- }
-
- public void setC(final EClass pC) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fC = pC;
- }
-
- public void setN(final String pN) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fN = pN;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.application.queries.eClassNames";
- }
-
- @Override
- public List<String> parameterNames() {
- return EClassNamesMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fC, fN};
- }
-
- @Override
- public EClassNamesMatch toImmutable() {
- return isMutable() ? newMatch(fC, fN) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"c\"=" + prettyPrintValue(fC) + ", ");
-
- result.append("\"n\"=" + prettyPrintValue(fN)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fC == null) ? 0 : fC.hashCode());
- result = prime * result + ((fN == null) ? 0 : fN.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof EClassNamesMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- EClassNamesMatch other = (EClassNamesMatch) obj;
- if (fC == null) {if (other.fC != null) return false;}
- else if (!fC.equals(other.fC)) return false;
- if (fN == null) {if (other.fN != null) return false;}
- else if (!fN.equals(other.fN)) return false;
- return true;
- }
-
- @Override
- public EClassNamesQuerySpecification specification() {
- try {
- return EClassNamesQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static EClassNamesMatch newEmptyMatch() {
- return new Mutable(null, null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static EClassNamesMatch newMutableMatch(final EClass pC, final String pN) {
- return new Mutable(pC, pN);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static EClassNamesMatch newMatch(final EClass pC, final String pN) {
- return new Immutable(pC, pN);
- }
-
- private static final class Mutable extends EClassNamesMatch {
- Mutable(final EClass pC, final String pN) {
- super(pC, pN);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends EClassNamesMatch {
- Immutable(final EClass pC, final String pN) {
- super(pC, pN);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesMatcher.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesMatcher.java
deleted file mode 100644
index 017f46da5..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EClassNamesMatcher.java
+++ /dev/null
@@ -1,300 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.EClassNamesMatch;
-import org.eclipse.viatra.query.application.queries.util.EClassNamesQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.application.queries.eClassNames pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link EClassNamesMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * pattern eClassNames(c: EClass, n : EString)= {
- * EClass.name(c,n);
- * }
- * </pre></code>
- *
- * @see EClassNamesMatch
- * @see EClassNamesProcessor
- * @see EClassNamesQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class EClassNamesMatcher extends BaseMatcher<EClassNamesMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static EClassNamesMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- EClassNamesMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new EClassNamesMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_C = 0;
-
- private final static int POSITION_N = 1;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(EClassNamesMatcher.class);
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link ViatraQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead, e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public EClassNamesMatcher(final Notifier emfRoot) throws ViatraQueryException {
- this(ViatraQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead
- *
- */
- @Deprecated
- public EClassNamesMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return matches represented as a EClassNamesMatch object.
- *
- */
- public Collection<EClassNamesMatch> getAllMatches(final EClass pC, final String pN) {
- return rawGetAllMatches(new Object[]{pC, pN});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return a match represented as a EClassNamesMatch object, or null if no match is found.
- *
- */
- public EClassNamesMatch getOneArbitraryMatch(final EClass pC, final String pN) {
- return rawGetOneArbitraryMatch(new Object[]{pC, pN});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EClass pC, final String pN) {
- return rawHasMatch(new Object[]{pC, pN});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EClass pC, final String pN) {
- return rawCountMatches(new Object[]{pC, pN});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EClass pC, final String pN, final IMatchProcessor<? super EClassNamesMatch> processor) {
- rawForEachMatch(new Object[]{pC, pN}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EClass pC, final String pN, final IMatchProcessor<? super EClassNamesMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pC, pN}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pC the fixed value of pattern parameter c, or null if not bound.
- * @param pN the fixed value of pattern parameter n, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public EClassNamesMatch newMatch(final EClass pC, final String pN) {
- return EClassNamesMatch.newMatch(pC, pN);
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EClass> rawAccumulateAllValuesOfc(final Object[] parameters) {
- Set<EClass> results = new HashSet<EClass>();
- rawAccumulateAllValues(POSITION_C, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfc() {
- return rawAccumulateAllValuesOfc(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfc(final EClassNamesMatch partialMatch) {
- return rawAccumulateAllValuesOfc(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for c.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EClass> getAllValuesOfc(final String pN) {
- return rawAccumulateAllValuesOfc(new Object[]{
- null,
- pN
- });
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<String> rawAccumulateAllValuesOfn(final Object[] parameters) {
- Set<String> results = new HashSet<String>();
- rawAccumulateAllValues(POSITION_N, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<String> getAllValuesOfn() {
- return rawAccumulateAllValuesOfn(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<String> getAllValuesOfn(final EClassNamesMatch partialMatch) {
- return rawAccumulateAllValuesOfn(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for n.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<String> getAllValuesOfn(final EClass pC) {
- return rawAccumulateAllValuesOfn(new Object[]{
- pC,
- null
- });
- }
-
- @Override
- protected EClassNamesMatch tupleToMatch(final Tuple t) {
- try {
- return EClassNamesMatch.newMatch((EClass) t.get(POSITION_C), (String) t.get(POSITION_N));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected EClassNamesMatch arrayToMatch(final Object[] match) {
- try {
- return EClassNamesMatch.newMatch((EClass) match[POSITION_C], (String) match[POSITION_N]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected EClassNamesMatch arrayToMatchMutable(final Object[] match) {
- try {
- return EClassNamesMatch.newMutableMatch((EClass) match[POSITION_C], (String) match[POSITION_N]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<EClassNamesMatcher> querySpecification() throws ViatraQueryException {
- return EClassNamesQuerySpecification.instance();
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EObjectMatch.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EObjectMatch.java
deleted file mode 100644
index 15cea1cef..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EObjectMatch.java
+++ /dev/null
@@ -1,183 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.viatra.query.application.queries.util.EObjectQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.application.queries.eObject pattern,
- * to be used in conjunction with {@link EObjectMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see EObjectMatcher
- * @see EObjectProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class EObjectMatch extends BasePatternMatch {
- private EObject fO;
-
- private static List<String> parameterNames = makeImmutableList("o");
-
- private EObjectMatch(final EObject pO) {
- this.fO = pO;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("o".equals(parameterName)) return this.fO;
- return null;
- }
-
- public EObject getO() {
- return this.fO;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("o".equals(parameterName) ) {
- this.fO = (EObject) newValue;
- return true;
- }
- return false;
- }
-
- public void setO(final EObject pO) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fO = pO;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.application.queries.eObject";
- }
-
- @Override
- public List<String> parameterNames() {
- return EObjectMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fO};
- }
-
- @Override
- public EObjectMatch toImmutable() {
- return isMutable() ? newMatch(fO) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"o\"=" + prettyPrintValue(fO)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fO == null) ? 0 : fO.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof EObjectMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- EObjectMatch other = (EObjectMatch) obj;
- if (fO == null) {if (other.fO != null) return false;}
- else if (!fO.equals(other.fO)) return false;
- return true;
- }
-
- @Override
- public EObjectQuerySpecification specification() {
- try {
- return EObjectQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static EObjectMatch newEmptyMatch() {
- return new Mutable(null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static EObjectMatch newMutableMatch(final EObject pO) {
- return new Mutable(pO);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static EObjectMatch newMatch(final EObject pO) {
- return new Immutable(pO);
- }
-
- private static final class Mutable extends EObjectMatch {
- Mutable(final EObject pO) {
- super(pO);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends EObjectMatch {
- Immutable(final EObject pO) {
- super(pO);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EObjectMatcher.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EObjectMatcher.java
deleted file mode 100644
index c7514050c..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EObjectMatcher.java
+++ /dev/null
@@ -1,229 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.viatra.query.application.queries.EObjectMatch;
-import org.eclipse.viatra.query.application.queries.util.EObjectQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.application.queries.eObject pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link EObjectMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * pattern eObject(o) {
- * EObject(o);
- * }
- * </pre></code>
- *
- * @see EObjectMatch
- * @see EObjectProcessor
- * @see EObjectQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class EObjectMatcher extends BaseMatcher<EObjectMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static EObjectMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- EObjectMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new EObjectMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_O = 0;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(EObjectMatcher.class);
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link ViatraQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead, e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public EObjectMatcher(final Notifier emfRoot) throws ViatraQueryException {
- this(ViatraQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead
- *
- */
- @Deprecated
- public EObjectMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @return matches represented as a EObjectMatch object.
- *
- */
- public Collection<EObjectMatch> getAllMatches(final EObject pO) {
- return rawGetAllMatches(new Object[]{pO});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @return a match represented as a EObjectMatch object, or null if no match is found.
- *
- */
- public EObjectMatch getOneArbitraryMatch(final EObject pO) {
- return rawGetOneArbitraryMatch(new Object[]{pO});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EObject pO) {
- return rawHasMatch(new Object[]{pO});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EObject pO) {
- return rawCountMatches(new Object[]{pO});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EObject pO, final IMatchProcessor<? super EObjectMatch> processor) {
- rawForEachMatch(new Object[]{pO}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EObject pO, final IMatchProcessor<? super EObjectMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pO}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pO the fixed value of pattern parameter o, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public EObjectMatch newMatch(final EObject pO) {
- return EObjectMatch.newMatch(pO);
- }
-
- /**
- * Retrieve the set of values that occur in matches for o.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EObject> rawAccumulateAllValuesOfo(final Object[] parameters) {
- Set<EObject> results = new HashSet<EObject>();
- rawAccumulateAllValues(POSITION_O, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for o.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EObject> getAllValuesOfo() {
- return rawAccumulateAllValuesOfo(emptyArray());
- }
-
- @Override
- protected EObjectMatch tupleToMatch(final Tuple t) {
- try {
- return EObjectMatch.newMatch((EObject) t.get(POSITION_O));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected EObjectMatch arrayToMatch(final Object[] match) {
- try {
- return EObjectMatch.newMatch((EObject) match[POSITION_O]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected EObjectMatch arrayToMatchMutable(final Object[] match) {
- try {
- return EObjectMatch.newMutableMatch((EObject) match[POSITION_O]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<EObjectMatcher> querySpecification() throws ViatraQueryException {
- return EObjectQuerySpecification.instance();
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EPackageMatch.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EPackageMatch.java
deleted file mode 100644
index 385e1cdf8..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EPackageMatch.java
+++ /dev/null
@@ -1,183 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.viatra.query.application.queries.util.EPackageQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.application.queries.ePackage pattern,
- * to be used in conjunction with {@link EPackageMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see EPackageMatcher
- * @see EPackageProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class EPackageMatch extends BasePatternMatch {
- private EPackage fP;
-
- private static List<String> parameterNames = makeImmutableList("p");
-
- private EPackageMatch(final EPackage pP) {
- this.fP = pP;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("p".equals(parameterName)) return this.fP;
- return null;
- }
-
- public EPackage getP() {
- return this.fP;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("p".equals(parameterName) ) {
- this.fP = (EPackage) newValue;
- return true;
- }
- return false;
- }
-
- public void setP(final EPackage pP) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fP = pP;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.application.queries.ePackage";
- }
-
- @Override
- public List<String> parameterNames() {
- return EPackageMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fP};
- }
-
- @Override
- public EPackageMatch toImmutable() {
- return isMutable() ? newMatch(fP) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"p\"=" + prettyPrintValue(fP)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fP == null) ? 0 : fP.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof EPackageMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- EPackageMatch other = (EPackageMatch) obj;
- if (fP == null) {if (other.fP != null) return false;}
- else if (!fP.equals(other.fP)) return false;
- return true;
- }
-
- @Override
- public EPackageQuerySpecification specification() {
- try {
- return EPackageQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static EPackageMatch newEmptyMatch() {
- return new Mutable(null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static EPackageMatch newMutableMatch(final EPackage pP) {
- return new Mutable(pP);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static EPackageMatch newMatch(final EPackage pP) {
- return new Immutable(pP);
- }
-
- private static final class Mutable extends EPackageMatch {
- Mutable(final EPackage pP) {
- super(pP);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends EPackageMatch {
- Immutable(final EPackage pP) {
- super(pP);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EPackageMatcher.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EPackageMatcher.java
deleted file mode 100644
index 0eb10b4d4..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/EPackageMatcher.java
+++ /dev/null
@@ -1,229 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.viatra.query.application.queries.EPackageMatch;
-import org.eclipse.viatra.query.application.queries.util.EPackageQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.application.queries.ePackage pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link EPackageMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * {@literal @}Item(item = p, label = "P: $p.name$")
- * {@literal @}Format(color = "#791662", textColor = "#ffffff")
- * pattern ePackage(p : EPackage) { EPackage(p); }
- * </pre></code>
- *
- * @see EPackageMatch
- * @see EPackageProcessor
- * @see EPackageQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class EPackageMatcher extends BaseMatcher<EPackageMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static EPackageMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- EPackageMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new EPackageMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_P = 0;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(EPackageMatcher.class);
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link ViatraQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead, e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public EPackageMatcher(final Notifier emfRoot) throws ViatraQueryException {
- this(ViatraQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead
- *
- */
- @Deprecated
- public EPackageMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @return matches represented as a EPackageMatch object.
- *
- */
- public Collection<EPackageMatch> getAllMatches(final EPackage pP) {
- return rawGetAllMatches(new Object[]{pP});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @return a match represented as a EPackageMatch object, or null if no match is found.
- *
- */
- public EPackageMatch getOneArbitraryMatch(final EPackage pP) {
- return rawGetOneArbitraryMatch(new Object[]{pP});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EPackage pP) {
- return rawHasMatch(new Object[]{pP});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EPackage pP) {
- return rawCountMatches(new Object[]{pP});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EPackage pP, final IMatchProcessor<? super EPackageMatch> processor) {
- rawForEachMatch(new Object[]{pP}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EPackage pP, final IMatchProcessor<? super EPackageMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pP}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public EPackageMatch newMatch(final EPackage pP) {
- return EPackageMatch.newMatch(pP);
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EPackage> rawAccumulateAllValuesOfp(final Object[] parameters) {
- Set<EPackage> results = new HashSet<EPackage>();
- rawAccumulateAllValues(POSITION_P, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp() {
- return rawAccumulateAllValuesOfp(emptyArray());
- }
-
- @Override
- protected EPackageMatch tupleToMatch(final Tuple t) {
- try {
- return EPackageMatch.newMatch((EPackage) t.get(POSITION_P));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected EPackageMatch arrayToMatch(final Object[] match) {
- try {
- return EPackageMatch.newMatch((EPackage) match[POSITION_P]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected EPackageMatch arrayToMatchMutable(final Object[] match) {
- try {
- return EPackageMatch.newMutableMatch((EPackage) match[POSITION_P]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<EPackageMatcher> querySpecification() throws ViatraQueryException {
- return EPackageQuerySpecification.instance();
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/HeadlessQueries.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/HeadlessQueries.java
deleted file mode 100644
index 764693146..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/HeadlessQueries.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import org.eclipse.viatra.query.application.queries.ClassesInPackageHierarchyMatcher;
-import org.eclipse.viatra.query.application.queries.ClassesInPackageMatcher;
-import org.eclipse.viatra.query.application.queries.EClassMatcher;
-import org.eclipse.viatra.query.application.queries.EClassNamesKeywordMatcher;
-import org.eclipse.viatra.query.application.queries.EClassNamesMatcher;
-import org.eclipse.viatra.query.application.queries.EObjectMatcher;
-import org.eclipse.viatra.query.application.queries.EPackageMatcher;
-import org.eclipse.viatra.query.application.queries.SubPackageMatcher;
-import org.eclipse.viatra.query.application.queries.util.ClassesInPackageHierarchyQuerySpecification;
-import org.eclipse.viatra.query.application.queries.util.ClassesInPackageQuerySpecification;
-import org.eclipse.viatra.query.application.queries.util.EClassNamesKeywordQuerySpecification;
-import org.eclipse.viatra.query.application.queries.util.EClassNamesQuerySpecification;
-import org.eclipse.viatra.query.application.queries.util.EClassQuerySpecification;
-import org.eclipse.viatra.query.application.queries.util.EObjectQuerySpecification;
-import org.eclipse.viatra.query.application.queries.util.EPackageQuerySpecification;
-import org.eclipse.viatra.query.application.queries.util.SubPackageQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-
-/**
- * A pattern group formed of all patterns defined in headlessQueries.vql.
- *
- * <p>Use the static instance as any {@link org.eclipse.viatra.query.runtime.api.IPatternGroup}, to conveniently prepare
- * a VIATRA Query engine for matching all patterns originally defined in file headlessQueries.vql,
- * in order to achieve better performance than one-by-one on-demand matcher initialization.
- *
- * <p> From package org.eclipse.viatra.query.application.queries, the group contains the definition of the following patterns: <ul>
- * <li>eClassNames</li>
- * <li>eClassNamesKeyword</li>
- * <li>eObject</li>
- * <li>classesInPackage</li>
- * <li>subPackage</li>
- * <li>classesInPackageHierarchy</li>
- * <li>ePackage</li>
- * <li>eClass</li>
- * </ul>
- *
- * @see IPatternGroup
- *
- */
-@SuppressWarnings("all")
-public final class HeadlessQueries extends BaseGeneratedPatternGroup {
- /**
- * Access the pattern group.
- *
- * @return the singleton instance of the group
- * @throws ViatraQueryException if there was an error loading the generated code of pattern specifications
- *
- */
- public static HeadlessQueries instance() throws ViatraQueryException {
- if (INSTANCE == null) {
- INSTANCE = new HeadlessQueries();
- }
- return INSTANCE;
- }
-
- private static HeadlessQueries INSTANCE;
-
- private HeadlessQueries() throws ViatraQueryException {
- querySpecifications.add(EClassNamesQuerySpecification.instance());
- querySpecifications.add(EClassNamesKeywordQuerySpecification.instance());
- querySpecifications.add(EObjectQuerySpecification.instance());
- querySpecifications.add(ClassesInPackageQuerySpecification.instance());
- querySpecifications.add(SubPackageQuerySpecification.instance());
- querySpecifications.add(ClassesInPackageHierarchyQuerySpecification.instance());
- querySpecifications.add(EPackageQuerySpecification.instance());
- querySpecifications.add(EClassQuerySpecification.instance());
- }
-
- public EClassNamesQuerySpecification getEClassNames() throws ViatraQueryException {
- return EClassNamesQuerySpecification.instance();
- }
-
- public EClassNamesMatcher getEClassNames(final ViatraQueryEngine engine) throws ViatraQueryException {
- return EClassNamesMatcher.on(engine);
- }
-
- public EClassNamesKeywordQuerySpecification getEClassNamesKeyword() throws ViatraQueryException {
- return EClassNamesKeywordQuerySpecification.instance();
- }
-
- public EClassNamesKeywordMatcher getEClassNamesKeyword(final ViatraQueryEngine engine) throws ViatraQueryException {
- return EClassNamesKeywordMatcher.on(engine);
- }
-
- public EObjectQuerySpecification getEObject() throws ViatraQueryException {
- return EObjectQuerySpecification.instance();
- }
-
- public EObjectMatcher getEObject(final ViatraQueryEngine engine) throws ViatraQueryException {
- return EObjectMatcher.on(engine);
- }
-
- public ClassesInPackageQuerySpecification getClassesInPackage() throws ViatraQueryException {
- return ClassesInPackageQuerySpecification.instance();
- }
-
- public ClassesInPackageMatcher getClassesInPackage(final ViatraQueryEngine engine) throws ViatraQueryException {
- return ClassesInPackageMatcher.on(engine);
- }
-
- public SubPackageQuerySpecification getSubPackage() throws ViatraQueryException {
- return SubPackageQuerySpecification.instance();
- }
-
- public SubPackageMatcher getSubPackage(final ViatraQueryEngine engine) throws ViatraQueryException {
- return SubPackageMatcher.on(engine);
- }
-
- public ClassesInPackageHierarchyQuerySpecification getClassesInPackageHierarchy() throws ViatraQueryException {
- return ClassesInPackageHierarchyQuerySpecification.instance();
- }
-
- public ClassesInPackageHierarchyMatcher getClassesInPackageHierarchy(final ViatraQueryEngine engine) throws ViatraQueryException {
- return ClassesInPackageHierarchyMatcher.on(engine);
- }
-
- public EPackageQuerySpecification getEPackage() throws ViatraQueryException {
- return EPackageQuerySpecification.instance();
- }
-
- public EPackageMatcher getEPackage(final ViatraQueryEngine engine) throws ViatraQueryException {
- return EPackageMatcher.on(engine);
- }
-
- public EClassQuerySpecification getEClass() throws ViatraQueryException {
- return EClassQuerySpecification.instance();
- }
-
- public EClassMatcher getEClass(final ViatraQueryEngine engine) throws ViatraQueryException {
- return EClassMatcher.on(engine);
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/SubPackageMatch.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/SubPackageMatch.java
deleted file mode 100644
index 353948182..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/SubPackageMatch.java
+++ /dev/null
@@ -1,207 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.viatra.query.application.queries.util.SubPackageQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.application.queries.subPackage pattern,
- * to be used in conjunction with {@link SubPackageMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see SubPackageMatcher
- * @see SubPackageProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class SubPackageMatch extends BasePatternMatch {
- private EPackage fP;
-
- private EPackage fSp;
-
- private static List<String> parameterNames = makeImmutableList("p", "sp");
-
- private SubPackageMatch(final EPackage pP, final EPackage pSp) {
- this.fP = pP;
- this.fSp = pSp;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("p".equals(parameterName)) return this.fP;
- if ("sp".equals(parameterName)) return this.fSp;
- return null;
- }
-
- public EPackage getP() {
- return this.fP;
- }
-
- public EPackage getSp() {
- return this.fSp;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("p".equals(parameterName) ) {
- this.fP = (EPackage) newValue;
- return true;
- }
- if ("sp".equals(parameterName) ) {
- this.fSp = (EPackage) newValue;
- return true;
- }
- return false;
- }
-
- public void setP(final EPackage pP) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fP = pP;
- }
-
- public void setSp(final EPackage pSp) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fSp = pSp;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.application.queries.subPackage";
- }
-
- @Override
- public List<String> parameterNames() {
- return SubPackageMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fP, fSp};
- }
-
- @Override
- public SubPackageMatch toImmutable() {
- return isMutable() ? newMatch(fP, fSp) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"p\"=" + prettyPrintValue(fP) + ", ");
-
- result.append("\"sp\"=" + prettyPrintValue(fSp)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fP == null) ? 0 : fP.hashCode());
- result = prime * result + ((fSp == null) ? 0 : fSp.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof SubPackageMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- SubPackageMatch other = (SubPackageMatch) obj;
- if (fP == null) {if (other.fP != null) return false;}
- else if (!fP.equals(other.fP)) return false;
- if (fSp == null) {if (other.fSp != null) return false;}
- else if (!fSp.equals(other.fSp)) return false;
- return true;
- }
-
- @Override
- public SubPackageQuerySpecification specification() {
- try {
- return SubPackageQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static SubPackageMatch newEmptyMatch() {
- return new Mutable(null, null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static SubPackageMatch newMutableMatch(final EPackage pP, final EPackage pSp) {
- return new Mutable(pP, pSp);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static SubPackageMatch newMatch(final EPackage pP, final EPackage pSp) {
- return new Immutable(pP, pSp);
- }
-
- private static final class Mutable extends SubPackageMatch {
- Mutable(final EPackage pP, final EPackage pSp) {
- super(pP, pSp);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends SubPackageMatch {
- Immutable(final EPackage pP, final EPackage pSp) {
- super(pP, pSp);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/SubPackageMatcher.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/SubPackageMatcher.java
deleted file mode 100644
index 92aa03baf..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/SubPackageMatcher.java
+++ /dev/null
@@ -1,299 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.viatra.query.application.queries.SubPackageMatch;
-import org.eclipse.viatra.query.application.queries.util.SubPackageQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.application.queries.subPackage pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link SubPackageMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * {@literal @}Edge(source = p, target = sp, label = "sub")
- * pattern subPackage(p: EPackage, sp: EPackage){ EPackage.eSubpackages(p,sp); }
- * </pre></code>
- *
- * @see SubPackageMatch
- * @see SubPackageProcessor
- * @see SubPackageQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class SubPackageMatcher extends BaseMatcher<SubPackageMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static SubPackageMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- SubPackageMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new SubPackageMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_P = 0;
-
- private final static int POSITION_SP = 1;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(SubPackageMatcher.class);
-
- /**
- * Initializes the pattern matcher over a given EMF model root (recommended: Resource or ResourceSet).
- * If a pattern matcher is already constructed with the same root, only a light-weight reference is returned.
- * The scope of pattern matching will be the given EMF model root and below (see FAQ for more precise definition).
- * The match set will be incrementally refreshed upon updates from this scope.
- * <p>The matcher will be created within the managed {@link ViatraQueryEngine} belonging to the EMF model root, so
- * multiple matchers will reuse the same engine and benefit from increased performance and reduced memory footprint.
- * @param emfRoot the root of the EMF containment hierarchy where the pattern matcher will operate. Recommended: Resource or ResourceSet.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead, e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}
- *
- */
- @Deprecated
- public SubPackageMatcher(final Notifier emfRoot) throws ViatraQueryException {
- this(ViatraQueryEngine.on(emfRoot));
- }
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- * @deprecated use {@link #on(ViatraQueryEngine)} instead
- *
- */
- @Deprecated
- public SubPackageMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @return matches represented as a SubPackageMatch object.
- *
- */
- public Collection<SubPackageMatch> getAllMatches(final EPackage pP, final EPackage pSp) {
- return rawGetAllMatches(new Object[]{pP, pSp});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @return a match represented as a SubPackageMatch object, or null if no match is found.
- *
- */
- public SubPackageMatch getOneArbitraryMatch(final EPackage pP, final EPackage pSp) {
- return rawGetOneArbitraryMatch(new Object[]{pP, pSp});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final EPackage pP, final EPackage pSp) {
- return rawHasMatch(new Object[]{pP, pSp});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final EPackage pP, final EPackage pSp) {
- return rawCountMatches(new Object[]{pP, pSp});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final EPackage pP, final EPackage pSp, final IMatchProcessor<? super SubPackageMatch> processor) {
- rawForEachMatch(new Object[]{pP, pSp}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final EPackage pP, final EPackage pSp, final IMatchProcessor<? super SubPackageMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pP, pSp}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pP the fixed value of pattern parameter p, or null if not bound.
- * @param pSp the fixed value of pattern parameter sp, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public SubPackageMatch newMatch(final EPackage pP, final EPackage pSp) {
- return SubPackageMatch.newMatch(pP, pSp);
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EPackage> rawAccumulateAllValuesOfp(final Object[] parameters) {
- Set<EPackage> results = new HashSet<EPackage>();
- rawAccumulateAllValues(POSITION_P, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp() {
- return rawAccumulateAllValuesOfp(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp(final SubPackageMatch partialMatch) {
- return rawAccumulateAllValuesOfp(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for p.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfp(final EPackage pSp) {
- return rawAccumulateAllValuesOfp(new Object[]{
- null,
- pSp
- });
- }
-
- /**
- * Retrieve the set of values that occur in matches for sp.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<EPackage> rawAccumulateAllValuesOfsp(final Object[] parameters) {
- Set<EPackage> results = new HashSet<EPackage>();
- rawAccumulateAllValues(POSITION_SP, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for sp.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfsp() {
- return rawAccumulateAllValuesOfsp(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for sp.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfsp(final SubPackageMatch partialMatch) {
- return rawAccumulateAllValuesOfsp(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for sp.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<EPackage> getAllValuesOfsp(final EPackage pP) {
- return rawAccumulateAllValuesOfsp(new Object[]{
- pP,
- null
- });
- }
-
- @Override
- protected SubPackageMatch tupleToMatch(final Tuple t) {
- try {
- return SubPackageMatch.newMatch((EPackage) t.get(POSITION_P), (EPackage) t.get(POSITION_SP));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected SubPackageMatch arrayToMatch(final Object[] match) {
- try {
- return SubPackageMatch.newMatch((EPackage) match[POSITION_P], (EPackage) match[POSITION_SP]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected SubPackageMatch arrayToMatchMutable(final Object[] match) {
- try {
- return SubPackageMatch.newMutableMatch((EPackage) match[POSITION_P], (EPackage) match[POSITION_SP]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<SubPackageMatcher> querySpecification() throws ViatraQueryException {
- return SubPackageQuerySpecification.instance();
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/.gitignore b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/.gitignore
deleted file mode 100644
index b21d549bb..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/.gitignore
+++ /dev/null
@@ -1,16 +0,0 @@
-/.ClassesInPackageHierarchyProcessor.java._trace
-/.ClassesInPackageHierarchyQuerySpecification.java._trace
-/.ClassesInPackageProcessor.java._trace
-/.ClassesInPackageQuerySpecification.java._trace
-/.EClassNamesKeywordProcessor.java._trace
-/.EClassNamesKeywordQuerySpecification.java._trace
-/.EClassNamesProcessor.java._trace
-/.EClassNamesQuerySpecification.java._trace
-/.EClassProcessor.java._trace
-/.EClassQuerySpecification.java._trace
-/.EObjectProcessor.java._trace
-/.EObjectQuerySpecification.java._trace
-/.EPackageProcessor.java._trace
-/.EPackageQuerySpecification.java._trace
-/.SubPackageProcessor.java._trace
-/.SubPackageQuerySpecification.java._trace
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageHierarchyProcessor.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageHierarchyProcessor.java
deleted file mode 100644
index 851e211ea..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageHierarchyProcessor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.viatra.query.application.queries.ClassesInPackageHierarchyMatch;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.application.queries.classesInPackageHierarchy pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class ClassesInPackageHierarchyProcessor implements IMatchProcessor<ClassesInPackageHierarchyMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pRootP the value of pattern parameter rootP in the currently processed match
- * @param pContainedClass the value of pattern parameter containedClass in the currently processed match
- *
- */
- public abstract void process(final EPackage pRootP, final EClass pContainedClass);
-
- @Override
- public void process(final ClassesInPackageHierarchyMatch match) {
- process(match.getRootP(), match.getContainedClass());
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageHierarchyQuerySpecification.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageHierarchyQuerySpecification.java
deleted file mode 100644
index f4e3ee864..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageHierarchyQuerySpecification.java
+++ /dev/null
@@ -1,169 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.ClassesInPackageHierarchyMatch;
-import org.eclipse.viatra.query.application.queries.ClassesInPackageHierarchyMatcher;
-import org.eclipse.viatra.query.application.queries.util.ClassesInPackageQuerySpecification;
-import org.eclipse.viatra.query.application.queries.util.SubPackageQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
-import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.BinaryTransitiveClosure;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-
-/**
- * A pattern-specific query specification that can instantiate ClassesInPackageHierarchyMatcher in a type-safe way.
- *
- * @see ClassesInPackageHierarchyMatcher
- * @see ClassesInPackageHierarchyMatch
- *
- */
-@SuppressWarnings("all")
-public final class ClassesInPackageHierarchyQuerySpecification extends BaseGeneratedEMFQuerySpecification<ClassesInPackageHierarchyMatcher> {
- private ClassesInPackageHierarchyQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static ClassesInPackageHierarchyQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected ClassesInPackageHierarchyMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return ClassesInPackageHierarchyMatcher.on(engine);
- }
-
- @Override
- public ClassesInPackageHierarchyMatch newEmptyMatch() {
- return ClassesInPackageHierarchyMatch.newEmptyMatch();
- }
-
- @Override
- public ClassesInPackageHierarchyMatch newMatch(final Object... parameters) {
- return ClassesInPackageHierarchyMatch.newMatch((org.eclipse.emf.ecore.EPackage) parameters[0], (org.eclipse.emf.ecore.EClass) parameters[1]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link ClassesInPackageHierarchyQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link ClassesInPackageHierarchyQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static ClassesInPackageHierarchyQuerySpecification INSTANCE = new ClassesInPackageHierarchyQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static ClassesInPackageHierarchyQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.application.queries.classesInPackageHierarchy";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("rootP","containedClass");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("rootP", "org.eclipse.emf.ecore.EPackage"),new PParameter("containedClass", "org.eclipse.emf.ecore.EClass"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_rootP = body.getOrCreateVariableByName("rootP");
- PVariable var_containedClass = body.getOrCreateVariableByName("containedClass");
- new TypeConstraint(body, new FlatTuple(var_rootP), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
- new TypeConstraint(body, new FlatTuple(var_containedClass), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_rootP, "rootP"),
- new ExportedParameter(body, var_containedClass, "containedClass")
- ));
- // find classesInPackage(rootP,containedClass)
- new PositivePatternCall(body, new FlatTuple(var_rootP, var_containedClass), ClassesInPackageQuerySpecification.instance().getInternalQueryRepresentation());
- bodies.add(body);
- }
- {
- PBody body = new PBody(this);
- PVariable var_rootP = body.getOrCreateVariableByName("rootP");
- PVariable var_containedClass = body.getOrCreateVariableByName("containedClass");
- PVariable var_somePackage = body.getOrCreateVariableByName("somePackage");
- new TypeConstraint(body, new FlatTuple(var_rootP), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
- new TypeConstraint(body, new FlatTuple(var_containedClass), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_rootP, "rootP"),
- new ExportedParameter(body, var_containedClass, "containedClass")
- ));
- // find subPackage+(rootP,somePackage)
- new BinaryTransitiveClosure(body, new FlatTuple(var_rootP, var_somePackage), SubPackageQuerySpecification.instance().getInternalQueryRepresentation());
- // find classesInPackage(somePackage,containedClass)
- new PositivePatternCall(body, new FlatTuple(var_somePackage, var_containedClass), ClassesInPackageQuerySpecification.instance().getInternalQueryRepresentation());
- bodies.add(body);
- }
- {
- PAnnotation annotation = new PAnnotation("Edge");
- annotation.addAttribute("source", new ParameterReference("rootP"));
- annotation.addAttribute("label", "classIn+");
- annotation.addAttribute("target", new ParameterReference("containedClass"));
- addAnnotation(annotation);
- }
- {
- PAnnotation annotation = new PAnnotation("Format");
- annotation.addAttribute("color", "#0033ff");
- addAnnotation(annotation);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageProcessor.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageProcessor.java
deleted file mode 100644
index b91cb6db3..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageProcessor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.viatra.query.application.queries.ClassesInPackageMatch;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.application.queries.classesInPackage pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class ClassesInPackageProcessor implements IMatchProcessor<ClassesInPackageMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pP the value of pattern parameter p in the currently processed match
- * @param pEc the value of pattern parameter ec in the currently processed match
- *
- */
- public abstract void process(final EPackage pP, final EClass pEc);
-
- @Override
- public void process(final ClassesInPackageMatch match) {
- process(match.getP(), match.getEc());
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageQuerySpecification.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageQuerySpecification.java
deleted file mode 100644
index 86fa4cbb2..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/ClassesInPackageQuerySpecification.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.ClassesInPackageMatch;
-import org.eclipse.viatra.query.application.queries.ClassesInPackageMatcher;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
-import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-
-/**
- * A pattern-specific query specification that can instantiate ClassesInPackageMatcher in a type-safe way.
- *
- * @see ClassesInPackageMatcher
- * @see ClassesInPackageMatch
- *
- */
-@SuppressWarnings("all")
-public final class ClassesInPackageQuerySpecification extends BaseGeneratedEMFQuerySpecification<ClassesInPackageMatcher> {
- private ClassesInPackageQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static ClassesInPackageQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected ClassesInPackageMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return ClassesInPackageMatcher.on(engine);
- }
-
- @Override
- public ClassesInPackageMatch newEmptyMatch() {
- return ClassesInPackageMatch.newEmptyMatch();
- }
-
- @Override
- public ClassesInPackageMatch newMatch(final Object... parameters) {
- return ClassesInPackageMatch.newMatch((org.eclipse.emf.ecore.EPackage) parameters[0], (org.eclipse.emf.ecore.EClass) parameters[1]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link ClassesInPackageQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link ClassesInPackageQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static ClassesInPackageQuerySpecification INSTANCE = new ClassesInPackageQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static ClassesInPackageQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.application.queries.classesInPackage";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("p","ec");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("p", "org.eclipse.emf.ecore.EPackage"),new PParameter("ec", "org.eclipse.emf.ecore.EClass"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_p = body.getOrCreateVariableByName("p");
- PVariable var_ec = body.getOrCreateVariableByName("ec");
- new TypeConstraint(body, new FlatTuple(var_p), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
- new TypeConstraint(body, new FlatTuple(var_ec), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_p, "p"),
- new ExportedParameter(body, var_ec, "ec")
- ));
- // EPackage.eClassifiers(p,ec)
- new TypeConstraint(body, new FlatTuple(var_p), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
- PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
- new TypeConstraint(body, new FlatTuple(var_p, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage", "eClassifiers")));
- new Equality(body, var__virtual_0_, var_ec);
- bodies.add(body);
- }
- {
- PAnnotation annotation = new PAnnotation("Edge");
- annotation.addAttribute("source", new ParameterReference("p"));
- annotation.addAttribute("label", "classIn");
- annotation.addAttribute("target", new ParameterReference("ec"));
- addAnnotation(annotation);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesKeywordProcessor.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesKeywordProcessor.java
deleted file mode 100644
index 37be5d209..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesKeywordProcessor.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.EClassNamesKeywordMatch;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.application.queries.eClassNamesKeyword pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class EClassNamesKeywordProcessor implements IMatchProcessor<EClassNamesKeywordMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pC the value of pattern parameter c in the currently processed match
- * @param pN the value of pattern parameter n in the currently processed match
- *
- */
- public abstract void process(final EClass pC, final String pN);
-
- @Override
- public void process(final EClassNamesKeywordMatch match) {
- process(match.getC(), match.getN());
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesKeywordQuerySpecification.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesKeywordQuerySpecification.java
deleted file mode 100644
index 2f771e1bd..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesKeywordQuerySpecification.java
+++ /dev/null
@@ -1,170 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.viatra.query.application.queries.EClassNamesKeywordMatch;
-import org.eclipse.viatra.query.application.queries.EClassNamesKeywordMatcher;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
-import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.IExpressionEvaluator;
-import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-
-/**
- * A pattern-specific query specification that can instantiate EClassNamesKeywordMatcher in a type-safe way.
- *
- * @see EClassNamesKeywordMatcher
- * @see EClassNamesKeywordMatch
- *
- */
-@SuppressWarnings("all")
-public final class EClassNamesKeywordQuerySpecification extends BaseGeneratedEMFQuerySpecification<EClassNamesKeywordMatcher> {
- private EClassNamesKeywordQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static EClassNamesKeywordQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected EClassNamesKeywordMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return EClassNamesKeywordMatcher.on(engine);
- }
-
- @Override
- public EClassNamesKeywordMatch newEmptyMatch() {
- return EClassNamesKeywordMatch.newEmptyMatch();
- }
-
- @Override
- public EClassNamesKeywordMatch newMatch(final Object... parameters) {
- return EClassNamesKeywordMatch.newMatch((org.eclipse.emf.ecore.EClass) parameters[0], (java.lang.String) parameters[1]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link EClassNamesKeywordQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link EClassNamesKeywordQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static EClassNamesKeywordQuerySpecification INSTANCE = new EClassNamesKeywordQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static EClassNamesKeywordQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.application.queries.eClassNamesKeyword";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("c","n");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("c", "org.eclipse.emf.ecore.EClass"),new PParameter("n", "java.lang.String"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_c = body.getOrCreateVariableByName("c");
- PVariable var_n = body.getOrCreateVariableByName("n");
- new TypeConstraint(body, new FlatTuple(var_c), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
- new TypeConstraint(body, new FlatTuple(var_n), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EString")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_c, "c"),
- new ExportedParameter(body, var_n, "n")
- ));
- // EClass.name(c,n)
- new TypeConstraint(body, new FlatTuple(var_c), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
- PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
- new TypeConstraint(body, new FlatTuple(var_c, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "ENamedElement", "name")));
- new Equality(body, var__virtual_0_, var_n);
- // check("A" == n)
- new ExpressionEvaluation(body, new IExpressionEvaluator() {
-
- @Override
- public String getShortDescription() {
- return "Expression evaluation from pattern eClassNamesKeyword";
- }
-
- @Override
- public Iterable<String> getInputParameterNames() {
- return Arrays.asList("n");
- }
-
- @Override
- public Object evaluateExpression(IValueProvider provider) throws Exception {
- java.lang.String n = (java.lang.String) provider.getValue("n");
- return evaluateExpression_1_1(n);
- }
-
- }, null);
- bodies.add(body);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-
- private static boolean evaluateExpression_1_1(final String n) {
- boolean _equals = Objects.equal("A", n);
- return _equals;
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesProcessor.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesProcessor.java
deleted file mode 100644
index 9077c036d..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesProcessor.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.EClassNamesMatch;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.application.queries.eClassNames pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class EClassNamesProcessor implements IMatchProcessor<EClassNamesMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pC the value of pattern parameter c in the currently processed match
- * @param pN the value of pattern parameter n in the currently processed match
- *
- */
- public abstract void process(final EClass pC, final String pN);
-
- @Override
- public void process(final EClassNamesMatch match) {
- process(match.getC(), match.getN());
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesQuerySpecification.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesQuerySpecification.java
deleted file mode 100644
index 8bf21bfb0..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassNamesQuerySpecification.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.viatra.query.application.queries.EClassNamesMatch;
-import org.eclipse.viatra.query.application.queries.EClassNamesMatcher;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
-import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-
-/**
- * A pattern-specific query specification that can instantiate EClassNamesMatcher in a type-safe way.
- *
- * @see EClassNamesMatcher
- * @see EClassNamesMatch
- *
- */
-@SuppressWarnings("all")
-public final class EClassNamesQuerySpecification extends BaseGeneratedEMFQuerySpecification<EClassNamesMatcher> {
- private EClassNamesQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static EClassNamesQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected EClassNamesMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return EClassNamesMatcher.on(engine);
- }
-
- @Override
- public EClassNamesMatch newEmptyMatch() {
- return EClassNamesMatch.newEmptyMatch();
- }
-
- @Override
- public EClassNamesMatch newMatch(final Object... parameters) {
- return EClassNamesMatch.newMatch((org.eclipse.emf.ecore.EClass) parameters[0], (java.lang.String) parameters[1]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link EClassNamesQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link EClassNamesQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static EClassNamesQuerySpecification INSTANCE = new EClassNamesQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static EClassNamesQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.application.queries.eClassNames";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("c","n");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("c", "org.eclipse.emf.ecore.EClass"),new PParameter("n", "java.lang.String"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_c = body.getOrCreateVariableByName("c");
- PVariable var_n = body.getOrCreateVariableByName("n");
- new TypeConstraint(body, new FlatTuple(var_c), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
- new TypeConstraint(body, new FlatTuple(var_n), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EString")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_c, "c"),
- new ExportedParameter(body, var_n, "n")
- ));
- // EClass.name(c,n)
- new TypeConstraint(body, new FlatTuple(var_c), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
- PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
- new TypeConstraint(body, new FlatTuple(var_c, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "ENamedElement", "name")));
- new Equality(body, var__virtual_0_, var_n);
- bodies.add(body);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassProcessor.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassProcessor.java
deleted file mode 100644
index 99b2ba2af..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassProcessor.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.EClassMatch;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.application.queries.eClass pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class EClassProcessor implements IMatchProcessor<EClassMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pEc the value of pattern parameter ec in the currently processed match
- *
- */
- public abstract void process(final EClass pEc);
-
- @Override
- public void process(final EClassMatch match) {
- process(match.getEc());
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassQuerySpecification.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassQuerySpecification.java
deleted file mode 100644
index 45256890a..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EClassQuerySpecification.java
+++ /dev/null
@@ -1,144 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.EClassMatch;
-import org.eclipse.viatra.query.application.queries.EClassMatcher;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
-import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-
-/**
- * A pattern-specific query specification that can instantiate EClassMatcher in a type-safe way.
- *
- * @see EClassMatcher
- * @see EClassMatch
- *
- */
-@SuppressWarnings("all")
-public final class EClassQuerySpecification extends BaseGeneratedEMFQuerySpecification<EClassMatcher> {
- private EClassQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static EClassQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected EClassMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return EClassMatcher.on(engine);
- }
-
- @Override
- public EClassMatch newEmptyMatch() {
- return EClassMatch.newEmptyMatch();
- }
-
- @Override
- public EClassMatch newMatch(final Object... parameters) {
- return EClassMatch.newMatch((org.eclipse.emf.ecore.EClass) parameters[0]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link EClassQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link EClassQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static EClassQuerySpecification INSTANCE = new EClassQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static EClassQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.application.queries.eClass";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("ec");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("ec", "org.eclipse.emf.ecore.EClass"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_ec = body.getOrCreateVariableByName("ec");
- new TypeConstraint(body, new FlatTuple(var_ec), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_ec, "ec")
- ));
- // EClass(ec)
- new TypeConstraint(body, new FlatTuple(var_ec), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EClass")));
- bodies.add(body);
- }
- {
- PAnnotation annotation = new PAnnotation("Item");
- annotation.addAttribute("item", new ParameterReference("ec"));
- annotation.addAttribute("label", "EC: $ec.name$");
- addAnnotation(annotation);
- }
- {
- PAnnotation annotation = new PAnnotation("Format");
- annotation.addAttribute("color", "#e8da2c");
- addAnnotation(annotation);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EObjectProcessor.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EObjectProcessor.java
deleted file mode 100644
index 37bbebe9d..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EObjectProcessor.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.viatra.query.application.queries.EObjectMatch;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.application.queries.eObject pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class EObjectProcessor implements IMatchProcessor<EObjectMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pO the value of pattern parameter o in the currently processed match
- *
- */
- public abstract void process(final EObject pO);
-
- @Override
- public void process(final EObjectMatch match) {
- process(match.getO());
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EObjectQuerySpecification.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EObjectQuerySpecification.java
deleted file mode 100644
index a648eb2de..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EObjectQuerySpecification.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.EObjectMatch;
-import org.eclipse.viatra.query.application.queries.EObjectMatcher;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-
-/**
- * A pattern-specific query specification that can instantiate EObjectMatcher in a type-safe way.
- *
- * @see EObjectMatcher
- * @see EObjectMatch
- *
- */
-@SuppressWarnings("all")
-public final class EObjectQuerySpecification extends BaseGeneratedEMFQuerySpecification<EObjectMatcher> {
- private EObjectQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static EObjectQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected EObjectMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return EObjectMatcher.on(engine);
- }
-
- @Override
- public EObjectMatch newEmptyMatch() {
- return EObjectMatch.newEmptyMatch();
- }
-
- @Override
- public EObjectMatch newMatch(final Object... parameters) {
- return EObjectMatch.newMatch((org.eclipse.emf.ecore.EObject) parameters[0]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link EObjectQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link EObjectQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static EObjectQuerySpecification INSTANCE = new EObjectQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static EObjectQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.application.queries.eObject";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("o");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("o", "org.eclipse.emf.ecore.EObject"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_o = body.getOrCreateVariableByName("o");
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_o, "o")
- ));
- // EObject(o)
- new TypeConstraint(body, new FlatTuple(var_o), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EObject")));
- bodies.add(body);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EPackageProcessor.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EPackageProcessor.java
deleted file mode 100644
index 835e4f5ed..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EPackageProcessor.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.viatra.query.application.queries.EPackageMatch;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.application.queries.ePackage pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class EPackageProcessor implements IMatchProcessor<EPackageMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pP the value of pattern parameter p in the currently processed match
- *
- */
- public abstract void process(final EPackage pP);
-
- @Override
- public void process(final EPackageMatch match) {
- process(match.getP());
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EPackageQuerySpecification.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EPackageQuerySpecification.java
deleted file mode 100644
index 81d29e7be..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/EPackageQuerySpecification.java
+++ /dev/null
@@ -1,145 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.EPackageMatch;
-import org.eclipse.viatra.query.application.queries.EPackageMatcher;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
-import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-
-/**
- * A pattern-specific query specification that can instantiate EPackageMatcher in a type-safe way.
- *
- * @see EPackageMatcher
- * @see EPackageMatch
- *
- */
-@SuppressWarnings("all")
-public final class EPackageQuerySpecification extends BaseGeneratedEMFQuerySpecification<EPackageMatcher> {
- private EPackageQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static EPackageQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected EPackageMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return EPackageMatcher.on(engine);
- }
-
- @Override
- public EPackageMatch newEmptyMatch() {
- return EPackageMatch.newEmptyMatch();
- }
-
- @Override
- public EPackageMatch newMatch(final Object... parameters) {
- return EPackageMatch.newMatch((org.eclipse.emf.ecore.EPackage) parameters[0]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link EPackageQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link EPackageQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static EPackageQuerySpecification INSTANCE = new EPackageQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static EPackageQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.application.queries.ePackage";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("p");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("p", "org.eclipse.emf.ecore.EPackage"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_p = body.getOrCreateVariableByName("p");
- new TypeConstraint(body, new FlatTuple(var_p), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_p, "p")
- ));
- // EPackage(p)
- new TypeConstraint(body, new FlatTuple(var_p), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
- bodies.add(body);
- }
- {
- PAnnotation annotation = new PAnnotation("Item");
- annotation.addAttribute("item", new ParameterReference("p"));
- annotation.addAttribute("label", "P: $p.name$");
- addAnnotation(annotation);
- }
- {
- PAnnotation annotation = new PAnnotation("Format");
- annotation.addAttribute("color", "#791662");
- annotation.addAttribute("textColor", "#ffffff");
- addAnnotation(annotation);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/SubPackageProcessor.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/SubPackageProcessor.java
deleted file mode 100644
index 8460e272f..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/SubPackageProcessor.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.viatra.query.application.queries.SubPackageMatch;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.application.queries.subPackage pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class SubPackageProcessor implements IMatchProcessor<SubPackageMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pP the value of pattern parameter p in the currently processed match
- * @param pSp the value of pattern parameter sp in the currently processed match
- *
- */
- public abstract void process(final EPackage pP, final EPackage pSp);
-
- @Override
- public void process(final SubPackageMatch match) {
- process(match.getP(), match.getSp());
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/SubPackageQuerySpecification.java b/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/SubPackageQuerySpecification.java
deleted file mode 100644
index 00592a434..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src-gen/org/eclipse/viatra/query/application/queries/util/SubPackageQuerySpecification.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package org.eclipse.viatra.query.application.queries.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.application.queries.SubPackageMatch;
-import org.eclipse.viatra.query.application.queries.SubPackageMatcher;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
-import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-
-/**
- * A pattern-specific query specification that can instantiate SubPackageMatcher in a type-safe way.
- *
- * @see SubPackageMatcher
- * @see SubPackageMatch
- *
- */
-@SuppressWarnings("all")
-public final class SubPackageQuerySpecification extends BaseGeneratedEMFQuerySpecification<SubPackageMatcher> {
- private SubPackageQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static SubPackageQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected SubPackageMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return SubPackageMatcher.on(engine);
- }
-
- @Override
- public SubPackageMatch newEmptyMatch() {
- return SubPackageMatch.newEmptyMatch();
- }
-
- @Override
- public SubPackageMatch newMatch(final Object... parameters) {
- return SubPackageMatch.newMatch((org.eclipse.emf.ecore.EPackage) parameters[0], (org.eclipse.emf.ecore.EPackage) parameters[1]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link SubPackageQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link SubPackageQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static SubPackageQuerySpecification INSTANCE = new SubPackageQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static SubPackageQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.application.queries.subPackage";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("p","sp");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(new PParameter("p", "org.eclipse.emf.ecore.EPackage"),new PParameter("sp", "org.eclipse.emf.ecore.EPackage"));
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_p = body.getOrCreateVariableByName("p");
- PVariable var_sp = body.getOrCreateVariableByName("sp");
- new TypeConstraint(body, new FlatTuple(var_p), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
- new TypeConstraint(body, new FlatTuple(var_sp), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_p, "p"),
- new ExportedParameter(body, var_sp, "sp")
- ));
- // EPackage.eSubpackages(p,sp)
- new TypeConstraint(body, new FlatTuple(var_p), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage")));
- PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
- new TypeConstraint(body, new FlatTuple(var_p, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/emf/2002/Ecore", "EPackage", "eSubpackages")));
- new Equality(body, var__virtual_0_, var_sp);
- bodies.add(body);
- }
- {
- PAnnotation annotation = new PAnnotation("Edge");
- annotation.addAttribute("source", new ParameterReference("p"));
- annotation.addAttribute("label", "sub");
- annotation.addAttribute("target", new ParameterReference("sp"));
- addAnnotation(annotation);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src/org/eclipse/viatra/query/application/queries/headlessQueries.vql b/examples/headless/org.eclipse.viatra.query.application.queries/src/org/eclipse/viatra/query/application/queries/headlessQueries.vql
deleted file mode 100644
index 0c98e24a1..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src/org/eclipse/viatra/query/application/queries/headlessQueries.vql
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.eclipse.viatra.query.application.queries;
-
-import "http://www.eclipse.org/emf/2002/Ecore"
-
-pattern eClassNames(c: EClass, n : EString)= {
- EClass.name(c,n);
-}
-
-pattern eClassNamesKeyword(c: EClass, n: EString)
-{
- EClass.name(c,n);
- check("A" == n);
-}
-
-pattern eObject(o) {
- EObject(o);
-}
-
-@Edge(source = p, target = ec, label = "classIn")
-pattern classesInPackage(p : EPackage, ec: EClass) { EPackage.eClassifiers(p,ec); }
-
-@Edge(source = p, target = sp, label = "sub")
-pattern subPackage(p: EPackage, sp: EPackage){ EPackage.eSubpackages(p,sp); }
-
-@Edge(source = rootP, target = containedClass, label = "classIn+")
-@Format(color = "#0033ff")
-pattern classesInPackageHierarchy(rootP: EPackage, containedClass: EClass)
-{
- find classesInPackage(rootP,containedClass);
-} or {
- find subPackage+(rootP,somePackage);
- find classesInPackage(somePackage,containedClass);
-}
-
-@Item(item = p, label = "P: $p.name$")
-@Format(color = "#791662", textColor = "#ffffff")
-pattern ePackage(p : EPackage) { EPackage(p); }
-
-@Item(item = ec, label = "EC: $ec.name$")
-@Format(color = "#e8da2c")
-pattern eClass(ec : EClass) { EClass(ec); }
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/src/org/eclipse/viatra/query/application/queries/test.vql b/examples/headless/org.eclipse.viatra.query.application.queries/src/org/eclipse/viatra/query/application/queries/test.vql
deleted file mode 100644
index 2f0830d4c..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/src/org/eclipse/viatra/query/application/queries/test.vql
+++ /dev/null
@@ -1 +0,0 @@
-package org.eclipse.viatra.query.application.queries \ No newline at end of file
diff --git a/examples/headless/org.eclipse.viatra.query.application.queries/testmodels/Test.ecore b/examples/headless/org.eclipse.viatra.query.application.queries/testmodels/Test.ecore
deleted file mode 100644
index 78799ba3f..000000000
--- a/examples/headless/org.eclipse.viatra.query.application.queries/testmodels/Test.ecore
+++ /dev/null
@@ -1,14 +0,0 @@
-<?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="root" nsURI="http://test.info" nsPrefix="test">
- <eClassifiers xsi:type="ecore:EClass" name="A"/>
- <eSubpackages name="subpackage1" nsURI="http://test.info/sp1" nsPrefix="sp1">
- <eClassifiers xsi:type="ecore:EClass" name="B"/>
- <eSubpackages name="subsubpackage1" nsURI="http://test.info/sp1/ssp1" nsPrefix="ssp1">
- <eClassifiers xsi:type="ecore:EClass" name="D"/>
- </eSubpackages>
- </eSubpackages>
- <eSubpackages name="subpackage2" nsURI="http://test.info/sp2" nsPrefix="sp2">
- <eClassifiers xsi:type="ecore:EClass" name="C"/>
- </eSubpackages>
-</ecore:EPackage>
diff --git a/examples/headless/org.eclipse.viatra.query.application/.classpath b/examples/headless/org.eclipse.viatra.query.application/.classpath
deleted file mode 100644
index ad32c83a7..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/headless/org.eclipse.viatra.query.application/.project b/examples/headless/org.eclipse.viatra.query.application/.project
deleted file mode 100644
index 97ccc2209..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.query.application</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/headless/org.eclipse.viatra.query.application/.settings/org.eclipse.jdt.core.prefs b/examples/headless/org.eclipse.viatra.query.application/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c537b6306..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/examples/headless/org.eclipse.viatra.query.application/META-INF/MANIFEST.MF b/examples/headless/org.eclipse.viatra.query.application/META-INF/MANIFEST.MF
deleted file mode 100644
index 2c1df8291..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: VIATRA Headless Application
-Bundle-SymbolicName: org.eclipse.viatra.query.application;singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Bundle-ClassPath: .
-Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.viatra.query.application.queries;bundle-version="0.0.2",
- org.eclipse.viatra.addon.databinding.runtime;bundle-version="[1.2.0,1.3.0)",
- org.eclipse.core.databinding;bundle-version="1.4.0",
- org.eclipse.viatra.query.tooling.core;bundle-version="[1.2.0,1.3.0)",
- org.eclipse.viatra.query.patternlanguage.emf;bundle-version="[1.2.0,1.3.0)",
- org.eclipse.viatra.query.runtime;bundle-version="[1.2.0,1.3.0)",
- com.google.inject,
- org.eclipse.emf.ecore.xmi;bundle-version="2.11.1"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/examples/headless/org.eclipse.viatra.query.application/build.properties b/examples/headless/org.eclipse.viatra.query.application/build.properties
deleted file mode 100644
index ce082b113..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-1source.. = src/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
-source.. = src/
diff --git a/examples/headless/org.eclipse.viatra.query.application/incquery-generic.product b/examples/headless/org.eclipse.viatra.query.application/incquery-generic.product
deleted file mode 100644
index 2eabd86e4..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/incquery-generic.product
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="Example Headless VIATRA Query Application (Using Generic API)" uid="org.eclipse.viatra.query.application.generic" id="viatra.query.generic" application="org.eclipse.viatra.query.application.app.generic" version="1.2.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <programArgs>--launcher.XX:MaxPermSize=768m
---launcher.XX:+UseParallelGC
---launcher.XX:PermSize=256m
--consolelog
- </programArgs>
- <vmArgs>-Xms200m
--Xmx1584m
--Declipse.log.backup.max=100
--Declipse.log.size.max=0
- </vmArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
- </vmArgsMac>
- </launcherArgs>
-
- <launcher>
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.google.guava"/>
- <plugin id="com.google.inject"/>
- <plugin id="com.google.inject.multibindings" fragment="true"/>
- <plugin id="com.ibm.icu"/>
- <plugin id="javax.annotation"/>
- <plugin id="javax.inject"/>
- <plugin id="javax.xml"/>
- <plugin id="org.antlr.runtime"/>
- <plugin id="org.apache.batik.css"/>
- <plugin id="org.apache.batik.util"/>
- <plugin id="org.apache.batik.util.gui"/>
- <plugin id="org.apache.commons.jxpath"/>
- <plugin id="org.apache.commons.lang"/>
- <plugin id="org.apache.log4j"/>
- <plugin id="org.eclipse.ant.core"/>
- <plugin id="org.eclipse.compare"/>
- <plugin id="org.eclipse.compare.core"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.filebuffers"/>
- <plugin id="org.eclipse.core.filesystem"/>
- <plugin id="org.eclipse.core.filesystem.java7" fragment="true"/>
- <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.resources"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.core.variables"/>
- <plugin id="org.eclipse.debug.core"/>
- <plugin id="org.eclipse.debug.ui"/>
- <plugin id="org.eclipse.e4.core.commands"/>
- <plugin id="org.eclipse.e4.core.contexts"/>
- <plugin id="org.eclipse.e4.core.di"/>
- <plugin id="org.eclipse.e4.core.di.annotations"/>
- <plugin id="org.eclipse.e4.core.di.extensions"/>
- <plugin id="org.eclipse.e4.core.services"/>
- <plugin id="org.eclipse.e4.emf.xpath"/>
- <plugin id="org.eclipse.e4.ui.bindings"/>
- <plugin id="org.eclipse.e4.ui.css.core"/>
- <plugin id="org.eclipse.e4.ui.css.swt"/>
- <plugin id="org.eclipse.e4.ui.css.swt.theme"/>
- <plugin id="org.eclipse.e4.ui.di"/>
- <plugin id="org.eclipse.e4.ui.model.workbench"/>
- <plugin id="org.eclipse.e4.ui.services"/>
- <plugin id="org.eclipse.e4.ui.widgets"/>
- <plugin id="org.eclipse.e4.ui.workbench"/>
- <plugin id="org.eclipse.e4.ui.workbench.addons.swt"/>
- <plugin id="org.eclipse.e4.ui.workbench.renderers.swt"/>
- <plugin id="org.eclipse.e4.ui.workbench.renderers.swt.cocoa" fragment="true"/>
- <plugin id="org.eclipse.e4.ui.workbench.swt"/>
- <plugin id="org.eclipse.e4.ui.workbench3"/>
- <plugin id="org.eclipse.emf.codegen"/>
- <plugin id="org.eclipse.emf.codegen.ecore"/>
- <plugin id="org.eclipse.emf.common"/>
- <plugin id="org.eclipse.emf.common.ui"/>
- <plugin id="org.eclipse.emf.databinding"/>
- <plugin id="org.eclipse.emf.ecore"/>
- <plugin id="org.eclipse.emf.ecore.change"/>
- <plugin id="org.eclipse.emf.ecore.xmi"/>
- <plugin id="org.eclipse.emf.edit"/>
- <plugin id="org.eclipse.emf.edit.ui"/>
- <plugin id="org.eclipse.emf.transaction"/>
- <plugin id="org.eclipse.emf.validation"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.bidi"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.director.app"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.publisher.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.repository.tools"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.macosx" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.equinox.util"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jdt.compiler.apt" fragment="true"/>
- <plugin id="org.eclipse.jdt.compiler.tool" fragment="true"/>
- <plugin id="org.eclipse.jdt.core"/>
- <plugin id="org.eclipse.jdt.core.manipulation"/>
- <plugin id="org.eclipse.jdt.debug"/>
- <plugin id="org.eclipse.jdt.launching"/>
- <plugin id="org.eclipse.jdt.ui"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.jface.text"/>
- <plugin id="org.eclipse.ltk.core.refactoring"/>
- <plugin id="org.eclipse.ltk.ui.refactoring"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.compatibility.state" fragment="true"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.pde.build"/>
- <plugin id="org.eclipse.pde.core"/>
- <plugin id="org.eclipse.search"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
- <plugin id="org.eclipse.team.core"/>
- <plugin id="org.eclipse.team.ui"/>
- <plugin id="org.eclipse.text"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.cocoa" fragment="true"/>
- <plugin id="org.eclipse.ui.console"/>
- <plugin id="org.eclipse.ui.editors"/>
- <plugin id="org.eclipse.ui.forms"/>
- <plugin id="org.eclipse.ui.ide"/>
- <plugin id="org.eclipse.ui.navigator"/>
- <plugin id="org.eclipse.ui.navigator.resources"/>
- <plugin id="org.eclipse.ui.views"/>
- <plugin id="org.eclipse.ui.views.properties.tabbed"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.eclipse.ui.workbench.texteditor"/>
- <plugin id="org.eclipse.update.configurator"/>
- <plugin id="org.eclipse.viatra.addon.databinding.runtime"/>
- <plugin id="org.eclipse.viatra.query.application"/>
- <plugin id="org.eclipse.viatra.query.application.queries"/>
- <plugin id="org.eclipse.viatra.query.patternlanguage"/>
- <plugin id="org.eclipse.viatra.query.patternlanguage.emf"/>
- <plugin id="org.eclipse.viatra.query.runtime"/>
- <plugin id="org.eclipse.viatra.query.runtime.base"/>
- <plugin id="org.eclipse.viatra.query.runtime.base.itc"/>
- <plugin id="org.eclipse.viatra.query.runtime.matchers"/>
- <plugin id="org.eclipse.viatra.query.runtime.rete"/>
- <plugin id="org.eclipse.viatra.query.runtime.rete.recipes"/>
- <plugin id="org.eclipse.viatra.query.tooling.core"/>
- <plugin id="org.eclipse.viatra.query.tooling.generator.model"/>
- <plugin id="org.eclipse.viatra.transformation.evm"/>
- <plugin id="org.eclipse.xtend.lib"/>
- <plugin id="org.eclipse.xtend.lib.macro"/>
- <plugin id="org.eclipse.xtext"/>
- <plugin id="org.eclipse.xtext.builder"/>
- <plugin id="org.eclipse.xtext.common.types"/>
- <plugin id="org.eclipse.xtext.common.types.ui"/>
- <plugin id="org.eclipse.xtext.ide"/>
- <plugin id="org.eclipse.xtext.logging" fragment="true"/>
- <plugin id="org.eclipse.xtext.smap"/>
- <plugin id="org.eclipse.xtext.ui"/>
- <plugin id="org.eclipse.xtext.util"/>
- <plugin id="org.eclipse.xtext.xbase"/>
- <plugin id="org.eclipse.xtext.xbase.lib"/>
- <plugin id="org.objectweb.asm"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- <plugin id="org.tukaani.xz"/>
- <plugin id="org.w3c.css.sac"/>
- <plugin id="org.w3c.dom.events"/>
- <plugin id="org.w3c.dom.smil"/>
- <plugin id="org.w3c.dom.svg"/>
- </plugins>
-
-
-</product>
diff --git a/examples/headless/org.eclipse.viatra.query.application/incquery-specific.product b/examples/headless/org.eclipse.viatra.query.application/incquery-specific.product
deleted file mode 100644
index 6bd024932..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/incquery-specific.product
+++ /dev/null
@@ -1,206 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="Example Headless VIATRA Query Application (Using Specific Generated API)" uid="org.eclipse.viatra.query.application.specific" id="viatra.query.specific" application="org.eclipse.viatra.query.application.app.patternspecific" version="1.2.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <programArgs>--launcher.XX:MaxPermSize=768m
---launcher.XX:+UseParallelGC
---launcher.XX:PermSize=256m
--consolelog
- </programArgs>
- <vmArgs>-Xms200m
--Xmx1584m
--Declipse.log.backup.max=100
--Declipse.log.size.max=0
- </vmArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
- </vmArgsMac>
- </launcherArgs>
-
- <windowImages/>
-
- <launcher>
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.google.guava"/>
- <plugin id="com.google.inject"/>
- <plugin id="com.google.inject.multibindings" fragment="true"/>
- <plugin id="com.ibm.icu"/>
- <plugin id="javax.annotation"/>
- <plugin id="javax.inject"/>
- <plugin id="javax.xml"/>
- <plugin id="org.antlr.runtime"/>
- <plugin id="org.apache.batik.css"/>
- <plugin id="org.apache.batik.util"/>
- <plugin id="org.apache.batik.util.gui"/>
- <plugin id="org.apache.commons.jxpath"/>
- <plugin id="org.apache.commons.lang"/>
- <plugin id="org.apache.log4j"/>
- <plugin id="org.eclipse.ant.core"/>
- <plugin id="org.eclipse.compare"/>
- <plugin id="org.eclipse.compare.core"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.filebuffers"/>
- <plugin id="org.eclipse.core.filesystem"/>
- <plugin id="org.eclipse.core.filesystem.java7" fragment="true"/>
- <plugin id="org.eclipse.core.filesystem.macosx" fragment="true"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.resources"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
- <plugin id="org.eclipse.core.variables"/>
- <plugin id="org.eclipse.debug.core"/>
- <plugin id="org.eclipse.debug.ui"/>
- <plugin id="org.eclipse.e4.core.commands"/>
- <plugin id="org.eclipse.e4.core.contexts"/>
- <plugin id="org.eclipse.e4.core.di"/>
- <plugin id="org.eclipse.e4.core.di.annotations"/>
- <plugin id="org.eclipse.e4.core.di.extensions"/>
- <plugin id="org.eclipse.e4.core.services"/>
- <plugin id="org.eclipse.e4.emf.xpath"/>
- <plugin id="org.eclipse.e4.ui.bindings"/>
- <plugin id="org.eclipse.e4.ui.css.core"/>
- <plugin id="org.eclipse.e4.ui.css.swt"/>
- <plugin id="org.eclipse.e4.ui.css.swt.theme"/>
- <plugin id="org.eclipse.e4.ui.di"/>
- <plugin id="org.eclipse.e4.ui.model.workbench"/>
- <plugin id="org.eclipse.e4.ui.services"/>
- <plugin id="org.eclipse.e4.ui.widgets"/>
- <plugin id="org.eclipse.e4.ui.workbench"/>
- <plugin id="org.eclipse.e4.ui.workbench.addons.swt"/>
- <plugin id="org.eclipse.e4.ui.workbench.renderers.swt"/>
- <plugin id="org.eclipse.e4.ui.workbench.renderers.swt.cocoa" fragment="true"/>
- <plugin id="org.eclipse.e4.ui.workbench.swt"/>
- <plugin id="org.eclipse.e4.ui.workbench3"/>
- <plugin id="org.eclipse.emf.codegen"/>
- <plugin id="org.eclipse.emf.codegen.ecore"/>
- <plugin id="org.eclipse.emf.common"/>
- <plugin id="org.eclipse.emf.common.ui"/>
- <plugin id="org.eclipse.emf.databinding"/>
- <plugin id="org.eclipse.emf.ecore"/>
- <plugin id="org.eclipse.emf.ecore.change"/>
- <plugin id="org.eclipse.emf.ecore.xmi"/>
- <plugin id="org.eclipse.emf.edit"/>
- <plugin id="org.eclipse.emf.edit.ui"/>
- <plugin id="org.eclipse.emf.transaction"/>
- <plugin id="org.eclipse.emf.validation"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.bidi"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.frameworkadmin"/>
- <plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
- <plugin id="org.eclipse.equinox.p2.artifact.repository"/>
- <plugin id="org.eclipse.equinox.p2.core"/>
- <plugin id="org.eclipse.equinox.p2.director"/>
- <plugin id="org.eclipse.equinox.p2.director.app"/>
- <plugin id="org.eclipse.equinox.p2.engine"/>
- <plugin id="org.eclipse.equinox.p2.garbagecollector"/>
- <plugin id="org.eclipse.equinox.p2.jarprocessor"/>
- <plugin id="org.eclipse.equinox.p2.metadata"/>
- <plugin id="org.eclipse.equinox.p2.metadata.repository"/>
- <plugin id="org.eclipse.equinox.p2.publisher"/>
- <plugin id="org.eclipse.equinox.p2.publisher.eclipse"/>
- <plugin id="org.eclipse.equinox.p2.repository"/>
- <plugin id="org.eclipse.equinox.p2.repository.tools"/>
- <plugin id="org.eclipse.equinox.p2.touchpoint.eclipse"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.security"/>
- <plugin id="org.eclipse.equinox.security.macosx" fragment="true"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator"/>
- <plugin id="org.eclipse.equinox.simpleconfigurator.manipulator"/>
- <plugin id="org.eclipse.equinox.util"/>
- <plugin id="org.eclipse.help"/>
- <plugin id="org.eclipse.jdt.compiler.apt" fragment="true"/>
- <plugin id="org.eclipse.jdt.compiler.tool" fragment="true"/>
- <plugin id="org.eclipse.jdt.core"/>
- <plugin id="org.eclipse.jdt.core.manipulation"/>
- <plugin id="org.eclipse.jdt.debug"/>
- <plugin id="org.eclipse.jdt.launching"/>
- <plugin id="org.eclipse.jdt.ui"/>
- <plugin id="org.eclipse.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.jface.text"/>
- <plugin id="org.eclipse.ltk.core.refactoring"/>
- <plugin id="org.eclipse.ltk.ui.refactoring"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.compatibility.state" fragment="true"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.pde.build"/>
- <plugin id="org.eclipse.pde.core"/>
- <plugin id="org.eclipse.search"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
- <plugin id="org.eclipse.team.core"/>
- <plugin id="org.eclipse.team.ui"/>
- <plugin id="org.eclipse.text"/>
- <plugin id="org.eclipse.ui"/>
- <plugin id="org.eclipse.ui.cocoa" fragment="true"/>
- <plugin id="org.eclipse.ui.console"/>
- <plugin id="org.eclipse.ui.editors"/>
- <plugin id="org.eclipse.ui.forms"/>
- <plugin id="org.eclipse.ui.ide"/>
- <plugin id="org.eclipse.ui.navigator"/>
- <plugin id="org.eclipse.ui.navigator.resources"/>
- <plugin id="org.eclipse.ui.views"/>
- <plugin id="org.eclipse.ui.views.properties.tabbed"/>
- <plugin id="org.eclipse.ui.workbench"/>
- <plugin id="org.eclipse.ui.workbench.texteditor"/>
- <plugin id="org.eclipse.update.configurator"/>
- <plugin id="org.eclipse.viatra.addon.databinding.runtime"/>
- <plugin id="org.eclipse.viatra.query.application"/>
- <plugin id="org.eclipse.viatra.query.application.queries"/>
- <plugin id="org.eclipse.viatra.query.patternlanguage"/>
- <plugin id="org.eclipse.viatra.query.patternlanguage.emf"/>
- <plugin id="org.eclipse.viatra.query.runtime"/>
- <plugin id="org.eclipse.viatra.query.runtime.base"/>
- <plugin id="org.eclipse.viatra.query.runtime.base.itc"/>
- <plugin id="org.eclipse.viatra.query.runtime.matchers"/>
- <plugin id="org.eclipse.viatra.query.runtime.rete"/>
- <plugin id="org.eclipse.viatra.query.runtime.rete.recipes"/>
- <plugin id="org.eclipse.viatra.query.tooling.core"/>
- <plugin id="org.eclipse.viatra.query.tooling.generator.model"/>
- <plugin id="org.eclipse.viatra.transformation.evm"/>
- <plugin id="org.eclipse.xtend.lib"/>
- <plugin id="org.eclipse.xtend.lib.macro"/>
- <plugin id="org.eclipse.xtext"/>
- <plugin id="org.eclipse.xtext.builder"/>
- <plugin id="org.eclipse.xtext.common.types"/>
- <plugin id="org.eclipse.xtext.common.types.ui"/>
- <plugin id="org.eclipse.xtext.ide"/>
- <plugin id="org.eclipse.xtext.logging" fragment="true"/>
- <plugin id="org.eclipse.xtext.smap"/>
- <plugin id="org.eclipse.xtext.ui"/>
- <plugin id="org.eclipse.xtext.util"/>
- <plugin id="org.eclipse.xtext.xbase"/>
- <plugin id="org.eclipse.xtext.xbase.lib"/>
- <plugin id="org.objectweb.asm"/>
- <plugin id="org.sat4j.core"/>
- <plugin id="org.sat4j.pb"/>
- <plugin id="org.tukaani.xz"/>
- <plugin id="org.w3c.css.sac"/>
- <plugin id="org.w3c.dom.events"/>
- <plugin id="org.w3c.dom.smil"/>
- <plugin id="org.w3c.dom.svg"/>
- </plugins>
-
-
-</product>
diff --git a/examples/headless/org.eclipse.viatra.query.application/plugin.xml b/examples/headless/org.eclipse.viatra.query.application/plugin.xml
deleted file mode 100644
index 43f5c6948..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/plugin.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- id="org.eclipse.viatra.query.application.app.generic"
- point="org.eclipse.core.runtime.applications">
- <application
- cardinality="singleton-global"
- thread="main"
- visible="true">
- <run
- class="org.eclipse.viatra.query.application.generic.GenericEclipseViatraQueryApplication">
- </run>
- </application>
- </extension>
- <extension
- id="org.eclipse.viatra.query.application.app.patternspecific"
- point="org.eclipse.core.runtime.applications">
- <application
- cardinality="singleton-global"
- thread="main"
- visible="true">
- <run
- class="org.eclipse.viatra.query.application.patternspecific.PatternSpecificEclipseViatraQueryApplication">
- </run>
- </application>
- </extension>
- <extension
- id="viatra.query.generic"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.viatra.query.application.app.generic"
- name="Generic VIATRA Query Application">
- <property
- name="appName"
- value="Generic VIATRA Query Application">
- </property>
- </product>
- </extension>
- <extension
- id="viatra.query.specific"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.viatra.query.application.app.patternspecific"
- name="PatternSpecific VIATRA Query Application">
- <property
- name="appName"
- value="PatternSpecific VIATRA Query Application">
- </property>
- </product>
- </extension>
-
-</plugin>
diff --git a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/DefaultRealm.java b/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/DefaultRealm.java
deleted file mode 100644
index 900eace7c..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/DefaultRealm.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.eclipse.viatra.query.application.common;
-
-import org.eclipse.core.databinding.observable.Realm;
-
-/**
- * Simple realm implementation that will set itself as default when constructed. Invoke
- * {@link #dispose()} to remove the realm from being the default. Does not support asyncExec(...).
- *
- * Original source: http://wiki.eclipse.org/JFace_Data_Binding/Realm
- */
-public class DefaultRealm extends Realm {
- private Realm previousRealm;
-
- public DefaultRealm() {
- previousRealm = super.setDefault(this);
- }
-
- /**
- * @return always returns true
- */
- public boolean isCurrent() {
- return true;
- }
-
- protected void syncExec(Runnable runnable) {
- runnable.run();
- }
-
- /**
- * @throws UnsupportedOperationException
- */
- public void asyncExec(Runnable runnable) {
- throw new UnsupportedOperationException("asyncExec is unsupported");
- }
-
- /**
- * Removes the realm from being the current and sets the previous realm to the default.
- */
- public void dispose() {
- if (getDefault() == this) {
- setDefault(previousRealm);
- }
- }
-}
-
diff --git a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/ViatraQueryHeadless.java b/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/ViatraQueryHeadless.java
deleted file mode 100644
index a01b0fe02..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/ViatraQueryHeadless.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2011 Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- * Istvan Rath - refactorings to accommodate to generic/patternspecific API differences
- *******************************************************************************/
-package org.eclipse.viatra.query.application.common;
-
-
-import java.util.Collection;
-
-import org.eclipse.core.databinding.observable.set.IObservableSet;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.SetChangeEvent;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.viatra.addon.databinding.runtime.api.ViatraObservables;
-import org.eclipse.viatra.query.application.queries.EClassNamesMatcher;
-import org.eclipse.viatra.query.application.queries.EObjectMatch;
-import org.eclipse.viatra.query.application.queries.EObjectMatcher;
-import org.eclipse.viatra.query.application.queries.EPackageMatch;
-import org.eclipse.viatra.query.application.queries.EPackageMatcher;
-import org.eclipse.viatra.query.application.queries.HeadlessQueries;
-import org.eclipse.viatra.query.application.queries.util.EClassNamesProcessor;
-import org.eclipse.viatra.query.application.queries.util.EObjectProcessor;
-import org.eclipse.viatra.query.application.queries.util.EPackageProcessor;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher;
-import org.eclipse.viatra.query.runtime.emf.EMFScope;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-
-/**
- * @author Abel Hegedus
- * @author Istvan Rath
- *
- */
-public class ViatraQueryHeadless {
-
- protected Resource loadModel(String modelPath) {
- URI fileURI = URI.createFileURI(modelPath);
- return loadModel(fileURI);
- }
-
- protected Resource loadModel(URI fileURI) {
- // Loads the resource
- ResourceSet resourceSet = new ResourceSetImpl();
- Resource resource = resourceSet.getResource(fileURI, true);
- return resource;
- }
-
- protected void prettyPrintMatches(StringBuilder results, Collection<? extends IPatternMatch> matches) {
- for (IPatternMatch match : matches) {
- results.append(match.prettyPrint()+"; ");
- }
- if(matches.size() == 0) {
- results.append("Empty match set");
- }
- results.append("\n");
- }
-
-
- public String executeDemo(String modelPath) {
- final StringBuilder results = new StringBuilder();
- Resource resource = loadModel(modelPath);
- if (resource != null) {
- try {
- // get all matches of the pattern
- // initialization
- // phase 1: (managed) ViatraQueryEngine
- ViatraQueryEngine engine = ViatraQueryEngine.on(new EMFScope(resource));
- // phase 2: the matcher itself
- EObjectMatcher matcher = EObjectMatcher.on(engine);
- // get all matches of the pattern
- Collection<EObjectMatch> matches = matcher.getAllMatches();
- prettyPrintMatches(results, matches);
- // using a match processor
- matcher.forEachMatch(new EObjectProcessor() {
- @Override
- public void process(EObject o) {
- results.append("\tEObject: " + o.toString() + "\n");
- }
- });
- // matching with partially bound input parameters
- // a new matcher initialization will trigger a new traversal of the model
- // unless you use pattern groups, see executePatternSpecific_PatternGroups below
- EClassNamesMatcher matcher2 = EClassNamesMatcher.on(engine);
- // defining an input mask by binding "name" to "A" ->
- matcher2.forEachMatch( matcher2.newMatch(null, "A") , new EClassNamesProcessor() {
- @Override
- public void process(EClass c, String n) {
- results.append("\tEClass with name A: " + c.toString() + "\n");
- }
- });
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- results.append(e.getMessage());
- }
- } else {
- results.append("Resource not found");
- }
- return results.toString();
- }
-
- public String executeDemo_PatternGroups(String modelPath) {
- final StringBuilder results = new StringBuilder();
- Resource resource = loadModel(modelPath);
- if (resource != null) {
- try {
- // initialization
- // phase 1: (managed) ViatraQueryEngine
- ViatraQueryEngine engine = ViatraQueryEngine.on(new EMFScope(resource));
- // phase 2: the group of pattern matchers
- HeadlessQueries patternGroup = HeadlessQueries.instance();
- patternGroup.prepare(engine);
- // from here on everything is the same
- EObjectMatcher matcher = EObjectMatcher.on(engine);
- // get all matches of the pattern
- Collection<EObjectMatch> matches = matcher.getAllMatches();
- prettyPrintMatches(results, matches);
- // using a match processor
- matcher.forEachMatch(new EObjectProcessor() {
- @Override
- public void process(EObject o) {
- results.append("\tEObject: " + o.toString() + "\n");
- }
- });
- // matching with partially bound input parameters
- // because EClassNamesMatcher is included in the patterngroup, *no new traversal* will be done here
- EClassNamesMatcher matcher2 = EClassNamesMatcher.on(engine);
- // defining an input mask by binding "name" to "A" ->
- matcher2.forEachMatch(null, "A" , new EClassNamesProcessor() {
- @Override
- public void process(EClass c, String n) {
- results.append("\tEClass with name A: " + c.toString() + "\n");
- }
- });
- // projections
- for (EClass ec: matcher2.getAllValuesOfc(matcher2.newMatch(null,"A")))
- {
- results.append("\tEClass with name A: " + ec.toString() + "\n");
- }
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- results.append(e.getMessage());
- }
- } else {
- results.append("Resource not found");
- }
- return results.toString();
- }
-
- // incrementally track changes
-
- protected void performModelModification(Resource res) {
- // somewhat brittle code, assumes there is a root EPackage in the Resource
- EPackage rootPackage = (EPackage)res.getContents().get(0);
- // add a new EPackage
- EPackage newPackage = EcoreFactory.eINSTANCE.createEPackage();
- newPackage.setName("NewPackage");
- rootPackage.getESubpackages().add(newPackage);
- }
-
- public String executeTrackChangesDemo(String modelPath)
- {
- final StringBuilder results = new StringBuilder();
- Resource resource = loadModel(modelPath);
- if (resource != null) {
- try {
- // initialization
- // phase 1: (managed) ViatraQueryEngine
- ViatraQueryEngine engine = ViatraQueryEngine.on(new EMFScope(resource));
- // phase 2: pattern matcher for packages
- EPackageMatcher matcher = EPackageMatcher.on(engine);
- matcher.forEachMatch(new EPackageProcessor() {
- @Override
- public void process(EPackage p) {
- results.append("\tEPackage before modification: " + p.getName()+"\n");
- }
- });
- // phase 3: prepare for change processing
- changeProcessing_databinding(results, matcher);
- // phase 4: modify model, change processor will update results accordingly
- performModelModification(resource);
- }
- catch (ViatraQueryException e) {
- e.printStackTrace();
- results.append(e.getMessage());
- }
- } else {
- results.append("Resource not found");
- }
- return results.toString();
- }
-
-
-
- private void changeProcessing_databinding(final StringBuilder results, ViatraQueryMatcher<?> matcher) {
- // (+) changes can also be tracked using JFace Databinding
- // this approach provides good performance, as the observable callbacks are guaranteed to be called
- // in a consistent state, and only when there is a relevant change; anything
- // can be written into the callback method
- // (-) * the databinding API introduces additional dependencies
- // * is does not support generics, hence typesafe programming is not possible
- // * a "Realm" needs to be set up for headless execution
- DefaultRealm realm = new DefaultRealm();
- IObservableSet set = ViatraObservables.observeMatchesAsSet(matcher);
-
- set.addSetChangeListener(new ISetChangeListener() {
- @Override
- public void handleSetChange(SetChangeEvent event) {
- for (Object _o : event.diff.getAdditions()) {
- if (_o instanceof EPackageMatch) {
- results.append("\tNew EPackage found by changeset databinding: " + ((EPackageMatch)_o).getP().getName()+"\n");
- }
- }
- for (Object _o : event.diff.getRemovals()) {
- // left empty
- }
- }
- });
-
- /* the same could also be done with a list:
- IObservableList list = ViatraObservables.observeMatchesAsList(factory, engine);
- list.addListChangeListener(new IListChangeListener() {
-
- @Override
- public void handleListChange(ListChangeEvent event) {
- for (ListDiffEntry lde : event.diff.getDifferences())
- {
- if (lde.isAddition()) {
- Object _o = lde.getElement();
- if (_o instanceof EPackageMatch) {
- results.append("\tNew EPackage found by changeset databinding: " + ((EPackageMatch)_o).getP().getName()+"\n");
- }
- }
- else {
- // left emptry
- }
- }
- }
- });
- */
- }
-
-
-
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/ViatraQueryHeadlessAdvanced.java b/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/ViatraQueryHeadlessAdvanced.java
deleted file mode 100644
index ab7113996..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/ViatraQueryHeadlessAdvanced.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2011 Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- * Istvan Rath - refactorings to accommodate to generic/patternspecific API differences
- *******************************************************************************/
-package org.eclipse.viatra.query.application.common;
-
-
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguageStandaloneSetup;
-import org.eclipse.viatra.query.patternlanguage.emf.eMFPatternLanguage.PatternModel;
-import org.eclipse.viatra.query.patternlanguage.emf.specification.SpecificationBuilder;
-import org.eclipse.viatra.query.patternlanguage.helper.CorePatternLanguageHelper;
-import org.eclipse.viatra.query.patternlanguage.patternLanguage.Pattern;
-import org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IMatchUpdateListener;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher;
-import org.eclipse.viatra.query.runtime.emf.EMFScope;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.extensibility.QuerySpecificationRegistry;
-
-/**
- * @author Abel Hegedus
- * @author Istvan Rath
- *
- */
-public class ViatraQueryHeadlessAdvanced extends ViatraQueryHeadless {
-
- /**
- * Returns the match set for patternFQN over the model in modelPath in pretty printed form
- *
- * @param modelPath
- * @param patternFQN
- * @return
- */
- public String executeDemo_GenericAPI_LoadFromVQL(URI modelURI, URI fileURI, String patternFQN) {
- final StringBuilder results = new StringBuilder();
- Resource resource = loadModel(modelURI);
- if (resource != null) {
- try {
- // get all matches of the pattern
- // create an *unmanaged* engine to ensure that noone else is going
- // to use our engine
- AdvancedViatraQueryEngine engine = AdvancedViatraQueryEngine.createUnmanagedEngine(new EMFScope(resource));
- // instantiate a pattern matcher through the registry, by only knowing its FQN
- // assuming that there is a pattern definition registered matching 'patternFQN'
-
- Pattern p = null;
-
- // Initializing Xtext-based resource parser
- new EMFPatternLanguageStandaloneSetup().createInjectorAndDoEMFRegistration();
-
- //Loading pattern resource from file
- ResourceSet resourceSet = new ResourceSetImpl();
-
- Resource patternResource = resourceSet.getResource(fileURI, true);
-
- // navigate to the pattern definition that we want
- if (patternResource != null) {
- if (patternResource.getErrors().size() == 0 && patternResource.getContents().size() >= 1) {
- EObject topElement = patternResource.getContents().get(0);
- if (topElement instanceof PatternModel) {
- for (Pattern _p : ((PatternModel) topElement).getPatterns()) {
- if (patternFQN.equals(CorePatternLanguageHelper.getFullyQualifiedName(_p))) {
- p = _p; break;
- }
- }
- }
- }
- }
- if (p == null) {
- throw new RuntimeException(String.format("Pattern %s not found", patternFQN));
- }
- SpecificationBuilder builder = new SpecificationBuilder();
- final IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> specification = builder.getOrCreateSpecification(p);
- QuerySpecificationRegistry.registerQuerySpecification(specification);
-
- // Initialize matcher from specification
- ViatraQueryMatcher<? extends IPatternMatch> matcher = engine.getMatcher(specification);
-
- if (matcher!=null) {
- Collection<? extends IPatternMatch> matches = matcher.getAllMatches();
- prettyPrintMatches(results, matches);
- }
-
- // wipe the engine
- engine.wipe();
- // after a wipe, new patterns can be rebuilt with much less overhead than
- // complete traversal (as the base indexes will be kept)
-
- // completely dispose of the engine once's it is not needed
- engine.dispose();
- resource.unload();
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- results.append(e.getMessage());
- }
- } else {
- results.append("Resource not found");
- }
- return results.toString();
- }
-
-
- // incrementally track changes
-
-
- public String executeTrackChangesDemo_Advanced(URI modelURI, String patternFQN)
- {
- final StringBuilder results = new StringBuilder();
- Resource resource = loadModel(modelURI);
- if (resource != null) {
- try {
- // initialization
- // phase 1: (managed) ViatraQueryEngine
- AdvancedViatraQueryEngine engine = AdvancedViatraQueryEngine.createUnmanagedEngine(new EMFScope(resource));
- // phase 2: pattern matcher for packages
- ViatraQueryMatcher<? extends IPatternMatch> matcher = QuerySpecificationRegistry.getQuerySpecification(patternFQN).getMatcher(engine);
- matcher.forEachMatch(new IMatchProcessor<IPatternMatch>() {
- @Override
- public void process(IPatternMatch match) {
- results.append("\tMatch before modification: " + match.prettyPrint()+"\n");
- }
- });
- // phase 3: prepare for advanced change processing
- changeProcessing_lowlevel(results, matcher, engine);
- // phase 4: modify model, change processor will update results accordingly
- performModelModification(resource);
- }
- catch (ViatraQueryException e) {
- e.printStackTrace();
- results.append(e.getMessage());
- }
- } else {
- results.append("Resource not found");
- }
- return results.toString();
- }
-
- private void changeProcessing_lowlevel(final StringBuilder results,
- ViatraQueryMatcher<? extends IPatternMatch> matcher,
- AdvancedViatraQueryEngine engine) {
- // (+) these update callbacks are called whenever there is an actual change in the
- // result set of the pattern you are interested in. Hence, they are called fewer times
- // than the "afterUpdates" option, giving better performance.
- // (-) the downside is that the callbacks are *not* guaranteed to be called in a consistent
- // state (i.e. when the update propagation is settled), hence
- // * you must not invoke pattern matching and model manipulation _inside_ the callback method
- // * the callbacks might encounter "hazards", i.e. when an appearance is followed immediately by a disappearance.
- engine.addMatchUpdateListener(matcher, new IMatchUpdateListener<IPatternMatch>() {
- @Override
- public void notifyDisappearance(IPatternMatch match) {
- // left empty
- }
- @Override
- public void notifyAppearance(IPatternMatch match) {
- results.append("\tNew match found by changeset low level callback: " + match.prettyPrint()+"\n");
- }
- }, false);
- }
-
-
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/ViatraQueryHeadlessBenchmark.java b/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/ViatraQueryHeadlessBenchmark.java
deleted file mode 100644
index f88dd1ca7..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/common/ViatraQueryHeadlessBenchmark.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2011 Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- * Istvan Rath - refactorings to accommodate to generic/patternspecific API differences
- *******************************************************************************/
-package org.eclipse.viatra.query.application.common;
-
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.viatra.query.application.queries.EObjectMatch;
-import org.eclipse.viatra.query.application.queries.EObjectMatcher;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineManager;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher;
-import org.eclipse.viatra.query.runtime.emf.EMFScope;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.extensibility.QuerySpecificationRegistry;
-
-/**
- * @author Abel Hegedus
- * @author Istvan Rath
- *
- */
-public class ViatraQueryHeadlessBenchmark {
-
- private Resource loadModel(String modelPath) {
- // Loads the resource
- long start = System.nanoTime();
- ResourceSet resourceSet = new ResourceSetImpl();
- URI fileURI = URI.createFileURI(modelPath);
- Resource resource = resourceSet.getResource(fileURI, true);
-
- long resourceInit = System.nanoTime();
- System.out.println("EMF load took: " + (resourceInit - start) / 1000000 + " ms");
-
- return resource;
- }
-
-
- private void prettyPrintMatches(StringBuilder results, Collection<? extends IPatternMatch> matches) {
- System.out.println("Found matches:");
- for (IPatternMatch match : matches) {
- System.out.println(match.prettyPrint());
- results.append(match.prettyPrint());
- }
-
- if(matches.size() == 0) {
- results.append("Empty match set");
- }
- }
-
- private void measureMemory(StringBuilder results) {
- System.gc();
- System.gc();
- System.gc();
- System.gc();
- System.gc();
-
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
-
- long usedMemory = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
- System.out.println("Used memory: " + usedMemory + " bytes");
- System.out.println("Used memory: " + (usedMemory / 1024) / 1024 + " megabytes");
-
-
- }
-
- public String executePatternSpecificBenchmark(String modelPath) {
- StringBuilder results = new StringBuilder();
-
- Resource resource = loadModel(modelPath);
-
- if (resource != null) {
- try {
- // get all matches of the pattern
- long startMatching = System.nanoTime();
- ViatraQueryEngine engine = ViatraQueryEngineManager.getInstance().getQueryEngine(new EMFScope(resource));
- EObjectMatcher matcher = EObjectMatcher.on(engine);
- long matcherInit = System.nanoTime();
- Collection<EObjectMatch> matches = matcher.getAllMatches();
- long collectedMatches = System.nanoTime();
- System.out.println(
- "Init took: " + (matcherInit - startMatching) / 1000000 + " Collecting took: "
- + (collectedMatches - matcherInit) / 1000000 + " ms");
- measureMemory(results);
- prettyPrintMatches(results, matches);
-
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- results.append(e.getMessage());
- }
- } else {
- results.append("Resource not found");
- }
- return results.toString();
- }
-
- /**
- * Returns the match set for patternFQN over the model in modelPath in pretty printed form
- *
- * @param modelPath
- * @param patternFQN
- * @return
- */
- @SuppressWarnings({ "unchecked", "rawtypes" })
- public String executeGenericBenchmark(String modelPath, String patternFQN) {
- StringBuilder results = new StringBuilder();
-
- Resource resource = loadModel(modelPath);
-
- if (resource != null) {
- try {
- long startMatching = System.nanoTime();
- ViatraQueryEngine engine = ViatraQueryEngineManager.getInstance().getQueryEngine(new EMFScope(resource));
- ViatraQueryMatcher matcher = QuerySpecificationRegistry.getQuerySpecification(patternFQN).getMatcher(engine);
- long matcherInit = System.nanoTime();
- // assuming that there is a pattern definition registered matching 'patternFQN'
- if (matcher!=null) {
- Collection<IPatternMatch> matches = matcher.getAllMatches();
- prettyPrintMatches(results, matches);
- // get all matches of the pattern
- long collectedMatches = System.nanoTime();
- System.out.println(
- "Init took: " + (matcherInit - startMatching) / 1000000 + " Collecting took: "
- + (collectedMatches - matcherInit) / 1000000 + " ms");
- measureMemory(results);
- prettyPrintMatches(results, matches);
- }
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- results.append(e.getMessage());
- }
- } else {
- results.append("Resource not found");
- }
- return results.toString();
- }
-
-
-
-
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/generic/GenericEclipseViatraQueryApplication.java b/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/generic/GenericEclipseViatraQueryApplication.java
deleted file mode 100644
index a7d5ffe65..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/generic/GenericEclipseViatraQueryApplication.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2011 Abel Hegedus and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.query.application.generic;
-
-import java.util.Map;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.viatra.query.application.common.ViatraQueryHeadlessAdvanced;
-
-/**
- * @author Abel Hegedus
- *
- */
-public class GenericEclipseViatraQueryApplication implements IApplication {
-
- private static String modelParam = "-m";
- private static String patternParam = "-p";
-
-
-
- @Override
- public Object start(IApplicationContext context) throws Exception {
-
- Map<String, Object> arguments = context.getArguments();
- String[] args = (String[]) arguments.get("application.args");
- String model = null;
- String patternFQN = null;
- if (args == null || args.length == 0) {
- displayHelp();
- return IApplication.EXIT_OK;
- }
- int i = 0;
- while (i < args.length) {
- if (args[i].equals(modelParam)) {
- model = args[i + 1];
- i += 2;
- continue;
- }
- if (args[i].equals(patternParam)) {
- patternFQN = args[i + 1];
- i += 2;
- continue;
- } else {
- i++;
- continue;
- }
- }
-
- if (model == null) {
- System.out.println("Model parameter not set");
- displayHelp();
- return IApplication.EXIT_OK;
- }
- if (patternFQN == null) {
- System.out.println("PatternFQN parameter not set");
- displayHelp();
- return IApplication.EXIT_OK;
- }
-
- ViatraQueryHeadlessAdvanced hla = new ViatraQueryHeadlessAdvanced();
-// System.out.println(hla.executeDemo_GenericAPI(model, patternFQN));
- URI fileURI = URI.createPlatformPluginURI("org.eclipse.viatra.query.application.queries/src/org/eclipse/viatra/query/application/queries/headlessQueries.vql", false);
- URI modelURI = URI.createFileURI(model);
- System.out.println(hla.executeDemo_GenericAPI_LoadFromVQL(modelURI, fileURI, patternFQN));
- System.out.println(hla.executeTrackChangesDemo_Advanced(modelURI, patternFQN));
-
- return IApplication.EXIT_OK;
- }
-
- @Override
- public void stop() {}
-
- private void displayHelp() {
- System.out.println("Usage:\n<call> -m <modelFilePAth> -p <patternFQN>\n -m : Required, the model to match on.\n -p : Required, the pattern fqn to match");
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/generic/GenericViatraQueryApplication.java b/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/generic/GenericViatraQueryApplication.java
deleted file mode 100644
index f93336460..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/generic/GenericViatraQueryApplication.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2011 Abel Hegedus and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.query.application.generic;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl;
-import org.eclipse.viatra.query.application.common.ViatraQueryHeadlessAdvanced;
-
-/**
- * @author Abel Hegedus
- *
- */
-public class GenericViatraQueryApplication {
-
- private static String modelParam = "-m";
- private static String patternParam = "-p";
- private static String eiqFileParam = "-e";
-
-
- public static void main(String[] args) {
- String model = null;
- String eiqFile = null;
- String patternFQN = null;
- if (args == null || args.length == 0) {
- displayHelp();
- return;
- }
- int i = 0;
- while (i < args.length) {
- if (args[i].equals(modelParam)) {
- model = args[i + 1];
- i += 2;
- continue;
- } else if (args[i].equals(patternParam)) {
- patternFQN = args[i + 1];
- i += 2;
- continue;
- } else if (args[i].equals(eiqFileParam)) {
- eiqFile = args[i + 1];
- i += 2;
- continue;
- } else {
- i++;
- continue;
- }
- }
-
- if (model == null) {
- System.out.println("Model parameter not set");
- displayHelp();
- return;
- }
- if (patternFQN == null) {
- System.out.println("PatternFQN parameter not set");
- displayHelp();
- return;
- }
- if (eiqFile == null) {
- System.out.println("EIQ file parameter not set");
- displayHelp();
- return;
- }
-
- ViatraQueryHeadlessAdvanced hla = new ViatraQueryHeadlessAdvanced();
- // Initializing metamodel
- Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ecore", new EcoreResourceFactoryImpl());
- URI fileURI = URI.createFileURI(eiqFile);
- URI modelURI = URI.createFileURI(model);
- System.out.println(hla.executeDemo_GenericAPI_LoadFromVQL(modelURI, fileURI, patternFQN));
- System.out.println(hla.executeTrackChangesDemo_Advanced(modelURI, patternFQN));
-
- }
-
- private static void displayHelp() {
- System.out.println("Usage:\n<call> -m <modelFilePath> -e <eiqFilePath> -p <patternFQN>");
- System.out.println(" -m : Required, the model to match on.");
- System.out.println(" -e : Required, the pattern definition file (.eiq) to match on.");
- System.out.println(" -p : Required, the pattern fqn to match");
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/patternspecific/PatternSpecificEclipseViatraQueryApplication.java b/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/patternspecific/PatternSpecificEclipseViatraQueryApplication.java
deleted file mode 100644
index 09e5dc139..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/patternspecific/PatternSpecificEclipseViatraQueryApplication.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2011 Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- * Istvan Rath - modifications for pattern-specific API demonstration
- *******************************************************************************/
-package org.eclipse.viatra.query.application.patternspecific;
-
-import java.util.Map;
-
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-import org.eclipse.viatra.query.application.common.ViatraQueryHeadless;
-
-/**
- * @author Abel Hegedus
- * @author Istvan Rath
- *
- */
-public class PatternSpecificEclipseViatraQueryApplication implements IApplication {
-
- private static String modelParam = "-m";
-
- @Override
- public Object start(IApplicationContext context) throws Exception {
-
- Map<String, Object> arguments = context.getArguments();
- String[] args = (String[]) arguments.get("application.args");
- String model = null;
- if (args == null || args.length == 0) {
- displayHelp();
- return IApplication.EXIT_OK;
- }
- int i = 0;
- while (i < args.length) {
- if (args[i].equals(modelParam)) {
- model = args[i + 1];
- i += 2;
- continue;
- }
- else {
- i++;
- continue;
- }
- }
-
- if (model == null) {
- System.out.println("Model parameter not set");
- displayHelp();
- return IApplication.EXIT_OK;
- }
-
- ViatraQueryHeadless hl = new ViatraQueryHeadless();
- System.out.println(hl.executeDemo(model));
- System.out.println(hl.executeDemo_PatternGroups(model));
- System.out.println(hl.executeTrackChangesDemo(model));
-
-
-
- return IApplication.EXIT_OK;
- }
-
- @Override
- public void stop() {
-
- }
-
- private void displayHelp() {
- System.out.println("Usage:\n<call> -m <modelFilePAth> \n -m : Required, the model to match on.");
- }
-}
diff --git a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/patternspecific/PatternSpecificViatraQueryApplication.java b/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/patternspecific/PatternSpecificViatraQueryApplication.java
deleted file mode 100644
index b64a51299..000000000
--- a/examples/headless/org.eclipse.viatra.query.application/src/org/eclipse/viatra/query/application/patternspecific/PatternSpecificViatraQueryApplication.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2011 Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- * Istvan Rath - modifications for pattern-specific API demonstration
- *******************************************************************************/
-package org.eclipse.viatra.query.application.patternspecific;
-
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl;
-import org.eclipse.viatra.query.application.common.ViatraQueryHeadless;
-
-/**
- * @author Abel Hegedus
- * @author Istvan Rath
- *
- */
-public class PatternSpecificViatraQueryApplication {
-
- private static String modelParam = "-m";
-
- public static void main(String[] args) {
-
- String model = null;
- if (args == null || args.length == 0) {
- displayHelp();
- return;
- }
- int i = 0;
- while (i < args.length) {
- if (args[i].equals(modelParam)) {
- model = args[i + 1];
- i += 2;
- continue;
- }
- else {
- i++;
- continue;
- }
- }
-
- if (model == null) {
- System.out.println("Model parameter not set");
- displayHelp();
- return;
- }
-
- // Initializing metamodel
- Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("ecore", new EcoreResourceFactoryImpl());
-
- ViatraQueryHeadless hl = new ViatraQueryHeadless();
- System.out.println(hl.executeDemo(model));
- System.out.println(hl.executeDemo_PatternGroups(model));
- System.out.println(hl.executeTrackChangesDemo(model));
-
-
-
- }
-
- private static void displayHelp() {
- System.out.println("Usage:\n<call> -m <modelFilePAth> \n -m : Required, the model to match on.");
- }
-}
diff --git a/examples/library/.gitignore b/examples/library/.gitignore
deleted file mode 100644
index 1c8f93fdb..000000000
--- a/examples/library/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-library.domain.base.edit/
-library.domain.base.editor/
-library.ecore.edit/
-library.ecore.editor/
-library.edit/
-library.editor/ \ No newline at end of file
diff --git a/examples/library/library.domain.base/.classpath b/examples/library/library.domain.base/.classpath
deleted file mode 100644
index 6a42377b5..000000000
--- a/examples/library/library.domain.base/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/library/library.domain.base/.gitignore b/examples/library/library.domain.base/.gitignore
deleted file mode 100644
index 30113e44f..000000000
--- a/examples/library/library.domain.base/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-plugin.xml_gen
-bin
-target
-plugin.xml_gen
-MANIFEST.MF_gen
-.DS_Store*
-xtend-gen
-+keep.txt
-+.keep.txt
-src-gen
-queries \ No newline at end of file
diff --git a/examples/library/library.domain.base/.project b/examples/library/library.domain.base/.project
deleted file mode 100644
index dc2c197cd..000000000
--- a/examples/library/library.domain.base/.project
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>library.domain.base</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.viatra.query.tooling.core.projectbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
- <nature>org.eclipse.viatra.query.projectnature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/library/library.domain.base/.settings/org.eclipse.jdt.core.prefs b/examples/library/library.domain.base/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de363a..000000000
--- a/examples/library/library.domain.base/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/examples/library/library.domain.base/.settings/org.eclipse.pde.core.prefs b/examples/library/library.domain.base/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 36c29adc3..000000000
--- a/examples/library/library.domain.base/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-eclipse.preferences.version=1
-pluginProject.equinox=false
-resolve.requirebundle=false
diff --git a/examples/library/library.domain.base/META-INF/MANIFEST.MF b/examples/library/library.domain.base/META-INF/MANIFEST.MF
deleted file mode 100644
index 1e616152c..000000000
--- a/examples/library/library.domain.base/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: library.domain.base;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: library.base,
- library.base.impl,
- library.base.util
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.emf.transaction,
- org.eclipse.xtext.xbase.lib;visibility:=reexport,
- org.eclipse.emf.ecore.xcore.lib;visibility:=reexport,
- org.eclipse.viatra.query.runtime;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Bundle-ActivationPolicy: lazy
-Import-Package: org.apache.log4j
diff --git a/examples/library/library.domain.base/build.properties b/examples/library/library.domain.base/build.properties
deleted file mode 100644
index b534a19f4..000000000
--- a/examples/library/library.domain.base/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-
-bin.includes = .,\
- META-INF/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = .
-source.. = src-gen/,\
- src/
-output.. = bin/
diff --git a/examples/library/library.domain.base/model/Library.xmi b/examples/library/library.domain.base/model/Library.xmi
deleted file mode 100644
index a4497e03e..000000000
--- a/examples/library/library.domain.base/model/Library.xmi
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<base:Library xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:base="library.base" xsi:schemaLocation="library.base ../src/library/base/Library.xcoreiq#/EPackage">
- <writers firstName="Leo" lastName="Tolstoy" books="//@books.0"/>
- <writers firstName="Aldous" lastName="Huxley" books="//@books.2"/>
- <writers firstName="John" lastName="Doe" books="//@books.3"/>
- <books title="War and Peace" bookCategory="ScienceFiction" writers="//@writers.0"/>
- <books title="Anna Karenina" bookCategory="ScienceFiction" citations="//@books.0"/>
- <books title="Brave New World" bookCategory="ScienceFiction" citations="//@books.1" writers="//@writers.1"/>
- <books title="Book of Mysteries" bookCategory="ScienceFiction" citations="//@books.2" writers="//@writers.2"/>
-</base:Library>
diff --git a/examples/library/library.domain.base/plugin.properties b/examples/library/library.domain.base/plugin.properties
deleted file mode 100644
index 52ff7edbb..000000000
--- a/examples/library/library.domain.base/plugin.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-
-pluginName = Base Model
-providerName = www.example.org
diff --git a/examples/library/library.domain.base/plugin.xml b/examples/library/library.domain.base/plugin.xml
deleted file mode 100644
index 1335557ba..000000000
--- a/examples/library/library.domain.base/plugin.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><plugin>
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package class="library.base.BasePackage" genModel="src/library/base/Library.xvql" uri="library.base"/>
- </extension>
- <extension id="library.base.BaseQueries" point="org.eclipse.viatra.query.runtime.queryspecification">
- <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:library.base.BaseQueries" id="library.base.BaseQueries"/>
- </extension>
- <extension id="extension.derived.name" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Writer" feature-name="name" package-nsUri="library.base"/>
- </extension>
-</plugin>
diff --git a/examples/library/library.domain.base/src/library/base/BaseQueries.vql b/examples/library/library.domain.base/src/library/base/BaseQueries.vql
deleted file mode 100644
index 0650419b8..000000000
--- a/examples/library/library.domain.base/src/library/base/BaseQueries.vql
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Tamas Szabo, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Tamas Szabo - initial API and implementation
- * Istvan Rath - minor modifications
- *******************************************************************************/
-package library.base
-
-import "library.base"
-
-//TODO add pattern definitions here
-
-pattern writerName(W : Writer, N) {
- Writer.firstName(W, FN);
- Writer.lastName(W, LN);
- Writer.books(W, B);
- Book.title(B, T);
- N == eval(FN + " " + LN + " (" + T + ")");
-} \ No newline at end of file
diff --git a/examples/library/library.domain.base/src/library/base/Library.xvql b/examples/library/library.domain.base/src/library/base/Library.xvql
deleted file mode 100644
index f20ace6ba..000000000
--- a/examples/library/library.domain.base/src/library/base/Library.xvql
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Tamas Szabo, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Tamas Szabo - initial API and implementation
- * Istvan Rath - minor modifications
- *******************************************************************************/
-@GenModel(editDirectory="/library.domain.base.edit/src")
-@GenModel(editorDirectory="/library.domain.base.editor/src")
-package library.base
-
-class Library {
- String name
- contains Writer[] writers opposite library
- contains Book[] books opposite library
-}
-
-class Writer {
- String firstName
- String lastName
- container Library library opposite writers
- refers Book[] books opposite writers
-
- query-based String name spec writerName
-
- /*derived String name get {
- var title = ""
- if (books.size > 0) {
- title = books.head.title
- }
- return firstName + " " + lastName + " (" + title + ")"
- }*/
-}
-
-class Book {
- String title = "" // set a default value
- Integer pages
- BookCategory bookCategory
- refers Book[] citations
- refers Writer[] writers opposite books
- container Library library opposite books
-}
-
-enum BookCategory {
- Mystery = 0,
- ScienceFiction = 1,
- Biography = 2
-} \ No newline at end of file
diff --git a/examples/library/library.domain/.classpath b/examples/library/library.domain/.classpath
deleted file mode 100644
index 6a42377b5..000000000
--- a/examples/library/library.domain/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/library/library.domain/.project b/examples/library/library.domain/.project
deleted file mode 100644
index d03f9462e..000000000
--- a/examples/library/library.domain/.project
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>library.domain</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.viatra.query.tooling.core.projectbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
- <nature>org.eclipse.viatra.query.projectnature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/library/library.domain/.settings/org.eclipse.jdt.core.prefs b/examples/library/library.domain/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de363a..000000000
--- a/examples/library/library.domain/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/examples/library/library.domain/META-INF/MANIFEST.MF b/examples/library/library.domain/META-INF/MANIFEST.MF
deleted file mode 100644
index 26c25cdbe..000000000
--- a/examples/library/library.domain/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: library.domain;singleton:=true
-Bundle-Version: 0.1.0.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: library,
- library.impl,
- library.util,
- library.validation,
- library.validation.util,
- library.viewers,
- library.viewers.util
-Require-Bundle: org.eclipse.core.runtime;visibility:=reexport,
- org.eclipse.emf.ecore;visibility:=reexport,
- org.eclipse.xtext.xbase.lib;visibility:=reexport,
- org.eclipse.emf.ecore.xcore.lib;visibility:=reexport,
- org.apache.log4j;bundle-version="1.2.15",
- org.eclipse.viatra.query.runtime;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Bundle-ActivationPolicy: lazy
-Import-Package: org.apache.log4j
diff --git a/examples/library/library.domain/build.properties b/examples/library/library.domain/build.properties
deleted file mode 100644
index c5d624854..000000000
--- a/examples/library/library.domain/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-bin.includes = .,\
- META-INF/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = .
-source.. = src-gen/,\
- src/
-output.. = bin/
-jre.compilation.profile = JavaSE-1.6
diff --git a/examples/library/library.domain/plugin.properties b/examples/library/library.domain/plugin.properties
deleted file mode 100644
index 5e38cc168..000000000
--- a/examples/library/library.domain/plugin.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-
-pluginName = Library Model
-providerName = www.example.org
diff --git a/examples/library/library.domain/plugin.xml b/examples/library/library.domain/plugin.xml
deleted file mode 100644
index fc6f4f9c3..000000000
--- a/examples/library/library.domain/plugin.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><plugin>
- <extension point="org.eclipse.emf.ecore.generated_package">
- <!-- @generated Library -->
- <package class="library.LibraryPackage" genModel="src/library/Library.xvql" uri="library"/>
- </extension>
- <extension id="library.viewers.ViewersQueries" point="org.eclipse.viatra.query.runtime.queryspecification">
- <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:library.viewers.ViewersQueries" id="library.viewers.ViewersQueries"/>
- </extension>
- <extension id="library.validation.ValidationQueries" point="org.eclipse.viatra.query.runtime.queryspecification">
- <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:library.validation.ValidationQueries" id="library.validation.ValidationQueries"/>
- </extension>
- <extension id="extension.derived.ownBooks" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Writer" feature-name="ownBooks" package-nsUri="library"/>
- </extension>
- <extension id="extension.derived.numberOfCitations" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Book" feature-name="numberOfCitations" package-nsUri="library"/>
- </extension>
- <extension id="extension.derived.mostPopularBookCategory" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Library" feature-name="mostPopularBookCategory" package-nsUri="library"/>
- </extension>
- <extension id="extension.derived.numberOfWriters" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Book" feature-name="numberOfWriters" package-nsUri="library"/>
- </extension>
- <extension id="extension.derived.allCitations" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Book" feature-name="allCitations" package-nsUri="library"/>
- </extension>
- <extension id="extension.derived.averageNumberOfCoauthorsPerBook" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Writer" feature-name="averageNumberOfCoauthorsPerBook" package-nsUri="library"/>
- </extension>
- <extension id="extension.derived.suspiciousBooks" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Library" feature-name="suspiciousBooks" package-nsUri="library"/>
- </extension>
- <extension id="extension.derived.name" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Writer" feature-name="name" package-nsUri="library"/>
- </extension>
- <extension id="extension.derived.coAuthors" point="org.eclipse.viatra.query.runtime.base.wellbehaving.derived.features">
- <wellbehaving-derived-feature classifier-name="Writer" feature-name="coAuthors" package-nsUri="library"/>
- </extension>
-</plugin>
diff --git a/examples/library/library.domain/src-gen/.gitignore b/examples/library/library.domain/src-gen/.gitignore
deleted file mode 100644
index 1a5126b18..000000000
--- a/examples/library/library.domain/src-gen/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-#This file is needed to prevent git from omitting this folder that would cause build issues/compile errors.
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore \ No newline at end of file
diff --git a/examples/library/library.domain/src/library/Library.xvql b/examples/library/library.domain/src/library/Library.xvql
deleted file mode 100644
index b268c8333..000000000
--- a/examples/library/library.domain/src/library/Library.xvql
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Tamas Szabo, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Tamas Szabo - initial API and implementation
- * Istvan Rath - minor modifications
- *******************************************************************************/
-//@Ecore(nsPrefix="library", nsURI="http://eclipse.org/incquery/xcore/library")
-@GenModel(editDirectory="/library.edit/src")
-@GenModel(editorDirectory="/library.editor/src")
-package library
-
-class Library {
- String name
- contains Writer[] writers opposite library
- contains Book[] books opposite library
-
- // derived features
- query-based refers Book[] suspiciousBooks spec suspiciousBook
- query-based String mostPopularBookCategory spec mostPopularBookCategory
-}
-
-class Writer {
- String firstName
- String lastName
- container Library library opposite writers
- refers Book[] books opposite writers
-
- // derived features
- query-based String name spec writerName
- query-based Double averageNumberOfCoauthorsPerBook spec averageNumberOfCoauthorsPerBook
- query-based refers Writer[] coAuthors spec coAuthorsOfWriter
- query-based refers Book[] ownBooks spec ownBooksOfWriter
-}
-
-class Book {
- String title = "" // set a default value
- Integer pages
- BookCategory bookCategory
- refers Book[] citations
- refers Writer[] writers opposite books
- container Library library opposite books
-
- // derived features
- query-based Integer numberOfCitations spec numberOfCitations
- query-based refers Book[] allCitations spec allBookCitations
- query-based Integer numberOfWriters spec numberOfWritersOfBook
-}
-
-enum BookCategory {
- Mystery = 0,
- ScienceFiction = 1,
- Biography = 2
-}
diff --git a/examples/library/library.domain/src/library/LibraryQueries.vql b/examples/library/library.domain/src/library/LibraryQueries.vql
deleted file mode 100644
index 529fb82dd..000000000
--- a/examples/library/library.domain/src/library/LibraryQueries.vql
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Tamas Szabo, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Tamas Szabo - initial API and implementation
- * Istvan Rath - minor modifications
- *******************************************************************************/
-package library
-
-//import "http://eclipse.org/incquery/xcore/library"
-import "library"
-
-// ***** relationships ********
-/*
- * CW is the coauthor of W (they share the same book and CW != W)
- */
-pattern coAuthorsOfWriter(W : Writer, CW : Writer) {
- Book(B);
- Writer.books(W, B);
- Writer.books(CW, B);
- W != CW;
-}
-
-/*
- * The name of the writer W is N (first name and last name are concatenated)
- */
-pattern writerName(W : Writer, N) {
- Writer.firstName(W, FN);
- Writer.lastName(W, LN);
- N == eval(FN + " " + LN);
-}
-
-/*
- * N represents the most popular book category of Library L, if that can be defined uniquely:
- * - if there is only one most popular book then that one is returned
- * - if there are two or more categories with the same number of books then 'None' is returned
- */
-pattern mostPopularBookCategory(L : Library, N) {
- V == count find mostPopularBookCategory0(L, _CX);
- check(V == 1);
- find mostPopularBookCategory0(L, C);
- N == eval((C as Object).toString);
-} or {
- V == count find mostPopularBookCategory0(L, _CX);
- check(V > 1 || V == 0);
- N == "None";
-}
-
-/*
- * Category C has the most books in the Library L.
- */
-pattern mostPopularBookCategory0(L : Library, C) = {
- Library.books.bookCategory(L, C);
- neg find moreBooksInCategoryThan(_Cx, C);
-}
-
-/*
- * There are more books with category C1 than books with category C2.
- */
-pattern moreBooksInCategoryThan(C1 : BookCategory, C2 : BookCategory) {
- N == count find categoryOfBook(C1, _B1);
- M == count find categoryOfBook(C2, _B2);
- check(N > M);
- check(C1 != C2);
-}
-
-/*
- * The book category of Book B is BookCategory C
- */
-pattern categoryOfBook(C : BookCategory, B : Book) {
- Book.bookCategory(B, C);
-}
-
-/*
- * The "own" books of writer, i.e. the ones that have only w as the author.
- */
-pattern ownBooksOfWriter(W : Writer, B : Book) {
- Writer.books(W, B);
- find numberOfWritersOfBook(B, 1);
-}
-
-/*
- * All of the (transitive) citations of Book b1 contain Book b2.
- */
-pattern allBookCitations(B1 : Book, B2 : Book) {
- find bookCitation+(B1, B2);
-}
-
-/*
- * Book ref is contained in the set of books that (transitively) reference Book b.
- */
-pattern allReferencesTo(B: Book, Ref: Book){
- find bookCitation+(Ref, B);
-}
-
-/*
- * Book b1 cites Book b2.
- */
-pattern bookCitation(B1 : Book, B2 : Book) {
- Book.citations(B1, B2);
-}
-
-/*
- * Writer W is the writer of Book B.
- */
-pattern bookOfWriter(W : Writer, B : Book) {
- Writer.books(W, B);
-}
-
-/*
- * Book B is a book of Writer W.
- */
-pattern writerOfBook(B : Book, W : Writer) {
- Book.writers(B, W);
-}
-
-// ************* numbers **********
-
-/*
- * The average number of coauthors per book of a writer is
- * the number of coauthors divided by the number of books.
- */
-pattern averageNumberOfCoauthorsPerBook(W : Writer, A) {
- find numberOfBooksOfWriter(W, NumOfBooks);
- NumOfCoAuthors == count find coAuthorsOfWriter(W, _CW);
- A == eval(if (NumOfBooks == 0) 0.0 else NumOfCoAuthors.doubleValue / NumOfBooks.doubleValue);
-}
-
-/*
- * The number of (transitive) citations of Book B1 is N.
- */
-pattern numberOfCitations(B1 : Book, N) {
- N == count find allBookCitations(B1, _B2);
-}
-
-/*
- * The number of the books of Writer W is N.
- */
-pattern numberOfBooksOfWriter(W : Writer, N) {
- N == count find bookOfWriter(W, _B);
-}
-
-/*
- * The number of writers of Book B is N.
- */
-pattern numberOfWritersOfBook(B : Book, N) {
- N == count find writerOfBook(B, _W);
-} \ No newline at end of file
diff --git a/examples/library/library.domain/src/library/validation/ValidationQueries.vql b/examples/library/library.domain/src/library/validation/ValidationQueries.vql
deleted file mode 100644
index d228849af..000000000
--- a/examples/library/library.domain/src/library/validation/ValidationQueries.vql
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Tamas Szabo, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Tamas Szabo - initial API and implementation
- * Istvan Rath - minor modifications
- *******************************************************************************/
-package library.validation
-
-import "library"
-//import "http://eclipse.org/incquery/xcore/library"
-
-// Validation queries
-
- /*
- * A "suspicious" book is one that:
- * - is empty (missing some important field)
- * - is weird (it transitively cites itself)
- */
-@Item(item = B, label = "Suspicious book $B.title$")
-pattern suspiciousBook(L:Library, B: Book) {
- Library.books(L,B);
- find emptyBook(B);
-}
-or {
- Library.books(L,B);
- find weirdBook(B);
-}
-
-/*
- * B is an empty book because it has either no title and/or no authors.
- */
-pattern emptyBook(B: Book) {
- Book.title(B, T);
- check((T as String).length == 0);
-}
-or {
- Book.numberOfWriters(B,0);
-}
-
-/*
- * B is a weird Book because it transitively cites itself.
- */
-pattern weirdBook(B : Book) {
- Book.allCitations(B, B);
-} \ No newline at end of file
diff --git a/examples/library/library.domain/src/library/viewers/ViewersQueries.vql b/examples/library/library.domain/src/library/viewers/ViewersQueries.vql
deleted file mode 100644
index b6044b28d..000000000
--- a/examples/library/library.domain/src/library/viewers/ViewersQueries.vql
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Tamas Szabo, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Tamas Szabo - initial API and implementation
- * Istvan Rath - minor modifications
- *******************************************************************************/
-package library.viewers
-
-import "library"
-//import "http://eclipse.org/incquery/xcore/library"
-
-// Viewers patterns
-
-// items
-
-@Item(item = l, hierarchy = "root", label = "$l.name$")
-pattern library(l) { Library(l); }
-
-@Item(item = w, label = "Writer: $w.name$", hierarchy = "child")
-@Format(color = "#626fc9", textColor = "#ffffff")
-pattern writer(w) { Writer(w);}
-
-@Item(item = b, label = "Book: $b.title$", hierarchy = "child")
-@Format(color = "#b22300", textColor = "#ffffff")
-pattern book(b) { Book(b); }
-
-// containment relationships
-
-@ContainsItem(container = l, item = w)
-pattern writersInLibrary(w:Writer, l:Library){
- Library.writers(l,w);
-}
-
-@ContainsItem(container = l, item = b)
-pattern booksInLibrary(b:Book, l:Library){
- Library.books(l,b);
-}
-
-// edges
-
-@Edge(source = B, target = Ref, label = "ref+")
-@Format(lineStyle = "dashed")
-pattern allReferencesTo(B: Book, Ref: Book){
- //find bookCitation+(Ref, B);
- Book.allCitations(Ref,B);
-}
-
-/*
- * Writer w1 is influenced by w2, since he wrote some book
- * that (indirectly or directly) references one of w2's works.
- */
-@Edge(source = W1, target = W2, label = "influencedBy")
-@Format(lineColor = "#ff0000")
-pattern influencedBy(W1: Writer, W2: Writer) {
- Book.writers(B1, W1);
- Book.writers(B2, W2);
- find allReferencesTo(B2, B1);
-}
-
-@Edge(source = W, target = B, label = "author")
-@QueryExplorer(display = true)
-pattern bookOfWriter(W : Writer, B : Book) {
- Writer.books(W, B);
-} \ No newline at end of file
diff --git a/examples/library/library.ecore.viewers/.classpath b/examples/library/library.ecore.viewers/.classpath
deleted file mode 100644
index 6a42377b5..000000000
--- a/examples/library/library.ecore.viewers/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/library/library.ecore.viewers/.project b/examples/library/library.ecore.viewers/.project
deleted file mode 100644
index f2bd1d8e9..000000000
--- a/examples/library/library.ecore.viewers/.project
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>library.ecore.viewers</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.viatra.query.tooling.core.projectbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
- <nature>org.eclipse.viatra.query.projectnature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/library/library.ecore.viewers/.settings/org.eclipse.jdt.core.prefs b/examples/library/library.ecore.viewers/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de363a..000000000
--- a/examples/library/library.ecore.viewers/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/examples/library/library.ecore.viewers/.settings/org.eclipse.pde.core.prefs b/examples/library/library.ecore.viewers/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 36c29adc3..000000000
--- a/examples/library/library.ecore.viewers/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-eclipse.preferences.version=1
-pluginProject.equinox=false
-resolve.requirebundle=false
diff --git a/examples/library/library.ecore.viewers/META-INF/MANIFEST.MF b/examples/library/library.ecore.viewers/META-INF/MANIFEST.MF
deleted file mode 100644
index 6056cb425..000000000
--- a/examples/library/library.ecore.viewers/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: library.ecore.viewers
-Bundle-SymbolicName: library.ecore.viewers;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Export-Package: library.viewers.livedemo,
- library.viewers.livedemo.util
-Require-Bundle: library.ecore,
- org.eclipse.emf.ecore,
- org.eclipse.emf.transaction,
- org.eclipse.xtext.xbase.lib,
- org.eclipse.viatra.query.runtime;bundle-version="1.2.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Import-Package: org.apache.log4j
diff --git a/examples/library/library.ecore.viewers/build.properties b/examples/library/library.ecore.viewers/build.properties
deleted file mode 100644
index 946f9e2d8..000000000
--- a/examples/library/library.ecore.viewers/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- queries/
-source.. = src/,\
- src-gen/
-output.. = bin/
diff --git a/examples/library/library.ecore.viewers/instancemodel/My.library b/examples/library/library.ecore.viewers/instancemodel/My.library
deleted file mode 100644
index 826794239..000000000
--- a/examples/library/library.ecore.viewers/instancemodel/My.library
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<library:Library xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:library="http://eclipse.org/emf/examples/library">
- <books title="War and Peace" writers="//@writers.1"/>
- <books title="Brave new world" writers="//@writers.0"/>
- <books title="Book of Mysteries" writers="//@writers.2"/>
- <writers name="Aldous Huxley"/>
- <writers name="Leo Tolstoy"/>
- <writers name="John Doe"/>
-</library:Library>
diff --git a/examples/library/library.ecore.viewers/plugin.xml b/examples/library/library.ecore.viewers/plugin.xml
deleted file mode 100644
index a5934fa99..000000000
--- a/examples/library/library.ecore.viewers/plugin.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><plugin>
- <extension id="library.viewers.livedemo.ViewersQueries" point="org.eclipse.viatra.query.runtime.queryspecification">
- <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:library.viewers.livedemo.ViewersQueries" id="library.viewers.livedemo.ViewersQueries"/>
- </extension>
-</plugin>
diff --git a/examples/library/library.ecore.viewers/src-gen/.gitignore b/examples/library/library.ecore.viewers/src-gen/.gitignore
deleted file mode 100644
index 1a5126b18..000000000
--- a/examples/library/library.ecore.viewers/src-gen/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-#This file is needed to prevent git from omitting this folder that would cause build issues/compile errors.
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore \ No newline at end of file
diff --git a/examples/library/library.ecore.viewers/src/library/viewers/livedemo/ViewersQueries.vql b/examples/library/library.ecore.viewers/src/library/viewers/livedemo/ViewersQueries.vql
deleted file mode 100644
index a7353b473..000000000
--- a/examples/library/library.ecore.viewers/src/library/viewers/livedemo/ViewersQueries.vql
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Tamas Szabo, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Tamas Szabo - initial API and implementation
- * Istvan Rath - minor modifications
- *******************************************************************************/
-package library.viewers.livedemo
-
-import "http://eclipse.org/emf/examples/library"
-
-// item
-
-@Item(item = w, label = "Writer: $w.name$")
-@Format(color = "#ed8700", textColor = "#ffffff")
-pattern writer(w) { Writer(w);}
-
-// edge
-
-/*
- * Writer w1 is influenced by w2, since he wrote some book
- * that (indirectly or directly) references one of w2's works.
- */
-@Edge(source = W1, target = W2, label = "influencedBy")
-@Format(lineColor = "#ed8700")
-pattern influencedBy(W1: Writer, W2: Writer) {
- Book.writers(B1, W1);
- Book.writers(B2, W2);
- find allReferencesTo(B2, B1);
-}
-
-/*
- * Book Ref is contained in B's set of transitive references.
- */
-private pattern allReferencesTo(B: Book, Ref: Book){
- find bookCitation+(Ref, B);
-}
-
-/*
- * Book b1 cites Book b2.
- */
-private pattern bookCitation(B1 : Book, B2 : Book) {
- Book.citations(B1, B2);
-}
-
diff --git a/examples/library/library.ecore/.classpath b/examples/library/library.ecore/.classpath
deleted file mode 100644
index 3bc247511..000000000
--- a/examples/library/library.ecore/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/library/library.ecore/.project b/examples/library/library.ecore/.project
deleted file mode 100644
index 26f54edd4..000000000
--- a/examples/library/library.ecore/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>library.ecore</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/library/library.ecore/.settings/org.eclipse.jdt.core.prefs b/examples/library/library.ecore/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de363a..000000000
--- a/examples/library/library.ecore/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/examples/library/library.ecore/META-INF/MANIFEST.MF b/examples/library/library.ecore/META-INF/MANIFEST.MF
deleted file mode 100644
index f7d0e6d5a..000000000
--- a/examples/library/library.ecore/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: library.ecore;singleton:=true
-Bundle-Version: 0.1.0.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Export-Package: library,
- library.impl,
- library.util
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.ecore;visibility:=reexport
-Bundle-ActivationPolicy: lazy
diff --git a/examples/library/library.ecore/build.properties b/examples/library/library.ecore/build.properties
deleted file mode 100644
index 4465407fc..000000000
--- a/examples/library/library.ecore/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-
-bin.includes = .,\
- model/,\
- META-INF/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = .
-source.. = src/
-output.. = bin/
diff --git a/examples/library/library.ecore/model/library.ecore b/examples/library/library.ecore/model/library.ecore
deleted file mode 100644
index 5c87853d3..000000000
--- a/examples/library/library.ecore/model/library.ecore
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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="library" nsURI="http://eclipse.org/emf/examples/library" nsPrefix="library">
- <eClassifiers xsi:type="ecore:EClass" name="Library">
- <eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
- eType="#//Book" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="writers" upperBound="-1"
- eType="#//Writer" containment="true"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Writer">
- <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="Book">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="writers" upperBound="-1"
- eType="#//Writer"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="citations" upperBound="-1"
- eType="#//Book"/>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/examples/library/library.ecore/model/library.genmodel b/examples/library/library.ecore/model/library.genmodel
deleted file mode 100644
index c5a145c37..000000000
--- a/examples/library/library.ecore/model/library.genmodel
+++ /dev/null
@@ -1,22 +0,0 @@
-<?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="/library.ecore/src" modelPluginID="library.ecore"
- modelName="Library" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
- importerID="org.eclipse.emf.importer.ecore" complianceLevel="6.0" copyrightFields="false"
- operationReflection="true" importOrganizing="true">
- <foreignModel>library.ecore</foreignModel>
- <genPackages prefix="Library" disposableProviderFactory="true" ecorePackage="library.ecore#/">
- <genClasses ecoreClass="library.ecore#//Library">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Library/books"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Library/writers"/>
- </genClasses>
- <genClasses ecoreClass="library.ecore#//Writer">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Writer/name"/>
- </genClasses>
- <genClasses ecoreClass="library.ecore#//Book">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/title"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference library.ecore#//Book/writers"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference library.ecore#//Book/citations"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
diff --git a/examples/library/library.ecore/plugin.properties b/examples/library/library.ecore/plugin.properties
deleted file mode 100644
index 5e38cc168..000000000
--- a/examples/library/library.ecore/plugin.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-
-pluginName = Library Model
-providerName = www.example.org
diff --git a/examples/library/library.ecore/plugin.xml b/examples/library/library.ecore/plugin.xml
deleted file mode 100644
index 408ef307e..000000000
--- a/examples/library/library.ecore/plugin.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!--
--->
-
-<plugin>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <!-- @generated library -->
- <package
- uri="http://eclipse.org/emf/examples/library"
- class="library.LibraryPackage"
- genModel="model/library.genmodel"/>
- </extension>
-
-</plugin>
diff --git a/examples/library/library.ecore/src/library/Book.java b/examples/library/library.ecore/src/library/Book.java
deleted file mode 100644
index 86cbebe18..000000000
--- a/examples/library/library.ecore/src/library/Book.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- */
-package library;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Book</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * </p>
- * <ul>
- * <li>{@link library.Book#getTitle <em>Title</em>}</li>
- * <li>{@link library.Book#getWriters <em>Writers</em>}</li>
- * <li>{@link library.Book#getCitations <em>Citations</em>}</li>
- * </ul>
- *
- * @see library.LibraryPackage#getBook()
- * @model
- * @generated
- */
-public interface Book extends EObject {
- /**
- * Returns the value of the '<em><b>Title</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Title</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Title</em>' attribute.
- * @see #setTitle(String)
- * @see library.LibraryPackage#getBook_Title()
- * @model
- * @generated
- */
- String getTitle();
-
- /**
- * Sets the value of the '{@link library.Book#getTitle <em>Title</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Title</em>' attribute.
- * @see #getTitle()
- * @generated
- */
- void setTitle(String value);
-
- /**
- * Returns the value of the '<em><b>Writers</b></em>' reference list.
- * The list contents are of type {@link library.Writer}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Writers</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Writers</em>' reference list.
- * @see library.LibraryPackage#getBook_Writers()
- * @model
- * @generated
- */
- EList<Writer> getWriters();
-
- /**
- * Returns the value of the '<em><b>Citations</b></em>' reference list.
- * The list contents are of type {@link library.Book}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Citations</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Citations</em>' reference list.
- * @see library.LibraryPackage#getBook_Citations()
- * @model
- * @generated
- */
- EList<Book> getCitations();
-
-} // Book
diff --git a/examples/library/library.ecore/src/library/Library.java b/examples/library/library.ecore/src/library/Library.java
deleted file mode 100644
index 1fae7486e..000000000
--- a/examples/library/library.ecore/src/library/Library.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- */
-package library;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Library</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * </p>
- * <ul>
- * <li>{@link library.Library#getBooks <em>Books</em>}</li>
- * <li>{@link library.Library#getWriters <em>Writers</em>}</li>
- * </ul>
- *
- * @see library.LibraryPackage#getLibrary()
- * @model
- * @generated
- */
-public interface Library extends EObject {
- /**
- * Returns the value of the '<em><b>Books</b></em>' containment reference list.
- * The list contents are of type {@link library.Book}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Books</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>Books</em>' containment reference list.
- * @see library.LibraryPackage#getLibrary_Books()
- * @model containment="true"
- * @generated
- */
- EList<Book> getBooks();
-
- /**
- * Returns the value of the '<em><b>Writers</b></em>' containment reference list.
- * The list contents are of type {@link library.Writer}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Writers</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>Writers</em>' containment reference list.
- * @see library.LibraryPackage#getLibrary_Writers()
- * @model containment="true"
- * @generated
- */
- EList<Writer> getWriters();
-
-} // Library
diff --git a/examples/library/library.ecore/src/library/LibraryFactory.java b/examples/library/library.ecore/src/library/LibraryFactory.java
deleted file mode 100644
index cb15b07c9..000000000
--- a/examples/library/library.ecore/src/library/LibraryFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- */
-package library;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see library.LibraryPackage
- * @generated
- */
-public interface LibraryFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- LibraryFactory eINSTANCE = library.impl.LibraryFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Library</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Library</em>'.
- * @generated
- */
- Library createLibrary();
-
- /**
- * Returns a new object of class '<em>Writer</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Writer</em>'.
- * @generated
- */
- Writer createWriter();
-
- /**
- * Returns a new object of class '<em>Book</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Book</em>'.
- * @generated
- */
- Book createBook();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- LibraryPackage getLibraryPackage();
-
-} //LibraryFactory
diff --git a/examples/library/library.ecore/src/library/LibraryPackage.java b/examples/library/library.ecore/src/library/LibraryPackage.java
deleted file mode 100644
index 20f6caf76..000000000
--- a/examples/library/library.ecore/src/library/LibraryPackage.java
+++ /dev/null
@@ -1,397 +0,0 @@
-/**
- */
-package library;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each operation of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see library.LibraryFactory
- * @model kind="package"
- * @generated
- */
-public interface LibraryPackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "library";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://eclipse.org/emf/examples/library";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "library";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- LibraryPackage eINSTANCE = library.impl.LibraryPackageImpl.init();
-
- /**
- * The meta object id for the '{@link library.impl.LibraryImpl <em>Library</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see library.impl.LibraryImpl
- * @see library.impl.LibraryPackageImpl#getLibrary()
- * @generated
- */
- int LIBRARY = 0;
-
- /**
- * The feature id for the '<em><b>Books</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__BOOKS = 0;
-
- /**
- * The feature id for the '<em><b>Writers</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__WRITERS = 1;
-
- /**
- * The number of structural features of the '<em>Library</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY_FEATURE_COUNT = 2;
-
- /**
- * The number of operations of the '<em>Library</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY_OPERATION_COUNT = 0;
-
- /**
- * The meta object id for the '{@link library.impl.WriterImpl <em>Writer</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see library.impl.WriterImpl
- * @see library.impl.LibraryPackageImpl#getWriter()
- * @generated
- */
- int WRITER = 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER__NAME = 0;
-
- /**
- * The number of structural features of the '<em>Writer</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER_FEATURE_COUNT = 1;
-
- /**
- * The number of operations of the '<em>Writer</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER_OPERATION_COUNT = 0;
-
- /**
- * The meta object id for the '{@link library.impl.BookImpl <em>Book</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see library.impl.BookImpl
- * @see library.impl.LibraryPackageImpl#getBook()
- * @generated
- */
- int BOOK = 2;
-
- /**
- * The feature id for the '<em><b>Title</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__TITLE = 0;
-
- /**
- * The feature id for the '<em><b>Writers</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__WRITERS = 1;
-
- /**
- * The feature id for the '<em><b>Citations</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__CITATIONS = 2;
-
- /**
- * The number of structural features of the '<em>Book</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK_FEATURE_COUNT = 3;
-
- /**
- * The number of operations of the '<em>Book</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK_OPERATION_COUNT = 0;
-
-
- /**
- * Returns the meta object for class '{@link library.Library <em>Library</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Library</em>'.
- * @see library.Library
- * @generated
- */
- EClass getLibrary();
-
- /**
- * Returns the meta object for the containment reference list '{@link library.Library#getBooks <em>Books</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Books</em>'.
- * @see library.Library#getBooks()
- * @see #getLibrary()
- * @generated
- */
- EReference getLibrary_Books();
-
- /**
- * Returns the meta object for the containment reference list '{@link library.Library#getWriters <em>Writers</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Writers</em>'.
- * @see library.Library#getWriters()
- * @see #getLibrary()
- * @generated
- */
- EReference getLibrary_Writers();
-
- /**
- * Returns the meta object for class '{@link library.Writer <em>Writer</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Writer</em>'.
- * @see library.Writer
- * @generated
- */
- EClass getWriter();
-
- /**
- * Returns the meta object for the attribute '{@link library.Writer#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see library.Writer#getName()
- * @see #getWriter()
- * @generated
- */
- EAttribute getWriter_Name();
-
- /**
- * Returns the meta object for class '{@link library.Book <em>Book</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Book</em>'.
- * @see library.Book
- * @generated
- */
- EClass getBook();
-
- /**
- * Returns the meta object for the attribute '{@link library.Book#getTitle <em>Title</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Title</em>'.
- * @see library.Book#getTitle()
- * @see #getBook()
- * @generated
- */
- EAttribute getBook_Title();
-
- /**
- * Returns the meta object for the reference list '{@link library.Book#getWriters <em>Writers</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Writers</em>'.
- * @see library.Book#getWriters()
- * @see #getBook()
- * @generated
- */
- EReference getBook_Writers();
-
- /**
- * Returns the meta object for the reference list '{@link library.Book#getCitations <em>Citations</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Citations</em>'.
- * @see library.Book#getCitations()
- * @see #getBook()
- * @generated
- */
- EReference getBook_Citations();
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- LibraryFactory getLibraryFactory();
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each operation of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- interface Literals {
- /**
- * The meta object literal for the '{@link library.impl.LibraryImpl <em>Library</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see library.impl.LibraryImpl
- * @see library.impl.LibraryPackageImpl#getLibrary()
- * @generated
- */
- EClass LIBRARY = eINSTANCE.getLibrary();
-
- /**
- * The meta object literal for the '<em><b>Books</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference LIBRARY__BOOKS = eINSTANCE.getLibrary_Books();
-
- /**
- * The meta object literal for the '<em><b>Writers</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference LIBRARY__WRITERS = eINSTANCE.getLibrary_Writers();
-
- /**
- * The meta object literal for the '{@link library.impl.WriterImpl <em>Writer</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see library.impl.WriterImpl
- * @see library.impl.LibraryPackageImpl#getWriter()
- * @generated
- */
- EClass WRITER = eINSTANCE.getWriter();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute WRITER__NAME = eINSTANCE.getWriter_Name();
-
- /**
- * The meta object literal for the '{@link library.impl.BookImpl <em>Book</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see library.impl.BookImpl
- * @see library.impl.LibraryPackageImpl#getBook()
- * @generated
- */
- EClass BOOK = eINSTANCE.getBook();
-
- /**
- * The meta object literal for the '<em><b>Title</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute BOOK__TITLE = eINSTANCE.getBook_Title();
-
- /**
- * The meta object literal for the '<em><b>Writers</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference BOOK__WRITERS = eINSTANCE.getBook_Writers();
-
- /**
- * The meta object literal for the '<em><b>Citations</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference BOOK__CITATIONS = eINSTANCE.getBook_Citations();
-
- }
-
-} //LibraryPackage
diff --git a/examples/library/library.ecore/src/library/Writer.java b/examples/library/library.ecore/src/library/Writer.java
deleted file mode 100644
index bc3ce196b..000000000
--- a/examples/library/library.ecore/src/library/Writer.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- */
-package library;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Writer</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * </p>
- * <ul>
- * <li>{@link library.Writer#getName <em>Name</em>}</li>
- * </ul>
- *
- * @see library.LibraryPackage#getWriter()
- * @model
- * @generated
- */
-public interface Writer extends EObject {
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see library.LibraryPackage#getWriter_Name()
- * @model
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link library.Writer#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
-} // Writer
diff --git a/examples/library/library.ecore/src/library/impl/BookImpl.java b/examples/library/library.ecore/src/library/impl/BookImpl.java
deleted file mode 100644
index dc1e69ba8..000000000
--- a/examples/library/library.ecore/src/library/impl/BookImpl.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/**
- */
-package library.impl;
-
-import java.util.Collection;
-
-import library.Book;
-import library.LibraryPackage;
-import library.Writer;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-
-import org.eclipse.emf.ecore.util.EObjectResolvingEList;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Book</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * </p>
- * <ul>
- * <li>{@link library.impl.BookImpl#getTitle <em>Title</em>}</li>
- * <li>{@link library.impl.BookImpl#getWriters <em>Writers</em>}</li>
- * <li>{@link library.impl.BookImpl#getCitations <em>Citations</em>}</li>
- * </ul>
- *
- * @generated
- */
-public class BookImpl extends MinimalEObjectImpl.Container implements Book {
- /**
- * The default value of the '{@link #getTitle() <em>Title</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTitle()
- * @generated
- * @ordered
- */
- protected static final String TITLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getTitle() <em>Title</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTitle()
- * @generated
- * @ordered
- */
- protected String title = TITLE_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getWriters() <em>Writers</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getWriters()
- * @generated
- * @ordered
- */
- protected EList<Writer> writers;
-
- /**
- * The cached value of the '{@link #getCitations() <em>Citations</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCitations()
- * @generated
- * @ordered
- */
- protected EList<Book> citations;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected BookImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return LibraryPackage.Literals.BOOK;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getTitle() {
- return title;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setTitle(String newTitle) {
- String oldTitle = title;
- title = newTitle;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__TITLE, oldTitle, title));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Writer> getWriters() {
- if (writers == null) {
- writers = new EObjectResolvingEList<Writer>(Writer.class, this, LibraryPackage.BOOK__WRITERS);
- }
- return writers;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Book> getCitations() {
- if (citations == null) {
- citations = new EObjectResolvingEList<Book>(Book.class, this, LibraryPackage.BOOK__CITATIONS);
- }
- return citations;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- return getTitle();
- case LibraryPackage.BOOK__WRITERS:
- return getWriters();
- case LibraryPackage.BOOK__CITATIONS:
- return getCitations();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- setTitle((String)newValue);
- return;
- case LibraryPackage.BOOK__WRITERS:
- getWriters().clear();
- getWriters().addAll((Collection<? extends Writer>)newValue);
- return;
- case LibraryPackage.BOOK__CITATIONS:
- getCitations().clear();
- getCitations().addAll((Collection<? extends Book>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- setTitle(TITLE_EDEFAULT);
- return;
- case LibraryPackage.BOOK__WRITERS:
- getWriters().clear();
- return;
- case LibraryPackage.BOOK__CITATIONS:
- getCitations().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
- case LibraryPackage.BOOK__WRITERS:
- return writers != null && !writers.isEmpty();
- case LibraryPackage.BOOK__CITATIONS:
- return citations != null && !citations.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (title: ");
- result.append(title);
- result.append(')');
- return result.toString();
- }
-
-} //BookImpl
diff --git a/examples/library/library.ecore/src/library/impl/LibraryFactoryImpl.java b/examples/library/library.ecore/src/library/impl/LibraryFactoryImpl.java
deleted file mode 100644
index aea186d40..000000000
--- a/examples/library/library.ecore/src/library/impl/LibraryFactoryImpl.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- */
-package library.impl;
-
-import library.*;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryFactoryImpl extends EFactoryImpl implements LibraryFactory {
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static LibraryFactory init() {
- try {
- LibraryFactory theLibraryFactory = (LibraryFactory)EPackage.Registry.INSTANCE.getEFactory(LibraryPackage.eNS_URI);
- if (theLibraryFactory != null) {
- return theLibraryFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new LibraryFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case LibraryPackage.LIBRARY: return createLibrary();
- case LibraryPackage.WRITER: return createWriter();
- case LibraryPackage.BOOK: return createBook();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Library createLibrary() {
- LibraryImpl library = new LibraryImpl();
- return library;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Writer createWriter() {
- WriterImpl writer = new WriterImpl();
- return writer;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Book createBook() {
- BookImpl book = new BookImpl();
- return book;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryPackage getLibraryPackage() {
- return (LibraryPackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static LibraryPackage getPackage() {
- return LibraryPackage.eINSTANCE;
- }
-
-} //LibraryFactoryImpl
diff --git a/examples/library/library.ecore/src/library/impl/LibraryImpl.java b/examples/library/library.ecore/src/library/impl/LibraryImpl.java
deleted file mode 100644
index ad91bc757..000000000
--- a/examples/library/library.ecore/src/library/impl/LibraryImpl.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/**
- */
-package library.impl;
-
-import java.util.Collection;
-
-import library.Book;
-import library.Library;
-import library.LibraryPackage;
-import library.Writer;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Library</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * </p>
- * <ul>
- * <li>{@link library.impl.LibraryImpl#getBooks <em>Books</em>}</li>
- * <li>{@link library.impl.LibraryImpl#getWriters <em>Writers</em>}</li>
- * </ul>
- *
- * @generated
- */
-public class LibraryImpl extends MinimalEObjectImpl.Container implements Library {
- /**
- * The cached value of the '{@link #getBooks() <em>Books</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getBooks()
- * @generated
- * @ordered
- */
- protected EList<Book> books;
-
- /**
- * The cached value of the '{@link #getWriters() <em>Writers</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getWriters()
- * @generated
- * @ordered
- */
- protected EList<Writer> writers;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LibraryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return LibraryPackage.Literals.LIBRARY;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Book> getBooks() {
- if (books == null) {
- books = new EObjectContainmentEList<Book>(Book.class, this, LibraryPackage.LIBRARY__BOOKS);
- }
- return books;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Writer> getWriters() {
- if (writers == null) {
- writers = new EObjectContainmentEList<Writer>(Writer.class, this, LibraryPackage.LIBRARY__WRITERS);
- }
- return writers;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__BOOKS:
- return ((InternalEList<?>)getBooks()).basicRemove(otherEnd, msgs);
- case LibraryPackage.LIBRARY__WRITERS:
- return ((InternalEList<?>)getWriters()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__BOOKS:
- return getBooks();
- case LibraryPackage.LIBRARY__WRITERS:
- return getWriters();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__BOOKS:
- getBooks().clear();
- getBooks().addAll((Collection<? extends Book>)newValue);
- return;
- case LibraryPackage.LIBRARY__WRITERS:
- getWriters().clear();
- getWriters().addAll((Collection<? extends Writer>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__BOOKS:
- getBooks().clear();
- return;
- case LibraryPackage.LIBRARY__WRITERS:
- getWriters().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__BOOKS:
- return books != null && !books.isEmpty();
- case LibraryPackage.LIBRARY__WRITERS:
- return writers != null && !writers.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-} //LibraryImpl
diff --git a/examples/library/library.ecore/src/library/impl/LibraryPackageImpl.java b/examples/library/library.ecore/src/library/impl/LibraryPackageImpl.java
deleted file mode 100644
index 03d673442..000000000
--- a/examples/library/library.ecore/src/library/impl/LibraryPackageImpl.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/**
- */
-package library.impl;
-
-import library.Book;
-import library.Library;
-import library.LibraryFactory;
-import library.LibraryPackage;
-import library.Writer;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass libraryEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass writerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass bookEClass = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see library.LibraryPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private LibraryPackageImpl() {
- super(eNS_URI, LibraryFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>This method is used to initialize {@link LibraryPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static LibraryPackage init() {
- if (isInited) return (LibraryPackage)EPackage.Registry.INSTANCE.getEPackage(LibraryPackage.eNS_URI);
-
- // Obtain or create and register package
- LibraryPackageImpl theLibraryPackage = (LibraryPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof LibraryPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new LibraryPackageImpl());
-
- isInited = true;
-
- // Create package meta-data objects
- theLibraryPackage.createPackageContents();
-
- // Initialize created meta-data
- theLibraryPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theLibraryPackage.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(LibraryPackage.eNS_URI, theLibraryPackage);
- return theLibraryPackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getLibrary() {
- return libraryEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getLibrary_Books() {
- return (EReference)libraryEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getLibrary_Writers() {
- return (EReference)libraryEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getWriter() {
- return writerEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getWriter_Name() {
- return (EAttribute)writerEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getBook() {
- return bookEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getBook_Title() {
- return (EAttribute)bookEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getBook_Writers() {
- return (EReference)bookEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getBook_Citations() {
- return (EReference)bookEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryFactory getLibraryFactory() {
- return (LibraryFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents() {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- libraryEClass = createEClass(LIBRARY);
- createEReference(libraryEClass, LIBRARY__BOOKS);
- createEReference(libraryEClass, LIBRARY__WRITERS);
-
- writerEClass = createEClass(WRITER);
- createEAttribute(writerEClass, WRITER__NAME);
-
- bookEClass = createEClass(BOOK);
- createEAttribute(bookEClass, BOOK__TITLE);
- createEReference(bookEClass, BOOK__WRITERS);
- createEReference(bookEClass, BOOK__CITATIONS);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
-
- // Initialize classes, features, and operations; add parameters
- initEClass(libraryEClass, Library.class, "Library", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getLibrary_Books(), this.getBook(), null, "books", null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getLibrary_Writers(), this.getWriter(), null, "writers", null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(writerEClass, Writer.class, "Writer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getWriter_Name(), ecorePackage.getEString(), "name", null, 0, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(bookEClass, Book.class, "Book", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getBook_Title(), ecorePackage.getEString(), "title", null, 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getBook_Writers(), this.getWriter(), null, "writers", null, 0, -1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getBook_Citations(), this.getBook(), null, "citations", null, 0, -1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Create resource
- createResource(eNS_URI);
- }
-
-} //LibraryPackageImpl
diff --git a/examples/library/library.ecore/src/library/impl/WriterImpl.java b/examples/library/library.ecore/src/library/impl/WriterImpl.java
deleted file mode 100644
index d275a3913..000000000
--- a/examples/library/library.ecore/src/library/impl/WriterImpl.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/**
- */
-package library.impl;
-
-import library.LibraryPackage;
-import library.Writer;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Writer</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * </p>
- * <ul>
- * <li>{@link library.impl.WriterImpl#getName <em>Name</em>}</li>
- * </ul>
- *
- * @generated
- */
-public class WriterImpl extends MinimalEObjectImpl.Container implements Writer {
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected WriterImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return LibraryPackage.Literals.WRITER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.WRITER__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case LibraryPackage.WRITER__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case LibraryPackage.WRITER__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case LibraryPackage.WRITER__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case LibraryPackage.WRITER__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-} //WriterImpl
diff --git a/examples/library/library.ecore/src/library/util/LibraryAdapterFactory.java b/examples/library/library.ecore/src/library/util/LibraryAdapterFactory.java
deleted file mode 100644
index 271fcafa0..000000000
--- a/examples/library/library.ecore/src/library/util/LibraryAdapterFactory.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- */
-package library.util;
-
-import library.*;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
- * @see library.LibraryPackage
- * @generated
- */
-public class LibraryAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static LibraryPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = LibraryPackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch that delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LibrarySwitch<Adapter> modelSwitch =
- new LibrarySwitch<Adapter>() {
- @Override
- public Adapter caseLibrary(Library object) {
- return createLibraryAdapter();
- }
- @Override
- public Adapter caseWriter(Writer object) {
- return createWriterAdapter();
- }
- @Override
- public Adapter caseBook(Book object) {
- return createBookAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- @Override
- public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * Creates a new adapter for an object of class '{@link library.Library <em>Library</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see library.Library
- * @generated
- */
- public Adapter createLibraryAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link library.Writer <em>Writer</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see library.Writer
- * @generated
- */
- public Adapter createWriterAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link library.Book <em>Book</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see library.Book
- * @generated
- */
- public Adapter createBookAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
-} //LibraryAdapterFactory
diff --git a/examples/library/library.ecore/src/library/util/LibrarySwitch.java b/examples/library/library.ecore/src/library/util/LibrarySwitch.java
deleted file mode 100644
index b1f7baf31..000000000
--- a/examples/library/library.ecore/src/library/util/LibrarySwitch.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- */
-package library.util;
-
-import library.*;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.util.Switch;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * <!-- end-user-doc -->
- * @see library.LibraryPackage
- * @generated
- */
-public class LibrarySwitch<T> extends Switch<T> {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static LibraryPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibrarySwitch() {
- if (modelPackage == null) {
- modelPackage = LibraryPackage.eINSTANCE;
- }
- }
-
- /**
- * Checks whether this is a switch for the given package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param ePackage the package in question.
- * @return whether this is a switch for the given package.
- * @generated
- */
- @Override
- protected boolean isSwitchFor(EPackage ePackage) {
- return ePackage == modelPackage;
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- @Override
- protected T doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case LibraryPackage.LIBRARY: {
- Library library = (Library)theEObject;
- T result = caseLibrary(library);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case LibraryPackage.WRITER: {
- Writer writer = (Writer)theEObject;
- T result = caseWriter(writer);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case LibraryPackage.BOOK: {
- Book book = (Book)theEObject;
- T result = caseBook(book);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Library</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Library</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseLibrary(Library object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Writer</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Writer</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseWriter(Writer object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Book</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Book</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseBook(Book object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- @Override
- public T defaultCase(EObject object) {
- return null;
- }
-
-} //LibrarySwitch
diff --git a/examples/library/library.ecore/src/library/validation/BookValidator.java b/examples/library/library.ecore/src/library/validation/BookValidator.java
deleted file mode 100644
index 47bf09582..000000000
--- a/examples/library/library.ecore/src/library/validation/BookValidator.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- *
- * $Id$
- */
-package library.validation;
-
-import library.Book;
-import library.Writer;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * A sample validator interface for {@link library.Book}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface BookValidator {
- boolean validate();
-
- boolean validateTitle(String value);
- boolean validateWriters(EList<Writer> value);
- boolean validateCitations(EList<Book> value);
-}
diff --git a/examples/library/library.ecore/src/library/validation/LibraryValidator.java b/examples/library/library.ecore/src/library/validation/LibraryValidator.java
deleted file mode 100644
index fe8ccc6e1..000000000
--- a/examples/library/library.ecore/src/library/validation/LibraryValidator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- *
- * $Id$
- */
-package library.validation;
-
-import library.Book;
-import library.Writer;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * A sample validator interface for {@link library.Library}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface LibraryValidator {
- boolean validate();
-
- boolean validateBooks(EList<Book> value);
- boolean validateWriters(EList<Writer> value);
-}
diff --git a/examples/library/library.ecore/src/library/validation/WriterValidator.java b/examples/library/library.ecore/src/library/validation/WriterValidator.java
deleted file mode 100644
index be3bd4873..000000000
--- a/examples/library/library.ecore/src/library/validation/WriterValidator.java
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- *
- * $Id$
- */
-package library.validation;
-
-
-/**
- * A sample validator interface for {@link library.Writer}.
- * This doesn't really do anything, and it's not a real EMF artifact.
- * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
- * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
- */
-public interface WriterValidator {
- boolean validate();
-
- boolean validateName(String value);
-}
diff --git a/examples/library/library.ecore/text/description.txt b/examples/library/library.ecore/text/description.txt
deleted file mode 100644
index c1e7c170b..000000000
--- a/examples/library/library.ecore/text/description.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-Model Library
-
-This model description is not a real EMF artifact. It was generated by the
-org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's
-code generator can be extended.
-This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
-
-Package library <http://eclipse.org/emf/examples/library>
-
- Class Library
- Reference books : Book<<0..*>>
- Reference writers : Writer<<0..*>>
-
- Class Writer
- Attribute name : EString
-
- Class Book
- Attribute title : EString
- Reference writers : Writer<<0..*>>
- Reference citations : Book<<0..*>>
diff --git a/examples/library/library.instances/.classpath b/examples/library/library.instances/.classpath
deleted file mode 100644
index 67e2a52cb..000000000
--- a/examples/library/library.instances/.classpath
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/library/library.instances/.project b/examples/library/library.instances/.project
deleted file mode 100644
index 98f43b1cc..000000000
--- a/examples/library/library.instances/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>library.instances</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/library/library.instances/.settings/org.eclipse.jdt.core.prefs b/examples/library/library.instances/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index f42de363a..000000000
--- a/examples/library/library.instances/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/examples/library/library.instances/META-INF/MANIFEST.MF b/examples/library/library.instances/META-INF/MANIFEST.MF
deleted file mode 100644
index 7033bab36..000000000
--- a/examples/library/library.instances/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Instances
-Bundle-SymbolicName: library.instances;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: library.domain;bundle-version="0.1.0"
diff --git a/examples/library/library.instances/build.properties b/examples/library/library.instances/build.properties
deleted file mode 100644
index 7594fab8d..000000000
--- a/examples/library/library.instances/build.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-bin.includes = META-INF/,\
- .
diff --git a/examples/library/library.instances/model/dynamic/Library_domain.xmi b/examples/library/library.instances/model/dynamic/Library_domain.xmi
deleted file mode 100644
index ce3336d62..000000000
--- a/examples/library/library.instances/model/dynamic/Library_domain.xmi
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<library:Library xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:library="library" xsi:schemaLocation="library ../../../library.domain/src/library/Library.xvql#/EPackage" name="My Library">
- <writers firstName="Leo" lastName="Tolstoy" books="//@books.1 //@books.2 //@books.3"/>
- <writers firstName="Aldous" lastName="Huxley" books="//@books.2 //@books.1"/>
- <writers firstName="John" lastName="Doe" books="//@books.3 //@books.4 //@books.0"/>
- <books title="War and Peace" bookCategory="ScienceFiction" writers="//@writers.2"/>
- <books title="Anna Karenina" bookCategory="ScienceFiction" citations="//@books.0" writers="//@writers.0 //@writers.1"/>
- <books title="Brave New World" bookCategory="Biography" citations="//@books.1" writers="//@writers.1 //@writers.0"/>
- <books title="Book of Mysteries" bookCategory="ScienceFiction" citations="//@books.2" writers="//@writers.2 //@writers.0"/>
- <books title="Suspicious" pages="0" citations="//@books.4" writers="//@writers.2"/>
- <books title="Nonempty"/>
-</library:Library>
diff --git a/examples/library/library.instances/model/dynamic/Library_domain_viewers_livedemo.xmi b/examples/library/library.instances/model/dynamic/Library_domain_viewers_livedemo.xmi
deleted file mode 100644
index 6a73a1633..000000000
--- a/examples/library/library.instances/model/dynamic/Library_domain_viewers_livedemo.xmi
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<library:Library xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:library="library" xsi:schemaLocation="library ../../../library.domain/src/library/Library.xvql#/EPackage" name="My Library">
- <writers firstName="Leo" lastName="Tolstoy" books="//@books.0 //@books.1"/>
- <writers firstName="Aldous" lastName="Huxley" books="//@books.2"/>
- <writers firstName="John" lastName="Doe" books="//@books.3"/>
- <books title="War and Peace" bookCategory="ScienceFiction" writers="//@writers.0"/>
- <books title="Anna Karenina" bookCategory="ScienceFiction" writers="//@writers.0"/>
- <books title="Brave New World" bookCategory="Biography" writers="//@writers.1"/>
- <books title="Book of Mysteries" bookCategory="ScienceFiction" writers="//@writers.2"/>
-</library:Library>
diff --git a/examples/library/library.instances/model/gen/My_domain.library b/examples/library/library.instances/model/gen/My_domain.library
deleted file mode 100644
index 622b5e6ad..000000000
--- a/examples/library/library.instances/model/gen/My_domain.library
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<library:Library xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:library="library">
- <writers firstName="John" lastName="Doe" books="//@books.0"/>
- <writers firstName="Mad" lastName="Max" books="//@books.1"/>
- <books title="Book One" citations="//@books.0" writers="//@writers.0"/>
- <books title="Book Two" writers="//@writers.1"/>
-</library:Library>
diff --git a/examples/minilibrary/.gitignore b/examples/minilibrary/.gitignore
deleted file mode 100644
index 68a16be95..000000000
--- a/examples/minilibrary/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-plugin.xml_gen
-bin
-target
-plugin.xml_gen
-MANIFEST.MF_gen
-.DS_Store*
-xtend-gen
-+keep.txt
-+.keep.txt
-!src-gen
-!globalEiqModel.xmi \ No newline at end of file
diff --git a/examples/minilibrary/README.markdown b/examples/minilibrary/README.markdown
deleted file mode 100644
index c0dc20d54..000000000
--- a/examples/minilibrary/README.markdown
+++ /dev/null
@@ -1,4 +0,0 @@
-Query-driven soft interconnection for EMF models
-================================================
-
-See https://wiki.eclipse.org/index.php?title=EMFIncQuery/UserDocumentation/API/RunOnce for details \ No newline at end of file
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/.classpath b/examples/minilibrary/org.eclipse.viatra.examples.library/.classpath
deleted file mode 100644
index b39dac816..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="emf-gen"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/.project b/examples/minilibrary/org.eclipse.viatra.examples.library/.project
deleted file mode 100644
index c20e33d59..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.examples.library</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/META-INF/MANIFEST.MF b/examples/minilibrary/org.eclipse.viatra.examples.library/META-INF/MANIFEST.MF
deleted file mode 100644
index 54481771f..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.viatra.examples.library;singleton:=true
-Bundle-Version: 0.1.0.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.eclipse.viatra.examples.library,
- org.eclipse.viatra.examples.library.impl,
- org.eclipse.viatra.examples.library.util
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.ecore;visibility:=reexport
-Bundle-ActivationPolicy: lazy
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/build.properties b/examples/minilibrary/org.eclipse.viatra.examples.library/build.properties
deleted file mode 100644
index 1a11a799c..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-
-bin.includes = .,\
- model/,\
- META-INF/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = .
-source.. = emf-gen/
-output.. = bin/
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Book.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Book.java
deleted file mode 100644
index ce12bf44c..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Book.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Book</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.viatra.examples.library.Book#getTitle <em>Title</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Book#getPages <em>Pages</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Book#getCategory <em>Category</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Book#getAuthors <em>Authors</em>}</li>
- * </ul>
- *
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getBook()
- * @model
- * @generated
- */
-public interface Book extends EObject {
- /**
- * Returns the value of the '<em><b>Title</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Title</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Title</em>' attribute.
- * @see #setTitle(String)
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getBook_Title()
- * @model
- * @generated
- */
- String getTitle();
-
- /**
- * Sets the value of the '{@link org.eclipse.viatra.examples.library.Book#getTitle <em>Title</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Title</em>' attribute.
- * @see #getTitle()
- * @generated
- */
- void setTitle(String value);
-
- /**
- * Returns the value of the '<em><b>Pages</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Pages</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Pages</em>' attribute.
- * @see #setPages(int)
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getBook_Pages()
- * @model
- * @generated
- */
- int getPages();
-
- /**
- * Sets the value of the '{@link org.eclipse.viatra.examples.library.Book#getPages <em>Pages</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Pages</em>' attribute.
- * @see #getPages()
- * @generated
- */
- void setPages(int value);
-
- /**
- * Returns the value of the '<em><b>Category</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.BookCategory}.
- * The literals are from the enumeration {@link org.eclipse.viatra.examples.library.BookCategory}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Category</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Category</em>' attribute list.
- * @see org.eclipse.viatra.examples.library.BookCategory
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getBook_Category()
- * @model
- * @generated
- */
- EList<BookCategory> getCategory();
-
- /**
- * Returns the value of the '<em><b>Authors</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.Writer}.
- * It is bidirectional and its opposite is '{@link org.eclipse.viatra.examples.library.Writer#getBooks <em>Books</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Authors</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Authors</em>' reference list.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getBook_Authors()
- * @see org.eclipse.viatra.examples.library.Writer#getBooks
- * @model opposite="books"
- * @generated
- */
- EList<Writer> getAuthors();
-
-} // Book
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/BookCategory.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/BookCategory.java
deleted file mode 100644
index 213394f6c..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/BookCategory.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library;
-
-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>Book Category</b></em>',
- * and utility methods for working with them.
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getBookCategory()
- * @model
- * @generated
- */
-public enum BookCategory implements Enumerator {
- /**
- * The '<em><b>Drama</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #DRAMA_VALUE
- * @generated
- * @ordered
- */
- DRAMA(0, "Drama", "Drama"),
-
- /**
- * The '<em><b>History</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #HISTORY_VALUE
- * @generated
- * @ordered
- */
- HISTORY(1, "History", "History"),
-
- /**
- * The '<em><b>Art</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #ART_VALUE
- * @generated
- * @ordered
- */
- ART(2, "Art", "Art"),
-
- /**
- * The '<em><b>Sci Fi</b></em>' literal object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #SCI_FI_VALUE
- * @generated
- * @ordered
- */
- SCI_FI(3, "SciFi", "SciFi");
-
- /**
- * The '<em><b>Drama</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Drama</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #DRAMA
- * @model name="Drama"
- * @generated
- * @ordered
- */
- public static final int DRAMA_VALUE = 0;
-
- /**
- * The '<em><b>History</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>History</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #HISTORY
- * @model name="History"
- * @generated
- * @ordered
- */
- public static final int HISTORY_VALUE = 1;
-
- /**
- * The '<em><b>Art</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Art</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #ART
- * @model name="Art"
- * @generated
- * @ordered
- */
- public static final int ART_VALUE = 2;
-
- /**
- * The '<em><b>Sci Fi</b></em>' literal value.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of '<em><b>Sci Fi</b></em>' literal object isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @see #SCI_FI
- * @model name="SciFi"
- * @generated
- * @ordered
- */
- public static final int SCI_FI_VALUE = 3;
-
- /**
- * An array of all the '<em><b>Book Category</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static final BookCategory[] VALUES_ARRAY =
- new BookCategory[] {
- DRAMA,
- HISTORY,
- ART,
- SCI_FI,
- };
-
- /**
- * A public read-only list of all the '<em><b>Book Category</b></em>' enumerators.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final List<BookCategory> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
-
- /**
- * Returns the '<em><b>Book Category</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 BookCategory get(String literal) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- BookCategory result = VALUES_ARRAY[i];
- if (result.toString().equals(literal)) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Book Category</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 BookCategory getByName(String name) {
- for (int i = 0; i < VALUES_ARRAY.length; ++i) {
- BookCategory result = VALUES_ARRAY[i];
- if (result.getName().equals(name)) {
- return result;
- }
- }
- return null;
- }
-
- /**
- * Returns the '<em><b>Book Category</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 BookCategory get(int value) {
- switch (value) {
- case DRAMA_VALUE: return DRAMA;
- case HISTORY_VALUE: return HISTORY;
- case ART_VALUE: return ART;
- case SCI_FI_VALUE: return SCI_FI;
- }
- 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 BookCategory(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;
- }
-
-} //BookCategory
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Library.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Library.java
deleted file mode 100644
index 807d773b9..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Library.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Library</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.viatra.examples.library.Library#getAddress <em>Address</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Library#getWriters <em>Writers</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Library#getSumOfPages <em>Sum Of Pages</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Library#getBooks <em>Books</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Library#getRequestCount <em>Request Count</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Library#getSomeBooks <em>Some Books</em>}</li>
- * </ul>
- *
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary()
- * @model features="internalRequestCount"
- * internalRequestCountDefault="1" internalRequestCountDataType="org.eclipse.emf.ecore.EInt" internalRequestCountTransient="true" internalRequestCountSuppressedGetVisibility="true" internalRequestCountSuppressedSetVisibility="true"
- * @generated
- */
-public interface Library extends EObject {
- /**
- * Returns the value of the '<em><b>Address</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Address</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Address</em>' attribute.
- * @see #setAddress(String)
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary_Address()
- * @model
- * @generated
- */
- String getAddress();
-
- /**
- * Sets the value of the '{@link org.eclipse.viatra.examples.library.Library#getAddress <em>Address</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Address</em>' attribute.
- * @see #getAddress()
- * @generated
- */
- void setAddress(String value);
-
- /**
- * Returns the value of the '<em><b>Writers</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.Writer}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Writers</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>Writers</em>' containment reference list.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary_Writers()
- * @model containment="true"
- * @generated
- */
- EList<Writer> getWriters();
-
- /**
- * Returns the value of the '<em><b>Sum Of Pages</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sum Of Pages</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sum Of Pages</em>' attribute.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary_SumOfPages()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * annotation="http://www.eclipse.org/emf/2002/GenModel get='EList<Book> allBooks = getBooks();\r\nint sumOfPages = 0;\r\nfor (Book book : allBooks) {\r\n sumOfPages += book.getPages();\r\n}\r\nreturn sumOfPages;'"
- * @generated
- */
- int getSumOfPages();
-
- /**
- * Returns the value of the '<em><b>Books</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.Book}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Books</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>Books</em>' containment reference list.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary_Books()
- * @model containment="true"
- * @generated
- */
- EList<Book> getBooks();
-
- /**
- * Returns the value of the '<em><b>Request Count</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Request Count</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Request Count</em>' attribute.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary_RequestCount()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * annotation="http://www.eclipse.org/emf/2002/GenModel get='internalRequestCount++;\r\nreturn internalRequestCount;'"
- * @generated
- */
- int getRequestCount();
-
- /**
- * Returns the value of the '<em><b>Some Books</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.Book}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Some Books</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Some Books</em>' reference list.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getLibrary_SomeBooks()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * annotation="http://www.eclipse.org/emf/2002/GenModel get='int count = internalRequestCount;\r\njava.util.List<Book> someBooks = new java.util.ArrayList<Book>();\r\n\r\nBook[] books = getBooks().toArray(new Book[0]);\r\nfor (int i = 0; i < books.length; i++) {\r\n Book book = books[i];\r\n if(i%count == 0) {\r\n someBooks.add(book);\r\n }\r\n}\r\nreturn org.eclipse.emf.common.util.ECollections.asEList(someBooks);'"
- * @generated
- */
- EList<Book> getSomeBooks();
-
-} // Library
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryFactory.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryFactory.java
deleted file mode 100644
index ee2fc741b..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryFactory.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.LibraryPackage
- * @generated
- */
-public interface LibraryFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- LibraryFactory eINSTANCE = org.eclipse.viatra.examples.library.impl.LibraryFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Library</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Library</em>'.
- * @generated
- */
- Library createLibrary();
-
- /**
- * Returns a new object of class '<em>Book</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Book</em>'.
- * @generated
- */
- Book createBook();
-
- /**
- * Returns a new object of class '<em>Writer</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Writer</em>'.
- * @generated
- */
- Writer createWriter();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- LibraryPackage getLibraryPackage();
-
-} //LibraryFactory
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryPackage.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryPackage.java
deleted file mode 100644
index 8579fd77e..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/LibraryPackage.java
+++ /dev/null
@@ -1,680 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each operation of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.LibraryFactory
- * @model kind="package"
- * @generated
- */
-public interface LibraryPackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "library";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/viatra/examples/library/1.0";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "vlibrary";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- LibraryPackage eINSTANCE = org.eclipse.viatra.examples.library.impl.LibraryPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.viatra.examples.library.impl.LibraryImpl <em>Library</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.impl.LibraryImpl
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getLibrary()
- * @generated
- */
- int LIBRARY = 0;
-
- /**
- * The feature id for the '<em><b>Address</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__ADDRESS = 0;
-
- /**
- * The feature id for the '<em><b>Writers</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__WRITERS = 1;
-
- /**
- * The feature id for the '<em><b>Sum Of Pages</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__SUM_OF_PAGES = 2;
-
- /**
- * The feature id for the '<em><b>Books</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__BOOKS = 3;
-
- /**
- * The feature id for the '<em><b>Internal Request Count</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__INTERNAL_REQUEST_COUNT = 4;
-
- /**
- * The feature id for the '<em><b>Request Count</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__REQUEST_COUNT = 5;
-
- /**
- * The feature id for the '<em><b>Some Books</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY__SOME_BOOKS = 6;
-
- /**
- * The number of structural features of the '<em>Library</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY_FEATURE_COUNT = 7;
-
- /**
- * The number of operations of the '<em>Library</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int LIBRARY_OPERATION_COUNT = 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.viatra.examples.library.impl.BookImpl <em>Book</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.impl.BookImpl
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getBook()
- * @generated
- */
- int BOOK = 1;
-
- /**
- * The feature id for the '<em><b>Title</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__TITLE = 0;
-
- /**
- * The feature id for the '<em><b>Pages</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__PAGES = 1;
-
- /**
- * The feature id for the '<em><b>Category</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__CATEGORY = 2;
-
- /**
- * The feature id for the '<em><b>Authors</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK__AUTHORS = 3;
-
- /**
- * The number of structural features of the '<em>Book</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK_FEATURE_COUNT = 4;
-
- /**
- * The number of operations of the '<em>Book</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int BOOK_OPERATION_COUNT = 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.viatra.examples.library.impl.WriterImpl <em>Writer</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.impl.WriterImpl
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getWriter()
- * @generated
- */
- int WRITER = 2;
-
- /**
- * The feature id for the '<em><b>Books</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER__BOOKS = 0;
-
- /**
- * The feature id for the '<em><b>First Book</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER__FIRST_BOOK = 1;
-
- /**
- * The feature id for the '<em><b>Scifi Books</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER__SCIFI_BOOKS = 2;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER__NAME = 3;
-
- /**
- * The number of structural features of the '<em>Writer</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER_FEATURE_COUNT = 4;
-
- /**
- * The number of operations of the '<em>Writer</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int WRITER_OPERATION_COUNT = 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.viatra.examples.library.BookCategory <em>Book Category</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.BookCategory
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getBookCategory()
- * @generated
- */
- int BOOK_CATEGORY = 3;
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.viatra.examples.library.Library <em>Library</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Library</em>'.
- * @see org.eclipse.viatra.examples.library.Library
- * @generated
- */
- EClass getLibrary();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Library#getAddress <em>Address</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Address</em>'.
- * @see org.eclipse.viatra.examples.library.Library#getAddress()
- * @see #getLibrary()
- * @generated
- */
- EAttribute getLibrary_Address();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.viatra.examples.library.Library#getWriters <em>Writers</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Writers</em>'.
- * @see org.eclipse.viatra.examples.library.Library#getWriters()
- * @see #getLibrary()
- * @generated
- */
- EReference getLibrary_Writers();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Library#getSumOfPages <em>Sum Of Pages</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Sum Of Pages</em>'.
- * @see org.eclipse.viatra.examples.library.Library#getSumOfPages()
- * @see #getLibrary()
- * @generated
- */
- EAttribute getLibrary_SumOfPages();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.viatra.examples.library.Library#getBooks <em>Books</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Books</em>'.
- * @see org.eclipse.viatra.examples.library.Library#getBooks()
- * @see #getLibrary()
- * @generated
- */
- EReference getLibrary_Books();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Library <em>Internal Request Count</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Internal Request Count</em>'.
- * @see org.eclipse.viatra.examples.library.Library
- * @see #getLibrary()
- * @generated
- */
- EAttribute getLibrary_InternalRequestCount();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Library#getRequestCount <em>Request Count</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Request Count</em>'.
- * @see org.eclipse.viatra.examples.library.Library#getRequestCount()
- * @see #getLibrary()
- * @generated
- */
- EAttribute getLibrary_RequestCount();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.viatra.examples.library.Library#getSomeBooks <em>Some Books</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Some Books</em>'.
- * @see org.eclipse.viatra.examples.library.Library#getSomeBooks()
- * @see #getLibrary()
- * @generated
- */
- EReference getLibrary_SomeBooks();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.viatra.examples.library.Book <em>Book</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Book</em>'.
- * @see org.eclipse.viatra.examples.library.Book
- * @generated
- */
- EClass getBook();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Book#getTitle <em>Title</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Title</em>'.
- * @see org.eclipse.viatra.examples.library.Book#getTitle()
- * @see #getBook()
- * @generated
- */
- EAttribute getBook_Title();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Book#getPages <em>Pages</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Pages</em>'.
- * @see org.eclipse.viatra.examples.library.Book#getPages()
- * @see #getBook()
- * @generated
- */
- EAttribute getBook_Pages();
-
- /**
- * Returns the meta object for the attribute list '{@link org.eclipse.viatra.examples.library.Book#getCategory <em>Category</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Category</em>'.
- * @see org.eclipse.viatra.examples.library.Book#getCategory()
- * @see #getBook()
- * @generated
- */
- EAttribute getBook_Category();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.viatra.examples.library.Book#getAuthors <em>Authors</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Authors</em>'.
- * @see org.eclipse.viatra.examples.library.Book#getAuthors()
- * @see #getBook()
- * @generated
- */
- EReference getBook_Authors();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.viatra.examples.library.Writer <em>Writer</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Writer</em>'.
- * @see org.eclipse.viatra.examples.library.Writer
- * @generated
- */
- EClass getWriter();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.viatra.examples.library.Writer#getBooks <em>Books</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Books</em>'.
- * @see org.eclipse.viatra.examples.library.Writer#getBooks()
- * @see #getWriter()
- * @generated
- */
- EReference getWriter_Books();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.viatra.examples.library.Writer#getFirstBook <em>First Book</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>First Book</em>'.
- * @see org.eclipse.viatra.examples.library.Writer#getFirstBook()
- * @see #getWriter()
- * @generated
- */
- EReference getWriter_FirstBook();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.viatra.examples.library.Writer#getScifiBooks <em>Scifi Books</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Scifi Books</em>'.
- * @see org.eclipse.viatra.examples.library.Writer#getScifiBooks()
- * @see #getWriter()
- * @generated
- */
- EReference getWriter_ScifiBooks();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.viatra.examples.library.Writer#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.viatra.examples.library.Writer#getName()
- * @see #getWriter()
- * @generated
- */
- EAttribute getWriter_Name();
-
- /**
- * Returns the meta object for enum '{@link org.eclipse.viatra.examples.library.BookCategory <em>Book Category</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for enum '<em>Book Category</em>'.
- * @see org.eclipse.viatra.examples.library.BookCategory
- * @generated
- */
- EEnum getBookCategory();
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- LibraryFactory getLibraryFactory();
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each operation of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- interface Literals {
- /**
- * The meta object literal for the '{@link org.eclipse.viatra.examples.library.impl.LibraryImpl <em>Library</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.impl.LibraryImpl
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getLibrary()
- * @generated
- */
- EClass LIBRARY = eINSTANCE.getLibrary();
-
- /**
- * The meta object literal for the '<em><b>Address</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute LIBRARY__ADDRESS = eINSTANCE.getLibrary_Address();
-
- /**
- * The meta object literal for the '<em><b>Writers</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference LIBRARY__WRITERS = eINSTANCE.getLibrary_Writers();
-
- /**
- * The meta object literal for the '<em><b>Sum Of Pages</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute LIBRARY__SUM_OF_PAGES = eINSTANCE.getLibrary_SumOfPages();
-
- /**
- * The meta object literal for the '<em><b>Books</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference LIBRARY__BOOKS = eINSTANCE.getLibrary_Books();
-
- /**
- * The meta object literal for the '<em><b>Internal Request Count</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute LIBRARY__INTERNAL_REQUEST_COUNT = eINSTANCE.getLibrary_InternalRequestCount();
-
- /**
- * The meta object literal for the '<em><b>Request Count</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute LIBRARY__REQUEST_COUNT = eINSTANCE.getLibrary_RequestCount();
-
- /**
- * The meta object literal for the '<em><b>Some Books</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference LIBRARY__SOME_BOOKS = eINSTANCE.getLibrary_SomeBooks();
-
- /**
- * The meta object literal for the '{@link org.eclipse.viatra.examples.library.impl.BookImpl <em>Book</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.impl.BookImpl
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getBook()
- * @generated
- */
- EClass BOOK = eINSTANCE.getBook();
-
- /**
- * The meta object literal for the '<em><b>Title</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute BOOK__TITLE = eINSTANCE.getBook_Title();
-
- /**
- * The meta object literal for the '<em><b>Pages</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute BOOK__PAGES = eINSTANCE.getBook_Pages();
-
- /**
- * The meta object literal for the '<em><b>Category</b></em>' attribute list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute BOOK__CATEGORY = eINSTANCE.getBook_Category();
-
- /**
- * The meta object literal for the '<em><b>Authors</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference BOOK__AUTHORS = eINSTANCE.getBook_Authors();
-
- /**
- * The meta object literal for the '{@link org.eclipse.viatra.examples.library.impl.WriterImpl <em>Writer</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.impl.WriterImpl
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getWriter()
- * @generated
- */
- EClass WRITER = eINSTANCE.getWriter();
-
- /**
- * The meta object literal for the '<em><b>Books</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference WRITER__BOOKS = eINSTANCE.getWriter_Books();
-
- /**
- * The meta object literal for the '<em><b>First Book</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference WRITER__FIRST_BOOK = eINSTANCE.getWriter_FirstBook();
-
- /**
- * The meta object literal for the '<em><b>Scifi Books</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference WRITER__SCIFI_BOOKS = eINSTANCE.getWriter_ScifiBooks();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute WRITER__NAME = eINSTANCE.getWriter_Name();
-
- /**
- * The meta object literal for the '{@link org.eclipse.viatra.examples.library.BookCategory <em>Book Category</em>}' enum.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.BookCategory
- * @see org.eclipse.viatra.examples.library.impl.LibraryPackageImpl#getBookCategory()
- * @generated
- */
- EEnum BOOK_CATEGORY = eINSTANCE.getBookCategory();
-
- }
-
-} //LibraryPackage
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Writer.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Writer.java
deleted file mode 100644
index 3d9632f13..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/Writer.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Writer</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.viatra.examples.library.Writer#getBooks <em>Books</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Writer#getFirstBook <em>First Book</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Writer#getScifiBooks <em>Scifi Books</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.Writer#getName <em>Name</em>}</li>
- * </ul>
- *
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getWriter()
- * @model
- * @generated
- */
-public interface Writer extends EObject {
- /**
- * Returns the value of the '<em><b>Books</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.Book}.
- * It is bidirectional and its opposite is '{@link org.eclipse.viatra.examples.library.Book#getAuthors <em>Authors</em>}'.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Books</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Books</em>' reference list.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getWriter_Books()
- * @see org.eclipse.viatra.examples.library.Book#getAuthors
- * @model opposite="authors"
- * @generated
- */
- EList<Book> getBooks();
-
- /**
- * Returns the value of the '<em><b>First Book</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>First Book</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>First Book</em>' reference.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getWriter_FirstBook()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * annotation="http://www.eclipse.org/emf/2002/GenModel get='EList<Book> allBooks = getBooks();\r\nif(!allBooks.isEmpty()){\r\n return allBooks.get(0);\r\n}\r\nreturn null;'"
- * @generated
- */
- Book getFirstBook();
-
- /**
- * Returns the value of the '<em><b>Scifi Books</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.viatra.examples.library.Book}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Scifi Books</em>' reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Scifi Books</em>' reference list.
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getWriter_ScifiBooks()
- * @model transient="true" changeable="false" volatile="true" derived="true"
- * annotation="http://www.eclipse.org/emf/2002/GenModel get='EList<Book> allBooks = getBooks();\r\njava.util.List<Book> scifiBooks = new java.util.ArrayList<Book>();\r\nfor (Book book : allBooks) {\r\n if(book.getCategory().contains(org.eclipse.viatra.examples.library.BookCategory.SCI_FI)) {\r\n scifiBooks.add(book);\r\n }\r\n}\r\nreturn org.eclipse.emf.common.util.ECollections.asEList(scifiBooks);'"
- * @generated
- */
- EList<Book> getScifiBooks();
-
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.viatra.examples.library.LibraryPackage#getWriter_Name()
- * @model
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.viatra.examples.library.Writer#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
-} // Writer
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/BookImpl.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/BookImpl.java
deleted file mode 100644
index 826388b98..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/BookImpl.java
+++ /dev/null
@@ -1,329 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-
-import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
-import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.BookCategory;
-import org.eclipse.viatra.examples.library.LibraryPackage;
-import org.eclipse.viatra.examples.library.Writer;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Book</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.viatra.examples.library.impl.BookImpl#getTitle <em>Title</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.BookImpl#getPages <em>Pages</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.BookImpl#getCategory <em>Category</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.BookImpl#getAuthors <em>Authors</em>}</li>
- * </ul>
- *
- * @generated
- */
-public class BookImpl extends MinimalEObjectImpl.Container implements Book {
- /**
- * The default value of the '{@link #getTitle() <em>Title</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTitle()
- * @generated
- * @ordered
- */
- protected static final String TITLE_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getTitle() <em>Title</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTitle()
- * @generated
- * @ordered
- */
- protected String title = TITLE_EDEFAULT;
-
- /**
- * The default value of the '{@link #getPages() <em>Pages</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPages()
- * @generated
- * @ordered
- */
- protected static final int PAGES_EDEFAULT = 0;
-
- /**
- * The cached value of the '{@link #getPages() <em>Pages</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getPages()
- * @generated
- * @ordered
- */
- protected int pages = PAGES_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getCategory() <em>Category</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getCategory()
- * @generated
- * @ordered
- */
- protected EList<BookCategory> category;
-
- /**
- * The cached value of the '{@link #getAuthors() <em>Authors</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAuthors()
- * @generated
- * @ordered
- */
- protected EList<Writer> authors;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected BookImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return LibraryPackage.Literals.BOOK;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getTitle() {
- return title;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setTitle(String newTitle) {
- String oldTitle = title;
- title = newTitle;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__TITLE, oldTitle, title));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getPages() {
- return pages;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setPages(int newPages) {
- int oldPages = pages;
- pages = newPages;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__PAGES, oldPages, pages));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<BookCategory> getCategory() {
- if (category == null) {
- category = new EDataTypeUniqueEList<BookCategory>(BookCategory.class, this, LibraryPackage.BOOK__CATEGORY);
- }
- return category;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Writer> getAuthors() {
- if (authors == null) {
- authors = new EObjectWithInverseResolvingEList.ManyInverse<Writer>(Writer.class, this, LibraryPackage.BOOK__AUTHORS, LibraryPackage.WRITER__BOOKS);
- }
- return authors;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.BOOK__AUTHORS:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getAuthors()).basicAdd(otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.BOOK__AUTHORS:
- return ((InternalEList<?>)getAuthors()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- return getTitle();
- case LibraryPackage.BOOK__PAGES:
- return getPages();
- case LibraryPackage.BOOK__CATEGORY:
- return getCategory();
- case LibraryPackage.BOOK__AUTHORS:
- return getAuthors();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- setTitle((String)newValue);
- return;
- case LibraryPackage.BOOK__PAGES:
- setPages((Integer)newValue);
- return;
- case LibraryPackage.BOOK__CATEGORY:
- getCategory().clear();
- getCategory().addAll((Collection<? extends BookCategory>)newValue);
- return;
- case LibraryPackage.BOOK__AUTHORS:
- getAuthors().clear();
- getAuthors().addAll((Collection<? extends Writer>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- setTitle(TITLE_EDEFAULT);
- return;
- case LibraryPackage.BOOK__PAGES:
- setPages(PAGES_EDEFAULT);
- return;
- case LibraryPackage.BOOK__CATEGORY:
- getCategory().clear();
- return;
- case LibraryPackage.BOOK__AUTHORS:
- getAuthors().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
- case LibraryPackage.BOOK__PAGES:
- return pages != PAGES_EDEFAULT;
- case LibraryPackage.BOOK__CATEGORY:
- return category != null && !category.isEmpty();
- case LibraryPackage.BOOK__AUTHORS:
- return authors != null && !authors.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (title: ");
- result.append(title);
- result.append(", pages: ");
- result.append(pages);
- result.append(", category: ");
- result.append(category);
- result.append(')');
- return result.toString();
- }
-
-} //BookImpl
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryFactoryImpl.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryFactoryImpl.java
deleted file mode 100644
index a78767b93..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryFactoryImpl.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.impl;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-import org.eclipse.viatra.examples.library.*;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryFactoryImpl extends EFactoryImpl implements LibraryFactory {
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static LibraryFactory init() {
- try {
- LibraryFactory theLibraryFactory = (LibraryFactory)EPackage.Registry.INSTANCE.getEFactory(LibraryPackage.eNS_URI);
- if (theLibraryFactory != null) {
- return theLibraryFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new LibraryFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case LibraryPackage.LIBRARY: return createLibrary();
- case LibraryPackage.BOOK: return createBook();
- case LibraryPackage.WRITER: return createWriter();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object createFromString(EDataType eDataType, String initialValue) {
- switch (eDataType.getClassifierID()) {
- case LibraryPackage.BOOK_CATEGORY:
- return createBookCategoryFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String convertToString(EDataType eDataType, Object instanceValue) {
- switch (eDataType.getClassifierID()) {
- case LibraryPackage.BOOK_CATEGORY:
- return convertBookCategoryToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Library createLibrary() {
- LibraryImpl library = new LibraryImpl();
- return library;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Book createBook() {
- BookImpl book = new BookImpl();
- return book;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Writer createWriter() {
- WriterImpl writer = new WriterImpl();
- return writer;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public BookCategory createBookCategoryFromString(EDataType eDataType, String initialValue) {
- BookCategory result = BookCategory.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String convertBookCategoryToString(EDataType eDataType, Object instanceValue) {
- return instanceValue == null ? null : instanceValue.toString();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryPackage getLibraryPackage() {
- return (LibraryPackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static LibraryPackage getPackage() {
- return LibraryPackage.eINSTANCE;
- }
-
-} //LibraryFactoryImpl
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryImpl.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryImpl.java
deleted file mode 100644
index ca522c664..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryImpl.java
+++ /dev/null
@@ -1,391 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.examples.library.LibraryPackage;
-import org.eclipse.viatra.examples.library.Writer;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Library</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getAddress <em>Address</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getWriters <em>Writers</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getSumOfPages <em>Sum Of Pages</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getBooks <em>Books</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getInternalRequestCount <em>Internal Request Count</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getRequestCount <em>Request Count</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.LibraryImpl#getSomeBooks <em>Some Books</em>}</li>
- * </ul>
- *
- * @generated
- */
-public class LibraryImpl extends MinimalEObjectImpl.Container implements Library {
- /**
- * The default value of the '{@link #getAddress() <em>Address</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAddress()
- * @generated
- * @ordered
- */
- protected static final String ADDRESS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getAddress() <em>Address</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAddress()
- * @generated
- * @ordered
- */
- protected String address = ADDRESS_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getWriters() <em>Writers</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getWriters()
- * @generated
- * @ordered
- */
- protected EList<Writer> writers;
-
- /**
- * The default value of the '{@link #getSumOfPages() <em>Sum Of Pages</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getSumOfPages()
- * @generated
- * @ordered
- */
- protected static final int SUM_OF_PAGES_EDEFAULT = 0;
-
- /**
- * The cached value of the '{@link #getBooks() <em>Books</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getBooks()
- * @generated
- * @ordered
- */
- protected EList<Book> books;
-
- /**
- * The default value of the '{@link #getInternalRequestCount() <em>Internal Request Count</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInternalRequestCount()
- * @generated
- * @ordered
- */
- protected static final int INTERNAL_REQUEST_COUNT_EDEFAULT = 1;
-
- /**
- * The cached value of the '{@link #getInternalRequestCount() <em>Internal Request Count</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInternalRequestCount()
- * @generated
- * @ordered
- */
- protected int internalRequestCount = INTERNAL_REQUEST_COUNT_EDEFAULT;
-
- /**
- * The default value of the '{@link #getRequestCount() <em>Request Count</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getRequestCount()
- * @generated
- * @ordered
- */
- protected static final int REQUEST_COUNT_EDEFAULT = 0;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LibraryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return LibraryPackage.Literals.LIBRARY;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getAddress() {
- return address;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setAddress(String newAddress) {
- String oldAddress = address;
- address = newAddress;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.LIBRARY__ADDRESS, oldAddress, address));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Writer> getWriters() {
- if (writers == null) {
- writers = new EObjectContainmentEList<Writer>(Writer.class, this, LibraryPackage.LIBRARY__WRITERS);
- }
- return writers;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getSumOfPages() {
- EList<Book> allBooks = getBooks();
- int sumOfPages = 0;
- for (Book book : allBooks) {
- sumOfPages += book.getPages();
- }
- return sumOfPages;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Book> getBooks() {
- if (books == null) {
- books = new EObjectContainmentEList<Book>(Book.class, this, LibraryPackage.LIBRARY__BOOKS);
- }
- return books;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getInternalRequestCount() {
- return internalRequestCount;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setInternalRequestCount(int newInternalRequestCount) {
- int oldInternalRequestCount = internalRequestCount;
- internalRequestCount = newInternalRequestCount;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.LIBRARY__INTERNAL_REQUEST_COUNT, oldInternalRequestCount, internalRequestCount));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public int getRequestCount() {
- internalRequestCount++;
- return internalRequestCount;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Book> getSomeBooks() {
- int count = internalRequestCount;
- java.util.List<Book> someBooks = new java.util.ArrayList<Book>();
-
- Book[] books = getBooks().toArray(new Book[0]);
- for (int i = 0; i < books.length; i++) {
- Book book = books[i];
- if(i%count == 0) {
- someBooks.add(book);
- }
- }
- return org.eclipse.emf.common.util.ECollections.asEList(someBooks);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__WRITERS:
- return ((InternalEList<?>)getWriters()).basicRemove(otherEnd, msgs);
- case LibraryPackage.LIBRARY__BOOKS:
- return ((InternalEList<?>)getBooks()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__ADDRESS:
- return getAddress();
- case LibraryPackage.LIBRARY__WRITERS:
- return getWriters();
- case LibraryPackage.LIBRARY__SUM_OF_PAGES:
- return getSumOfPages();
- case LibraryPackage.LIBRARY__BOOKS:
- return getBooks();
- case LibraryPackage.LIBRARY__INTERNAL_REQUEST_COUNT:
- return getInternalRequestCount();
- case LibraryPackage.LIBRARY__REQUEST_COUNT:
- return getRequestCount();
- case LibraryPackage.LIBRARY__SOME_BOOKS:
- return getSomeBooks();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__ADDRESS:
- setAddress((String)newValue);
- return;
- case LibraryPackage.LIBRARY__WRITERS:
- getWriters().clear();
- getWriters().addAll((Collection<? extends Writer>)newValue);
- return;
- case LibraryPackage.LIBRARY__BOOKS:
- getBooks().clear();
- getBooks().addAll((Collection<? extends Book>)newValue);
- return;
- case LibraryPackage.LIBRARY__INTERNAL_REQUEST_COUNT:
- setInternalRequestCount((Integer)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__ADDRESS:
- setAddress(ADDRESS_EDEFAULT);
- return;
- case LibraryPackage.LIBRARY__WRITERS:
- getWriters().clear();
- return;
- case LibraryPackage.LIBRARY__BOOKS:
- getBooks().clear();
- return;
- case LibraryPackage.LIBRARY__INTERNAL_REQUEST_COUNT:
- setInternalRequestCount(INTERNAL_REQUEST_COUNT_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case LibraryPackage.LIBRARY__ADDRESS:
- return ADDRESS_EDEFAULT == null ? address != null : !ADDRESS_EDEFAULT.equals(address);
- case LibraryPackage.LIBRARY__WRITERS:
- return writers != null && !writers.isEmpty();
- case LibraryPackage.LIBRARY__SUM_OF_PAGES:
- return getSumOfPages() != SUM_OF_PAGES_EDEFAULT;
- case LibraryPackage.LIBRARY__BOOKS:
- return books != null && !books.isEmpty();
- case LibraryPackage.LIBRARY__INTERNAL_REQUEST_COUNT:
- return internalRequestCount != INTERNAL_REQUEST_COUNT_EDEFAULT;
- case LibraryPackage.LIBRARY__REQUEST_COUNT:
- return getRequestCount() != REQUEST_COUNT_EDEFAULT;
- case LibraryPackage.LIBRARY__SOME_BOOKS:
- return !getSomeBooks().isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (address: ");
- result.append(address);
- result.append(", internalRequestCount: ");
- result.append(internalRequestCount);
- result.append(')');
- return result.toString();
- }
-
-} //LibraryImpl
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryPackageImpl.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryPackageImpl.java
deleted file mode 100644
index 605380fdf..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/LibraryPackageImpl.java
+++ /dev/null
@@ -1,402 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.impl;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EEnum;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.BookCategory;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.examples.library.LibraryFactory;
-import org.eclipse.viatra.examples.library.LibraryPackage;
-import org.eclipse.viatra.examples.library.Writer;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass libraryEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass bookEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass writerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EEnum bookCategoryEEnum = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.viatra.examples.library.LibraryPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private LibraryPackageImpl() {
- super(eNS_URI, LibraryFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>This method is used to initialize {@link LibraryPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static LibraryPackage init() {
- if (isInited) return (LibraryPackage)EPackage.Registry.INSTANCE.getEPackage(LibraryPackage.eNS_URI);
-
- // Obtain or create and register package
- LibraryPackageImpl theLibraryPackage = (LibraryPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof LibraryPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new LibraryPackageImpl());
-
- isInited = true;
-
- // Create package meta-data objects
- theLibraryPackage.createPackageContents();
-
- // Initialize created meta-data
- theLibraryPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theLibraryPackage.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(LibraryPackage.eNS_URI, theLibraryPackage);
- return theLibraryPackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getLibrary() {
- return libraryEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getLibrary_Address() {
- return (EAttribute)libraryEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getLibrary_Writers() {
- return (EReference)libraryEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getLibrary_SumOfPages() {
- return (EAttribute)libraryEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getLibrary_Books() {
- return (EReference)libraryEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getLibrary_InternalRequestCount() {
- return (EAttribute)libraryEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getLibrary_RequestCount() {
- return (EAttribute)libraryEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getLibrary_SomeBooks() {
- return (EReference)libraryEClass.getEStructuralFeatures().get(6);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getBook() {
- return bookEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getBook_Title() {
- return (EAttribute)bookEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getBook_Pages() {
- return (EAttribute)bookEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getBook_Category() {
- return (EAttribute)bookEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getBook_Authors() {
- return (EReference)bookEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getWriter() {
- return writerEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getWriter_Books() {
- return (EReference)writerEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getWriter_FirstBook() {
- return (EReference)writerEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getWriter_ScifiBooks() {
- return (EReference)writerEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getWriter_Name() {
- return (EAttribute)writerEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EEnum getBookCategory() {
- return bookCategoryEEnum;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryFactory getLibraryFactory() {
- return (LibraryFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents() {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- libraryEClass = createEClass(LIBRARY);
- createEAttribute(libraryEClass, LIBRARY__ADDRESS);
- createEReference(libraryEClass, LIBRARY__WRITERS);
- createEAttribute(libraryEClass, LIBRARY__SUM_OF_PAGES);
- createEReference(libraryEClass, LIBRARY__BOOKS);
- createEAttribute(libraryEClass, LIBRARY__INTERNAL_REQUEST_COUNT);
- createEAttribute(libraryEClass, LIBRARY__REQUEST_COUNT);
- createEReference(libraryEClass, LIBRARY__SOME_BOOKS);
-
- bookEClass = createEClass(BOOK);
- createEAttribute(bookEClass, BOOK__TITLE);
- createEAttribute(bookEClass, BOOK__PAGES);
- createEAttribute(bookEClass, BOOK__CATEGORY);
- createEReference(bookEClass, BOOK__AUTHORS);
-
- writerEClass = createEClass(WRITER);
- createEReference(writerEClass, WRITER__BOOKS);
- createEReference(writerEClass, WRITER__FIRST_BOOK);
- createEReference(writerEClass, WRITER__SCIFI_BOOKS);
- createEAttribute(writerEClass, WRITER__NAME);
-
- // Create enums
- bookCategoryEEnum = createEEnum(BOOK_CATEGORY);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
-
- // Initialize classes, features, and operations; add parameters
- initEClass(libraryEClass, Library.class, "Library", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getLibrary_Address(), ecorePackage.getEString(), "address", null, 0, 1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getLibrary_Writers(), this.getWriter(), null, "writers", null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getLibrary_SumOfPages(), ecorePackage.getEInt(), "sumOfPages", null, 0, 1, Library.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEReference(getLibrary_Books(), this.getBook(), null, "books", null, 0, -1, Library.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getLibrary_InternalRequestCount(), ecorePackage.getEInt(), "internalRequestCount", "1", 0, 1, Library.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getLibrary_RequestCount(), ecorePackage.getEInt(), "requestCount", null, 0, 1, Library.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEReference(getLibrary_SomeBooks(), this.getBook(), null, "someBooks", null, 0, -1, Library.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
-
- initEClass(bookEClass, Book.class, "Book", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getBook_Title(), ecorePackage.getEString(), "title", null, 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getBook_Pages(), ecorePackage.getEInt(), "pages", null, 0, 1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getBook_Category(), this.getBookCategory(), "category", null, 0, -1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getBook_Authors(), this.getWriter(), this.getWriter_Books(), "authors", null, 0, -1, Book.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(writerEClass, Writer.class, "Writer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getWriter_Books(), this.getBook(), this.getBook_Authors(), "books", null, 0, -1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getWriter_FirstBook(), this.getBook(), null, "firstBook", null, 0, 1, Writer.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEReference(getWriter_ScifiBooks(), this.getBook(), null, "scifiBooks", null, 0, -1, Writer.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
- initEAttribute(getWriter_Name(), ecorePackage.getEString(), "name", null, 0, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Initialize enums and add enum literals
- initEEnum(bookCategoryEEnum, BookCategory.class, "BookCategory");
- addEEnumLiteral(bookCategoryEEnum, BookCategory.DRAMA);
- addEEnumLiteral(bookCategoryEEnum, BookCategory.HISTORY);
- addEEnumLiteral(bookCategoryEEnum, BookCategory.ART);
- addEEnumLiteral(bookCategoryEEnum, BookCategory.SCI_FI);
-
- // Create resource
- createResource(eNS_URI);
- }
-
-} //LibraryPackageImpl
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/WriterImpl.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/WriterImpl.java
deleted file mode 100644
index 6f3df2a20..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/impl/WriterImpl.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.impl;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-
-import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.LibraryPackage;
-import org.eclipse.viatra.examples.library.Writer;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Writer</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * </p>
- * <ul>
- * <li>{@link org.eclipse.viatra.examples.library.impl.WriterImpl#getBooks <em>Books</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.WriterImpl#getFirstBook <em>First Book</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.WriterImpl#getScifiBooks <em>Scifi Books</em>}</li>
- * <li>{@link org.eclipse.viatra.examples.library.impl.WriterImpl#getName <em>Name</em>}</li>
- * </ul>
- *
- * @generated
- */
-public class WriterImpl extends MinimalEObjectImpl.Container implements Writer {
- /**
- * The cached value of the '{@link #getBooks() <em>Books</em>}' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getBooks()
- * @generated
- * @ordered
- */
- protected EList<Book> books;
-
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected WriterImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return LibraryPackage.Literals.WRITER;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Book> getBooks() {
- if (books == null) {
- books = new EObjectWithInverseResolvingEList.ManyInverse<Book>(Book.class, this, LibraryPackage.WRITER__BOOKS, LibraryPackage.BOOK__AUTHORS);
- }
- return books;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Book getFirstBook() {
- Book firstBook = basicGetFirstBook();
- return firstBook != null && firstBook.eIsProxy() ? (Book)eResolveProxy((InternalEObject)firstBook) : firstBook;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Book basicGetFirstBook() {
- EList<Book> allBooks = getBooks();
- if(!allBooks.isEmpty()){
- return allBooks.get(0);
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<Book> getScifiBooks() {
- EList<Book> allBooks = getBooks();
- java.util.List<Book> scifiBooks = new java.util.ArrayList<Book>();
- for (Book book : allBooks) {
- if(book.getCategory().contains(org.eclipse.viatra.examples.library.BookCategory.SCI_FI)) {
- scifiBooks.add(book);
- }
- }
- return org.eclipse.emf.common.util.ECollections.asEList(scifiBooks);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName() {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.WRITER__NAME, oldName, name));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getBooks()).basicAdd(otherEnd, msgs);
- }
- return super.eInverseAdd(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- return ((InternalEList<?>)getBooks()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- return getBooks();
- case LibraryPackage.WRITER__FIRST_BOOK:
- if (resolve) return getFirstBook();
- return basicGetFirstBook();
- case LibraryPackage.WRITER__SCIFI_BOOKS:
- return getScifiBooks();
- case LibraryPackage.WRITER__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- getBooks().clear();
- getBooks().addAll((Collection<? extends Book>)newValue);
- return;
- case LibraryPackage.WRITER__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- getBooks().clear();
- return;
- case LibraryPackage.WRITER__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case LibraryPackage.WRITER__BOOKS:
- return books != null && !books.isEmpty();
- case LibraryPackage.WRITER__FIRST_BOOK:
- return basicGetFirstBook() != null;
- case LibraryPackage.WRITER__SCIFI_BOOKS:
- return !getScifiBooks().isEmpty();
- case LibraryPackage.WRITER__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
-} //WriterImpl
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibraryAdapterFactory.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibraryAdapterFactory.java
deleted file mode 100644
index 3b2ee05c6..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibraryAdapterFactory.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.util;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.viatra.examples.library.*;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.LibraryPackage
- * @generated
- */
-public class LibraryAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static LibraryPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibraryAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = LibraryPackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch that delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected LibrarySwitch<Adapter> modelSwitch =
- new LibrarySwitch<Adapter>() {
- @Override
- public Adapter caseLibrary(Library object) {
- return createLibraryAdapter();
- }
- @Override
- public Adapter caseBook(Book object) {
- return createBookAdapter();
- }
- @Override
- public Adapter caseWriter(Writer object) {
- return createWriterAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- @Override
- public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.viatra.examples.library.Library <em>Library</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.viatra.examples.library.Library
- * @generated
- */
- public Adapter createLibraryAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.viatra.examples.library.Book <em>Book</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.viatra.examples.library.Book
- * @generated
- */
- public Adapter createBookAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.viatra.examples.library.Writer <em>Writer</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.viatra.examples.library.Writer
- * @generated
- */
- public Adapter createWriterAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
-} //LibraryAdapterFactory
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibrarySwitch.java b/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibrarySwitch.java
deleted file mode 100644
index eb535b379..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/emf-gen/org/eclipse/viatra/examples/library/util/LibrarySwitch.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- */
-package org.eclipse.viatra.examples.library.util;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.util.Switch;
-
-import org.eclipse.viatra.examples.library.*;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * <!-- end-user-doc -->
- * @see org.eclipse.viatra.examples.library.LibraryPackage
- * @generated
- */
-public class LibrarySwitch<T> extends Switch<T> {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static LibraryPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public LibrarySwitch() {
- if (modelPackage == null) {
- modelPackage = LibraryPackage.eINSTANCE;
- }
- }
-
- /**
- * Checks whether this is a switch for the given package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param ePackage the package in question.
- * @return whether this is a switch for the given package.
- * @generated
- */
- @Override
- protected boolean isSwitchFor(EPackage ePackage) {
- return ePackage == modelPackage;
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- @Override
- protected T doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case LibraryPackage.LIBRARY: {
- Library library = (Library)theEObject;
- T result = caseLibrary(library);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case LibraryPackage.BOOK: {
- Book book = (Book)theEObject;
- T result = caseBook(book);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case LibraryPackage.WRITER: {
- Writer writer = (Writer)theEObject;
- T result = caseWriter(writer);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Library</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Library</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseLibrary(Library object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Book</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Book</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseBook(Book object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Writer</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Writer</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseWriter(Writer object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- @Override
- public T defaultCase(EObject object) {
- return null;
- }
-
-} //LibrarySwitch
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/model/library.ecore b/examples/minilibrary/org.eclipse.viatra.examples.library/model/library.ecore
deleted file mode 100644
index 68ca374be..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/model/library.ecore
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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="library" nsURI="http://www.eclipse.org/viatra/examples/library/1.0"
- nsPrefix="vlibrary">
- <eClassifiers xsi:type="ecore:EClass" name="Library">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="address" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="writers" upperBound="-1"
- eType="#//Writer" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="sumOfPages" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
- changeable="false" volatile="true" transient="true" derived="true">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="get" value="EList&lt;Book> allBooks = getBooks();&#xD;&#xA;int sumOfPages = 0;&#xD;&#xA;for (Book book : allBooks) {&#xD;&#xA; sumOfPages += book.getPages();&#xD;&#xA;}&#xD;&#xA;return sumOfPages;"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
- eType="#//Book" containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="internalRequestCount" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
- transient="true" defaultValueLiteral="1">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="suppressedGetVisibility" value="true"/>
- <details key="suppressedSetVisibility" value="true"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="requestCount" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
- changeable="false" volatile="true" transient="true" derived="true">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="get" value="internalRequestCount++;&#xD;&#xA;return internalRequestCount;"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="someBooks" upperBound="-1"
- eType="#//Book" changeable="false" volatile="true" transient="true" derived="true">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="get" value="int count = internalRequestCount;&#xD;&#xA;java.util.List&lt;Book> someBooks = new java.util.ArrayList&lt;Book>();&#xD;&#xA;&#xD;&#xA;Book[] books = getBooks().toArray(new Book[0]);&#xD;&#xA;for (int i = 0; i &lt; books.length; i++) {&#xD;&#xA; Book book = books[i];&#xD;&#xA; if(i%count == 0) {&#xD;&#xA; someBooks.add(book);&#xD;&#xA; }&#xD;&#xA;}&#xD;&#xA;return org.eclipse.emf.common.util.ECollections.asEList(someBooks);"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Book">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="pages" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="category" upperBound="-1"
- eType="#//BookCategory"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="authors" upperBound="-1"
- eType="#//Writer" eOpposite="#//Writer/books"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Writer">
- <eStructuralFeatures xsi:type="ecore:EReference" name="books" upperBound="-1"
- eType="#//Book" eOpposite="#//Book/authors"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="firstBook" eType="#//Book"
- changeable="false" volatile="true" transient="true" derived="true">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="get" value="EList&lt;Book> allBooks = getBooks();&#xD;&#xA;if(!allBooks.isEmpty()){&#xD;&#xA; return allBooks.get(0);&#xD;&#xA;}&#xD;&#xA;return null;"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="scifiBooks" upperBound="-1"
- eType="#//Book" changeable="false" volatile="true" transient="true" derived="true">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="get" value="EList&lt;Book> allBooks = getBooks();&#xD;&#xA;java.util.List&lt;Book> scifiBooks = new java.util.ArrayList&lt;Book>();&#xD;&#xA;for (Book book : allBooks) {&#xD;&#xA; if(book.getCategory().contains(org.eclipse.viatra.examples.library.BookCategory.SCI_FI)) {&#xD;&#xA; scifiBooks.add(book);&#xD;&#xA; }&#xD;&#xA;}&#xD;&#xA;return org.eclipse.emf.common.util.ECollections.asEList(scifiBooks);"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EEnum" name="BookCategory">
- <eLiterals name="Drama"/>
- <eLiterals name="History" value="1"/>
- <eLiterals name="Art" value="2"/>
- <eLiterals name="SciFi" value="3"/>
- </eClassifiers>
-</ecore:EPackage>
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/model/library.genmodel b/examples/minilibrary/org.eclipse.viatra.examples.library/model/library.genmodel
deleted file mode 100644
index ec76b3925..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/model/library.genmodel
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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="/org.eclipse.viatra.examples.library/emf-gen" editDirectory="/org.eclipse.viatra.examples.library.edit/emf-gen"
- editorDirectory="/org.eclipse.viatra.examples.library.editor/emf-gen" modelPluginID="org.eclipse.viatra.examples.library"
- modelName="Library" modelPluginClass="" editPluginClass="org.eclipse.viatra.examples.library.provider.LibraryEditPlugin"
- editorPluginClass="org.eclipse.viatra.examples.library.presentation.LibraryEditorPlugin"
- rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" testsDirectory="org.eclipse.viatra.examples.library.tests/emf-gen"
- testSuiteClass="org.eclipse.viatra.examples.library.tests.LibraryAllTests" importerID="org.eclipse.emf.importer.ecore"
- complianceLevel="7.0" copyrightFields="false" editPluginID="org.eclipse.viatra.examples.library.edit"
- editorPluginID="org.eclipse.viatra.examples.library.editor" runtimeVersion="2.10"
- operationReflection="true" importOrganizing="true">
- <foreignModel>library.ecore</foreignModel>
- <genPackages prefix="Library" basePackage="org.eclipse.viatra.examples" disposableProviderFactory="true"
- ecorePackage="library.ecore#/">
- <genEnums typeSafeEnumCompatible="false" ecoreEnum="library.ecore#//BookCategory">
- <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/Drama"/>
- <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/History"/>
- <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/Art"/>
- <genEnumLiterals ecoreEnumLiteral="library.ecore#//BookCategory/SciFi"/>
- </genEnums>
- <genClasses ecoreClass="library.ecore#//Library">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Library/address"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Library/writers"/>
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Library/sumOfPages"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Library/books"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Library/internalRequestCount"/>
- <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Library/requestCount"/>
- <genFeatures property="Readonly" notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Library/someBooks"/>
- </genClasses>
- <genClasses ecoreClass="library.ecore#//Book">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/title"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/pages"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Book/category"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference library.ecore#//Book/authors"/>
- </genClasses>
- <genClasses ecoreClass="library.ecore#//Writer">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference library.ecore#//Writer/books"/>
- <genFeatures property="Readonly" notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Writer/firstBook"/>
- <genFeatures property="Readonly" notify="false" createChild="false" ecoreFeature="ecore:EReference library.ecore#//Writer/scifiBooks"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Writer/name"/>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/plugin.properties b/examples/minilibrary/org.eclipse.viatra.examples.library/plugin.properties
deleted file mode 100644
index 5e38cc168..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/plugin.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-#
-
-pluginName = Library Model
-providerName = www.example.org
diff --git a/examples/minilibrary/org.eclipse.viatra.examples.library/plugin.xml b/examples/minilibrary/org.eclipse.viatra.examples.library/plugin.xml
deleted file mode 100644
index b9e0450f7..000000000
--- a/examples/minilibrary/org.eclipse.viatra.examples.library/plugin.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-
-<!--
--->
-
-<plugin>
-
- <extension point="org.eclipse.emf.ecore.generated_package">
- <!-- @generated library -->
- <package
- uri="http://www.eclipse.org/viatra/examples/library/1.0"
- class="org.eclipse.viatra.examples.library.LibraryPackage"
- genModel="model/library.genmodel"/>
- </extension>
-
-</plugin>
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.classpath b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.classpath
deleted file mode 100644
index 0c22b5d7e..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.project b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.project
deleted file mode 100644
index 2b28260e3..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.project
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.query.runtime.runonce.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.viatra.query.tooling.core.projectbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
- <nature>org.eclipse.viatra.query.projectnature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.settings/org.eclipse.incquery.patternlanguage.emf.EMFPatternLanguage.prefs b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.settings/org.eclipse.incquery.patternlanguage.emf.EMFPatternLanguage.prefs
deleted file mode 100644
index 1ab96e99d..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.settings/org.eclipse.incquery.patternlanguage.emf.EMFPatternLanguage.prefs
+++ /dev/null
@@ -1,10 +0,0 @@
-autobuilding=true
-eclipse.preferences.version=1
-is_project_specific=true
-outlet.DEFAULT_OUTPUT.cleanDirectory=false
-outlet.DEFAULT_OUTPUT.cleanupDerived=true
-outlet.DEFAULT_OUTPUT.createDirectory=true
-outlet.DEFAULT_OUTPUT.derived=false
-outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true
-outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false
-outlet.DEFAULT_OUTPUT.override=true
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.settings/org.eclipse.jdt.core.prefs b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c537b6306..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/META-INF/MANIFEST.MF b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index b502fd6cc..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: RunOnce Query Engine Tests
-Bundle-SymbolicName: org.eclipse.viatra.query.runtime.runonce.tests;singleton:=true
-Bundle-Version: 0.8.0.qualifier
-Bundle-Vendor: Eclipse VIATRA Project
-Export-Package: org.eclipse.viatra.query.runtime.runonce.tests,
- org.eclipse.viatra.query.runtime.runonce.tests.util
-Require-Bundle: org.eclipse.viatra.examples.library,
- org.junit,
- org.eclipse.emf.ecore,
- org.eclipse.xtext.xbase.lib;bundle-version="2.5.0",
- org.eclipse.viatra.query.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.apache.log4j
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/build.properties b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/build.properties
deleted file mode 100644
index e5013d6c1..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-bin.includes = META-INF/,\
- .,\
- model/,\
- plugin.xml
-source.. = src/,\
- src-gen/
-output.. = bin/
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/model/test.library b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/model/test.library
deleted file mode 100644
index 2daf6fe35..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/model/test.library
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<vlibrary:Library xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:vlibrary="http://www.eclipse.org/viatra/examples/library/1.0" address="Test street">
- <writers books="//@books.1 //@books.0" name="First Author"/>
- <writers books="//@books.1" name="Second Author"/>
- <writers books="//@books.3" name="Third Author"/>
- <writers books="//@books.2" name="Twin One"/>
- <writers books="//@books.2" name="Twin Two"/>
- <books title="First Book in Library" pages="30" authors="//@writers.0">
- <category>SciFi</category>
- <category>Drama</category>
- </books>
- <books title="Second book" pages="42" authors="//@writers.0 //@writers.1">
- <category>Art</category>
- </books>
- <books title="Twin life" authors="//@writers.3 //@writers.4"/>
- <books title="Other SciFi" pages="150" authors="//@writers.2">
- <category>SciFi</category>
- <category>History</category>
- </books>
-</vlibrary:Library>
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/plugin.xml b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/plugin.xml
deleted file mode 100644
index 4edea499c..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/plugin.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><plugin>
- <extension id="org.eclipse.viatra.query.runtime.runonce.tests.Eiqlibrary" point="org.eclipse.viatra.query.runtime.queryspecification">
- <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:org.eclipse.viatra.query.runtime.runonce.tests.Eiqlibrary" id="org.eclipse.viatra.query.runtime.runonce.tests.Eiqlibrary"/>
- </extension>
-</plugin>
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/.gitignore b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/.gitignore
deleted file mode 100644
index ef5710f77..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/.gitignore
+++ /dev/null
@@ -1,15 +0,0 @@
-/.BookAuthorsMatch.java._trace
-/.BookAuthorsMatcher.java._trace
-/.BooksWithMultipleAuthorsMatch.java._trace
-/.BooksWithMultipleAuthorsMatcher.java._trace
-/.SingleAuthoredFirstBooksMatch.java._trace
-/.SumOfPagesInLibraryMatch.java._trace
-/.SumOfPagesInLibraryMatcher.java._trace
-/.SingleAuthoredFirstBooksMatcher.java._trace
-/.Eiqlibrary.java._trace
-/.LongSciFiBooksOfAuthorMatch.java._trace
-/.LongSciFiBooksOfAuthorMatcher.java._trace
-/.RequestCountOfLibraryMatch.java._trace
-/.RequestCountOfLibraryMatcher.java._trace
-/.SomeBooksWithTwoAuthorsMatch.java._trace
-/.SomeBooksWithTwoAuthorsMatcher.java._trace
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BookAuthorsMatch.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BookAuthorsMatch.java
deleted file mode 100644
index 2e2277a8a..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BookAuthorsMatch.java
+++ /dev/null
@@ -1,208 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Writer;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.BookAuthorsQuerySpecification;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.runtime.runonce.tests.bookAuthors pattern,
- * to be used in conjunction with {@link BookAuthorsMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see BookAuthorsMatcher
- * @see BookAuthorsProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class BookAuthorsMatch extends BasePatternMatch {
- private Book fBook;
-
- private Writer fAuthor;
-
- private static List<String> parameterNames = makeImmutableList("book", "author");
-
- private BookAuthorsMatch(final Book pBook, final Writer pAuthor) {
- this.fBook = pBook;
- this.fAuthor = pAuthor;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("book".equals(parameterName)) return this.fBook;
- if ("author".equals(parameterName)) return this.fAuthor;
- return null;
- }
-
- public Book getBook() {
- return this.fBook;
- }
-
- public Writer getAuthor() {
- return this.fAuthor;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("book".equals(parameterName) ) {
- this.fBook = (Book) newValue;
- return true;
- }
- if ("author".equals(parameterName) ) {
- this.fAuthor = (Writer) newValue;
- return true;
- }
- return false;
- }
-
- public void setBook(final Book pBook) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fBook = pBook;
- }
-
- public void setAuthor(final Writer pAuthor) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fAuthor = pAuthor;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.bookAuthors";
- }
-
- @Override
- public List<String> parameterNames() {
- return BookAuthorsMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fBook, fAuthor};
- }
-
- @Override
- public BookAuthorsMatch toImmutable() {
- return isMutable() ? newMatch(fBook, fAuthor) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"book\"=" + prettyPrintValue(fBook) + ", ");
-
- result.append("\"author\"=" + prettyPrintValue(fAuthor)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fBook == null) ? 0 : fBook.hashCode());
- result = prime * result + ((fAuthor == null) ? 0 : fAuthor.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof BookAuthorsMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- BookAuthorsMatch other = (BookAuthorsMatch) obj;
- if (fBook == null) {if (other.fBook != null) return false;}
- else if (!fBook.equals(other.fBook)) return false;
- if (fAuthor == null) {if (other.fAuthor != null) return false;}
- else if (!fAuthor.equals(other.fAuthor)) return false;
- return true;
- }
-
- @Override
- public BookAuthorsQuerySpecification specification() {
- try {
- return BookAuthorsQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static BookAuthorsMatch newEmptyMatch() {
- return new Mutable(null, null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static BookAuthorsMatch newMutableMatch(final Book pBook, final Writer pAuthor) {
- return new Mutable(pBook, pAuthor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static BookAuthorsMatch newMatch(final Book pBook, final Writer pAuthor) {
- return new Immutable(pBook, pAuthor);
- }
-
- private static final class Mutable extends BookAuthorsMatch {
- Mutable(final Book pBook, final Writer pAuthor) {
- super(pBook, pAuthor);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends BookAuthorsMatch {
- Immutable(final Book pBook, final Writer pAuthor) {
- super(pBook, pAuthor);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BookAuthorsMatcher.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BookAuthorsMatcher.java
deleted file mode 100644
index 2be74ad3d..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BookAuthorsMatcher.java
+++ /dev/null
@@ -1,281 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Writer;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.BookAuthorsMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.BookAuthorsQuerySpecification;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.runtime.runonce.tests.bookAuthors pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link BookAuthorsMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * pattern bookAuthors(book : Book, author : Writer) {
- * Book.authors(book, author);
- * }
- * </pre></code>
- *
- * @see BookAuthorsMatch
- * @see BookAuthorsProcessor
- * @see BookAuthorsQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class BookAuthorsMatcher extends BaseMatcher<BookAuthorsMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static BookAuthorsMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- BookAuthorsMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new BookAuthorsMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_BOOK = 0;
-
- private final static int POSITION_AUTHOR = 1;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(BookAuthorsMatcher.class);
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- private BookAuthorsMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @return matches represented as a BookAuthorsMatch object.
- *
- */
- public Collection<BookAuthorsMatch> getAllMatches(final Book pBook, final Writer pAuthor) {
- return rawGetAllMatches(new Object[]{pBook, pAuthor});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @return a match represented as a BookAuthorsMatch object, or null if no match is found.
- *
- */
- public BookAuthorsMatch getOneArbitraryMatch(final Book pBook, final Writer pAuthor) {
- return rawGetOneArbitraryMatch(new Object[]{pBook, pAuthor});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final Book pBook, final Writer pAuthor) {
- return rawHasMatch(new Object[]{pBook, pAuthor});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final Book pBook, final Writer pAuthor) {
- return rawCountMatches(new Object[]{pBook, pAuthor});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final Book pBook, final Writer pAuthor, final IMatchProcessor<? super BookAuthorsMatch> processor) {
- rawForEachMatch(new Object[]{pBook, pAuthor}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final Book pBook, final Writer pAuthor, final IMatchProcessor<? super BookAuthorsMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pBook, pAuthor}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public BookAuthorsMatch newMatch(final Book pBook, final Writer pAuthor) {
- return BookAuthorsMatch.newMatch(pBook, pAuthor);
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<Book> rawAccumulateAllValuesOfbook(final Object[] parameters) {
- Set<Book> results = new HashSet<Book>();
- rawAccumulateAllValues(POSITION_BOOK, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Book> getAllValuesOfbook() {
- return rawAccumulateAllValuesOfbook(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Book> getAllValuesOfbook(final BookAuthorsMatch partialMatch) {
- return rawAccumulateAllValuesOfbook(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Book> getAllValuesOfbook(final Writer pAuthor) {
- return rawAccumulateAllValuesOfbook(new Object[]{
- null,
- pAuthor
- });
- }
-
- /**
- * Retrieve the set of values that occur in matches for author.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<Writer> rawAccumulateAllValuesOfauthor(final Object[] parameters) {
- Set<Writer> results = new HashSet<Writer>();
- rawAccumulateAllValues(POSITION_AUTHOR, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for author.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Writer> getAllValuesOfauthor() {
- return rawAccumulateAllValuesOfauthor(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for author.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Writer> getAllValuesOfauthor(final BookAuthorsMatch partialMatch) {
- return rawAccumulateAllValuesOfauthor(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for author.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Writer> getAllValuesOfauthor(final Book pBook) {
- return rawAccumulateAllValuesOfauthor(new Object[]{
- pBook,
- null
- });
- }
-
- @Override
- protected BookAuthorsMatch tupleToMatch(final Tuple t) {
- try {
- return BookAuthorsMatch.newMatch((Book) t.get(POSITION_BOOK), (Writer) t.get(POSITION_AUTHOR));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected BookAuthorsMatch arrayToMatch(final Object[] match) {
- try {
- return BookAuthorsMatch.newMatch((Book) match[POSITION_BOOK], (Writer) match[POSITION_AUTHOR]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected BookAuthorsMatch arrayToMatchMutable(final Object[] match) {
- try {
- return BookAuthorsMatch.newMutableMatch((Book) match[POSITION_BOOK], (Writer) match[POSITION_AUTHOR]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<BookAuthorsMatcher> querySpecification() throws ViatraQueryException {
- return BookAuthorsQuerySpecification.instance();
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BooksWithMultipleAuthorsMatch.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BooksWithMultipleAuthorsMatch.java
deleted file mode 100644
index ec26c2dd1..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BooksWithMultipleAuthorsMatch.java
+++ /dev/null
@@ -1,183 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.BooksWithMultipleAuthorsQuerySpecification;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.runtime.runonce.tests.booksWithMultipleAuthors pattern,
- * to be used in conjunction with {@link BooksWithMultipleAuthorsMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see BooksWithMultipleAuthorsMatcher
- * @see BooksWithMultipleAuthorsProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class BooksWithMultipleAuthorsMatch extends BasePatternMatch {
- private Book fBook;
-
- private static List<String> parameterNames = makeImmutableList("book");
-
- private BooksWithMultipleAuthorsMatch(final Book pBook) {
- this.fBook = pBook;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("book".equals(parameterName)) return this.fBook;
- return null;
- }
-
- public Book getBook() {
- return this.fBook;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("book".equals(parameterName) ) {
- this.fBook = (Book) newValue;
- return true;
- }
- return false;
- }
-
- public void setBook(final Book pBook) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fBook = pBook;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.booksWithMultipleAuthors";
- }
-
- @Override
- public List<String> parameterNames() {
- return BooksWithMultipleAuthorsMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fBook};
- }
-
- @Override
- public BooksWithMultipleAuthorsMatch toImmutable() {
- return isMutable() ? newMatch(fBook) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"book\"=" + prettyPrintValue(fBook)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fBook == null) ? 0 : fBook.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof BooksWithMultipleAuthorsMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- BooksWithMultipleAuthorsMatch other = (BooksWithMultipleAuthorsMatch) obj;
- if (fBook == null) {if (other.fBook != null) return false;}
- else if (!fBook.equals(other.fBook)) return false;
- return true;
- }
-
- @Override
- public BooksWithMultipleAuthorsQuerySpecification specification() {
- try {
- return BooksWithMultipleAuthorsQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static BooksWithMultipleAuthorsMatch newEmptyMatch() {
- return new Mutable(null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static BooksWithMultipleAuthorsMatch newMutableMatch(final Book pBook) {
- return new Mutable(pBook);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static BooksWithMultipleAuthorsMatch newMatch(final Book pBook) {
- return new Immutable(pBook);
- }
-
- private static final class Mutable extends BooksWithMultipleAuthorsMatch {
- Mutable(final Book pBook) {
- super(pBook);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends BooksWithMultipleAuthorsMatch {
- Immutable(final Book pBook) {
- super(pBook);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BooksWithMultipleAuthorsMatcher.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BooksWithMultipleAuthorsMatcher.java
deleted file mode 100644
index 3bb7904de..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/BooksWithMultipleAuthorsMatcher.java
+++ /dev/null
@@ -1,211 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.BooksWithMultipleAuthorsMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.BooksWithMultipleAuthorsQuerySpecification;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.runtime.runonce.tests.booksWithMultipleAuthors pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link BooksWithMultipleAuthorsMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * pattern booksWithMultipleAuthors(book : Book) {
- * Book(book);
- * numberOfBooks == count find bookAuthors(book, _author);
- * check(numberOfBooks {@literal >} 1);
- * }
- * </pre></code>
- *
- * @see BooksWithMultipleAuthorsMatch
- * @see BooksWithMultipleAuthorsProcessor
- * @see BooksWithMultipleAuthorsQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class BooksWithMultipleAuthorsMatcher extends BaseMatcher<BooksWithMultipleAuthorsMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static BooksWithMultipleAuthorsMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- BooksWithMultipleAuthorsMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new BooksWithMultipleAuthorsMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_BOOK = 0;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(BooksWithMultipleAuthorsMatcher.class);
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- private BooksWithMultipleAuthorsMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return matches represented as a BooksWithMultipleAuthorsMatch object.
- *
- */
- public Collection<BooksWithMultipleAuthorsMatch> getAllMatches(final Book pBook) {
- return rawGetAllMatches(new Object[]{pBook});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return a match represented as a BooksWithMultipleAuthorsMatch object, or null if no match is found.
- *
- */
- public BooksWithMultipleAuthorsMatch getOneArbitraryMatch(final Book pBook) {
- return rawGetOneArbitraryMatch(new Object[]{pBook});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final Book pBook) {
- return rawHasMatch(new Object[]{pBook});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final Book pBook) {
- return rawCountMatches(new Object[]{pBook});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final Book pBook, final IMatchProcessor<? super BooksWithMultipleAuthorsMatch> processor) {
- rawForEachMatch(new Object[]{pBook}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final Book pBook, final IMatchProcessor<? super BooksWithMultipleAuthorsMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pBook}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public BooksWithMultipleAuthorsMatch newMatch(final Book pBook) {
- return BooksWithMultipleAuthorsMatch.newMatch(pBook);
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<Book> rawAccumulateAllValuesOfbook(final Object[] parameters) {
- Set<Book> results = new HashSet<Book>();
- rawAccumulateAllValues(POSITION_BOOK, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Book> getAllValuesOfbook() {
- return rawAccumulateAllValuesOfbook(emptyArray());
- }
-
- @Override
- protected BooksWithMultipleAuthorsMatch tupleToMatch(final Tuple t) {
- try {
- return BooksWithMultipleAuthorsMatch.newMatch((Book) t.get(POSITION_BOOK));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected BooksWithMultipleAuthorsMatch arrayToMatch(final Object[] match) {
- try {
- return BooksWithMultipleAuthorsMatch.newMatch((Book) match[POSITION_BOOK]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected BooksWithMultipleAuthorsMatch arrayToMatchMutable(final Object[] match) {
- try {
- return BooksWithMultipleAuthorsMatch.newMutableMatch((Book) match[POSITION_BOOK]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<BooksWithMultipleAuthorsMatcher> querySpecification() throws ViatraQueryException {
- return BooksWithMultipleAuthorsQuerySpecification.instance();
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/Eiqlibrary.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/Eiqlibrary.java
deleted file mode 100644
index d77871f13..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/Eiqlibrary.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.runonce.tests.BookAuthorsMatcher;
-import org.eclipse.viatra.query.runtime.runonce.tests.BooksWithMultipleAuthorsMatcher;
-import org.eclipse.viatra.query.runtime.runonce.tests.LongSciFiBooksOfAuthorMatcher;
-import org.eclipse.viatra.query.runtime.runonce.tests.RequestCountOfLibraryMatcher;
-import org.eclipse.viatra.query.runtime.runonce.tests.SingleAuthoredFirstBooksMatcher;
-import org.eclipse.viatra.query.runtime.runonce.tests.SomeBooksWithTwoAuthorsMatcher;
-import org.eclipse.viatra.query.runtime.runonce.tests.SumOfPagesInLibraryMatcher;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.BookAuthorsQuerySpecification;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.BooksWithMultipleAuthorsQuerySpecification;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.LongSciFiBooksOfAuthorQuerySpecification;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.RequestCountOfLibraryQuerySpecification;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.SingleAuthoredFirstBooksQuerySpecification;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.SomeBooksWithTwoAuthorsQuerySpecification;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.SumOfPagesInLibraryQuerySpecification;
-
-/**
- * A pattern group formed of all patterns defined in eiqlibrary.vql.
- *
- * <p>Use the static instance as any {@link org.eclipse.viatra.query.runtime.api.IPatternGroup}, to conveniently prepare
- * a VIATRA Query engine for matching all patterns originally defined in file eiqlibrary.vql,
- * in order to achieve better performance than one-by-one on-demand matcher initialization.
- *
- * <p> From package org.eclipse.viatra.query.runtime.runonce.tests, the group contains the definition of the following patterns: <ul>
- * <li>bookAuthors</li>
- * <li>booksWithMultipleAuthors</li>
- * <li>sumOfPagesInLibrary</li>
- * <li>singleAuthoredFirstBooks</li>
- * <li>longSciFiBooksOfAuthor</li>
- * <li>requestCountOfLibrary</li>
- * <li>someBooksWithTwoAuthors</li>
- * </ul>
- *
- * @see IPatternGroup
- *
- */
-@SuppressWarnings("all")
-public final class Eiqlibrary extends BaseGeneratedPatternGroup {
- /**
- * Access the pattern group.
- *
- * @return the singleton instance of the group
- * @throws ViatraQueryException if there was an error loading the generated code of pattern specifications
- *
- */
- public static Eiqlibrary instance() throws ViatraQueryException {
- if (INSTANCE == null) {
- INSTANCE = new Eiqlibrary();
- }
- return INSTANCE;
- }
-
- private static Eiqlibrary INSTANCE;
-
- private Eiqlibrary() throws ViatraQueryException {
- querySpecifications.add(BookAuthorsQuerySpecification.instance());
- querySpecifications.add(BooksWithMultipleAuthorsQuerySpecification.instance());
- querySpecifications.add(SumOfPagesInLibraryQuerySpecification.instance());
- querySpecifications.add(SingleAuthoredFirstBooksQuerySpecification.instance());
- querySpecifications.add(LongSciFiBooksOfAuthorQuerySpecification.instance());
- querySpecifications.add(RequestCountOfLibraryQuerySpecification.instance());
- querySpecifications.add(SomeBooksWithTwoAuthorsQuerySpecification.instance());
- }
-
- public BookAuthorsQuerySpecification getBookAuthors() throws ViatraQueryException {
- return BookAuthorsQuerySpecification.instance();
- }
-
- public BookAuthorsMatcher getBookAuthors(final ViatraQueryEngine engine) throws ViatraQueryException {
- return BookAuthorsMatcher.on(engine);
- }
-
- public BooksWithMultipleAuthorsQuerySpecification getBooksWithMultipleAuthors() throws ViatraQueryException {
- return BooksWithMultipleAuthorsQuerySpecification.instance();
- }
-
- public BooksWithMultipleAuthorsMatcher getBooksWithMultipleAuthors(final ViatraQueryEngine engine) throws ViatraQueryException {
- return BooksWithMultipleAuthorsMatcher.on(engine);
- }
-
- public SumOfPagesInLibraryQuerySpecification getSumOfPagesInLibrary() throws ViatraQueryException {
- return SumOfPagesInLibraryQuerySpecification.instance();
- }
-
- public SumOfPagesInLibraryMatcher getSumOfPagesInLibrary(final ViatraQueryEngine engine) throws ViatraQueryException {
- return SumOfPagesInLibraryMatcher.on(engine);
- }
-
- public SingleAuthoredFirstBooksQuerySpecification getSingleAuthoredFirstBooks() throws ViatraQueryException {
- return SingleAuthoredFirstBooksQuerySpecification.instance();
- }
-
- public SingleAuthoredFirstBooksMatcher getSingleAuthoredFirstBooks(final ViatraQueryEngine engine) throws ViatraQueryException {
- return SingleAuthoredFirstBooksMatcher.on(engine);
- }
-
- public LongSciFiBooksOfAuthorQuerySpecification getLongSciFiBooksOfAuthor() throws ViatraQueryException {
- return LongSciFiBooksOfAuthorQuerySpecification.instance();
- }
-
- public LongSciFiBooksOfAuthorMatcher getLongSciFiBooksOfAuthor(final ViatraQueryEngine engine) throws ViatraQueryException {
- return LongSciFiBooksOfAuthorMatcher.on(engine);
- }
-
- public RequestCountOfLibraryQuerySpecification getRequestCountOfLibrary() throws ViatraQueryException {
- return RequestCountOfLibraryQuerySpecification.instance();
- }
-
- public RequestCountOfLibraryMatcher getRequestCountOfLibrary(final ViatraQueryEngine engine) throws ViatraQueryException {
- return RequestCountOfLibraryMatcher.on(engine);
- }
-
- public SomeBooksWithTwoAuthorsQuerySpecification getSomeBooksWithTwoAuthors() throws ViatraQueryException {
- return SomeBooksWithTwoAuthorsQuerySpecification.instance();
- }
-
- public SomeBooksWithTwoAuthorsMatcher getSomeBooksWithTwoAuthors(final ViatraQueryEngine engine) throws ViatraQueryException {
- return SomeBooksWithTwoAuthorsMatcher.on(engine);
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/LongSciFiBooksOfAuthorMatch.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/LongSciFiBooksOfAuthorMatch.java
deleted file mode 100644
index 2c5274189..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/LongSciFiBooksOfAuthorMatch.java
+++ /dev/null
@@ -1,208 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Writer;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.LongSciFiBooksOfAuthorQuerySpecification;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.runtime.runonce.tests.longSciFiBooksOfAuthor pattern,
- * to be used in conjunction with {@link LongSciFiBooksOfAuthorMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see LongSciFiBooksOfAuthorMatcher
- * @see LongSciFiBooksOfAuthorProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class LongSciFiBooksOfAuthorMatch extends BasePatternMatch {
- private Writer fAuthor;
-
- private Book fBook;
-
- private static List<String> parameterNames = makeImmutableList("author", "book");
-
- private LongSciFiBooksOfAuthorMatch(final Writer pAuthor, final Book pBook) {
- this.fAuthor = pAuthor;
- this.fBook = pBook;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("author".equals(parameterName)) return this.fAuthor;
- if ("book".equals(parameterName)) return this.fBook;
- return null;
- }
-
- public Writer getAuthor() {
- return this.fAuthor;
- }
-
- public Book getBook() {
- return this.fBook;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("author".equals(parameterName) ) {
- this.fAuthor = (Writer) newValue;
- return true;
- }
- if ("book".equals(parameterName) ) {
- this.fBook = (Book) newValue;
- return true;
- }
- return false;
- }
-
- public void setAuthor(final Writer pAuthor) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fAuthor = pAuthor;
- }
-
- public void setBook(final Book pBook) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fBook = pBook;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.longSciFiBooksOfAuthor";
- }
-
- @Override
- public List<String> parameterNames() {
- return LongSciFiBooksOfAuthorMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fAuthor, fBook};
- }
-
- @Override
- public LongSciFiBooksOfAuthorMatch toImmutable() {
- return isMutable() ? newMatch(fAuthor, fBook) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"author\"=" + prettyPrintValue(fAuthor) + ", ");
-
- result.append("\"book\"=" + prettyPrintValue(fBook)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fAuthor == null) ? 0 : fAuthor.hashCode());
- result = prime * result + ((fBook == null) ? 0 : fBook.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof LongSciFiBooksOfAuthorMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- LongSciFiBooksOfAuthorMatch other = (LongSciFiBooksOfAuthorMatch) obj;
- if (fAuthor == null) {if (other.fAuthor != null) return false;}
- else if (!fAuthor.equals(other.fAuthor)) return false;
- if (fBook == null) {if (other.fBook != null) return false;}
- else if (!fBook.equals(other.fBook)) return false;
- return true;
- }
-
- @Override
- public LongSciFiBooksOfAuthorQuerySpecification specification() {
- try {
- return LongSciFiBooksOfAuthorQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static LongSciFiBooksOfAuthorMatch newEmptyMatch() {
- return new Mutable(null, null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static LongSciFiBooksOfAuthorMatch newMutableMatch(final Writer pAuthor, final Book pBook) {
- return new Mutable(pAuthor, pBook);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static LongSciFiBooksOfAuthorMatch newMatch(final Writer pAuthor, final Book pBook) {
- return new Immutable(pAuthor, pBook);
- }
-
- private static final class Mutable extends LongSciFiBooksOfAuthorMatch {
- Mutable(final Writer pAuthor, final Book pBook) {
- super(pAuthor, pBook);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends LongSciFiBooksOfAuthorMatch {
- Immutable(final Writer pAuthor, final Book pBook) {
- super(pAuthor, pBook);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/LongSciFiBooksOfAuthorMatcher.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/LongSciFiBooksOfAuthorMatcher.java
deleted file mode 100644
index fdc7880c8..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/LongSciFiBooksOfAuthorMatcher.java
+++ /dev/null
@@ -1,283 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Writer;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.LongSciFiBooksOfAuthorMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.LongSciFiBooksOfAuthorQuerySpecification;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.runtime.runonce.tests.longSciFiBooksOfAuthor pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link LongSciFiBooksOfAuthorMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * pattern longSciFiBooksOfAuthor(author : Writer, book : Book) {
- * Writer.scifiBooks(author, book);
- * Book.pages(book, pages);
- * check(pages {@literal >} 100);
- * }
- * </pre></code>
- *
- * @see LongSciFiBooksOfAuthorMatch
- * @see LongSciFiBooksOfAuthorProcessor
- * @see LongSciFiBooksOfAuthorQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class LongSciFiBooksOfAuthorMatcher extends BaseMatcher<LongSciFiBooksOfAuthorMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static LongSciFiBooksOfAuthorMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- LongSciFiBooksOfAuthorMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new LongSciFiBooksOfAuthorMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_AUTHOR = 0;
-
- private final static int POSITION_BOOK = 1;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(LongSciFiBooksOfAuthorMatcher.class);
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- private LongSciFiBooksOfAuthorMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return matches represented as a LongSciFiBooksOfAuthorMatch object.
- *
- */
- public Collection<LongSciFiBooksOfAuthorMatch> getAllMatches(final Writer pAuthor, final Book pBook) {
- return rawGetAllMatches(new Object[]{pAuthor, pBook});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return a match represented as a LongSciFiBooksOfAuthorMatch object, or null if no match is found.
- *
- */
- public LongSciFiBooksOfAuthorMatch getOneArbitraryMatch(final Writer pAuthor, final Book pBook) {
- return rawGetOneArbitraryMatch(new Object[]{pAuthor, pBook});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final Writer pAuthor, final Book pBook) {
- return rawHasMatch(new Object[]{pAuthor, pBook});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final Writer pAuthor, final Book pBook) {
- return rawCountMatches(new Object[]{pAuthor, pBook});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final Writer pAuthor, final Book pBook, final IMatchProcessor<? super LongSciFiBooksOfAuthorMatch> processor) {
- rawForEachMatch(new Object[]{pAuthor, pBook}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final Writer pAuthor, final Book pBook, final IMatchProcessor<? super LongSciFiBooksOfAuthorMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pAuthor, pBook}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pAuthor the fixed value of pattern parameter author, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public LongSciFiBooksOfAuthorMatch newMatch(final Writer pAuthor, final Book pBook) {
- return LongSciFiBooksOfAuthorMatch.newMatch(pAuthor, pBook);
- }
-
- /**
- * Retrieve the set of values that occur in matches for author.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<Writer> rawAccumulateAllValuesOfauthor(final Object[] parameters) {
- Set<Writer> results = new HashSet<Writer>();
- rawAccumulateAllValues(POSITION_AUTHOR, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for author.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Writer> getAllValuesOfauthor() {
- return rawAccumulateAllValuesOfauthor(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for author.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Writer> getAllValuesOfauthor(final LongSciFiBooksOfAuthorMatch partialMatch) {
- return rawAccumulateAllValuesOfauthor(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for author.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Writer> getAllValuesOfauthor(final Book pBook) {
- return rawAccumulateAllValuesOfauthor(new Object[]{
- null,
- pBook
- });
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<Book> rawAccumulateAllValuesOfbook(final Object[] parameters) {
- Set<Book> results = new HashSet<Book>();
- rawAccumulateAllValues(POSITION_BOOK, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Book> getAllValuesOfbook() {
- return rawAccumulateAllValuesOfbook(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Book> getAllValuesOfbook(final LongSciFiBooksOfAuthorMatch partialMatch) {
- return rawAccumulateAllValuesOfbook(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Book> getAllValuesOfbook(final Writer pAuthor) {
- return rawAccumulateAllValuesOfbook(new Object[]{
- pAuthor,
- null
- });
- }
-
- @Override
- protected LongSciFiBooksOfAuthorMatch tupleToMatch(final Tuple t) {
- try {
- return LongSciFiBooksOfAuthorMatch.newMatch((Writer) t.get(POSITION_AUTHOR), (Book) t.get(POSITION_BOOK));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected LongSciFiBooksOfAuthorMatch arrayToMatch(final Object[] match) {
- try {
- return LongSciFiBooksOfAuthorMatch.newMatch((Writer) match[POSITION_AUTHOR], (Book) match[POSITION_BOOK]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected LongSciFiBooksOfAuthorMatch arrayToMatchMutable(final Object[] match) {
- try {
- return LongSciFiBooksOfAuthorMatch.newMutableMatch((Writer) match[POSITION_AUTHOR], (Book) match[POSITION_BOOK]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<LongSciFiBooksOfAuthorMatcher> querySpecification() throws ViatraQueryException {
- return LongSciFiBooksOfAuthorQuerySpecification.instance();
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/RequestCountOfLibraryMatch.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/RequestCountOfLibraryMatch.java
deleted file mode 100644
index a468cb529..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/RequestCountOfLibraryMatch.java
+++ /dev/null
@@ -1,207 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.RequestCountOfLibraryQuerySpecification;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.runtime.runonce.tests.requestCountOfLibrary pattern,
- * to be used in conjunction with {@link RequestCountOfLibraryMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see RequestCountOfLibraryMatcher
- * @see RequestCountOfLibraryProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class RequestCountOfLibraryMatch extends BasePatternMatch {
- private Library fLibrary;
-
- private Integer fReqCount;
-
- private static List<String> parameterNames = makeImmutableList("library", "reqCount");
-
- private RequestCountOfLibraryMatch(final Library pLibrary, final Integer pReqCount) {
- this.fLibrary = pLibrary;
- this.fReqCount = pReqCount;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("library".equals(parameterName)) return this.fLibrary;
- if ("reqCount".equals(parameterName)) return this.fReqCount;
- return null;
- }
-
- public Library getLibrary() {
- return this.fLibrary;
- }
-
- public Integer getReqCount() {
- return this.fReqCount;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("library".equals(parameterName) ) {
- this.fLibrary = (Library) newValue;
- return true;
- }
- if ("reqCount".equals(parameterName) ) {
- this.fReqCount = (Integer) newValue;
- return true;
- }
- return false;
- }
-
- public void setLibrary(final Library pLibrary) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fLibrary = pLibrary;
- }
-
- public void setReqCount(final Integer pReqCount) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fReqCount = pReqCount;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.requestCountOfLibrary";
- }
-
- @Override
- public List<String> parameterNames() {
- return RequestCountOfLibraryMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fLibrary, fReqCount};
- }
-
- @Override
- public RequestCountOfLibraryMatch toImmutable() {
- return isMutable() ? newMatch(fLibrary, fReqCount) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"library\"=" + prettyPrintValue(fLibrary) + ", ");
-
- result.append("\"reqCount\"=" + prettyPrintValue(fReqCount)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fLibrary == null) ? 0 : fLibrary.hashCode());
- result = prime * result + ((fReqCount == null) ? 0 : fReqCount.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof RequestCountOfLibraryMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- RequestCountOfLibraryMatch other = (RequestCountOfLibraryMatch) obj;
- if (fLibrary == null) {if (other.fLibrary != null) return false;}
- else if (!fLibrary.equals(other.fLibrary)) return false;
- if (fReqCount == null) {if (other.fReqCount != null) return false;}
- else if (!fReqCount.equals(other.fReqCount)) return false;
- return true;
- }
-
- @Override
- public RequestCountOfLibraryQuerySpecification specification() {
- try {
- return RequestCountOfLibraryQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static RequestCountOfLibraryMatch newEmptyMatch() {
- return new Mutable(null, null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pReqCount the fixed value of pattern parameter reqCount, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static RequestCountOfLibraryMatch newMutableMatch(final Library pLibrary, final Integer pReqCount) {
- return new Mutable(pLibrary, pReqCount);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pReqCount the fixed value of pattern parameter reqCount, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static RequestCountOfLibraryMatch newMatch(final Library pLibrary, final Integer pReqCount) {
- return new Immutable(pLibrary, pReqCount);
- }
-
- private static final class Mutable extends RequestCountOfLibraryMatch {
- Mutable(final Library pLibrary, final Integer pReqCount) {
- super(pLibrary, pReqCount);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends RequestCountOfLibraryMatch {
- Immutable(final Library pLibrary, final Integer pReqCount) {
- super(pLibrary, pReqCount);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/RequestCountOfLibraryMatcher.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/RequestCountOfLibraryMatcher.java
deleted file mode 100644
index 974fe4a6b..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/RequestCountOfLibraryMatcher.java
+++ /dev/null
@@ -1,280 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.RequestCountOfLibraryMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.RequestCountOfLibraryQuerySpecification;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.runtime.runonce.tests.requestCountOfLibrary pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link RequestCountOfLibraryMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * pattern requestCountOfLibrary(library : Library, reqCount) {
- * Library.requestCount(library, reqCount);
- * }
- * </pre></code>
- *
- * @see RequestCountOfLibraryMatch
- * @see RequestCountOfLibraryProcessor
- * @see RequestCountOfLibraryQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class RequestCountOfLibraryMatcher extends BaseMatcher<RequestCountOfLibraryMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static RequestCountOfLibraryMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- RequestCountOfLibraryMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new RequestCountOfLibraryMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_LIBRARY = 0;
-
- private final static int POSITION_REQCOUNT = 1;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(RequestCountOfLibraryMatcher.class);
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- private RequestCountOfLibraryMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pReqCount the fixed value of pattern parameter reqCount, or null if not bound.
- * @return matches represented as a RequestCountOfLibraryMatch object.
- *
- */
- public Collection<RequestCountOfLibraryMatch> getAllMatches(final Library pLibrary, final Integer pReqCount) {
- return rawGetAllMatches(new Object[]{pLibrary, pReqCount});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pReqCount the fixed value of pattern parameter reqCount, or null if not bound.
- * @return a match represented as a RequestCountOfLibraryMatch object, or null if no match is found.
- *
- */
- public RequestCountOfLibraryMatch getOneArbitraryMatch(final Library pLibrary, final Integer pReqCount) {
- return rawGetOneArbitraryMatch(new Object[]{pLibrary, pReqCount});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pReqCount the fixed value of pattern parameter reqCount, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final Library pLibrary, final Integer pReqCount) {
- return rawHasMatch(new Object[]{pLibrary, pReqCount});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pReqCount the fixed value of pattern parameter reqCount, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final Library pLibrary, final Integer pReqCount) {
- return rawCountMatches(new Object[]{pLibrary, pReqCount});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pReqCount the fixed value of pattern parameter reqCount, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final Library pLibrary, final Integer pReqCount, final IMatchProcessor<? super RequestCountOfLibraryMatch> processor) {
- rawForEachMatch(new Object[]{pLibrary, pReqCount}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pReqCount the fixed value of pattern parameter reqCount, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final Library pLibrary, final Integer pReqCount, final IMatchProcessor<? super RequestCountOfLibraryMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pLibrary, pReqCount}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pReqCount the fixed value of pattern parameter reqCount, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public RequestCountOfLibraryMatch newMatch(final Library pLibrary, final Integer pReqCount) {
- return RequestCountOfLibraryMatch.newMatch(pLibrary, pReqCount);
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<Library> rawAccumulateAllValuesOflibrary(final Object[] parameters) {
- Set<Library> results = new HashSet<Library>();
- rawAccumulateAllValues(POSITION_LIBRARY, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Library> getAllValuesOflibrary() {
- return rawAccumulateAllValuesOflibrary(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Library> getAllValuesOflibrary(final RequestCountOfLibraryMatch partialMatch) {
- return rawAccumulateAllValuesOflibrary(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Library> getAllValuesOflibrary(final Integer pReqCount) {
- return rawAccumulateAllValuesOflibrary(new Object[]{
- null,
- pReqCount
- });
- }
-
- /**
- * Retrieve the set of values that occur in matches for reqCount.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<Integer> rawAccumulateAllValuesOfreqCount(final Object[] parameters) {
- Set<Integer> results = new HashSet<Integer>();
- rawAccumulateAllValues(POSITION_REQCOUNT, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for reqCount.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Integer> getAllValuesOfreqCount() {
- return rawAccumulateAllValuesOfreqCount(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for reqCount.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Integer> getAllValuesOfreqCount(final RequestCountOfLibraryMatch partialMatch) {
- return rawAccumulateAllValuesOfreqCount(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for reqCount.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Integer> getAllValuesOfreqCount(final Library pLibrary) {
- return rawAccumulateAllValuesOfreqCount(new Object[]{
- pLibrary,
- null
- });
- }
-
- @Override
- protected RequestCountOfLibraryMatch tupleToMatch(final Tuple t) {
- try {
- return RequestCountOfLibraryMatch.newMatch((Library) t.get(POSITION_LIBRARY), (Integer) t.get(POSITION_REQCOUNT));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected RequestCountOfLibraryMatch arrayToMatch(final Object[] match) {
- try {
- return RequestCountOfLibraryMatch.newMatch((Library) match[POSITION_LIBRARY], (Integer) match[POSITION_REQCOUNT]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected RequestCountOfLibraryMatch arrayToMatchMutable(final Object[] match) {
- try {
- return RequestCountOfLibraryMatch.newMutableMatch((Library) match[POSITION_LIBRARY], (Integer) match[POSITION_REQCOUNT]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<RequestCountOfLibraryMatcher> querySpecification() throws ViatraQueryException {
- return RequestCountOfLibraryQuerySpecification.instance();
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SingleAuthoredFirstBooksMatch.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SingleAuthoredFirstBooksMatch.java
deleted file mode 100644
index a7a678b14..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SingleAuthoredFirstBooksMatch.java
+++ /dev/null
@@ -1,208 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.SingleAuthoredFirstBooksQuerySpecification;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.runtime.runonce.tests.singleAuthoredFirstBooks pattern,
- * to be used in conjunction with {@link SingleAuthoredFirstBooksMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see SingleAuthoredFirstBooksMatcher
- * @see SingleAuthoredFirstBooksProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class SingleAuthoredFirstBooksMatch extends BasePatternMatch {
- private Library fLibrary;
-
- private Book fFirstBook;
-
- private static List<String> parameterNames = makeImmutableList("library", "firstBook");
-
- private SingleAuthoredFirstBooksMatch(final Library pLibrary, final Book pFirstBook) {
- this.fLibrary = pLibrary;
- this.fFirstBook = pFirstBook;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("library".equals(parameterName)) return this.fLibrary;
- if ("firstBook".equals(parameterName)) return this.fFirstBook;
- return null;
- }
-
- public Library getLibrary() {
- return this.fLibrary;
- }
-
- public Book getFirstBook() {
- return this.fFirstBook;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("library".equals(parameterName) ) {
- this.fLibrary = (Library) newValue;
- return true;
- }
- if ("firstBook".equals(parameterName) ) {
- this.fFirstBook = (Book) newValue;
- return true;
- }
- return false;
- }
-
- public void setLibrary(final Library pLibrary) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fLibrary = pLibrary;
- }
-
- public void setFirstBook(final Book pFirstBook) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fFirstBook = pFirstBook;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.singleAuthoredFirstBooks";
- }
-
- @Override
- public List<String> parameterNames() {
- return SingleAuthoredFirstBooksMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fLibrary, fFirstBook};
- }
-
- @Override
- public SingleAuthoredFirstBooksMatch toImmutable() {
- return isMutable() ? newMatch(fLibrary, fFirstBook) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"library\"=" + prettyPrintValue(fLibrary) + ", ");
-
- result.append("\"firstBook\"=" + prettyPrintValue(fFirstBook)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fLibrary == null) ? 0 : fLibrary.hashCode());
- result = prime * result + ((fFirstBook == null) ? 0 : fFirstBook.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof SingleAuthoredFirstBooksMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- SingleAuthoredFirstBooksMatch other = (SingleAuthoredFirstBooksMatch) obj;
- if (fLibrary == null) {if (other.fLibrary != null) return false;}
- else if (!fLibrary.equals(other.fLibrary)) return false;
- if (fFirstBook == null) {if (other.fFirstBook != null) return false;}
- else if (!fFirstBook.equals(other.fFirstBook)) return false;
- return true;
- }
-
- @Override
- public SingleAuthoredFirstBooksQuerySpecification specification() {
- try {
- return SingleAuthoredFirstBooksQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static SingleAuthoredFirstBooksMatch newEmptyMatch() {
- return new Mutable(null, null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pFirstBook the fixed value of pattern parameter firstBook, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static SingleAuthoredFirstBooksMatch newMutableMatch(final Library pLibrary, final Book pFirstBook) {
- return new Mutable(pLibrary, pFirstBook);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pFirstBook the fixed value of pattern parameter firstBook, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static SingleAuthoredFirstBooksMatch newMatch(final Library pLibrary, final Book pFirstBook) {
- return new Immutable(pLibrary, pFirstBook);
- }
-
- private static final class Mutable extends SingleAuthoredFirstBooksMatch {
- Mutable(final Library pLibrary, final Book pFirstBook) {
- super(pLibrary, pFirstBook);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends SingleAuthoredFirstBooksMatch {
- Immutable(final Library pLibrary, final Book pFirstBook) {
- super(pLibrary, pFirstBook);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SingleAuthoredFirstBooksMatcher.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SingleAuthoredFirstBooksMatcher.java
deleted file mode 100644
index d69cedd5a..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SingleAuthoredFirstBooksMatcher.java
+++ /dev/null
@@ -1,282 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.SingleAuthoredFirstBooksMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.SingleAuthoredFirstBooksQuerySpecification;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.runtime.runonce.tests.singleAuthoredFirstBooks pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link SingleAuthoredFirstBooksMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * pattern singleAuthoredFirstBooks(library : Library, firstBook : Book) {
- * Library.writers.firstBook(library, firstBook);
- * 1 == count find bookAuthors(firstBook, _author);
- * }
- * </pre></code>
- *
- * @see SingleAuthoredFirstBooksMatch
- * @see SingleAuthoredFirstBooksProcessor
- * @see SingleAuthoredFirstBooksQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class SingleAuthoredFirstBooksMatcher extends BaseMatcher<SingleAuthoredFirstBooksMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static SingleAuthoredFirstBooksMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- SingleAuthoredFirstBooksMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new SingleAuthoredFirstBooksMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_LIBRARY = 0;
-
- private final static int POSITION_FIRSTBOOK = 1;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(SingleAuthoredFirstBooksMatcher.class);
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- private SingleAuthoredFirstBooksMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pFirstBook the fixed value of pattern parameter firstBook, or null if not bound.
- * @return matches represented as a SingleAuthoredFirstBooksMatch object.
- *
- */
- public Collection<SingleAuthoredFirstBooksMatch> getAllMatches(final Library pLibrary, final Book pFirstBook) {
- return rawGetAllMatches(new Object[]{pLibrary, pFirstBook});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pFirstBook the fixed value of pattern parameter firstBook, or null if not bound.
- * @return a match represented as a SingleAuthoredFirstBooksMatch object, or null if no match is found.
- *
- */
- public SingleAuthoredFirstBooksMatch getOneArbitraryMatch(final Library pLibrary, final Book pFirstBook) {
- return rawGetOneArbitraryMatch(new Object[]{pLibrary, pFirstBook});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pFirstBook the fixed value of pattern parameter firstBook, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final Library pLibrary, final Book pFirstBook) {
- return rawHasMatch(new Object[]{pLibrary, pFirstBook});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pFirstBook the fixed value of pattern parameter firstBook, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final Library pLibrary, final Book pFirstBook) {
- return rawCountMatches(new Object[]{pLibrary, pFirstBook});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pFirstBook the fixed value of pattern parameter firstBook, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final Library pLibrary, final Book pFirstBook, final IMatchProcessor<? super SingleAuthoredFirstBooksMatch> processor) {
- rawForEachMatch(new Object[]{pLibrary, pFirstBook}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pFirstBook the fixed value of pattern parameter firstBook, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final Library pLibrary, final Book pFirstBook, final IMatchProcessor<? super SingleAuthoredFirstBooksMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pLibrary, pFirstBook}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pFirstBook the fixed value of pattern parameter firstBook, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public SingleAuthoredFirstBooksMatch newMatch(final Library pLibrary, final Book pFirstBook) {
- return SingleAuthoredFirstBooksMatch.newMatch(pLibrary, pFirstBook);
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<Library> rawAccumulateAllValuesOflibrary(final Object[] parameters) {
- Set<Library> results = new HashSet<Library>();
- rawAccumulateAllValues(POSITION_LIBRARY, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Library> getAllValuesOflibrary() {
- return rawAccumulateAllValuesOflibrary(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Library> getAllValuesOflibrary(final SingleAuthoredFirstBooksMatch partialMatch) {
- return rawAccumulateAllValuesOflibrary(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Library> getAllValuesOflibrary(final Book pFirstBook) {
- return rawAccumulateAllValuesOflibrary(new Object[]{
- null,
- pFirstBook
- });
- }
-
- /**
- * Retrieve the set of values that occur in matches for firstBook.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<Book> rawAccumulateAllValuesOffirstBook(final Object[] parameters) {
- Set<Book> results = new HashSet<Book>();
- rawAccumulateAllValues(POSITION_FIRSTBOOK, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for firstBook.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Book> getAllValuesOffirstBook() {
- return rawAccumulateAllValuesOffirstBook(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for firstBook.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Book> getAllValuesOffirstBook(final SingleAuthoredFirstBooksMatch partialMatch) {
- return rawAccumulateAllValuesOffirstBook(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for firstBook.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Book> getAllValuesOffirstBook(final Library pLibrary) {
- return rawAccumulateAllValuesOffirstBook(new Object[]{
- pLibrary,
- null
- });
- }
-
- @Override
- protected SingleAuthoredFirstBooksMatch tupleToMatch(final Tuple t) {
- try {
- return SingleAuthoredFirstBooksMatch.newMatch((Library) t.get(POSITION_LIBRARY), (Book) t.get(POSITION_FIRSTBOOK));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected SingleAuthoredFirstBooksMatch arrayToMatch(final Object[] match) {
- try {
- return SingleAuthoredFirstBooksMatch.newMatch((Library) match[POSITION_LIBRARY], (Book) match[POSITION_FIRSTBOOK]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected SingleAuthoredFirstBooksMatch arrayToMatchMutable(final Object[] match) {
- try {
- return SingleAuthoredFirstBooksMatch.newMutableMatch((Library) match[POSITION_LIBRARY], (Book) match[POSITION_FIRSTBOOK]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<SingleAuthoredFirstBooksMatcher> querySpecification() throws ViatraQueryException {
- return SingleAuthoredFirstBooksQuerySpecification.instance();
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SomeBooksWithTwoAuthorsMatch.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SomeBooksWithTwoAuthorsMatch.java
deleted file mode 100644
index 5534fd2f0..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SomeBooksWithTwoAuthorsMatch.java
+++ /dev/null
@@ -1,208 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.SomeBooksWithTwoAuthorsQuerySpecification;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.runtime.runonce.tests.someBooksWithTwoAuthors pattern,
- * to be used in conjunction with {@link SomeBooksWithTwoAuthorsMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see SomeBooksWithTwoAuthorsMatcher
- * @see SomeBooksWithTwoAuthorsProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class SomeBooksWithTwoAuthorsMatch extends BasePatternMatch {
- private Library fLibrary;
-
- private Book fBook;
-
- private static List<String> parameterNames = makeImmutableList("library", "book");
-
- private SomeBooksWithTwoAuthorsMatch(final Library pLibrary, final Book pBook) {
- this.fLibrary = pLibrary;
- this.fBook = pBook;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("library".equals(parameterName)) return this.fLibrary;
- if ("book".equals(parameterName)) return this.fBook;
- return null;
- }
-
- public Library getLibrary() {
- return this.fLibrary;
- }
-
- public Book getBook() {
- return this.fBook;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("library".equals(parameterName) ) {
- this.fLibrary = (Library) newValue;
- return true;
- }
- if ("book".equals(parameterName) ) {
- this.fBook = (Book) newValue;
- return true;
- }
- return false;
- }
-
- public void setLibrary(final Library pLibrary) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fLibrary = pLibrary;
- }
-
- public void setBook(final Book pBook) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fBook = pBook;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.someBooksWithTwoAuthors";
- }
-
- @Override
- public List<String> parameterNames() {
- return SomeBooksWithTwoAuthorsMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fLibrary, fBook};
- }
-
- @Override
- public SomeBooksWithTwoAuthorsMatch toImmutable() {
- return isMutable() ? newMatch(fLibrary, fBook) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"library\"=" + prettyPrintValue(fLibrary) + ", ");
-
- result.append("\"book\"=" + prettyPrintValue(fBook)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fLibrary == null) ? 0 : fLibrary.hashCode());
- result = prime * result + ((fBook == null) ? 0 : fBook.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof SomeBooksWithTwoAuthorsMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- SomeBooksWithTwoAuthorsMatch other = (SomeBooksWithTwoAuthorsMatch) obj;
- if (fLibrary == null) {if (other.fLibrary != null) return false;}
- else if (!fLibrary.equals(other.fLibrary)) return false;
- if (fBook == null) {if (other.fBook != null) return false;}
- else if (!fBook.equals(other.fBook)) return false;
- return true;
- }
-
- @Override
- public SomeBooksWithTwoAuthorsQuerySpecification specification() {
- try {
- return SomeBooksWithTwoAuthorsQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static SomeBooksWithTwoAuthorsMatch newEmptyMatch() {
- return new Mutable(null, null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static SomeBooksWithTwoAuthorsMatch newMutableMatch(final Library pLibrary, final Book pBook) {
- return new Mutable(pLibrary, pBook);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static SomeBooksWithTwoAuthorsMatch newMatch(final Library pLibrary, final Book pBook) {
- return new Immutable(pLibrary, pBook);
- }
-
- private static final class Mutable extends SomeBooksWithTwoAuthorsMatch {
- Mutable(final Library pLibrary, final Book pBook) {
- super(pLibrary, pBook);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends SomeBooksWithTwoAuthorsMatch {
- Immutable(final Library pLibrary, final Book pBook) {
- super(pLibrary, pBook);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SomeBooksWithTwoAuthorsMatcher.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SomeBooksWithTwoAuthorsMatcher.java
deleted file mode 100644
index 8e2f2e29e..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SomeBooksWithTwoAuthorsMatcher.java
+++ /dev/null
@@ -1,283 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.SomeBooksWithTwoAuthorsMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.SomeBooksWithTwoAuthorsQuerySpecification;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.runtime.runonce.tests.someBooksWithTwoAuthors pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link SomeBooksWithTwoAuthorsMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * pattern someBooksWithTwoAuthors(library : Library, book : Book) {
- * Library.requestCount(library, _c);
- * Library.someBooks(library, book);
- * 2 == count find bookAuthors(book, _author);
- * }
- * </pre></code>
- *
- * @see SomeBooksWithTwoAuthorsMatch
- * @see SomeBooksWithTwoAuthorsProcessor
- * @see SomeBooksWithTwoAuthorsQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class SomeBooksWithTwoAuthorsMatcher extends BaseMatcher<SomeBooksWithTwoAuthorsMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static SomeBooksWithTwoAuthorsMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- SomeBooksWithTwoAuthorsMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new SomeBooksWithTwoAuthorsMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_LIBRARY = 0;
-
- private final static int POSITION_BOOK = 1;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(SomeBooksWithTwoAuthorsMatcher.class);
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- private SomeBooksWithTwoAuthorsMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return matches represented as a SomeBooksWithTwoAuthorsMatch object.
- *
- */
- public Collection<SomeBooksWithTwoAuthorsMatch> getAllMatches(final Library pLibrary, final Book pBook) {
- return rawGetAllMatches(new Object[]{pLibrary, pBook});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return a match represented as a SomeBooksWithTwoAuthorsMatch object, or null if no match is found.
- *
- */
- public SomeBooksWithTwoAuthorsMatch getOneArbitraryMatch(final Library pLibrary, final Book pBook) {
- return rawGetOneArbitraryMatch(new Object[]{pLibrary, pBook});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final Library pLibrary, final Book pBook) {
- return rawHasMatch(new Object[]{pLibrary, pBook});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final Library pLibrary, final Book pBook) {
- return rawCountMatches(new Object[]{pLibrary, pBook});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final Library pLibrary, final Book pBook, final IMatchProcessor<? super SomeBooksWithTwoAuthorsMatch> processor) {
- rawForEachMatch(new Object[]{pLibrary, pBook}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final Library pLibrary, final Book pBook, final IMatchProcessor<? super SomeBooksWithTwoAuthorsMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pLibrary, pBook}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pBook the fixed value of pattern parameter book, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public SomeBooksWithTwoAuthorsMatch newMatch(final Library pLibrary, final Book pBook) {
- return SomeBooksWithTwoAuthorsMatch.newMatch(pLibrary, pBook);
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<Library> rawAccumulateAllValuesOflibrary(final Object[] parameters) {
- Set<Library> results = new HashSet<Library>();
- rawAccumulateAllValues(POSITION_LIBRARY, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Library> getAllValuesOflibrary() {
- return rawAccumulateAllValuesOflibrary(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Library> getAllValuesOflibrary(final SomeBooksWithTwoAuthorsMatch partialMatch) {
- return rawAccumulateAllValuesOflibrary(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Library> getAllValuesOflibrary(final Book pBook) {
- return rawAccumulateAllValuesOflibrary(new Object[]{
- null,
- pBook
- });
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<Book> rawAccumulateAllValuesOfbook(final Object[] parameters) {
- Set<Book> results = new HashSet<Book>();
- rawAccumulateAllValues(POSITION_BOOK, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Book> getAllValuesOfbook() {
- return rawAccumulateAllValuesOfbook(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Book> getAllValuesOfbook(final SomeBooksWithTwoAuthorsMatch partialMatch) {
- return rawAccumulateAllValuesOfbook(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for book.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Book> getAllValuesOfbook(final Library pLibrary) {
- return rawAccumulateAllValuesOfbook(new Object[]{
- pLibrary,
- null
- });
- }
-
- @Override
- protected SomeBooksWithTwoAuthorsMatch tupleToMatch(final Tuple t) {
- try {
- return SomeBooksWithTwoAuthorsMatch.newMatch((Library) t.get(POSITION_LIBRARY), (Book) t.get(POSITION_BOOK));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected SomeBooksWithTwoAuthorsMatch arrayToMatch(final Object[] match) {
- try {
- return SomeBooksWithTwoAuthorsMatch.newMatch((Library) match[POSITION_LIBRARY], (Book) match[POSITION_BOOK]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected SomeBooksWithTwoAuthorsMatch arrayToMatchMutable(final Object[] match) {
- try {
- return SomeBooksWithTwoAuthorsMatch.newMutableMatch((Library) match[POSITION_LIBRARY], (Book) match[POSITION_BOOK]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<SomeBooksWithTwoAuthorsMatcher> querySpecification() throws ViatraQueryException {
- return SomeBooksWithTwoAuthorsQuerySpecification.instance();
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SumOfPagesInLibraryMatch.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SumOfPagesInLibraryMatch.java
deleted file mode 100644
index 40dff3846..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SumOfPagesInLibraryMatch.java
+++ /dev/null
@@ -1,207 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.SumOfPagesInLibraryQuerySpecification;
-
-/**
- * Pattern-specific match representation of the org.eclipse.viatra.query.runtime.runonce.tests.sumOfPagesInLibrary pattern,
- * to be used in conjunction with {@link SumOfPagesInLibraryMatcher}.
- *
- * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
- * Each instance is a (possibly partial) substitution of pattern parameters,
- * usable to represent a match of the pattern in the result of a query,
- * or to specify the bound (fixed) input parameters when issuing a query.
- *
- * @see SumOfPagesInLibraryMatcher
- * @see SumOfPagesInLibraryProcessor
- *
- */
-@SuppressWarnings("all")
-public abstract class SumOfPagesInLibraryMatch extends BasePatternMatch {
- private Library fLibrary;
-
- private Integer fSumOfPages;
-
- private static List<String> parameterNames = makeImmutableList("library", "sumOfPages");
-
- private SumOfPagesInLibraryMatch(final Library pLibrary, final Integer pSumOfPages) {
- this.fLibrary = pLibrary;
- this.fSumOfPages = pSumOfPages;
- }
-
- @Override
- public Object get(final String parameterName) {
- if ("library".equals(parameterName)) return this.fLibrary;
- if ("sumOfPages".equals(parameterName)) return this.fSumOfPages;
- return null;
- }
-
- public Library getLibrary() {
- return this.fLibrary;
- }
-
- public Integer getSumOfPages() {
- return this.fSumOfPages;
- }
-
- @Override
- public boolean set(final String parameterName, final Object newValue) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- if ("library".equals(parameterName) ) {
- this.fLibrary = (Library) newValue;
- return true;
- }
- if ("sumOfPages".equals(parameterName) ) {
- this.fSumOfPages = (Integer) newValue;
- return true;
- }
- return false;
- }
-
- public void setLibrary(final Library pLibrary) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fLibrary = pLibrary;
- }
-
- public void setSumOfPages(final Integer pSumOfPages) {
- if (!isMutable()) throw new java.lang.UnsupportedOperationException();
- this.fSumOfPages = pSumOfPages;
- }
-
- @Override
- public String patternName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.sumOfPagesInLibrary";
- }
-
- @Override
- public List<String> parameterNames() {
- return SumOfPagesInLibraryMatch.parameterNames;
- }
-
- @Override
- public Object[] toArray() {
- return new Object[]{fLibrary, fSumOfPages};
- }
-
- @Override
- public SumOfPagesInLibraryMatch toImmutable() {
- return isMutable() ? newMatch(fLibrary, fSumOfPages) : this;
- }
-
- @Override
- public String prettyPrint() {
- StringBuilder result = new StringBuilder();
- result.append("\"library\"=" + prettyPrintValue(fLibrary) + ", ");
-
- result.append("\"sumOfPages\"=" + prettyPrintValue(fSumOfPages)
- );
- return result.toString();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fLibrary == null) ? 0 : fLibrary.hashCode());
- result = prime * result + ((fSumOfPages == null) ? 0 : fSumOfPages.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj)
- return true;
- if (!(obj instanceof SumOfPagesInLibraryMatch)) { // this should be infrequent
- if (obj == null) {
- return false;
- }
- if (!(obj instanceof IPatternMatch)) {
- return false;
- }
- IPatternMatch otherSig = (IPatternMatch) obj;
- if (!specification().equals(otherSig.specification()))
- return false;
- return Arrays.deepEquals(toArray(), otherSig.toArray());
- }
- SumOfPagesInLibraryMatch other = (SumOfPagesInLibraryMatch) obj;
- if (fLibrary == null) {if (other.fLibrary != null) return false;}
- else if (!fLibrary.equals(other.fLibrary)) return false;
- if (fSumOfPages == null) {if (other.fSumOfPages != null) return false;}
- else if (!fSumOfPages.equals(other.fSumOfPages)) return false;
- return true;
- }
-
- @Override
- public SumOfPagesInLibraryQuerySpecification specification() {
- try {
- return SumOfPagesInLibraryQuerySpecification.instance();
- } catch (ViatraQueryException ex) {
- // This cannot happen, as the match object can only be instantiated if the query specification exists
- throw new IllegalStateException (ex);
- }
- }
-
- /**
- * Returns an empty, mutable match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @return the empty match.
- *
- */
- public static SumOfPagesInLibraryMatch newEmptyMatch() {
- return new Mutable(null, null);
- }
-
- /**
- * Returns a mutable (partial) match.
- * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
- *
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pSumOfPages the fixed value of pattern parameter sumOfPages, or null if not bound.
- * @return the new, mutable (partial) match object.
- *
- */
- public static SumOfPagesInLibraryMatch newMutableMatch(final Library pLibrary, final Integer pSumOfPages) {
- return new Mutable(pLibrary, pSumOfPages);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pSumOfPages the fixed value of pattern parameter sumOfPages, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public static SumOfPagesInLibraryMatch newMatch(final Library pLibrary, final Integer pSumOfPages) {
- return new Immutable(pLibrary, pSumOfPages);
- }
-
- private static final class Mutable extends SumOfPagesInLibraryMatch {
- Mutable(final Library pLibrary, final Integer pSumOfPages) {
- super(pLibrary, pSumOfPages);
- }
-
- @Override
- public boolean isMutable() {
- return true;
- }
- }
-
- private static final class Immutable extends SumOfPagesInLibraryMatch {
- Immutable(final Library pLibrary, final Integer pSumOfPages) {
- super(pLibrary, pSumOfPages);
- }
-
- @Override
- public boolean isMutable() {
- return false;
- }
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SumOfPagesInLibraryMatcher.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SumOfPagesInLibraryMatcher.java
deleted file mode 100644
index 331e16b06..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/SumOfPagesInLibraryMatcher.java
+++ /dev/null
@@ -1,280 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.log4j.Logger;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.SumOfPagesInLibraryMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.SumOfPagesInLibraryQuerySpecification;
-import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
-
-/**
- * Generated pattern matcher API of the org.eclipse.viatra.query.runtime.runonce.tests.sumOfPagesInLibrary pattern,
- * providing pattern-specific query methods.
- *
- * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
- * e.g. in conjunction with {@link ViatraQueryEngine#on(Notifier)}.
- *
- * <p>Matches of the pattern will be represented as {@link SumOfPagesInLibraryMatch}.
- *
- * <p>Original source:
- * <code><pre>
- * pattern sumOfPagesInLibrary(library : Library, sumOfPages) {
- * Library.sumOfPages(library, sumOfPages);
- * }
- * </pre></code>
- *
- * @see SumOfPagesInLibraryMatch
- * @see SumOfPagesInLibraryProcessor
- * @see SumOfPagesInLibraryQuerySpecification
- *
- */
-@SuppressWarnings("all")
-public class SumOfPagesInLibraryMatcher extends BaseMatcher<SumOfPagesInLibraryMatch> {
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- public static SumOfPagesInLibraryMatcher on(final ViatraQueryEngine engine) throws ViatraQueryException {
- // check if matcher already exists
- SumOfPagesInLibraryMatcher matcher = engine.getExistingMatcher(querySpecification());
- if (matcher == null) {
- matcher = new SumOfPagesInLibraryMatcher(engine);
- // do not have to "put" it into engine.matchers, reportMatcherInitialized() will take care of it
- }
- return matcher;
- }
-
- private final static int POSITION_LIBRARY = 0;
-
- private final static int POSITION_SUMOFPAGES = 1;
-
- private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(SumOfPagesInLibraryMatcher.class);
-
- /**
- * Initializes the pattern matcher within an existing VIATRA Query engine.
- * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
- * The match set will be incrementally refreshed upon updates.
- * @param engine the existing VIATRA Query engine in which this matcher will be created.
- * @throws ViatraQueryException if an error occurs during pattern matcher creation
- *
- */
- private SumOfPagesInLibraryMatcher(final ViatraQueryEngine engine) throws ViatraQueryException {
- super(engine, querySpecification());
- }
-
- /**
- * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pSumOfPages the fixed value of pattern parameter sumOfPages, or null if not bound.
- * @return matches represented as a SumOfPagesInLibraryMatch object.
- *
- */
- public Collection<SumOfPagesInLibraryMatch> getAllMatches(final Library pLibrary, final Integer pSumOfPages) {
- return rawGetAllMatches(new Object[]{pLibrary, pSumOfPages});
- }
-
- /**
- * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pSumOfPages the fixed value of pattern parameter sumOfPages, or null if not bound.
- * @return a match represented as a SumOfPagesInLibraryMatch object, or null if no match is found.
- *
- */
- public SumOfPagesInLibraryMatch getOneArbitraryMatch(final Library pLibrary, final Integer pSumOfPages) {
- return rawGetOneArbitraryMatch(new Object[]{pLibrary, pSumOfPages});
- }
-
- /**
- * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
- * under any possible substitution of the unspecified parameters (if any).
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pSumOfPages the fixed value of pattern parameter sumOfPages, or null if not bound.
- * @return true if the input is a valid (partial) match of the pattern.
- *
- */
- public boolean hasMatch(final Library pLibrary, final Integer pSumOfPages) {
- return rawHasMatch(new Object[]{pLibrary, pSumOfPages});
- }
-
- /**
- * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pSumOfPages the fixed value of pattern parameter sumOfPages, or null if not bound.
- * @return the number of pattern matches found.
- *
- */
- public int countMatches(final Library pLibrary, final Integer pSumOfPages) {
- return rawCountMatches(new Object[]{pLibrary, pSumOfPages});
- }
-
- /**
- * Executes the given processor on each match of the pattern that conforms to the given fixed values of some parameters.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pSumOfPages the fixed value of pattern parameter sumOfPages, or null if not bound.
- * @param processor the action that will process each pattern match.
- *
- */
- public void forEachMatch(final Library pLibrary, final Integer pSumOfPages, final IMatchProcessor<? super SumOfPagesInLibraryMatch> processor) {
- rawForEachMatch(new Object[]{pLibrary, pSumOfPages}, processor);
- }
-
- /**
- * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
- * Neither determinism nor randomness of selection is guaranteed.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pSumOfPages the fixed value of pattern parameter sumOfPages, or null if not bound.
- * @param processor the action that will process the selected match.
- * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
- *
- */
- public boolean forOneArbitraryMatch(final Library pLibrary, final Integer pSumOfPages, final IMatchProcessor<? super SumOfPagesInLibraryMatch> processor) {
- return rawForOneArbitraryMatch(new Object[]{pLibrary, pSumOfPages}, processor);
- }
-
- /**
- * Returns a new (partial) match.
- * This can be used e.g. to call the matcher with a partial match.
- * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
- * @param pLibrary the fixed value of pattern parameter library, or null if not bound.
- * @param pSumOfPages the fixed value of pattern parameter sumOfPages, or null if not bound.
- * @return the (partial) match object.
- *
- */
- public SumOfPagesInLibraryMatch newMatch(final Library pLibrary, final Integer pSumOfPages) {
- return SumOfPagesInLibraryMatch.newMatch(pLibrary, pSumOfPages);
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<Library> rawAccumulateAllValuesOflibrary(final Object[] parameters) {
- Set<Library> results = new HashSet<Library>();
- rawAccumulateAllValues(POSITION_LIBRARY, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Library> getAllValuesOflibrary() {
- return rawAccumulateAllValuesOflibrary(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Library> getAllValuesOflibrary(final SumOfPagesInLibraryMatch partialMatch) {
- return rawAccumulateAllValuesOflibrary(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for library.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Library> getAllValuesOflibrary(final Integer pSumOfPages) {
- return rawAccumulateAllValuesOflibrary(new Object[]{
- null,
- pSumOfPages
- });
- }
-
- /**
- * Retrieve the set of values that occur in matches for sumOfPages.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- protected Set<Integer> rawAccumulateAllValuesOfsumOfPages(final Object[] parameters) {
- Set<Integer> results = new HashSet<Integer>();
- rawAccumulateAllValues(POSITION_SUMOFPAGES, parameters, results);
- return results;
- }
-
- /**
- * Retrieve the set of values that occur in matches for sumOfPages.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Integer> getAllValuesOfsumOfPages() {
- return rawAccumulateAllValuesOfsumOfPages(emptyArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for sumOfPages.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Integer> getAllValuesOfsumOfPages(final SumOfPagesInLibraryMatch partialMatch) {
- return rawAccumulateAllValuesOfsumOfPages(partialMatch.toArray());
- }
-
- /**
- * Retrieve the set of values that occur in matches for sumOfPages.
- * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches
- *
- */
- public Set<Integer> getAllValuesOfsumOfPages(final Library pLibrary) {
- return rawAccumulateAllValuesOfsumOfPages(new Object[]{
- pLibrary,
- null
- });
- }
-
- @Override
- protected SumOfPagesInLibraryMatch tupleToMatch(final Tuple t) {
- try {
- return SumOfPagesInLibraryMatch.newMatch((Library) t.get(POSITION_LIBRARY), (Integer) t.get(POSITION_SUMOFPAGES));
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in tuple not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected SumOfPagesInLibraryMatch arrayToMatch(final Object[] match) {
- try {
- return SumOfPagesInLibraryMatch.newMatch((Library) match[POSITION_LIBRARY], (Integer) match[POSITION_SUMOFPAGES]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- @Override
- protected SumOfPagesInLibraryMatch arrayToMatchMutable(final Object[] match) {
- try {
- return SumOfPagesInLibraryMatch.newMutableMatch((Library) match[POSITION_LIBRARY], (Integer) match[POSITION_SUMOFPAGES]);
- } catch(ClassCastException e) {
- LOGGER.error("Element(s) in array not properly typed!",e);
- return null;
- }
- }
-
- /**
- * @return the singleton instance of the query specification of this pattern
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static IQuerySpecification<SumOfPagesInLibraryMatcher> querySpecification() throws ViatraQueryException {
- return SumOfPagesInLibraryQuerySpecification.instance();
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/.gitignore b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/.gitignore
deleted file mode 100644
index 75d24fa4e..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-/.BookAuthorsProcessor.java._trace
-/.BookAuthorsQuerySpecification.java._trace
-/.BooksWithMultipleAuthorsProcessor.java._trace
-/.BooksWithMultipleAuthorsQuerySpecification.java._trace
-/.SingleAuthoredFirstBooksProcessor.java._trace
-/.SingleAuthoredFirstBooksQuerySpecification.java._trace
-/.SumOfPagesInLibraryProcessor.java._trace
-/.SumOfPagesInLibraryQuerySpecification.java._trace
-/.LongSciFiBooksOfAuthorProcessor.java._trace
-/.LongSciFiBooksOfAuthorQuerySpecification.java._trace
-/.RequestCountOfLibraryProcessor.java._trace
-/.RequestCountOfLibraryQuerySpecification.java._trace
-/.SomeBooksWithTwoAuthorsProcessor.java._trace
-/.SomeBooksWithTwoAuthorsQuerySpecification.java._trace
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BookAuthorsProcessor.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BookAuthorsProcessor.java
deleted file mode 100644
index 2b8bbc978..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BookAuthorsProcessor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Writer;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.runonce.tests.BookAuthorsMatch;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.runtime.runonce.tests.bookAuthors pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class BookAuthorsProcessor implements IMatchProcessor<BookAuthorsMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pBook the value of pattern parameter book in the currently processed match
- * @param pAuthor the value of pattern parameter author in the currently processed match
- *
- */
- public abstract void process(final Book pBook, final Writer pAuthor);
-
- @Override
- public void process(final BookAuthorsMatch match) {
- process(match.getBook(), match.getAuthor());
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BookAuthorsQuerySpecification.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BookAuthorsQuerySpecification.java
deleted file mode 100644
index a28540cc0..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BookAuthorsQuerySpecification.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.BookAuthorsMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.BookAuthorsMatcher;
-
-/**
- * A pattern-specific query specification that can instantiate BookAuthorsMatcher in a type-safe way.
- *
- * @see BookAuthorsMatcher
- * @see BookAuthorsMatch
- *
- */
-@SuppressWarnings("all")
-public final class BookAuthorsQuerySpecification extends BaseGeneratedEMFQuerySpecification<BookAuthorsMatcher> {
- private BookAuthorsQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static BookAuthorsQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected BookAuthorsMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return BookAuthorsMatcher.on(engine);
- }
-
- @Override
- public BookAuthorsMatch newEmptyMatch() {
- return BookAuthorsMatch.newEmptyMatch();
- }
-
- @Override
- public BookAuthorsMatch newMatch(final Object... parameters) {
- return BookAuthorsMatch.newMatch((org.eclipse.viatra.examples.library.Book) parameters[0], (org.eclipse.viatra.examples.library.Writer) parameters[1]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link BookAuthorsQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link BookAuthorsQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static BookAuthorsQuerySpecification INSTANCE = new BookAuthorsQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static BookAuthorsQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.bookAuthors";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("book","author");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(
- new PParameter("book", "org.eclipse.viatra.examples.library.Book", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/viatra/examples/library/1.0", "Book"))),
- new PParameter("author", "org.eclipse.viatra.examples.library.Writer", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/viatra/examples/library/1.0", "Writer")))
- );
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_book = body.getOrCreateVariableByName("book");
- PVariable var_author = body.getOrCreateVariableByName("author");
- new TypeConstraint(body, new FlatTuple(var_book), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Book")));
- new TypeConstraint(body, new FlatTuple(var_author), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Writer")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_book, "book"),
- new ExportedParameter(body, var_author, "author")
- ));
- // Book.authors(book, author)
- new TypeConstraint(body, new FlatTuple(var_book), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Book")));
- PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
- new TypeConstraint(body, new FlatTuple(var_book, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Book", "authors")));
- new Equality(body, var__virtual_0_, var_author);
- bodies.add(body);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BooksWithMultipleAuthorsProcessor.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BooksWithMultipleAuthorsProcessor.java
deleted file mode 100644
index 8c6acec4c..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BooksWithMultipleAuthorsProcessor.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.runonce.tests.BooksWithMultipleAuthorsMatch;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.runtime.runonce.tests.booksWithMultipleAuthors pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class BooksWithMultipleAuthorsProcessor implements IMatchProcessor<BooksWithMultipleAuthorsMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pBook the value of pattern parameter book in the currently processed match
- *
- */
- public abstract void process(final Book pBook);
-
- @Override
- public void process(final BooksWithMultipleAuthorsMatch match) {
- process(match.getBook());
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BooksWithMultipleAuthorsQuerySpecification.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BooksWithMultipleAuthorsQuerySpecification.java
deleted file mode 100644
index 5195a5290..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/BooksWithMultipleAuthorsQuerySpecification.java
+++ /dev/null
@@ -1,169 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.IExpressionEvaluator;
-import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.PatternMatchCounter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.BooksWithMultipleAuthorsMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.BooksWithMultipleAuthorsMatcher;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.BookAuthorsQuerySpecification;
-
-/**
- * A pattern-specific query specification that can instantiate BooksWithMultipleAuthorsMatcher in a type-safe way.
- *
- * @see BooksWithMultipleAuthorsMatcher
- * @see BooksWithMultipleAuthorsMatch
- *
- */
-@SuppressWarnings("all")
-public final class BooksWithMultipleAuthorsQuerySpecification extends BaseGeneratedEMFQuerySpecification<BooksWithMultipleAuthorsMatcher> {
- private BooksWithMultipleAuthorsQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static BooksWithMultipleAuthorsQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected BooksWithMultipleAuthorsMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return BooksWithMultipleAuthorsMatcher.on(engine);
- }
-
- @Override
- public BooksWithMultipleAuthorsMatch newEmptyMatch() {
- return BooksWithMultipleAuthorsMatch.newEmptyMatch();
- }
-
- @Override
- public BooksWithMultipleAuthorsMatch newMatch(final Object... parameters) {
- return BooksWithMultipleAuthorsMatch.newMatch((org.eclipse.viatra.examples.library.Book) parameters[0]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link BooksWithMultipleAuthorsQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link BooksWithMultipleAuthorsQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static BooksWithMultipleAuthorsQuerySpecification INSTANCE = new BooksWithMultipleAuthorsQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static BooksWithMultipleAuthorsQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.booksWithMultipleAuthors";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("book");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(
- new PParameter("book", "org.eclipse.viatra.examples.library.Book", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/viatra/examples/library/1.0", "Book")))
- );
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_book = body.getOrCreateVariableByName("book");
- PVariable var_numberOfBooks = body.getOrCreateVariableByName("numberOfBooks");
- PVariable var__author = body.getOrCreateVariableByName("_author");
- new TypeConstraint(body, new FlatTuple(var_book), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Book")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_book, "book")
- ));
- // Book(book)
- new TypeConstraint(body, new FlatTuple(var_book), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Book")));
- // numberOfBooks == count find bookAuthors(book, _author)
- PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
- new PatternMatchCounter(body, new FlatTuple(var_book, var__author), BookAuthorsQuerySpecification.instance().getInternalQueryRepresentation(), var__virtual_0_);
- new Equality(body, var_numberOfBooks, var__virtual_0_);
- // check(numberOfBooks > 1)
- new ExpressionEvaluation(body, new IExpressionEvaluator() {
-
- @Override
- public String getShortDescription() {
- return "Expression evaluation from pattern booksWithMultipleAuthors";
- }
-
- @Override
- public Iterable<String> getInputParameterNames() {
- return Arrays.asList("numberOfBooks");
- }
-
- @Override
- public Object evaluateExpression(IValueProvider provider) throws Exception {
- java.lang.Integer numberOfBooks = (java.lang.Integer) provider.getValue("numberOfBooks");
- return evaluateExpression_1_1(numberOfBooks);
- }
-
- }, null);
- bodies.add(body);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-
- private static boolean evaluateExpression_1_1(final Integer numberOfBooks) {
- return ((numberOfBooks).intValue() > 1);
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/LongSciFiBooksOfAuthorProcessor.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/LongSciFiBooksOfAuthorProcessor.java
deleted file mode 100644
index 1c3a97ea9..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/LongSciFiBooksOfAuthorProcessor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Writer;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.runonce.tests.LongSciFiBooksOfAuthorMatch;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.runtime.runonce.tests.longSciFiBooksOfAuthor pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class LongSciFiBooksOfAuthorProcessor implements IMatchProcessor<LongSciFiBooksOfAuthorMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pAuthor the value of pattern parameter author in the currently processed match
- * @param pBook the value of pattern parameter book in the currently processed match
- *
- */
- public abstract void process(final Writer pAuthor, final Book pBook);
-
- @Override
- public void process(final LongSciFiBooksOfAuthorMatch match) {
- process(match.getAuthor(), match.getBook());
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/LongSciFiBooksOfAuthorQuerySpecification.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/LongSciFiBooksOfAuthorQuerySpecification.java
deleted file mode 100644
index 0b305e21f..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/LongSciFiBooksOfAuthorQuerySpecification.java
+++ /dev/null
@@ -1,175 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.IExpressionEvaluator;
-import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.LongSciFiBooksOfAuthorMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.LongSciFiBooksOfAuthorMatcher;
-
-/**
- * A pattern-specific query specification that can instantiate LongSciFiBooksOfAuthorMatcher in a type-safe way.
- *
- * @see LongSciFiBooksOfAuthorMatcher
- * @see LongSciFiBooksOfAuthorMatch
- *
- */
-@SuppressWarnings("all")
-public final class LongSciFiBooksOfAuthorQuerySpecification extends BaseGeneratedEMFQuerySpecification<LongSciFiBooksOfAuthorMatcher> {
- private LongSciFiBooksOfAuthorQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static LongSciFiBooksOfAuthorQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected LongSciFiBooksOfAuthorMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return LongSciFiBooksOfAuthorMatcher.on(engine);
- }
-
- @Override
- public LongSciFiBooksOfAuthorMatch newEmptyMatch() {
- return LongSciFiBooksOfAuthorMatch.newEmptyMatch();
- }
-
- @Override
- public LongSciFiBooksOfAuthorMatch newMatch(final Object... parameters) {
- return LongSciFiBooksOfAuthorMatch.newMatch((org.eclipse.viatra.examples.library.Writer) parameters[0], (org.eclipse.viatra.examples.library.Book) parameters[1]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link LongSciFiBooksOfAuthorQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link LongSciFiBooksOfAuthorQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static LongSciFiBooksOfAuthorQuerySpecification INSTANCE = new LongSciFiBooksOfAuthorQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static LongSciFiBooksOfAuthorQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.longSciFiBooksOfAuthor";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("author","book");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(
- new PParameter("author", "org.eclipse.viatra.examples.library.Writer", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/viatra/examples/library/1.0", "Writer"))),
- new PParameter("book", "org.eclipse.viatra.examples.library.Book", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/viatra/examples/library/1.0", "Book")))
- );
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_author = body.getOrCreateVariableByName("author");
- PVariable var_book = body.getOrCreateVariableByName("book");
- PVariable var_pages = body.getOrCreateVariableByName("pages");
- new TypeConstraint(body, new FlatTuple(var_author), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Writer")));
- new TypeConstraint(body, new FlatTuple(var_book), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Book")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_author, "author"),
- new ExportedParameter(body, var_book, "book")
- ));
- // Writer.scifiBooks(author, book)
- new TypeConstraint(body, new FlatTuple(var_author), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Writer")));
- PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
- new TypeConstraint(body, new FlatTuple(var_author, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Writer", "scifiBooks")));
- new Equality(body, var__virtual_0_, var_book);
- // Book.pages(book, pages)
- new TypeConstraint(body, new FlatTuple(var_book), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Book")));
- PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
- new TypeConstraint(body, new FlatTuple(var_book, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Book", "pages")));
- new Equality(body, var__virtual_1_, var_pages);
- // check(pages > 100)
- new ExpressionEvaluation(body, new IExpressionEvaluator() {
-
- @Override
- public String getShortDescription() {
- return "Expression evaluation from pattern longSciFiBooksOfAuthor";
- }
-
- @Override
- public Iterable<String> getInputParameterNames() {
- return Arrays.asList("pages");
- }
-
- @Override
- public Object evaluateExpression(IValueProvider provider) throws Exception {
- java.lang.Integer pages = (java.lang.Integer) provider.getValue("pages");
- return evaluateExpression_1_1(pages);
- }
-
- }, null);
- bodies.add(body);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-
- private static boolean evaluateExpression_1_1(final Integer pages) {
- return ((pages).intValue() > 100);
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/RequestCountOfLibraryProcessor.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/RequestCountOfLibraryProcessor.java
deleted file mode 100644
index 36da74346..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/RequestCountOfLibraryProcessor.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.runonce.tests.RequestCountOfLibraryMatch;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.runtime.runonce.tests.requestCountOfLibrary pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class RequestCountOfLibraryProcessor implements IMatchProcessor<RequestCountOfLibraryMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pLibrary the value of pattern parameter library in the currently processed match
- * @param pReqCount the value of pattern parameter reqCount in the currently processed match
- *
- */
- public abstract void process(final Library pLibrary, final Integer pReqCount);
-
- @Override
- public void process(final RequestCountOfLibraryMatch match) {
- process(match.getLibrary(), match.getReqCount());
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/RequestCountOfLibraryQuerySpecification.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/RequestCountOfLibraryQuerySpecification.java
deleted file mode 100644
index b2d212213..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/RequestCountOfLibraryQuerySpecification.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.RequestCountOfLibraryMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.RequestCountOfLibraryMatcher;
-
-/**
- * A pattern-specific query specification that can instantiate RequestCountOfLibraryMatcher in a type-safe way.
- *
- * @see RequestCountOfLibraryMatcher
- * @see RequestCountOfLibraryMatch
- *
- */
-@SuppressWarnings("all")
-public final class RequestCountOfLibraryQuerySpecification extends BaseGeneratedEMFQuerySpecification<RequestCountOfLibraryMatcher> {
- private RequestCountOfLibraryQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static RequestCountOfLibraryQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected RequestCountOfLibraryMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return RequestCountOfLibraryMatcher.on(engine);
- }
-
- @Override
- public RequestCountOfLibraryMatch newEmptyMatch() {
- return RequestCountOfLibraryMatch.newEmptyMatch();
- }
-
- @Override
- public RequestCountOfLibraryMatch newMatch(final Object... parameters) {
- return RequestCountOfLibraryMatch.newMatch((org.eclipse.viatra.examples.library.Library) parameters[0], (java.lang.Integer) parameters[1]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link RequestCountOfLibraryQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link RequestCountOfLibraryQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static RequestCountOfLibraryQuerySpecification INSTANCE = new RequestCountOfLibraryQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static RequestCountOfLibraryQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.requestCountOfLibrary";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("library","reqCount");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(
- new PParameter("library", "org.eclipse.viatra.examples.library.Library", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/viatra/examples/library/1.0", "Library"))),
- new PParameter("reqCount", "java.lang.Integer", null)
- );
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_library = body.getOrCreateVariableByName("library");
- PVariable var_reqCount = body.getOrCreateVariableByName("reqCount");
- new TypeConstraint(body, new FlatTuple(var_library), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_library, "library"),
- new ExportedParameter(body, var_reqCount, "reqCount")
- ));
- // Library.requestCount(library, reqCount)
- new TypeConstraint(body, new FlatTuple(var_library), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library")));
- PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
- new TypeConstraint(body, new FlatTuple(var_library, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library", "requestCount")));
- new Equality(body, var__virtual_0_, var_reqCount);
- bodies.add(body);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SingleAuthoredFirstBooksProcessor.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SingleAuthoredFirstBooksProcessor.java
deleted file mode 100644
index fd44b2cfc..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SingleAuthoredFirstBooksProcessor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.runonce.tests.SingleAuthoredFirstBooksMatch;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.runtime.runonce.tests.singleAuthoredFirstBooks pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class SingleAuthoredFirstBooksProcessor implements IMatchProcessor<SingleAuthoredFirstBooksMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pLibrary the value of pattern parameter library in the currently processed match
- * @param pFirstBook the value of pattern parameter firstBook in the currently processed match
- *
- */
- public abstract void process(final Library pLibrary, final Book pFirstBook);
-
- @Override
- public void process(final SingleAuthoredFirstBooksMatch match) {
- process(match.getLibrary(), match.getFirstBook());
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SingleAuthoredFirstBooksQuerySpecification.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SingleAuthoredFirstBooksQuerySpecification.java
deleted file mode 100644
index 8ea641488..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SingleAuthoredFirstBooksQuerySpecification.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.PatternMatchCounter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.SingleAuthoredFirstBooksMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.SingleAuthoredFirstBooksMatcher;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.BookAuthorsQuerySpecification;
-
-/**
- * A pattern-specific query specification that can instantiate SingleAuthoredFirstBooksMatcher in a type-safe way.
- *
- * @see SingleAuthoredFirstBooksMatcher
- * @see SingleAuthoredFirstBooksMatch
- *
- */
-@SuppressWarnings("all")
-public final class SingleAuthoredFirstBooksQuerySpecification extends BaseGeneratedEMFQuerySpecification<SingleAuthoredFirstBooksMatcher> {
- private SingleAuthoredFirstBooksQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static SingleAuthoredFirstBooksQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected SingleAuthoredFirstBooksMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return SingleAuthoredFirstBooksMatcher.on(engine);
- }
-
- @Override
- public SingleAuthoredFirstBooksMatch newEmptyMatch() {
- return SingleAuthoredFirstBooksMatch.newEmptyMatch();
- }
-
- @Override
- public SingleAuthoredFirstBooksMatch newMatch(final Object... parameters) {
- return SingleAuthoredFirstBooksMatch.newMatch((org.eclipse.viatra.examples.library.Library) parameters[0], (org.eclipse.viatra.examples.library.Book) parameters[1]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link SingleAuthoredFirstBooksQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link SingleAuthoredFirstBooksQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static SingleAuthoredFirstBooksQuerySpecification INSTANCE = new SingleAuthoredFirstBooksQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static SingleAuthoredFirstBooksQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.singleAuthoredFirstBooks";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("library","firstBook");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(
- new PParameter("library", "org.eclipse.viatra.examples.library.Library", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/viatra/examples/library/1.0", "Library"))),
- new PParameter("firstBook", "org.eclipse.viatra.examples.library.Book", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/viatra/examples/library/1.0", "Book")))
- );
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_library = body.getOrCreateVariableByName("library");
- PVariable var_firstBook = body.getOrCreateVariableByName("firstBook");
- PVariable var__author = body.getOrCreateVariableByName("_author");
- new TypeConstraint(body, new FlatTuple(var_library), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library")));
- new TypeConstraint(body, new FlatTuple(var_firstBook), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Book")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_library, "library"),
- new ExportedParameter(body, var_firstBook, "firstBook")
- ));
- // Library.writers.firstBook(library, firstBook)
- new TypeConstraint(body, new FlatTuple(var_library), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library")));
- PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
- new TypeConstraint(body, new FlatTuple(var_library, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library", "writers")));
- PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
- new TypeConstraint(body, new FlatTuple(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Writer", "firstBook")));
- new Equality(body, var__virtual_1_, var_firstBook);
- // 1 == count find bookAuthors(firstBook, _author)
- PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
- new ConstantValue(body, var__virtual_2_, 1);
- PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}");
- new PatternMatchCounter(body, new FlatTuple(var_firstBook, var__author), BookAuthorsQuerySpecification.instance().getInternalQueryRepresentation(), var__virtual_3_);
- new Equality(body, var__virtual_2_, var__virtual_3_);
- bodies.add(body);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SomeBooksWithTwoAuthorsProcessor.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SomeBooksWithTwoAuthorsProcessor.java
deleted file mode 100644
index bdd5e7b23..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SomeBooksWithTwoAuthorsProcessor.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.runonce.tests.SomeBooksWithTwoAuthorsMatch;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.runtime.runonce.tests.someBooksWithTwoAuthors pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class SomeBooksWithTwoAuthorsProcessor implements IMatchProcessor<SomeBooksWithTwoAuthorsMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pLibrary the value of pattern parameter library in the currently processed match
- * @param pBook the value of pattern parameter book in the currently processed match
- *
- */
- public abstract void process(final Library pLibrary, final Book pBook);
-
- @Override
- public void process(final SomeBooksWithTwoAuthorsMatch match) {
- process(match.getLibrary(), match.getBook());
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SomeBooksWithTwoAuthorsQuerySpecification.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SomeBooksWithTwoAuthorsQuerySpecification.java
deleted file mode 100644
index 7a03a6304..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SomeBooksWithTwoAuthorsQuerySpecification.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.PatternMatchCounter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.SomeBooksWithTwoAuthorsMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.SomeBooksWithTwoAuthorsMatcher;
-import org.eclipse.viatra.query.runtime.runonce.tests.util.BookAuthorsQuerySpecification;
-
-/**
- * A pattern-specific query specification that can instantiate SomeBooksWithTwoAuthorsMatcher in a type-safe way.
- *
- * @see SomeBooksWithTwoAuthorsMatcher
- * @see SomeBooksWithTwoAuthorsMatch
- *
- */
-@SuppressWarnings("all")
-public final class SomeBooksWithTwoAuthorsQuerySpecification extends BaseGeneratedEMFQuerySpecification<SomeBooksWithTwoAuthorsMatcher> {
- private SomeBooksWithTwoAuthorsQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static SomeBooksWithTwoAuthorsQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected SomeBooksWithTwoAuthorsMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return SomeBooksWithTwoAuthorsMatcher.on(engine);
- }
-
- @Override
- public SomeBooksWithTwoAuthorsMatch newEmptyMatch() {
- return SomeBooksWithTwoAuthorsMatch.newEmptyMatch();
- }
-
- @Override
- public SomeBooksWithTwoAuthorsMatch newMatch(final Object... parameters) {
- return SomeBooksWithTwoAuthorsMatch.newMatch((org.eclipse.viatra.examples.library.Library) parameters[0], (org.eclipse.viatra.examples.library.Book) parameters[1]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link SomeBooksWithTwoAuthorsQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link SomeBooksWithTwoAuthorsQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static SomeBooksWithTwoAuthorsQuerySpecification INSTANCE = new SomeBooksWithTwoAuthorsQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static SomeBooksWithTwoAuthorsQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.someBooksWithTwoAuthors";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("library","book");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(
- new PParameter("library", "org.eclipse.viatra.examples.library.Library", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/viatra/examples/library/1.0", "Library"))),
- new PParameter("book", "org.eclipse.viatra.examples.library.Book", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/viatra/examples/library/1.0", "Book")))
- );
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_library = body.getOrCreateVariableByName("library");
- PVariable var_book = body.getOrCreateVariableByName("book");
- PVariable var__c = body.getOrCreateVariableByName("_c");
- PVariable var__author = body.getOrCreateVariableByName("_author");
- new TypeConstraint(body, new FlatTuple(var_library), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library")));
- new TypeConstraint(body, new FlatTuple(var_book), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Book")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_library, "library"),
- new ExportedParameter(body, var_book, "book")
- ));
- // Library.requestCount(library, _c)
- new TypeConstraint(body, new FlatTuple(var_library), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library")));
- PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
- new TypeConstraint(body, new FlatTuple(var_library, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library", "requestCount")));
- new Equality(body, var__virtual_0_, var__c);
- // Library.someBooks(library, book)
- new TypeConstraint(body, new FlatTuple(var_library), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library")));
- PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
- new TypeConstraint(body, new FlatTuple(var_library, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library", "someBooks")));
- new Equality(body, var__virtual_1_, var_book);
- // 2 == count find bookAuthors(book, _author)
- PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
- new ConstantValue(body, var__virtual_2_, 2);
- PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}");
- new PatternMatchCounter(body, new FlatTuple(var_book, var__author), BookAuthorsQuerySpecification.instance().getInternalQueryRepresentation(), var__virtual_3_);
- new Equality(body, var__virtual_2_, var__virtual_3_);
- bodies.add(body);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SumOfPagesInLibraryProcessor.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SumOfPagesInLibraryProcessor.java
deleted file mode 100644
index 3c83cdbc3..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SumOfPagesInLibraryProcessor.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.query.runtime.api.IMatchProcessor;
-import org.eclipse.viatra.query.runtime.runonce.tests.SumOfPagesInLibraryMatch;
-
-/**
- * A match processor tailored for the org.eclipse.viatra.query.runtime.runonce.tests.sumOfPagesInLibrary pattern.
- *
- * Clients should derive an (anonymous) class that implements the abstract process().
- *
- */
-@SuppressWarnings("all")
-public abstract class SumOfPagesInLibraryProcessor implements IMatchProcessor<SumOfPagesInLibraryMatch> {
- /**
- * Defines the action that is to be executed on each match.
- * @param pLibrary the value of pattern parameter library in the currently processed match
- * @param pSumOfPages the value of pattern parameter sumOfPages in the currently processed match
- *
- */
- public abstract void process(final Library pLibrary, final Integer pSumOfPages);
-
- @Override
- public void process(final SumOfPagesInLibraryMatch match) {
- process(match.getLibrary(), match.getSumOfPages());
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SumOfPagesInLibraryQuerySpecification.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SumOfPagesInLibraryQuerySpecification.java
deleted file mode 100644
index d8b7c09b6..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src-gen/org/eclipse/viatra/query/runtime/runonce/tests/util/SumOfPagesInLibraryQuerySpecification.java
+++ /dev/null
@@ -1,141 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests.util;
-
-import com.google.common.collect.Sets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
-import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
-import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
-import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
-import org.eclipse.viatra.query.runtime.matchers.tuple.FlatTuple;
-import org.eclipse.viatra.query.runtime.runonce.tests.SumOfPagesInLibraryMatch;
-import org.eclipse.viatra.query.runtime.runonce.tests.SumOfPagesInLibraryMatcher;
-
-/**
- * A pattern-specific query specification that can instantiate SumOfPagesInLibraryMatcher in a type-safe way.
- *
- * @see SumOfPagesInLibraryMatcher
- * @see SumOfPagesInLibraryMatch
- *
- */
-@SuppressWarnings("all")
-public final class SumOfPagesInLibraryQuerySpecification extends BaseGeneratedEMFQuerySpecification<SumOfPagesInLibraryMatcher> {
- private SumOfPagesInLibraryQuerySpecification() {
- super(GeneratedPQuery.INSTANCE);
- }
-
- /**
- * @return the singleton instance of the query specification
- * @throws ViatraQueryException if the pattern definition could not be loaded
- *
- */
- public static SumOfPagesInLibraryQuerySpecification instance() throws ViatraQueryException {
- try{
- return LazyHolder.INSTANCE;
- } catch (ExceptionInInitializerError err) {
- throw processInitializerError(err);
- }
- }
-
- @Override
- protected SumOfPagesInLibraryMatcher instantiate(final ViatraQueryEngine engine) throws ViatraQueryException {
- return SumOfPagesInLibraryMatcher.on(engine);
- }
-
- @Override
- public SumOfPagesInLibraryMatch newEmptyMatch() {
- return SumOfPagesInLibraryMatch.newEmptyMatch();
- }
-
- @Override
- public SumOfPagesInLibraryMatch newMatch(final Object... parameters) {
- return SumOfPagesInLibraryMatch.newMatch((org.eclipse.viatra.examples.library.Library) parameters[0], (java.lang.Integer) parameters[1]);
- }
-
- /**
- * Inner class allowing the singleton instance of {@link SumOfPagesInLibraryQuerySpecification} to be created
- * <b>not</b> at the class load time of the outer class,
- * but rather at the first call to {@link SumOfPagesInLibraryQuerySpecification#instance()}.
- *
- * <p> This workaround is required e.g. to support recursion.
- *
- */
- private static class LazyHolder {
- private final static SumOfPagesInLibraryQuerySpecification INSTANCE = new SumOfPagesInLibraryQuerySpecification();
-
- /**
- * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
- * This initialization order is required to support indirect recursion.
- *
- * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
- *
- */
- private final static Object STATIC_INITIALIZER = ensureInitialized();
-
- public static Object ensureInitialized() {
- INSTANCE.ensureInitializedInternalSneaky();
- return null;
- }
- }
-
- private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
- private final static SumOfPagesInLibraryQuerySpecification.GeneratedPQuery INSTANCE = new GeneratedPQuery();
-
- @Override
- public String getFullyQualifiedName() {
- return "org.eclipse.viatra.query.runtime.runonce.tests.sumOfPagesInLibrary";
- }
-
- @Override
- public List<String> getParameterNames() {
- return Arrays.asList("library","sumOfPages");
- }
-
- @Override
- public List<PParameter> getParameters() {
- return Arrays.asList(
- new PParameter("library", "org.eclipse.viatra.examples.library.Library", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.eclipse.org/viatra/examples/library/1.0", "Library"))),
- new PParameter("sumOfPages", "java.lang.Integer", null)
- );
- }
-
- @Override
- public Set<PBody> doGetContainedBodies() throws QueryInitializationException {
- Set<PBody> bodies = Sets.newLinkedHashSet();
- try {
- {
- PBody body = new PBody(this);
- PVariable var_library = body.getOrCreateVariableByName("library");
- PVariable var_sumOfPages = body.getOrCreateVariableByName("sumOfPages");
- new TypeConstraint(body, new FlatTuple(var_library), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library")));
- body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
- new ExportedParameter(body, var_library, "library"),
- new ExportedParameter(body, var_sumOfPages, "sumOfPages")
- ));
- // Library.sumOfPages(library, sumOfPages)
- new TypeConstraint(body, new FlatTuple(var_library), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library")));
- PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
- new TypeConstraint(body, new FlatTuple(var_library, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.eclipse.org/viatra/examples/library/1.0", "Library", "sumOfPages")));
- new Equality(body, var__virtual_0_, var_sumOfPages);
- bodies.add(body);
- }
- // to silence compiler error
- if (false) throw new ViatraQueryException("Never", "happens");
- } catch (ViatraQueryException ex) {
- throw processDependencyException(ex);
- }
- return bodies;
- }
- }
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src/org/eclipse/viatra/query/runtime/runonce/tests/RunOnceTest.java b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src/org/eclipse/viatra/query/runtime/runonce/tests/RunOnceTest.java
deleted file mode 100644
index faac73b6d..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src/org/eclipse/viatra/query/runtime/runonce/tests/RunOnceTest.java
+++ /dev/null
@@ -1,398 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013, Abel Hegedus, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Abel Hegedus - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.query.runtime.runonce.tests;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.viatra.examples.library.Book;
-import org.eclipse.viatra.examples.library.BookCategory;
-import org.eclipse.viatra.examples.library.LibraryFactory;
-import org.eclipse.viatra.examples.library.LibraryPackage;
-import org.eclipse.viatra.examples.library.Library;
-import org.eclipse.viatra.examples.library.Writer;
-import org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineManager;
-import org.eclipse.viatra.query.runtime.api.impl.RunOnceQueryEngine;
-import org.eclipse.viatra.query.runtime.base.api.BaseIndexOptions;
-import org.eclipse.viatra.query.runtime.base.comprehension.WellbehavingDerivedFeatureRegistry;
-import org.eclipse.viatra.query.runtime.emf.EMFScope;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.junit.Test;
-
-/**
- * Test cases that run different kind of derived features in run-once engine.
- *
- * @author Abel Hegedus
- *
- */
-public class RunOnceTest {
-
- private ResourceSet rs;
-
- /**
- * Prepares a resource set and loads the example model.
- *
- * @return the library that is the root of the example model
- */
- private Library prepareModel() {
- String modelPath = "/org.eclipse.viatra.query.runtime.runonce.tests/model/test.library";
- rs = new ResourceSetImpl();
- URI modelUri = URI.createPlatformPluginURI(modelPath, true);
- Resource resource = rs.getResource(modelUri, true);
- return (Library) resource.getContents().get(0);
- }
-
- /**
- * Test whether a run-once engine returns matches for regular queries.
- */
- @Test
- public void testRegularQuery() {
- Library library = prepareModel();
-
- try {
- //RunOnceQueryEngine engine = new RunOnceQueryEngine(rs);
- ViatraQueryEngine engine = ViatraQueryEngineManager.getInstance().getQueryEngine(new EMFScope(rs));
-// Collection<BooksWithMultipleAuthorsMatch> allMatches = engine.getAllMatches(BooksWithMultipleAuthorsMatcher.querySpecification());
- Collection<BooksWithMultipleAuthorsMatch> allMatches = engine.getMatcher(BooksWithMultipleAuthorsMatcher.querySpecification()).getAllMatches();
- assertTrue(allMatches.size() == 2);
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- fail(e.getShortMessage());
- }
- }
-
- @Test
- public void testSimpleAttribute() {
- Library library = prepareModel();
-
- try {
- RunOnceQueryEngine engine = new RunOnceQueryEngine(rs);
- Collection<SumOfPagesInLibraryMatch> allMatches = engine.getAllMatches(SumOfPagesInLibraryMatcher.querySpecification());
- assertTrue(allMatches.size() == 1);
- SumOfPagesInLibraryMatch match = allMatches.iterator().next();
- assertTrue(match.getLibrary().equals(library));
- assertTrue(match.getSumOfPages() == 222);
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- fail(e.getShortMessage());
- }
- }
-
- @Test
- public void testSingleReference() {
- Library library = prepareModel();
-
- try {
- RunOnceQueryEngine engine = new RunOnceQueryEngine(rs);
- Collection<SingleAuthoredFirstBooksMatch> allMatches = engine.getAllMatches(SingleAuthoredFirstBooksMatcher.querySpecification());
- assertTrue(allMatches.size() == 1);
- SingleAuthoredFirstBooksMatch match = allMatches.iterator().next();
- assertTrue(match.getLibrary().equals(library));
- assertTrue(match.getFirstBook().getTitle().equals("Other SciFi"));
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- fail(e.getShortMessage());
- }
- }
-
- @Test
- public void testManyReference() {
- Library library = prepareModel();
-
- try {
- RunOnceQueryEngine engine = new RunOnceQueryEngine(rs);
- Collection<LongSciFiBooksOfAuthorMatch> allMatches = engine.getAllMatches(LongSciFiBooksOfAuthorMatcher.querySpecification());
- assertTrue(allMatches.size() == 1);
- LongSciFiBooksOfAuthorMatch match = allMatches.iterator().next();
- assertTrue(match.getAuthor().getName().equals("Third Author"));
- assertTrue(match.getBook().getTitle().equals("Other SciFi"));
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- fail(e.getShortMessage());
- }
- }
-
- /**
- * This test uses a derived feature that returns different values on subsequent requests.
- * We could use this to test how the engine responds in such cases (e.g. during disposal).
- */
- @Test
- public void testNonDeterministicAttribute() {
- Library library = prepareModel();
-
- try {
- RunOnceQueryEngine engine = new RunOnceQueryEngine(rs);
- Collection<RequestCountOfLibraryMatch> allMatches = engine.getAllMatches(RequestCountOfLibraryMatcher.querySpecification());
- assertTrue(allMatches.size() == 1);
- RequestCountOfLibraryMatch match = allMatches.iterator().next();
- assertTrue(match.getLibrary().equals(library));
- assertTrue(match.getReqCount() == 2);
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- fail(e.getShortMessage());
- }
- }
-
- /**
- * Similar to {@link #testNonDeterministicAttribute()} but with a many reference.
- */
- @Test
- public void testNonDeterministicFeature() {
- Library library = prepareModel();
-
- try {
- RunOnceQueryEngine engine = new RunOnceQueryEngine(rs);
- Collection<SomeBooksWithTwoAuthorsMatch> allMatches = engine.getAllMatches(SomeBooksWithTwoAuthorsMatcher.querySpecification());
- assertTrue(allMatches.size() == 1);
- SomeBooksWithTwoAuthorsMatch match = allMatches.iterator().next();
- assertTrue(match.getLibrary().equals(library));
- assertTrue(match.getBook().getTitle().equals("Twin life"));
-
- allMatches = engine.getAllMatches(SomeBooksWithTwoAuthorsMatcher.querySpecification());
- assertTrue(allMatches.isEmpty());
-
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- fail(e.getShortMessage());
- }
- }
-
- /**
- * The test shows that using an incremental engine with not well-behaving derived features will return
- * incorrect values if the model changes.
- * @throws ViatraQueryException
- */
- @Test
- public void testModelModification() throws ViatraQueryException {
- // the results of incremental engine will not be correct
- Library library = prepareModel();
-
- try {
- WellbehavingDerivedFeatureRegistry.registerWellbehavingDerivedPackage(LibraryPackage.eINSTANCE);
- AdvancedViatraQueryEngine engine = AdvancedViatraQueryEngine.createUnmanagedEngine(new EMFScope(rs));
- // this is to allow the normal engine to traverse feature
- LongSciFiBooksOfAuthorMatcher matcher = engine.getMatcher(LongSciFiBooksOfAuthorMatcher.querySpecification());
- Collection<LongSciFiBooksOfAuthorMatch> allMatches = matcher.getAllMatches();
-
- RunOnceQueryEngine roengine = new RunOnceQueryEngine(rs);
- Collection<LongSciFiBooksOfAuthorMatch> allROMatches = roengine.getAllMatches(LongSciFiBooksOfAuthorMatcher.querySpecification());
-
- assertTrue(allMatches.size() == allROMatches.size());
- LongSciFiBooksOfAuthorMatch match = allMatches.iterator().next();
- LongSciFiBooksOfAuthorMatch romatch = allROMatches.iterator().next();
- assertTrue(match.getAuthor() == romatch.getAuthor());
- Book longBook = romatch.getBook();
- assertTrue(match.getBook() == longBook);
-
- Book b = LibraryFactory.eINSTANCE.createBook();
- b.setTitle("Long book");
- b.setPages(120);
- b.getCategory().add(BookCategory.SCI_FI);
- b.getAuthors().add(library.getWriters().get(0));
- library.getBooks().add(b);
-
- allROMatches = roengine.getAllMatches(LongSciFiBooksOfAuthorMatcher.querySpecification());
- allMatches = matcher.getAllMatches();
- assertTrue(allMatches.size() != allROMatches.size());
- assertTrue(allROMatches.size() == 2);
-
- Set<Book> longScifiBooks = new HashSet<Book>();
- for (LongSciFiBooksOfAuthorMatch m : allROMatches) {
- longScifiBooks.add(m.getBook());
- }
- assertTrue(longScifiBooks.contains(b));
- assertTrue(longScifiBooks.contains(longBook));
- } finally {
- WellbehavingDerivedFeatureRegistry.initRegistry();
- }
-
-
- }
-
- @Test
- public void testSamplingModelModification() {
- // the results of incremental engine will be correct after resampling
- Library library = prepareModel();
-
- try {
- RunOnceQueryEngine roengine = new RunOnceQueryEngine(rs);
- AdvancedViatraQueryEngine engine = AdvancedViatraQueryEngine.createUnmanagedEngine(new EMFScope(rs,roengine.getBaseIndexOptions()));
- // TODO remove this once such EClasses are automatically identified
- //engine.getBaseIndex().registerEClasses(Sets.newHashSet(EIQLibraryPackage.eINSTANCE.getBook(), EIQLibraryPackage.eINSTANCE.getWriter()));
- runModelModification(library, roengine, engine);
-
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- fail(e.getShortMessage());
- }
- }
-
- @Test
- public void testSamplingModelModificationInWildCardMode() {
- // the results of incremental engine will be correct after resampling
- Library library = prepareModel();
-
- try {
- RunOnceQueryEngine roengine = new RunOnceQueryEngine(rs);
- BaseIndexOptions baseIndexOptions = roengine.getBaseIndexOptions();
- baseIndexOptions.withWildcardMode(true); // ensure all types are indexed
- AdvancedViatraQueryEngine engine = AdvancedViatraQueryEngine.createUnmanagedEngine(new EMFScope(rs,baseIndexOptions));
- runModelModification(library, roengine, engine);
-
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- fail(e.getShortMessage());
- }
- }
-
- private void runModelModification(Library library, RunOnceQueryEngine roengine, AdvancedViatraQueryEngine engine)
- throws ViatraQueryException {
- LongSciFiBooksOfAuthorMatcher matcher = engine.getMatcher(LongSciFiBooksOfAuthorMatcher.querySpecification());
- Collection<LongSciFiBooksOfAuthorMatch> allMatches = matcher.getAllMatches();
-
- Collection<LongSciFiBooksOfAuthorMatch> allROMatches = roengine.getAllMatches(LongSciFiBooksOfAuthorMatcher.querySpecification());
-
- assertTrue(allMatches.size() == allROMatches.size());
- LongSciFiBooksOfAuthorMatch match = allMatches.iterator().next();
- LongSciFiBooksOfAuthorMatch romatch = allROMatches.iterator().next();
- assertTrue(match.getAuthor() == romatch.getAuthor());
- Book longBook = romatch.getBook();
- assertTrue(match.getBook() == longBook);
-
- Book b = LibraryFactory.eINSTANCE.createBook();
- b.setTitle("Long book");
- b.setPages(120);
- b.getCategory().add(BookCategory.SCI_FI);
- b.getAuthors().add(library.getWriters().get(0));
- library.getBooks().add(b);
-
- allROMatches = roengine.getAllMatches(LongSciFiBooksOfAuthorMatcher.querySpecification());
- allMatches = matcher.getAllMatches();
- assertTrue(allMatches.size() != allROMatches.size());
-
- // manually resample values
- engine.getBaseIndex().resampleDerivedFeatures();
-
- allMatches = matcher.getAllMatches();
- assertTrue(allMatches.size() == allROMatches.size());
- assertTrue(allROMatches.size() == 2);
-
- Set<Book> longScifiBooks = new HashSet<Book>();
- for (LongSciFiBooksOfAuthorMatch m : allROMatches) {
- longScifiBooks.add(m.getBook());
- }
- assertTrue(longScifiBooks.contains(b));
- assertTrue(longScifiBooks.contains(longBook));
- }
-
- @Test
- public void testSamplingModelModificationChangeVisitor() {
- // the results of incremental engine will be correct after resampling
- String address = "test";
- Library library = createLibrary(address);
- String title = "test";
- Book book = createBook(library, title, 150, BookCategory.SCI_FI);
-
- try {
- RunOnceQueryEngine roengine = new RunOnceQueryEngine(library);
- AdvancedViatraQueryEngine engine = AdvancedViatraQueryEngine.createUnmanagedEngine(new EMFScope(library,roengine.getBaseIndexOptions()));
-
- LongSciFiBooksOfAuthorMatcher matcher = engine.getMatcher(LongSciFiBooksOfAuthorMatcher.querySpecification());
- Collection<LongSciFiBooksOfAuthorMatch> allMatches = matcher.getAllMatches();
- assertTrue(allMatches.isEmpty());
-
- Writer writer = createWriter(library, "test");
- book.getAuthors().add(writer);
-
- engine.getBaseIndex().resampleDerivedFeatures();
-
- allMatches = matcher.getAllMatches();
- assertTrue(!allMatches.isEmpty());
- LongSciFiBooksOfAuthorMatch match = allMatches.iterator().next();
- assertTrue(match.getAuthor().equals(writer));
- assertTrue(match.getBook().equals(book));
-
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- fail(e.getShortMessage());
- }
-
- }
-
- @Test
- public void testAutomaticSamplingModelModification() {
- // the results of run-once engine will be correct after automatic resampling
- String address = "test";
- Library library = createLibrary(address);
- String title = "test";
- Book book = createBook(library, title, 150, BookCategory.SCI_FI);
-
- try {
- RunOnceQueryEngine roengine = new RunOnceQueryEngine(library);
- roengine.setAutomaticResampling(true);
- Collection<LongSciFiBooksOfAuthorMatch> allMatches = roengine.getAllMatches(LongSciFiBooksOfAuthorMatcher.querySpecification());
- assertTrue(allMatches.isEmpty());
-
- Writer writer = createWriter(library, "test");
- book.getAuthors().add(writer);
-
- allMatches = roengine.getAllMatches(LongSciFiBooksOfAuthorMatcher.querySpecification());
- assertTrue(!allMatches.isEmpty());
- LongSciFiBooksOfAuthorMatch match = allMatches.iterator().next();
- assertTrue(match.getAuthor().equals(writer));
- assertTrue(match.getBook().equals(book));
-
- roengine.setAutomaticResampling(false);
-
- Writer writer2 = createWriter(library, "test2");
- allMatches = roengine.getAllMatches(LongSciFiBooksOfAuthorMatcher.querySpecification());
- assertTrue(!allMatches.isEmpty());
-
- } catch (ViatraQueryException e) {
- e.printStackTrace();
- fail(e.getShortMessage());
- }
-
- }
-
- private Writer createWriter(Library library, String name) {
- Writer writer = LibraryFactory.eINSTANCE.createWriter();
- writer.setName(name);
- library.getWriters().add(writer);
- return writer;
- }
-
- private Book createBook(Library library, String title, int pages, BookCategory cat) {
- Book book = LibraryFactory.eINSTANCE.createBook();
- book.setTitle(title);
- book.setPages(pages);
- book.getCategory().add(cat);
- library.getBooks().add(book);
- return book;
- }
-
- private Library createLibrary(String address) {
- Library library = LibraryFactory.eINSTANCE.createLibrary();
- library.setAddress(address);
- return library;
- }
-
-}
diff --git a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src/org/eclipse/viatra/query/runtime/runonce/tests/eiqlibrary.vql b/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src/org/eclipse/viatra/query/runtime/runonce/tests/eiqlibrary.vql
deleted file mode 100644
index 6a1bfa090..000000000
--- a/examples/minilibrary/org.eclipse.viatra.query.runtime.runonce.tests/src/org/eclipse/viatra/query/runtime/runonce/tests/eiqlibrary.vql
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.eclipse.viatra.query.runtime.runonce.tests
-
-import "http://www.eclipse.org/viatra/examples/library/1.0"
-
-pattern bookAuthors(book : Book, author : Writer) {
- Book.authors(book, author);
-}
-
-pattern booksWithMultipleAuthors(book : Book) {
- Book(book);
- numberOfBooks == count find bookAuthors(book, _author);
- check(numberOfBooks > 1);
-}
-
-pattern sumOfPagesInLibrary(library : Library, sumOfPages) {
- Library.sumOfPages(library, sumOfPages);
-}
-
-pattern singleAuthoredFirstBooks(library : Library, firstBook : Book) {
- Library.writers.firstBook(library, firstBook);
- 1 == count find bookAuthors(firstBook, _author);
-}
-
-pattern longSciFiBooksOfAuthor(author : Writer, book : Book) {
- Writer.scifiBooks(author, book);
- Book.pages(book, pages);
- check(pages > 100);
-}
-
-pattern requestCountOfLibrary(library : Library, reqCount) {
- Library.requestCount(library, reqCount);
-}
-
-pattern someBooksWithTwoAuthors(library : Library, book : Book) {
- Library.requestCount(library, _c);
- Library.someBooks(library, book);
- 2 == count find bookAuthors(book, _author);
-} \ No newline at end of file
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.classpath b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.classpath
deleted file mode 100644
index d25c08a5c..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="src" path="src-gen/"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.project b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.project
deleted file mode 100644
index 399a2962a..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.project
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.examples.uml.evm</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.viatra.query.tooling.core.projectbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
- <nature>org.eclipse.viatra.query.projectnature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.settings/org.eclipse.jdt.core.prefs b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c537b6306..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.settings/org.eclipse.pde.core.prefs b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 36c29adc3..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-eclipse.preferences.version=1
-pluginProject.equinox=false
-resolve.requirebundle=false
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/META-INF/MANIFEST.MF b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/META-INF/MANIFEST.MF
deleted file mode 100644
index 5dc286fea..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,17 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: org.eclipse.incquery.example.uml.evm
-Bundle-SymbolicName: org.eclipse.viatra.examples.uml.evm;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Bundle-Vendor: Budapest University of Technology and Economics
-Export-Package: org.eclipse.viatra.examples.uml.evm.queries,
- org.eclipse.viatra.examples.uml.evm.queries.util
-Require-Bundle: org.eclipse.emf.ecore,
- org.eclipse.emf.transaction,
- org.eclipse.xtext.xbase.lib,
- org.junit,
- org.eclipse.uml2.uml;bundle-version="4.0.2",
- org.eclipse.viatra.query.runtime,
- org.eclipse.viatra.transformation.evm;bundle-version="[1.2.0,2.0.0)"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.apache.log4j
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/build.properties b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/build.properties
deleted file mode 100644
index 0129926d0..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- queries/,\
- testmodels/
-source.. = src/,\
- src-gen/
-output.. = bin/
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/plugin.xml b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/plugin.xml
deleted file mode 100644
index 31bd9c2e4..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/plugin.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><plugin>
- <extension id="org.eclipse.viatra.examples.uml.evm.queries.Preconditions" point="org.eclipse.viatra.query.runtime.queryspecification">
- <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:org.eclipse.viatra.examples.uml.evm.queries.Preconditions" id="org.eclipse.viatra.examples.uml.evm.queries.Preconditions"/>
- </extension>
-</plugin>
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/src-gen/.gitignore b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/src-gen/.gitignore
deleted file mode 100644
index ce4a58f9f..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/src-gen/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-#This file is needed to prevent git from omitting this folder that would cause build issues/compile errors.
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore \ No newline at end of file
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/src/org/eclipse/viatra/examples/uml/evm/UMLexampleForEVM.java b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/src/org/eclipse/viatra/examples/uml/evm/UMLexampleForEVM.java
deleted file mode 100644
index d6a7fc254..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/src/org/eclipse/viatra/examples/uml/evm/UMLexampleForEVM.java
+++ /dev/null
@@ -1,241 +0,0 @@
-package org.eclipse.viatra.examples.uml.evm;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
-
-import java.util.Set;
-
-import org.apache.log4j.Level;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Generalization;
-import org.eclipse.uml2.uml.Operation;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.viatra.examples.uml.evm.queries.OnlyInheritedOperationsMatch;
-import org.eclipse.viatra.examples.uml.evm.queries.OnlyInheritedOperationsMatcher;
-import org.eclipse.viatra.examples.uml.evm.queries.PossibleSuperClassMatch;
-import org.eclipse.viatra.examples.uml.evm.queries.PossibleSuperClassMatcher;
-import org.eclipse.viatra.examples.uml.evm.queries.SuperClassMatcher;
-import org.eclipse.viatra.examples.uml.evm.queries.util.OnlyInheritedOperationsProcessor;
-import org.eclipse.viatra.examples.uml.evm.queries.util.PossibleSuperClassProcessor;
-import org.eclipse.viatra.examples.uml.evm.queries.util.SuperClassProcessor;
-import org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.api.IPatternMatch;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.emf.EMFScope;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.transformation.evm.api.Activation;
-import org.eclipse.viatra.transformation.evm.api.ActivationLifeCycle;
-import org.eclipse.viatra.transformation.evm.api.Context;
-import org.eclipse.viatra.transformation.evm.api.ExecutionSchema;
-import org.eclipse.viatra.transformation.evm.api.Job;
-import org.eclipse.viatra.transformation.evm.api.RuleEngine;
-import org.eclipse.viatra.transformation.evm.api.RuleSpecification;
-import org.eclipse.viatra.transformation.evm.api.event.EventFilter;
-import org.eclipse.viatra.transformation.evm.api.resolver.ScopedConflictSet;
-import org.eclipse.viatra.transformation.evm.specific.ConflictResolvers;
-import org.eclipse.viatra.transformation.evm.specific.ExecutionSchemas;
-import org.eclipse.viatra.transformation.evm.specific.Jobs;
-import org.eclipse.viatra.transformation.evm.specific.Lifecycles;
-import org.eclipse.viatra.transformation.evm.specific.RuleEngines;
-import org.eclipse.viatra.transformation.evm.specific.Rules;
-import org.eclipse.viatra.transformation.evm.specific.Schedulers;
-import org.eclipse.viatra.transformation.evm.specific.crud.CRUDActivationStateEnum;
-import org.eclipse.viatra.transformation.evm.specific.scheduler.UpdateCompleteBasedScheduler.UpdateCompleteBasedSchedulerFactory;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-public class UMLexampleForEVM {
-
- @Test
- public void RuleEngineExample() {
-
- final ResourceSet resourceSet = new ResourceSetImpl();
- final URI fileURI = URI.createPlatformPluginURI("org.eclipse.viatra.examples.uml.evm/testmodels/Testmodel.uml",
- false);
- resourceSet.getResource(fileURI, true);
-
- try {
- // create IncQueryEngine for the resource set
- final ViatraQueryEngine engine = AdvancedViatraQueryEngine.createUnmanagedEngine(new EMFScope(resourceSet));
- // create rule engine over IncQueryEngine
- final RuleEngine ruleEngine = RuleEngines.createViatraQueryRuleEngine(engine);
- // set logger level to debug to see activation life-cycle events
- ruleEngine.getLogger().setLevel(Level.DEBUG);
- // create context for execution
- final Context context = Context.create();
-
- // prepare rule specifications
- final RuleSpecification<PossibleSuperClassMatch> createGeneralization = getCreateGeneralizationRule();
- final RuleSpecification<OnlyInheritedOperationsMatch> createOperation = getCreateOperationRule();
-
- // add rule specifications to engine
- ruleEngine.addRule(createGeneralization);
- testFilteredRules(engine, ruleEngine, createGeneralization);
-
- ruleEngine.addRule(createOperation);
-
- // check rule applicability
- final Set<Activation<PossibleSuperClassMatch>> createClassesActivations = ruleEngine.getActivations(createGeneralization);
- if (!createClassesActivations.isEmpty()) {
- // fire activation of a given rule
- createClassesActivations.iterator().next().fire(context);
- }
-
- ruleEngine.setConflictResolver(ConflictResolvers.createFixedPriorityResolver());
-
- final ScopedConflictSet activationSet = ruleEngine.createScopedConflictSet(createGeneralization, createGeneralization.createEmptyFilter());
- assertTrue(activationSet.getNextActivation() != null);
-
- // check for any applicable rules
- while (!ruleEngine.getConflictingActivations().isEmpty()) {
- // fire next activation as long as possible
- ruleEngine.getNextActivation().fire(context);
- }
-
- assertTrue(activationSet.getNextActivation() == null);
- activationSet.dispose();
-
- // rules that are no longer needed can be removed
- ruleEngine.removeRule(createGeneralization);
-
- // rule engine manages the activations of the added rules until
- // disposed
- ruleEngine.dispose();
-
- } catch (final ViatraQueryException e) {
- e.printStackTrace();
- }
-
- }
-
- private void testFilteredRules(final ViatraQueryEngine engine, final RuleEngine ruleEngine,
- final RuleSpecification<PossibleSuperClassMatch> createGeneralization) throws ViatraQueryException {
- assertFalse(ruleEngine.addRule(createGeneralization));
-
- final PossibleSuperClassMatcher matcher = PossibleSuperClassMatcher.on(engine);
- final PossibleSuperClassMatch emptyMatch = matcher.newMatch(null, null);
- final PossibleSuperClassMatch arbitraryMatch = matcher.getOneArbitraryMatch();
- final EventFilter<PossibleSuperClassMatch> emptyFilter1 = Rules.newSingleMatchFilter(emptyMatch);
- final EventFilter<PossibleSuperClassMatch> emptyFilter2 = Rules.newSingleMatchFilter(emptyMatch);
- final EventFilter<PossibleSuperClassMatch> filter = Rules.newSingleMatchFilter(arbitraryMatch);
- final EventFilter<PossibleSuperClassMatch> filter2 = Rules.newSingleMatchFilter(arbitraryMatch);
-
- final EventFilter<IPatternMatch> eventFilter = new EventFilter<IPatternMatch>() {
-
- Class cl = arbitraryMatch.getCl();
-
- @Override
- public boolean isProcessable(final IPatternMatch eventAtom) {
- return eventAtom.get("cl").equals(cl);
- }
- };
-
- ruleEngine.addRule(createGeneralization, eventFilter);
- assertFalse(ruleEngine.getActivations(createGeneralization, eventFilter).isEmpty());
-
- assertTrue(ruleEngine.addRule(createGeneralization, emptyFilter1)); // empty filter different from no filter
- assertFalse(ruleEngine.addRule(createGeneralization, emptyFilter2));
- assertTrue(ruleEngine.addRule(createGeneralization, filter));
- assertFalse(ruleEngine.addRule(createGeneralization, filter2));
- }
-
- @Test
- public void ExecutionSchemaExample() {
-
- final ResourceSet resourceSet = new ResourceSetImpl();
- final URI fileURI = URI.createPlatformPluginURI("org.eclipse.viatra.examples.uml.evm/testmodels/Testmodel.uml",
- false);
- resourceSet.getResource(fileURI, true);
-
- try {
- // create IncQueryEngine for the resource set
- final ViatraQueryEngine engine = AdvancedViatraQueryEngine.createUnmanagedEngine(new EMFScope(resourceSet));
- // use IQBase update callback for scheduling execution
- final UpdateCompleteBasedSchedulerFactory schedulerFactory = Schedulers.getQueryEngineSchedulerFactory(engine);
- // create execution schema over IncQueryEngine
- final ExecutionSchema executionSchema = ExecutionSchemas.createViatraQueryExecutionSchema(engine, schedulerFactory);
- // set logger level to debug to see activation life-cycle events
- executionSchema.getLogger().setLevel(Level.DEBUG);
-
-
- // prepare rule specifications
- final RuleSpecification<PossibleSuperClassMatch> createGeneralization = getCreateGeneralizationRule();
- final RuleSpecification<OnlyInheritedOperationsMatch> createOperation = getCreateOperationRule();
-
- // add rule specifications to engine
- executionSchema.addRule(createGeneralization);
- testFilteredRules(engine, executionSchema, createGeneralization);
-
- executionSchema.addRule(createOperation);
-
-
- // execution schema waits for a scheduling to fire activations
- // we trigger this by removing one generalization at random
- SuperClassMatcher.querySpecification().getMatcher(engine).forOneArbitraryMatch(new SuperClassProcessor() {
-
- @Override
- public void process(final Class sub, final Class sup) {
- sub.getGeneralizations().remove(0);
- }
- });
-
- // rules that are no longer needed can be removed
- executionSchema.removeRule(createGeneralization);
-
- // execution schema manages and fires the activations of the added
- // rules until disposed
- executionSchema.dispose();
-
- } catch (final ViatraQueryException e) {
- e.printStackTrace();
- }
-
- }
-
- private RuleSpecification<PossibleSuperClassMatch> getCreateGeneralizationRule() throws ViatraQueryException {
- // the job specifies what to do when an activation is fired in the given
- // state
- final Job<PossibleSuperClassMatch> job = Jobs.newStatelessJob(CRUDActivationStateEnum.CREATED, new PossibleSuperClassProcessor() {
- @Override
- public void process(final Class cl, final Class sup) {
- System.out.println("Found cl " + cl + " without superclass");
- final Generalization generalization = UMLFactory.eINSTANCE.createGeneralization();
- generalization.setGeneral(sup);
- generalization.setSpecific(cl);
- }
- });
- // the life-cycle determines how events affect the state of activations
- final ActivationLifeCycle lifecycle = Lifecycles.getDefault(false, false);
- // the factory is used to initialize the matcher for the precondition
- final IQuerySpecification<PossibleSuperClassMatcher> factory = PossibleSuperClassMatcher.querySpecification();
- // the rule specification is a model-independent definition that can be
- // used to instantiate a rule
- final RuleSpecification<PossibleSuperClassMatch> spec = Rules.newMatcherRuleSpecification(factory, lifecycle, ImmutableSet.of(job));
- return spec;
- }
-
- private RuleSpecification<OnlyInheritedOperationsMatch> getCreateOperationRule() throws ViatraQueryException {
- final Job<OnlyInheritedOperationsMatch> job = Jobs.newStatelessJob(CRUDActivationStateEnum.CREATED, new OnlyInheritedOperationsProcessor() {
- @Override
- public void process(final Class cl) {
- System.out.println("Found class " + cl + " without operation");
- final Operation operation = UMLFactory.eINSTANCE.createOperation();
- operation.setName("newOp");
- operation.setClass_(cl);
- }
- });
-
- final ActivationLifeCycle lifecycle = Lifecycles.getDefault(false, false);
- final IQuerySpecification<OnlyInheritedOperationsMatcher> factory = OnlyInheritedOperationsMatcher.querySpecification();
- final RuleSpecification<OnlyInheritedOperationsMatch> spec = Rules.newMatcherRuleSpecification(factory, lifecycle, ImmutableSet.of(job));
- return spec;
- }
-
-
-
-}
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/src/org/eclipse/viatra/examples/uml/evm/queries/preconditions.vql b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/src/org/eclipse/viatra/examples/uml/evm/queries/preconditions.vql
deleted file mode 100644
index 75e313252..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/src/org/eclipse/viatra/examples/uml/evm/queries/preconditions.vql
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.eclipse.viatra.examples.uml.evm.queries
-
-import "http://www.eclipse.org/uml2/4.0.0/UML"
-
-/*
- * Precondition for add generalization rule
- */
-pattern possibleSuperClass(cl : Class, sup : Class) {
- neg find superClass(cl, _otherSup);
- neg find superClass(_cl2, sup);
-}
-
-/*
- * Precondition for create owned operation
- */
-pattern onlyInheritedOperations(cl : Class) {
- find hasOperation(cl, _op);
- neg find ownsOperation(cl, _ownOp);
-}
-
-/*
- * Helper patterns
- */
-
-pattern superClass(sub : Class, sup : Class) {
- Generalization.specific(Gen, sub);
- Generalization(Gen);
- Generalization.general(Gen, sup);
-}
-
-pattern transitiveSuperClass(sub : Class, sup : Class) {
- find superClass+(sub, sup);
-}
-
-pattern superOrEqualClass(sub : Class, sup : Class) {
- sub == sup;
-} or {
- find superClass+(sub, sup);
-}
-
-pattern ownsOperation(cl : Class, op : Operation) {
- Class.ownedOperation(cl, op);
-}
-
-pattern ownsProperty(cl : Class, pr : Property) {
- StructuredClassifier.ownedAttribute(cl, pr);
-}
-
-pattern hasOperation(cl : Class, op : Operation) {
- find superOrEqualClass(cl, owner);
- find ownsOperation(owner, op);
-}
-
-pattern hasProperty(cl : Class, pr : Property) {
- find superOrEqualClass(cl, owner);
- find ownsProperty(owner, pr);
-}
-
-pattern emptyClass(cl : Class) {
- neg find hasOperation(cl, _op);
- neg find hasProperty(cl, _prop);
-}
-
-pattern nonEmptyClass(cl : Class) {
- neg find emptyClass(cl);
-} \ No newline at end of file
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/testmodels/Testmodel.uml b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/testmodels/Testmodel.uml
deleted file mode 100644
index 00a0f72c9..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.evm/testmodels/Testmodel.uml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_F8wnAaWdEeK2her1tIkPKA" name="Test">
- <packagedElement xmi:type="uml:Package" xmi:id="_IHBfIKWdEeK2her1tIkPKA" name="root">
- <packagedElement xmi:type="uml:Package" xmi:id="_MtJVsKWdEeK2her1tIkPKA" name="subpackage1">
- <packagedElement xmi:type="uml:Package" xmi:id="_QuOlgKWdEeK2her1tIkPKA" name="subsubpackage1">
- <packagedElement xmi:type="uml:Class" xmi:id="_UOjRoKWdEeK2her1tIkPKA" name="D">
- <generalization xmi:id="_slr0kKWdEeK2her1tIkPKA" general="_SlbXsKWdEeK2her1tIkPKA"/>
- </packagedElement>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_SlbXsKWdEeK2her1tIkPKA" name="B">
- <generalization xmi:id="_oYQK0KWdEeK2her1tIkPKA" general="_O9yioKWdEeK2her1tIkPKA"/>
- </packagedElement>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_O9yioKWdEeK2her1tIkPKA" name="A">
- <ownedOperation xmi:id="_i4R7IKWdEeK2her1tIkPKA" name="opA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Package" xmi:id="_WRUaoKWdEeK2her1tIkPKA" name="subpackage2">
- <packagedElement xmi:type="uml:Class" xmi:id="_X9CVkKWdEeK2her1tIkPKA" name="C"/>
- </packagedElement>
- </packagedElement>
-</uml:Model>
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.classpath b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.classpath
deleted file mode 100644
index 4f474ad13..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src-gen/"/>
- <classpathentry kind="src" path="src/"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.project b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.project
deleted file mode 100644
index cc1df7c0c..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.examples.uml.queries.validation</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.settings/org.eclipse.jdt.core.prefs b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c537b6306..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.settings/org.eclipse.pde.core.prefs b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 36c29adc3..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-eclipse.preferences.version=1
-pluginProject.equinox=false
-resolve.requirebundle=false
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/META-INF/MANIFEST.MF b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/META-INF/MANIFEST.MF
deleted file mode 100644
index e05b6e471..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,13 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: org.eclipse.viatra.examples.uml.queries.validation
-Bundle-SymbolicName: org.eclipse.viatra.examples.uml.queries.validation;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Require-Bundle: com.google.guava,
- org.eclipse.viatra.query.runtime,
- org.eclipse.viatra.addon.validation.core,
- org.eclipse.viatra.examples.uml.queries,
- org.eclipse.uml2.uml,
- org.eclipse.viatra.query.runtime,
- org.eclipse.viatra.addon.validation.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/build.properties b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/build.properties
deleted file mode 100644
index 459799971..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-bin.includes = META-INF/,\
- .,\
- plugin.xml
-source.. = src-gen/,\
- src/
-output.. = bin/
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/plugin.xml b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/plugin.xml
deleted file mode 100644
index c416fdc24..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/plugin.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><plugin>
- <extension id="validation.constraint.org.eclipse.viatra.examples.uml.queries.emptyClass" point="org.eclipse.viatra.addon.validation.runtime.constraint">
- <constraint class="org.eclipse.viatra.examples.uml.queries.EmptyClassConstraint3" name="org.eclipse.viatra.examples.uml.queries.emptyClass">
- <enabledForEditor editorId="org.eclipse.papyrus.infra.core.papyrusEditor"/>
- </constraint>
- </extension>
-</plugin>
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/src-gen/org/eclipse/viatra/examples/uml/queries/.gitignore b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/src-gen/org/eclipse/viatra/examples/uml/queries/.gitignore
deleted file mode 100644
index 7dc27ff69..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries.validation/src-gen/org/eclipse/viatra/examples/uml/queries/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/EmptyClassConstraint3.java
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.classpath b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.classpath
deleted file mode 100644
index a376b7c3e..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.project b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.project
deleted file mode 100644
index 830f14f52..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.project
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.examples.uml.queries</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.viatra.query.tooling.core.projectbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
- <nature>org.eclipse.viatra.query.projectnature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.settings/org.eclipse.jdt.core.prefs b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c537b6306..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.settings/org.eclipse.pde.core.prefs b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 36c29adc3..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-eclipse.preferences.version=1
-pluginProject.equinox=false
-resolve.requirebundle=false
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/META-INF/MANIFEST.MF b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/META-INF/MANIFEST.MF
deleted file mode 100644
index 2ed15303b..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,14 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: org.eclipse.viatra.examples.uml.queries
-Bundle-SymbolicName: org.eclipse.viatra.examples.uml.queries;singleton:=true
-Bundle-Version: 0.0.1.qualifier
-Export-Package: org.eclipse.viatra.examples.uml.queries,
- org.eclipse.viatra.examples.uml.queries.util
-Require-Bundle: org.eclipse.emf.ecore,
- org.eclipse.emf.transaction,
- org.eclipse.xtext.xbase.lib,
- org.eclipse.uml2.uml,
- org.eclipse.viatra.query.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.apache.log4j
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/build.properties b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/build.properties
deleted file mode 100644
index 6e00103c8..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-bin.includes = META-INF/,\
- .,\
- plugin.xml
-source.. = src/,\
- src-gen/
-output.. = bin/
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/plugin.xml b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/plugin.xml
deleted file mode 100644
index 1340f2561..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/plugin.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><plugin>
- <extension id="org.eclipse.viatra.examples.uml.queries.EmptyClass" point="org.eclipse.viatra.query.runtime.queryspecification">
- <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:org.eclipse.viatra.examples.uml.queries.EmptyClass" id="org.eclipse.viatra.examples.uml.queries.EmptyClass"/>
- </extension>
-</plugin>
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/src-gen/.gitignore b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/src-gen/.gitignore
deleted file mode 100644
index ce4a58f9f..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/src-gen/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-#This file is needed to prevent git from omitting this folder that would cause build issues/compile errors.
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore \ No newline at end of file
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/src/org/eclipse/viatra/examples/uml/queries/EmptyClass.vql b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/src/org/eclipse/viatra/examples/uml/queries/EmptyClass.vql
deleted file mode 100755
index 88fbd960b..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/src/org/eclipse/viatra/examples/uml/queries/EmptyClass.vql
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.eclipse.viatra.examples.uml.queries
-
-import "http://www.eclipse.org/uml2/4.0.0/UML"
-
-@Edge(source = sup, target = sub, label = "direct")
-@ContainsItem(container = sup, item = sub)
-@Format(color = "#7f004b", lineWidth = 2, lineStyle = "dashed")
-pattern superClass(sub : Class, sup : Class) {
- Generalization.specific(Gen, sub);
- Generalization(Gen);
- Generalization.general(Gen, sup);
-}
-
-@Edge(source = sup, target = sub)
-pattern transitiveSuperClass(sub : Class, sup : Class) {
- find superClass+(sub, sup);
-}
-
-pattern superOrEqualClass(sub : Class, sup : Class) {
- sub == sup;
-} or {
- find superClass+(sub, sup);
-}
-
-pattern ownsOperation(cl : Class, op : Operation) {
- Class.ownedOperation(cl, op);
-}
-
-pattern ownsProperty(cl : Class, pr : Property) {
- StructuredClassifier.ownedAttribute(cl, pr);
-}
-
-pattern hasOperation(cl : Class, op : Operation) {
- find superOrEqualClass(cl, owner);
- find ownsOperation(owner, op);
-}
-
-pattern hasProperty(cl : Class, pr : Property) {
- find superOrEqualClass(cl, owner);
- find ownsProperty(owner, pr);
-}
-
-@ObservableValue(name = "abstract", expression = "cl.isAbstract")
-@ObservableValue(name = "leaf", expression = "cl.isLeaf")
-@ObservableValue(name = "label", labelExpression = "Label: $cl.name$")
-@Constraint(severity = "error", key = {"cl"}, message="The class $cl$ is empty",
- targetEditorId = "org.eclipse.papyrus.infra.core.papyrusEditor"
-)
-@Item(item = cl, label="Empty class $cl$")
-@Format(color="#3770d7", textColor = "#ffffff")
-pattern emptyClass(cl : Class) {
- neg find hasOperation(cl, _op);
- neg find hasProperty(cl, _prop);
-}
-
-@Item(item = cl, label = "Class $cl$")
-pattern nonEmptyClass(cl : Class) {
- neg find emptyClass(cl);
-}
-
-// flattener test queries
-pattern hasPropertyOrOperation(cl : Class) {
- find hasOperation(cl,_);
-} or {
- find hasProperty(cl,_);
-} \ No newline at end of file
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/testmodels/Testmodel.uml b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/testmodels/Testmodel.uml
deleted file mode 100644
index e7d8ea57d..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.queries/testmodels/Testmodel.uml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_F8wnAaWdEeK2her1tIkPKA" name="Test">
- <packagedElement xmi:type="uml:Package" xmi:id="_IHBfIKWdEeK2her1tIkPKA" name="root">
- <packagedElement xmi:type="uml:Package" xmi:id="_MtJVsKWdEeK2her1tIkPKA" name="subpackage1">
- <packagedElement xmi:type="uml:Package" xmi:id="_QuOlgKWdEeK2her1tIkPKA" name="subsubpackage1">
- <packagedElement xmi:type="uml:Class" xmi:id="_UOjRoKWdEeK2her1tIkPKA" name="D">
- <generalization xmi:id="_slr0kKWdEeK2her1tIkPKA" general="_SlbXsKWdEeK2her1tIkPKA"/>
- </packagedElement>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_SlbXsKWdEeK2her1tIkPKA" name="B">
- <generalization xmi:id="_oYQK0KWdEeK2her1tIkPKA" general="_O9yioKWdEeK2her1tIkPKA"/>
- </packagedElement>
- </packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_O9yioKWdEeK2her1tIkPKA" name="A">
- <ownedOperation xmi:id="_i4R7IKWdEeK2her1tIkPKA" name="opA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Package" xmi:id="_WRUaoKWdEeK2her1tIkPKA" name="subpackage2">
- <packagedElement xmi:type="uml:Class" xmi:id="_X9CVkKWdEeK2her1tIkPKA" name="C"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Package" xmi:id="_zCUDQQMzEeOkmeKe8k_Ilw" name="objects">
- <packagedElement xmi:type="uml:InstanceValue" xmi:id="_7Z71gAMzEeOkmeKe8k_Ilw" name="obj" type="__2wmIAMzEeOkmeKe8k_Ilw"/>
- <packagedElement xmi:type="uml:Class" xmi:id="__2wmIAMzEeOkmeKe8k_Ilw" name="Test"/>
- <profileApplication xmi:id="_oG9TgAM0EeOkmeKe8k_Ilw" appliedProfile="_fsUpgAM0EeOkmeKe8k_Ilw"/>
- </packagedElement>
- </packagedElement>
- <packagedElement xmi:type="uml:Profile" xmi:id="_fsUpgAM0EeOkmeKe8k_Ilw" name="MyProfile">
- <packagedElement xmi:type="uml:Stereotype" xmi:id="_hlVZkAM0EeOkmeKe8k_Ilw" name="MyStereotype"/>
- </packagedElement>
-</uml:Model>
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/.classpath b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/.classpath
deleted file mode 100644
index ad32c83a7..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/.project b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/.project
deleted file mode 100644
index 181b284b4..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.viatra.examples.uml.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/.settings/org.eclipse.jdt.core.prefs b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c537b6306..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/META-INF/MANIFEST.MF b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 976ef460d..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Tests
-Bundle-SymbolicName: org.eclipse.viatra.examples.uml.tests
-Bundle-Version: 1.0.0.qualifier
-Export-Package: org.eclipse.viatra.examples.uml.tests
-Require-Bundle: org.junit,
- org.eclipse.emf;bundle-version="2.6.0",
- org.eclipse.viatra.examples.uml.queries;bundle-version="0.0.1",
- org.eclipse.viatra.query.runtime;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.viatra.query.testing.core
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/build.properties b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/build.properties
deleted file mode 100644
index 34d2e4d2d..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .
diff --git a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/src/org/eclipse/viatra/examples/uml/tests/FlattenerTest.java b/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/src/org/eclipse/viatra/examples/uml/tests/FlattenerTest.java
deleted file mode 100644
index 46fff6fab..000000000
--- a/examples/papyrus-uml/org.eclipse.viatra.examples.uml.tests/src/org/eclipse/viatra/examples/uml/tests/FlattenerTest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2014, Marton Bur, Akos Horvath, Zoltan Ujhelyi, Istvan Rath and Daniel Varro
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Marton Bur - initial API and implementation
- *******************************************************************************/
-package org.eclipse.viatra.examples.uml.tests;
-
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.viatra.examples.uml.queries.util.EmptyClassQuerySpecification;
-import org.eclipse.viatra.examples.uml.queries.util.HasPropertyOrOperationQuerySpecification;
-import org.eclipse.viatra.examples.uml.queries.util.HasPropertyQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
-import org.eclipse.viatra.query.runtime.emf.EMFScope;
-import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PConstraint;
-import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PDisjunction;
-import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery;
-import org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.DefaultFlattenCallPredicate;
-import org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PQueryFlattener;
-import org.eclipse.viatra.query.testing.core.base.CompareQueryTester;
-import org.eclipse.viatra.query.testing.core.base.DisjunctionBasedQuerySpecification;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameter;
-import org.junit.runners.Parameterized.Parameters;
-
-@RunWith(Parameterized.class)
-public class FlattenerTest {
-
- @Parameters
- public static Collection<Object[]> querySpecifications() throws ViatraQueryException {
- return Arrays.asList(new Object[][] {
- { HasPropertyOrOperationQuerySpecification.instance() },
- { HasPropertyQuerySpecification.instance() },
- { EmptyClassQuerySpecification.instance() }
- });
- }
-
- @Parameter
- public IQuerySpecification<?> querySpecification;
-
- @Test
- public void compareMatches() throws Exception{
- // Load the UML model
- ResourceSet rs = new ResourceSetImpl();
- Resource model = rs.getResource(URI.createPlatformPluginURI("org.eclipse.incquery.examples.uml.evm/testmodels/Testmodel.uml", false), true);
- // Create an engine
- ViatraQueryEngine engine = ViatraQueryEngine.on(new EMFScope(model));
-
- // Do the flattening
- PDisjunction flatDisjunction = flatten(querySpecification.getInternalQueryRepresentation());
- // Create a new query specification with the flattened body
- IQuerySpecification<?> flattenedQuerySpecification = new DisjunctionBasedQuerySpecification(querySpecification, flatDisjunction);
-
-
- CompareQueryTester.assertQueriesEquivalent(engine, querySpecification, flattenedQuerySpecification);
- }
-
- private PDisjunction flatten(PQuery query) throws Exception {
- PQueryFlattener flattener = new PQueryFlattener(new DefaultFlattenCallPredicate());
- PDisjunction flattenedDisjunction = flattener.rewrite(query);
- return flattenedDisjunction;
- }
-
- /**
- * Helper method to print the result of a flattening - no matching is done
- *
- * @throws Exception
- */
- public static void printDisjunction(PDisjunction flattenedDisjunction) {
- Set<PBody> bodies = flattenedDisjunction.getBodies();
- int i = 0;
-
- System.out.println("Variables");
- for (PBody pBody : bodies) {
- System.out.println("Body " + (i++));
-
- Set<PVariable> variables = pBody.getAllVariables();
- for (PVariable pVariable : variables) {
- System.out.println(pVariable.toString());
- }
- }
-
- System.out.println("Constraints");
- i = 0;
- for (PBody pBody : bodies) {
- System.out.println("Body " + (i++));
-
- Set<PConstraint> constraints = pBody.getConstraints();
- for (PConstraint pConstraint : constraints) {
- System.out.println(pConstraint.toString());
- }
- }
-
- System.out.println("Exported Parameters:");
- for (PBody pBody : bodies) {
- System.out.println(pBody.getSymbolicParameters());
- }
- }
-}

Back to the top