• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java EolModelLoadingException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException的典型用法代码示例。如果您正苦于以下问题:Java EolModelLoadingException类的具体用法?Java EolModelLoadingException怎么用?Java EolModelLoadingException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



EolModelLoadingException类属于org.eclipse.epsilon.eol.exceptions.models包,在下文中一共展示了EolModelLoadingException类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createEmfModel

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
protected EmfModel createEmfModel(Role role, String model)
		throws FileNotFoundException, EolModelLoadingException,
		URISyntaxException {
	Language language = getLanguage(role);
	assert language.getLocation() != null : String.format(
			"Can't create EMF model for language %s", language);
	StringProperties props = new StringProperties();
	props.put(EmfModel.PROPERTY_NAME, role == BOTH ? "Model" : language.getName());
	props.put(EmfModel.PROPERTY_FILE_BASED_METAMODEL_URI,
			toFileURI(language.getLocation()));
	props.put(EmfModel.PROPERTY_MODEL_URI, model);
	props.put(EmfModel.PROPERTY_READONLOAD, "" + (role == SOURCE || role == BOTH));
	props.put(EmfModel.PROPERTY_STOREONDISPOSAL, "" + (role == TARGET || role == BOTH));

	EmfModel result = new EmfModel();
	result.load(props, null);
	return result;
}
 
开发者ID:djhuistra,项目名称:UnifyingAttackTrees,代码行数:19,代码来源:EpsilonTransformer.java


示例2: contextlessQuery

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
protected Object contextlessQuery(IModelIndexer m, String query, Map<String, Object> context)
		throws QueryExecutionException, InvalidQueryException {
	final long trueStart = System.currentTimeMillis();
	String defaultnamespaces = null;
	if (context != null)
		defaultnamespaces = (String) context.get(PROPERTY_DEFAULTNAMESPACES);

	/*
	 * We need to always create a new engine for every query: reusing the
	 * same engine would be thread-unsafe.
	 */
	final EOLQueryEngine q = new EOLQueryEngine();
	try {
		q.load(m);
		q.setDefaultNamespaces(defaultnamespaces);
	} catch (EolModelLoadingException e) {
		throw new QueryExecutionException("Loading of EOLQueryEngine failed");
	}

	final IEolModule module = createModule();
	parseQuery(query, context, q, module);
	return runQuery(trueStart, module);
}
 
开发者ID:mondo-project,项目名称:mondo-hawk,代码行数:24,代码来源:EOLQueryEngine.java


示例3: contextfulQuery

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
protected Object contextfulQuery(IModelIndexer m, String query, Map<String, Object> context)
		throws QueryExecutionException, InvalidQueryException {
	final long trueStart = System.currentTimeMillis();

	CEOLQueryEngine q = new CEOLQueryEngine();
	try {
		q.load(m);
	} catch (EolModelLoadingException e) {
		throw new QueryExecutionException("Loading of EOLQueryEngine failed");
	}
	q.setContext(context);
	LOGGER.debug("Graph path: {}", graph.getPath());

	final IEolModule module = createModule();
	parseQuery(query, context, q, module);
	return runQuery(trueStart, module);
}
 
开发者ID:mondo-project,项目名称:mondo-hawk,代码行数:18,代码来源:EOLQueryEngine.java


