本文整理了Java中com.reprezen.rapidml.xtext.loaders.ZenModelLoader
类的一些代码示例,展示了ZenModelLoader
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZenModelLoader
类的具体详情如下:
包路径:com.reprezen.rapidml.xtext.loaders.ZenModelLoader
类名称:ZenModelLoader
[英]A utility class to load ZenModel in headless mode.
[中]在无头模式下加载ZenModel的实用程序类。
代码示例来源:origin: com.reprezen.rapidml/com.reprezen.rapidml
public ZenModel loadAndValidateModel(File modelFile) {
return loadAndValidateModel(URI.createFileURI(modelFile.getAbsolutePath()));
}
代码示例来源:origin: com.reprezen.rapidml/com.reprezen.rapidml
public ZenModel loadModel(File modelFile) {
return loadModel(URI.createFileURI(modelFile.getAbsolutePath()));
}
代码示例来源:origin: com.reprezen.genflow/genflow-tests
public GeneratorTestFixture(String extension) {
this.extension = extension;
this.loader = new ZenModelLoader();
}
代码示例来源:origin: com.reprezen.rapidml/com.reprezen.rapidml
public ZenModel loadModel(URI modelUri) {
Resource resource = getResource(modelUri);
ZenModel model = (ZenModel) resource.getContents().get(0);
return model;
}
代码示例来源:origin: com.reprezen.rapidml/com.reprezen.rapidml
public ZenModel loadAndValidateModel(URI modelUri) {
Resource resource = getResource(modelUri);
if (validator != null) {
List<Issue> issues = validator.validate(resource, CheckMode.ALL, CancelIndicator.NullImpl);
if (!issues.isEmpty()) {
throw new RuntimeException(String.format(errorMessage, issues.get(0).getMessage()));
}
} else if (!resource.getErrors().isEmpty()) {
throw new RuntimeException(String.format(errorMessage, resource.getErrors().get(0).getMessage()));
}
return (ZenModel) resource.getContents().get(0);
}
代码示例来源:origin: com.reprezen.genflow/genflow-api
@Override
public ZenModel load(File inFile) throws GenerationException {
checkMetaModelVersion(getMetaModelVersion());
ZenModel model = loader.loadAndValidateModel(inFile);
new ZenModelNormalizer().normalize(model);
return model;
}
代码示例来源:origin: com.reprezen.genflow/genflow-tests
@Override
protected void starting(Description description) {
scratchDir = scratchDirRule.getRoot();
// end of the workaround
URI modelURI = getRestFileURI(description);
try {
ZenModel zenModel = loader.loadModel(modelURI);
Monitor progressMonitor = null;
Map<String, String> generated = doGenerate(zenModel, scratchDir, progressMonitor);
assertTrue(generated.size() >= 1);
generatedFile = prepareFile(scratchDir, generated, extension);
} catch (IOException | GenerationException e) {
e.printStackTrace();
fail(e.getMessage());
}
}
内容来源于网络,如有侵权,请联系作者删除!