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

Java OWLException类代码示例

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

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



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

示例1: addMapping

import org.semanticweb.owlapi.model.OWLException; //导入依赖的package包/类
private void addMapping(CaseAnnotationQuery taq, QuestOWLReasonerExt reasoner) 
		throws OWLException, OBDAException, MalformedQueryException{

	//TODO: make a check if reformulateSPARQL2 ada masalah, lanjut ke query berikutnya, jangan mati
	List<SQLWithVarMap> unfoldedQuery = reasoner.reformulateSPARQL2(taq.getQuery());
	Iterator<SQLWithVarMap> it = unfoldedQuery.iterator(); 
	
	while(it.hasNext()){

		SQLWithVarMap sqlWithVarMap = it.next();
		HashMap<String, String> varMap = sqlWithVarMap.getVariableMap();
		
		//TODO: need to check whether taq.getTraceAnsVariable() is null or not before calling varMap.get
		//TODO: need to check whether taq.getNameAnsVariable() is null or not before calling varMap.get
		addTraceMapping(sqlWithVarMap.getSQL(), 
					cleanURI(varMap.get(taq.getTraceAnsVariable())),
					cleanURI(varMap.get(taq.getNameAnsVariable()))
			);
	}
}
 
开发者ID:onprom,项目名称:onprom,代码行数:21,代码来源:EBDAModelImpl2.java


示例2: addMapping

import org.semanticweb.owlapi.model.OWLException; //导入依赖的package包/类
private void addMapping(CaseAnnotationQuery taq, QuestOWLReasonerExt reasoner) 
		throws OWLException, OBDAException, MalformedQueryException{

	//TODO: make a check if reformulateSPARQL2 ada masalah, lanjut ke query berikutnya, jangan mati
	List<SQLWithVarMap> unfoldedQuery = reasoner.reformulateSPARQL2(taq.getQuery());
	Iterator<SQLWithVarMap> it = unfoldedQuery.iterator(); 
	
	while(it.hasNext()){

		SQLWithVarMap sqlWithVarMap = it.next();
		HashMap<String, String> varMap = sqlWithVarMap.getVariableMap();
		
		//TODO: need to check whether taq.getTraceAnsVariable() is null or not before calling varMap.get
		//TODO: need to check whether taq.getNameAnsVariable() is null or not before calling varMap.get
		addTraceNameMapping(sqlWithVarMap.getSQL(), 
					cleanURI(varMap.get(taq.getTraceAnsVariable())),
					cleanURI(varMap.get(taq.getNameAnsVariable()))
			);
	}
}
 
开发者ID:onprom,项目名称:onprom,代码行数:21,代码来源:EBDAModelImpl3.java


示例3: run

import org.semanticweb.owlapi.model.OWLException; //导入依赖的package包/类
@Override
public void run() {
	this.finished = false;

	//extract all events and associate each event with their attributes
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Retrieving XES events information"));
	try {
		xevents = ebdaR.retrieveXEvents16(attributes);
		
	} catch (OWLException e) {
		e.printStackTrace();
	}
	this.finished = true;
	synchronized(lock){
		lock.notifyAll();
	}
}
 
开发者ID:onprom,项目名称:onprom,代码行数:18,代码来源:XESLogExtractorExperimentParalel.java


示例4: extractXESLog

import org.semanticweb.owlapi.model.OWLException; //导入依赖的package包/类
/**
 * Generates XES log based on the given inputs, namely: 
 * Domain Ontology, OBDA Model, and annotation information
 * 
 * @author Ario Santoso ([email protected] / [email protected])
 * @param domainOntology
 * @param obdaModel
 * @param annotation
 * @return event log - XLog
 * @throws InvalidDataSourcesNumberException 
 * @throws OWLException 
 * @throws InvalidAnnotationException 
 * @throws XESLogExtractionFailureException 
 * @deprecated this one is only maintained for backward compatibility with the other OnProm plug in, at some point it should be removed
 */
@Deprecated
public static XLog extractXESLog(OWLOntology domainOntology, OBDAModel obdaModel, AnnotationQueries annotation) 
		throws InvalidDataSourcesNumberException, InvalidAnnotationException, OWLException, XESLogExtractionFailureException, OBDAException, MalformedQueryException{

	List<OBDADataSource> odsList = obdaModel.getSources();
	if(odsList.size() > 1)
		throw new InvalidDataSourcesNumberException(odsList.size());
	
	//Construct EBDA Model
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Start constucting an EBDA Model"));
	LEObjectFactory leFact = LEObjectFactory.getInstance();
	EBDAModelNaiveImpl ebdaModel = leFact.createEBDAModelNaiveImpl();
	
	//add data source information to the EBDA Model
	ebdaModel.addSource(odsList.get(0));
	
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Construct the mappings for the EBDA Model"));
	//add new mapping based on the annotation information
	ebdaModel.addMapping(domainOntology, obdaModel, annotation);
	
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Finish constucting an EBDA Model"));

	return extractXESLog(ebdaModel);
}
 