示例4: createEmfModel

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
protected EmfModel createEmfModel(String name, String model, 
    String metamodel, boolean readOnLoad, boolean storeOnDisposal) 
        throws EolModelLoadingException, URISyntaxException {
  EmfModel emfModel = new EmfModel();
  StringProperties properties = new StringProperties();
  properties.put(EmfModel.PROPERTY_NAME, name);
  properties.put(EmfModel.PROPERTY_FILE_BASED_METAMODEL_URI,
      getFile(metamodel).toURI().toString());
  properties.put(EmfModel.PROPERTY_MODEL_URI, 
      getFile(model).toURI().toString());
  properties.put(EmfModel.PROPERTY_READONLOAD, readOnLoad + "");
  properties.put(EmfModel.PROPERTY_STOREONDISPOSAL, 
      storeOnDisposal + "");
  emfModel.load(properties);
  return emfModel;
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:17,代码来源:AbstractEolLauncher.java


示例5: createEmfModelByURI

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
protected EmfModel createEmfModelByURI(String name, String model, String metamodel,
                                       boolean readOnLoad,
                                       boolean storeOnDisposal) throws EolModelLoadingException {
  // @Correctness this assumes the metamodels are in the EPackage.Registry.
  // This does not hold for using Ecore files directly, unless we load them into
  // the registry first.
  // See if we can tell Epsilon to fallback on the Ecore file.

  // @Correctness this condition seems fishy
  if (metamodel.contains("UML")) {
    UMLResourcesUtil.init(null);
  }

  EmfModel emfModel = new EmfModel();
  StringProperties properties = new StringProperties();
  properties.put(Model.PROPERTY_NAME, name);
  properties.put(EmfModel.PROPERTY_METAMODEL_URI, metamodel);
  properties.put(EmfModel.PROPERTY_MODEL_URI, model);
  properties.put(EmfModel.PROPERTY_IS_METAMODEL_FILE_BASED, "false");
  properties.put(Model.PROPERTY_READONLOAD, readOnLoad + "");
  properties.put(Model.PROPERTY_STOREONDISPOSAL, storeOnDisposal + "");
  emfModel.load(properties);
  return emfModel;
}
 
开发者ID:atlanmod,项目名称:emfviews,代码行数:25,代码来源:EclDelegate.java


示例6: getModels

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
@Override
public IModel[] getModels(String inputPath, String outputPath)
		throws EolModelLoadingException, URISyntaxException, FileNotFoundException {
	IModel source = createPlainXmlModel(Role.SOURCE, inputPath);
	IModel target = createEmfModel(Role.TARGET, outputPath);
	return new IModel[] { source, target };
}
 
开发者ID:djhuistra,项目名称:UnifyingAttackTrees,代码行数:8,代码来源:ATA2UAT.java


示例7: getModels

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
@Override
public IModel[] getModels(String inputPath, String outputPath)
		throws EolModelLoadingException, URISyntaxException, FileNotFoundException {
	IModel source = createEmfModel(Role.SOURCE, inputPath);
	IModel target = createPlainXmlModel(Role.TARGET, outputPath);
	return new IModel[] { source, target };
}
 
开发者ID:djhuistra,项目名称:UnifyingAttackTrees,代码行数:8,代码来源:UAT2ADTool.java


示例8: createPlainXmlModel

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
protected PlainXmlModel createPlainXmlModel(Role role, String model)
		throws FileNotFoundException, EolModelLoadingException,
		URISyntaxException {
	StringProperties props = new StringProperties();
	props.put(PlainXmlModel.PROPERTY_NAME, getLanguage(role).getName());
	props.put(PlainXmlModel.PROPERTY_URI, model);
	props.put(PlainXmlModel.PROPERTY_READONLOAD, "" + (role == SOURCE));
	props.put(PlainXmlModel.PROPERTY_STOREONDISPOSAL, "" + (role == TARGET));

	PlainXmlModel result = new PlainXmlModel();
	result.load(props, null);
	return result;
}
 
开发者ID:djhuistra,项目名称:UnifyingAttackTrees,代码行数:14,代码来源:EpsilonTransformer.java


示例9: loadModel

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
@Override
protected void loadModel() throws EolModelLoadingException {
	loadModelFromUri();
	this.hawkResource = (HawkResourceImpl) modelImpl;

	if (hawkResource.getDescriptor().getLoadingMode().isGreedyElements()) {
		/*
		 * Only set up the containment change listeners if we use the GREEDY
		 * or LAZY_ATTRIBUTES loading modes.
		 */
		setupContainmentChangeListeners();
	}
}
 
开发者ID:mondo-project,项目名称:mondo-integration,代码行数:14,代码来源:RemoteHawkModel.java


示例10: load

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
@Override
public void load() throws EolModelLoadingException {
	if (graph != null)
		load((IModelIndexer) null);
	else
		throw new EolModelLoadingException(new Exception("load called with no graph store initialized"), this);
}
 
开发者ID:mondo-project,项目名称:mondo-hawk,代码行数:8,代码来源:EOLQueryEngine.java


示例11: load

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
@Override
public void load(StringProperties properties, IRelativePathResolver resolver)
		throws EolModelLoadingException {

	this.name = properties.getProperty(Model.PROPERTY_NAME);

	EOLQueryEngine eolQueryEngine = new EOLQueryEngine();
	target = eolQueryEngine;
	eolQueryEngine.setDatabaseConfig(properties);

	//
	database = HManager.getGraphByIndexerName(
			properties.getProperty(PROPERTY_INDEXER_NAME));

	// String location = properties.getProperty(PROPERTY_DATABASE_LOCATION);
	//
	// System.out.println("Location: " + location);
	//
	// String name = location.substring(location.lastIndexOf("/") + 1);
	// String loc = location.substring(0, location.lastIndexOf("/"));
	//
	// System.out.println(name);
	// System.out.println(loc);
	//
	// database.run(name, new File(loc), new DefaultConsole());
	if(database!=null)
		eolQueryEngine.load(database);
}
 
开发者ID:seyyedshah,项目名称:hawk-ui,代码行数:29,代码来源:HawkModel.java


示例12: createEmfModelByURI

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
protected EmfModel createEmfModelByURI(String name, String modelURI, 
    String metamodelURI, boolean readOnLoad, boolean storeOnDisposal) 
        throws EolModelLoadingException, URISyntaxException {
  EmfModel emfModel = new EmfModel();
  StringProperties properties = new StringProperties();
  properties.put(EmfModel.PROPERTY_NAME, name);
  properties.put(EmfModel.PROPERTY_METAMODEL_URI, metamodelURI);
  properties.put(EmfModel.PROPERTY_MODEL_URI,  modelURI);
  properties.put(EmfModel.PROPERTY_READONLOAD, readOnLoad + "");
  properties.put(EmfModel.PROPERTY_STOREONDISPOSAL, 
      storeOnDisposal + "");
  emfModel.load(properties);
  return emfModel;
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:15,代码来源:AbstractEolLauncher.java


示例13: createXmlModel

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
protected XmlModel createXmlModel(String name, String uri, String xsdURI,
		  boolean readOnLoad, boolean storeOnDisposal) 
	          throws EolModelLoadingException, URISyntaxException {
	  	XmlModel xmlModel = new XmlModel();
	    StringProperties properties = new StringProperties();
	    properties.put(XmlModel.PROPERTY_NAME, name);
	    properties.put(XmlModel.PROPERTY_MODEL_FILE, uri);
	    properties.put(XmlModel.PROPERTY_XSD_FILE, xsdURI);
	    properties.put(XmlModel.PROPERTY_READONLOAD, readOnLoad + "");
	    properties.put(XmlModel.PROPERTY_STOREONDISPOSAL, 
	        storeOnDisposal + "");
	    xmlModel.load(properties);
	    return xmlModel;
}
 
开发者ID:adolfosbh,项目名称:cs2as,代码行数:15,代码来源:AbstractEolLauncher.java


示例14: getModels

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
@Override
public IModel[] getModels(String inputPath, String outputPath)
		throws EolModelLoadingException, URISyntaxException, FileNotFoundException {
	// EGL transformation does not have output model, only generated output
	return new IModel[] { createEmfModel(Role.SOURCE, inputPath) };
}
 
开发者ID:djhuistra,项目名称:UnifyingAttackTrees,代码行数:7,代码来源:UAT2ATCalc.java


示例15: getModels

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
@Override
public IModel[] getModels(String inputPath, String outputPath)
		throws EolModelLoadingException, URISyntaxException, FileNotFoundException {
	// EOL transformation only alters the input model, does not create output model
	return new IModel[] {createEmfModel(Role.BOTH, new File(inputPath).toURI().getPath() ) };
}
 
开发者ID:djhuistra,项目名称:UnifyingAttackTrees,代码行数:7,代码来源:UAT2UATBinary.java


示例16: getModels

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
@Override
public IModel[] getModels(String inputPath, String outputPath) throws EolModelLoadingException, URISyntaxException, FileNotFoundException {
	IModel source = createPlainXmlModel(Role.SOURCE, inputPath);
	IModel target = createEmfModel(Role.TARGET, outputPath);
	return new IModel[] { source, target };
}
 
开发者ID:djhuistra,项目名称:UnifyingAttackTrees,代码行数:7,代码来源:ADTool2UAT.java


示例17: load

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
@Override
abstract public void load() throws EolModelLoadingException;
 
开发者ID:mondo-project,项目名称:mondo-hawk,代码行数:3,代码来源:AbstractEpsilonModel.java


示例18: calculateDerivedAttributes

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
@Override
public AccessListener calculateDerivedAttributes(IModelIndexer m, Iterable<IGraphNode> nodes) {
	final boolean enableDebug = false;

	indexer = m;
	graph = m.getGraph();

	if (config == null)
		config = getDatabaseConfig();

	if (propertygetter == null)
		propertygetter = new GraphPropertyGetter(graph, this);

	StringProperties configuration = new StringProperties();
	configuration.put(EOLQueryEngine.PROPERTY_ENABLE_CACHING, true);
	setDatabaseConfig(configuration);
	try {
		load(m);
	} catch (EolModelLoadingException e2) {
		e2.printStackTrace();
	}

	// listen to accesses
	GraphPropertyGetter pg = null;
	if (!enableDebug) {
		pg = (GraphPropertyGetter) getPropertyGetter();
		pg.setBroadcastAccess(true);
	}

	// Compute the derived attributes
	final Map<String, EolModule> cachedModules = new HashMap<String, EolModule>();
	try (IGraphTransaction t = graph.beginTransaction()) {
		for (IGraphNode n : nodes) {
			calculateDerivedAttributes(cachedModules, n);
		}
		t.success();
	} catch (Exception e) {
		LOGGER.error("Failed to compute the derived attributes", e);
	}

	if (!enableDebug) {
		pg.setBroadcastAccess(false);
		return pg.getAccessListener();
	}
	return null;
}
 
开发者ID:mondo-project,项目名称:mondo-hawk,代码行数:47,代码来源:EOLQueryEngine.java


示例19: getModels

import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException; //导入依赖的package包/类
/**
 * Converts the file names of the source and target models into IModels.
 * 
 * @param inputPath
 *            file name of the source model
 * @param outputPath
 *            file name of the target model
 * @throws EolModelLoadingException
 *             if one of the models could not be loaded
 * @throws URISyntaxException
 *             if one of the file names is not a valid URI
 * @throws FileNotFoundException
 *             if one of the files did not exist
 */
public abstract IModel[] getModels(String inputPath, String outputPath)
		throws EolModelLoadingException, URISyntaxException,
		FileNotFoundException;
 
开发者ID:djhuistra,项目名称:UnifyingAttackTrees,代码行数:18,代码来源:EpsilonTransformer.java



注:本文中的org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java LightweightHttpWagon类代码示例发布时间:2022-05-22
下一篇:
Java ClusterRenderer类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap