diff options
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util')
2 files changed, 21 insertions, 4 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/ApplicationConfigurationParser.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/ApplicationConfigurationParser.xtend new file mode 100644 index 00000000..ea738c5a --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/ApplicationConfigurationParser.xtend | |||
@@ -0,0 +1,18 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.application.execution.util | ||
2 | |||
3 | import org.eclipse.emf.common.util.URI | ||
4 | import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl | ||
5 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ConfigurationScript | ||
6 | |||
7 | class ApplicationConfigurationParser { | ||
8 | public def parse(URI uri) { | ||
9 | val rs = new ResourceSetImpl | ||
10 | val res = rs.getResource(uri,true) | ||
11 | val content = res.contents.head | ||
12 | if(content instanceof ConfigurationScript) { | ||
13 | return content | ||
14 | } else { | ||
15 | throw new IllegalArgumentException('''Content is not an ConfigurationScript! (got: «content.class.simpleName»)''') | ||
16 | } | ||
17 | } | ||
18 | } \ No newline at end of file | ||
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend index f85e3dcf..0da42e0f 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend | |||
@@ -3,6 +3,7 @@ package hu.bme.mit.inf.dslreasoner.application.execution.util | |||
3 | import com.google.inject.Guice | 3 | import com.google.inject.Guice |
4 | import com.google.inject.Injector | 4 | import com.google.inject.Injector |
5 | import com.google.inject.Module | 5 | import com.google.inject.Module |
6 | import hu.bme.mit.inf.dslreasoner.application.execution.ScriptConsole | ||
6 | import java.util.LinkedHashMap | 7 | import java.util.LinkedHashMap |
7 | import java.util.List | 8 | import java.util.List |
8 | import org.eclipse.emf.common.util.URI | 9 | import org.eclipse.emf.common.util.URI |
@@ -17,13 +18,11 @@ import org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguageStandalone | |||
17 | import org.eclipse.viatra.query.patternlanguage.emf.GenmodelExtensionLoader | 18 | import org.eclipse.viatra.query.patternlanguage.emf.GenmodelExtensionLoader |
18 | import org.eclipse.viatra.query.patternlanguage.emf.IGenmodelMappingLoader | 19 | import org.eclipse.viatra.query.patternlanguage.emf.IGenmodelMappingLoader |
19 | import org.eclipse.viatra.query.patternlanguage.emf.eMFPatternLanguage.PatternModel | 20 | import org.eclipse.viatra.query.patternlanguage.emf.eMFPatternLanguage.PatternModel |
21 | import org.eclipse.viatra.query.patternlanguage.emf.scoping.CompoundMetamodelProviderService | ||
22 | import org.eclipse.viatra.query.patternlanguage.emf.scoping.IMetamodelProvider | ||
20 | import org.eclipse.viatra.query.patternlanguage.emf.specification.SpecificationBuilder | 23 | import org.eclipse.viatra.query.patternlanguage.emf.specification.SpecificationBuilder |
21 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification | 24 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification |
22 | import org.eclipse.xtext.resource.XtextResourceSet | 25 | import org.eclipse.xtext.resource.XtextResourceSet |
23 | import hu.bme.mit.inf.dslreasoner.application.execution.ScriptConsole | ||
24 | import org.eclipse.viatra.query.patternlanguage.emf.scoping.IMetamodelProvider | ||
25 | import hu.bme.mit.inf.dslreasoner.application.linking.PreloadedMetamodelProvider | ||
26 | import org.eclipse.viatra.query.patternlanguage.emf.scoping.CompoundMetamodelProviderService | ||
27 | 26 | ||
28 | class MyModule extends EMFPatternLanguageRuntimeModule implements Module { | 27 | class MyModule extends EMFPatternLanguageRuntimeModule implements Module { |
29 | def public Class<? extends IAnnotationValidatorLoader> bindAnnotationValidatorLoader() { | 28 | def public Class<? extends IAnnotationValidatorLoader> bindAnnotationValidatorLoader() { |