开发者ID:onprom,项目名称:onprom,代码行数:40,代码来源:XESLogExtractorExperimental.java


示例5: createEBDAModelNaiveImpl

import org.semanticweb.owlapi.model.OWLException; //导入依赖的package包/类
/**
 * Generates EBDA Model based on the given inputs, namely: 
 * Domain Ontology, OBDA Model, and annotation information
 * 
 * @author Ario Santoso ([email protected] / [email protected])
 * @param domainOntology
 * @param obdaModel
 * @param annotation
 * @return EBDA Model
 * @throws InvalidDataSourcesNumberException 
 * @throws OWLException 
 * @throws InvalidAnnotationException 
 * @throws XESLogExtractionFailureException 
 */
public EBDAModelNaiveImpl createEBDAModelNaiveImpl(OWLOntology domainOntology, OBDAModel obdaModel, AnnotationQueries annotation) 
		throws InvalidDataSourcesNumberException, InvalidAnnotationException, OWLException, XESLogExtractionFailureException, OBDAException, MalformedQueryException{
	
	List<OBDADataSource> odsList = obdaModel.getSources();
	if(odsList.size() > 1)
		throw new InvalidDataSourcesNumberException(odsList.size());
	
	//Construct EBDA Model
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Start constucting an EBDA Model"));
	LEObjectFactory leFact = LEObjectFactory.getInstance();
	EBDAModelNaiveImpl ebdaModel = leFact.createEBDAModelNaiveImpl();
	
	//add data source information to the EBDA Model
	ebdaModel.addSource(odsList.get(0));
	
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Construct the mappings for the EBDA Model"));
	//add new mapping based on the annotation information
	ebdaModel.addMapping(domainOntology, obdaModel, annotation);
	
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Finish constucting an EBDA Model"));
	
	return ebdaModel;	
}
 
开发者ID:onprom,项目名称:onprom,代码行数:38,代码来源:XESLogExtractorExperimental.java


示例6: createEBDAModelImpl2

import org.semanticweb.owlapi.model.OWLException; //导入依赖的package包/类
/**
 * Generates EBDA Model based on the given inputs, namely: 
 * Domain Ontology, OBDA Model, and annotation information
 * 
 * @author Ario Santoso ([email protected] / [email protected])
 * @param domainOntology
 * @param obdaModel
 * @param annotation
 * @return EBDA Model
 * @throws InvalidDataSourcesNumberException 
 * @throws OWLException 
 * @throws InvalidAnnotationException 
 * @throws XESLogExtractionFailureException 
 */
public EBDAModelImpl2 createEBDAModelImpl2(OWLOntology domainOntology, OBDAModel obdaModel, AnnotationQueries annotation) 
		throws InvalidDataSourcesNumberException, InvalidAnnotationException, OWLException, XESLogExtractionFailureException, OBDAException, MalformedQueryException{
	
	List<OBDADataSource> odsList = obdaModel.getSources();
	if(odsList.size() > 1)
		throw new InvalidDataSourcesNumberException(odsList.size());
	
	//Construct EBDA Model
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Start constucting an EBDA Model"));
	LEObjectFactory leFact = LEObjectFactory.getInstance();
	EBDAModelImpl2 ebdaModel = leFact.createEBDAModelImpl2();
	
	//add data source information to the EBDA Model
	ebdaModel.addSource(odsList.get(0));
	
	//add new mapping based on the annotation information
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Construct the mappings for the EBDA Model"));
	ebdaModel.addMapping(domainOntology, obdaModel, annotation);
	
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Finish constucting an EBDA Model"));
	
	return ebdaModel;	
}
 
开发者ID:onprom,项目名称:onprom,代码行数:38,代码来源:XESLogExtractorExperimental.java


示例7: createEBDAModelImpl3

import org.semanticweb.owlapi.model.OWLException; //导入依赖的package包/类
/**
 * Generates EBDA Model based on the given inputs, namely: 
 * Domain Ontology, OBDA Model, and annotation information
 * 
 * @author Ario Santoso ([email protected] / [email protected])
 * @param domainOntology
 * @param obdaModel
 * @param annotation
 * @return EBDA Model
 * @throws InvalidDataSourcesNumberException 
 * @throws OWLException 
 * @throws InvalidAnnotationException 
 * @throws XESLogExtractionFailureException 
 */
public EBDAModelImpl3 createEBDAModelImpl3(OWLOntology domainOntology, OBDAModel obdaModel, AnnotationQueries annotation) 
		throws InvalidDataSourcesNumberException, InvalidAnnotationException, OWLException, XESLogExtractionFailureException, OBDAException, MalformedQueryException{
	
	List<OBDADataSource> odsList = obdaModel.getSources();
	if(odsList.size() > 1)
		throw new InvalidDataSourcesNumberException(odsList.size());
	
	//Construct EBDA Model
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Start constucting an EBDA Model"));
	LEObjectFactory leFact = LEObjectFactory.getInstance();
	EBDAModelImpl3 ebdaModel = leFact.createEBDAModelImpl3();
	
	//add data source information to the EBDA Model
	ebdaModel.addSource(odsList.get(0));
	
	//add new mapping based on the annotation information
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Construct the mappings for the EBDA Model"));
	ebdaModel.addMapping(domainOntology, obdaModel, annotation);
	
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Finish constucting an EBDA Model"));
	
	return ebdaModel;	
}
 
开发者ID:onprom,项目名称:onprom,代码行数:38,代码来源:XESLogExtractorExperimental.java


示例8: createEBDAModelWithOptimizedXAttributesEncoding

import org.semanticweb.owlapi.model.OWLException; //导入依赖的package包/类
/**
 * Generates EBDA Model based on the given inputs, namely: 
 * Domain Ontology, OBDA Model, and annotation information
 * 
 * @author Ario Santoso ([email protected] / [email protected])
 * @param domainOntology
 * @param obdaModel
 * @param annotation
 * @return EBDA Model
 * @throws InvalidDataSourcesNumberException 
 * @throws OWLException 
 * @throws InvalidAnnotationException 
 * @throws XESLogExtractionFailureException 
 */
public EBDAModelWithOptimizedXAttributesEncoding createEBDAModelWithOptimizedXAttributesEncoding(OWLOntology domainOntology, OBDAModel obdaModel, AnnotationQueries annotation) 
		throws InvalidDataSourcesNumberException, InvalidAnnotationException, OWLException, XESLogExtractionFailureException, OBDAException, MalformedQueryException{
	
	List<OBDADataSource> odsList = obdaModel.getSources();
	if(odsList.size() > 1)
		throw new InvalidDataSourcesNumberException(odsList.size());
	
	//Construct EBDA Model
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Start constucting an EBDA Model"));
	LEObjectFactory leFact = LEObjectFactory.getInstance();
	EBDAModelWithOptimizedXAttributesEncoding ebdaModel = leFact.createEBDAModelWithOptimizedXAttributesEncoding();
	
	//add data source information to the EBDA Model
	ebdaModel.addSource(odsList.get(0));
	
	//add new mapping based on the annotation information
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Construct the mappings for the EBDA Model"));
	ebdaModel.addMapping(domainOntology, obdaModel, annotation);
	
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Finish constucting an EBDA Model"));
	
	return ebdaModel;	
}
 
开发者ID:onprom,项目名称:onprom,代码行数:38,代码来源:XESLogExtractorExperimental.java


示例9: getXESLog17

import org.semanticweb.owlapi.model.OWLException; //导入依赖的package包/类
/**
 * 
 * Generates XES log based on the given particular OBDA model that connects a 
 * Database to the Event Ontology (i.e., EBDA).
 * 
 * @author Ario Santoso ([email protected] / [email protected])
 * @param ebdaModel - an Event OBDA model (i.e., a particular OBDA model) that 
 * 						connects a Database to the Event Ontology
 * @return event log - XLog
 * @throws OWLException 
 */
public XLog getXESLog17(EBDAModelWithOptimizedXAttributesEncoding ebdaModel) throws XESLogExtractionFailureException{
	
	logger.info(String.format(
			LEConstants.LOG_INFO_TEMPLATE, "Start extracting XES Log from the EBDA Model"));
	
	EBDAReasonerImplWithParallelProcessing ebdaR = new EBDAReasonerImplWithParallelProcessing(ebdaModel);
	ebdaR.setExecutionLogListener(this);
	
	try{
		//Create XLogOnProm 
		XLogOnProm xlog = ebdaR.extractXLog();
		if(xlog == null) 
			throw new XESLogExtractionFailureException(LEConstants.MSG_LOG_CREATION_FAILURE);
		
		logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Finish extracting XES Log from the EBDA Model"));

		//return the log
		return xlog;
	
	} catch (OWLException e) {
		e.printStackTrace();
		throw new XESLogExtractionFailureException();
	}
}
 
开发者ID:onprom,项目名称:onprom,代码行数:36,代码来源:XESLogExtractorExperimental.java


示例10: extractOnPromXESLogUsingParallelAndOptimizedXAttributesProcessing

import org.semanticweb.owlapi.model.OWLException; //导入依赖的package包/类
/**
 * 
 * Generates XES log based on the given particular OBDA model that connects a 
 * Database to the Event Ontology (i.e., EBDA).
 * 
 * <br /><br />
 * Feature(s)/Note(s):
 * <ul>
 * 		<li>It encodes/extracts the XAttributes information (i.e., key, type, values) in/from the Attributes URI</li>
 * 		<li>It must use EBDAModelWithOptimizedXAttributesEncoding</li>
 * 		<li>It runs some tasks in parallel</li>
 * </ul>
 * 
 * @author Ario Santoso ([email protected] / [email protected])
 * @param ebdaModel - an Event OBDA model (i.e., a particular OBDA model) that 
 * 						connects a Database to the Event Ontology
 * @return event log - XLog
 * @throws OWLException 
 */
public XLog extractOnPromXESLogUsingParallelAndOptimizedXAttributesProcessing(EBDAModelWithOptimizedXAttributesEncoding ebdaModel) throws XESLogExtractionFailureException{
	
	logger.info(String.format(
			LEConstants.LOG_INFO_TEMPLATE, "Start extracting XES Log from the EBDA Model"));
	
	EBDAReasonerImplWithParallelProcessing ebdaR = new EBDAReasonerImplWithParallelProcessing(ebdaModel);
	ebdaR.setExecutionLogListener(this);
	
	try{
		//Create XLogOnProm 
		XLogOnProm xlog = ebdaR.extractXLog();
		if(xlog == null) 
			throw new XESLogExtractionFailureException(LEConstants.MSG_LOG_CREATION_FAILURE);
		
		logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Finish extracting XES Log from the EBDA Model"));

		return xlog;
	
	} catch (OWLException e) {
		e.printStackTrace();
		throw new XESLogExtractionFailureException();
	}
}
 
开发者ID:onprom,项目名称:onprom,代码行数:43,代码来源:XESLogExtractor.java


示例11: run

import org.semanticweb.owlapi.model.OWLException; //导入依赖的package包/类
@Override
public void run() {
	this.finished = false;
	this.setPriority(Thread.MAX_PRIORITY);
	
	//extract all events and associate each event with their attributes
	logger.info(String.format(LEConstants.LOG_INFO_TEMPLATE, "Retrieving XES events information"));
	try {
		xevents = retrieveXEvents17();
		
	} catch (OWLException e) {
		e.printStackTrace();
	}
	
	this.finished = true;
	
	synchronized(caller){
		caller.notify();
	}
}
 
开发者ID:onprom,项目名称:onprom,代码行数:21,代码来源:EBDAReasonerImplWithParallelProcessing.java


示例12: reformulateSPARQL2

import org.semanticweb.owlapi.model.OWLException; //导入依赖的package包/类
public List<SQLWithVarMap> reformulateSPARQL2(String sparqlQuery) throws OWLException, OBDAException, MalformedQueryException {

		QuestQueryProcessor qqueryProcessor = this.getQueryProcessor();

		//parse the given SPARQL query
		ParsedQuery parsedSparql = qqueryProcessor.getParsedQuery(sparqlQuery);
		
		//applying the reformulation algorithm to the parsed SPARQL query, 
		//the resulting reformulated query is in the form of DatalogProgram
		DatalogProgram reformulatedQuery = qqueryProcessor.reformulateSPARQL(parsedSparql);
		List<String> qs = qqueryProcessor.getQuerySignature(parsedSparql);

		
		if(qs == null)
			throw new OBDAException("\nA problem occurred while reformulating the query: \n\n"+
				sparqlQuery+"\n\nthe signature of the reformulated query can't be obtained. Please check the Ontop configuration.\n");
		
		//translate the reformulated query (which is in the form of DatalogProgram) into (a list of) SQL
		return this.sqlGeneratorExt.generateSourceQueries(reformulatedQuery, qs);
	}
 
开发者ID:onprom,项目名称:onprom,代码行数:21,代码来源:QuestOWLReasonerExt.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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