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

Java InconsistentOntologyException类代码示例

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

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



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

示例1: getTypes

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
public NodeSet<OWLClass> getTypes(OWLNamedIndividual ind, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
    ensurePrepared();
    DefaultNodeSet<OWLClass> result = new OWLClassNodeSet();
    for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
        for (OWLClassAssertionAxiom axiom : ontology.getClassAssertionAxioms(ind)) {
            OWLClassExpression ce = axiom.getClassExpression();
            if (!ce.isAnonymous()) {
                result.addNode(classHierarchyInfo.getEquivalents(ce.asOWLClass()));
                if (!direct) {
                    result.addAllNodes(getSuperClasses(ce, false).getNodes());
                }
            }
        }
    }
    return result;
}
 
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:17,代码来源:StructuralReasoner2.java


示例2: findAncestors

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
protected Set<OWLClass> findAncestors(String expr, 
		OWLObjectProperty p, boolean direct, Integer numExpected) throws TimeOutException, FreshEntitiesException, InconsistentOntologyException, ClassExpressionNotInProfileException, ReasonerInterruptedException, OWLParserException {
	System.out.println("Query: "+expr+" "+p+" Direct="+direct);
	OWLClassExpression qc = parseOMN(expr);
	System.out.println("QueryC: "+qc);
	//Set<OWLClassExpression> ces = reasoner.getSuperClassExpressions(qc, false);
	//System.out.println("NumX:"+ces.size());
	Set<OWLClass> clzs = reasoner.getSuperClassesOver(qc, p, direct);
	System.out.println("NumD:"+clzs.size());
	for (OWLClass c : clzs) {
		System.out.println("  D:"+c);
	}
	if (numExpected != null) {
		assertEquals(numExpected.intValue(), clzs.size());
	}
	return clzs;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:18,代码来源:ExtendedReasonerTest.java


示例3: getSubClasses

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
public NodeSet<OWLClass> getSubClasses(OWLClassExpression ce, boolean direct)
throws ReasonerInterruptedException, TimeOutException,
FreshEntitiesException, InconsistentOntologyException,
ClassExpressionNotInProfileException {

	DefaultNodeSet<OWLClass> result = new OWLClassNodeSet();
	Set<OWLObject> subs = gw.queryDescendants(ce, false, true);
	for (OWLObject s : subs) {
		if (s instanceof OWLClassExpression) {
			if (s instanceof OWLClass) {
				result.addEntity((OWLClass) s);
			}
			else {

			}
		}
		else {

		}
	}
	return result;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:23,代码来源:GraphReasoner.java


示例4: getSuperClassExpressions

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
/**
 * note that this is not a standard reasoner method
 * 
 * @param ce
 * @param direct
 * @return all superclasses, where superclasses can include anon class expressions
 * @throws InconsistentOntologyException
 * @throws ClassExpressionNotInProfileException
 * @throws FreshEntitiesException
 * @throws ReasonerInterruptedException
 * @throws TimeOutException
 */
public Set<OWLClassExpression> getSuperClassExpressions(OWLClassExpression ce,
		boolean direct) throws InconsistentOntologyException,
		ClassExpressionNotInProfileException, FreshEntitiesException,
		ReasonerInterruptedException, TimeOutException {

	Set<OWLClassExpression> result = new HashSet<OWLClassExpression>();
	Set<OWLObject> supers = gw.getSubsumersFromClosure(ce);
	for (OWLObject sup : supers) {
		if (sup instanceof OWLClassExpression) {
			result.add((OWLClassExpression) sup);
		}
		else {

		}
	}
	return result;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:30,代码来源:GraphReasoner.java


示例5: getSuperClasses

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce,
		boolean direct) throws InconsistentOntologyException,
		ClassExpressionNotInProfileException, FreshEntitiesException,
		ReasonerInterruptedException, TimeOutException {

	DefaultNodeSet<OWLClass> result = new OWLClassNodeSet();
	Set<OWLObject> supers = gw.getSubsumersFromClosure(ce);
	for (OWLObject sup : supers) {
		if (sup instanceof OWLClassExpression) {
			if (sup instanceof OWLClass) {
				result.addEntity((OWLClass) sup);
			}
			else {

			}
		}
		else {

		}
	}
	return result;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:23,代码来源:GraphReasoner.java


示例6: findDescendants

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
protected Set<OWLClass> findDescendants(OWLReasoner r, String expr, Integer numExpected) throws TimeOutException, FreshEntitiesException, InconsistentOntologyException, ClassExpressionNotInProfileException, ReasonerInterruptedException, OWLParserException {
	System.out.println("Query: "+expr);
	OWLClassExpression qc = parseOMN(expr);
	Set<OWLClass> clzs = r.getSubClasses(qc, false).getFlattened();
	clzs.remove(r.getRootOntology().getOWLOntologyManager().getOWLDataFactory().getOWLNothing());
	if (!qc.isAnonymous())
		clzs.add((OWLClass) qc);
	System.out.println("NumD:"+clzs.size());
	for (OWLClass c : clzs) {
		System.out.println("  D:"+c);
	}
	if (numExpected != null) {
		assertEquals(numExpected.intValue(), clzs.size());
	}
	return clzs;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:17,代码来源:AbstractReasonerTest.java


示例7: getDisjointDataProperties

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
@Override
public NodeSet<OWLDataProperty> getDisjointDataProperties(OWLDataPropertyExpression dataPropertyExpression)
		throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException,
		TimeOutException {
	Objects.requireNonNull(dataPropertyExpression);
	logger.finer("getDisjointDataProperties(" + dataPropertyExpression + ")");
	throw new UnsupportedReasonerOperationInJcelException(
			"Unsupported operation : getDisjointDataProperties(OWLDataPropertyExpression)");
}
 
开发者ID:julianmendez,项目名称:jcel,代码行数:10,代码来源:JcelReasoner.java


示例8: getSubClasses

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
public NodeSet<OWLClass> getSubClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
    OWLClassNodeSet ns = new OWLClassNodeSet();
    if (!ce.isAnonymous()) {
        ensurePrepared();
        return classHierarchyInfo.getNodeHierarchyChildren(ce.asOWLClass(), direct, ns);
    }
    return ns;
}
 
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:9,代码来源:StructuralReasoner2.java


示例9: getSuperClasses

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
public NodeSet<OWLClass> getSuperClasses(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
    OWLClassNodeSet ns = new OWLClassNodeSet();
    if (!ce.isAnonymous()) {
        ensurePrepared();
        return classHierarchyInfo.getNodeHierarchyParents(ce.asOWLClass(), direct, ns);
    }
    return ns;
}
 
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:9,代码来源:StructuralReasoner2.java


示例10: getEquivalentClasses

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
public Node<OWLClass> getEquivalentClasses(OWLClassExpression ce) throws InconsistentOntologyException, ClassExpressionNotInProfileException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
    ensurePrepared();
    if (!ce.isAnonymous()) {
        return classHierarchyInfo.getEquivalents(ce.asOWLClass());
    }
    else {
        return new OWLClassNode();
    }
}
 
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:10,代码来源:StructuralReasoner2.java


示例11: getEquivalentDataProperties

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
@Override
public Node<OWLDataProperty> getEquivalentDataProperties(OWLDataProperty dataProperty)
		throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException,
		TimeOutException {
	Objects.requireNonNull(dataProperty);
	logger.finer("getEquivalentDataProperties(" + dataProperty + ")");
	throw new UnsupportedReasonerOperationInBornException(
			"Unsupported operation : getEquivalentDataProperties(OWLDataProperty)");
}
 
开发者ID:julianmendez,项目名称:born,代码行数:10,代码来源:BornReasoner.java


示例12: getSameIndividuals

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
@Override
public Node<OWLNamedIndividual> getSameIndividuals(OWLNamedIndividual individual)
		throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException,
		TimeOutException {
	Objects.requireNonNull(individual);
	logger.finer("getSameIndividuals(" + individual + ")");
	Node<OWLNamedIndividual> ret = getTranslator()
			.translateSI(getReasoner().getSameIndividuals(getTranslator().translateI(individual)));
	logger.finer("" + ret);
	return ret;
}
 
开发者ID:julianmendez,项目名称:jcel,代码行数:12,代码来源:JcelReasoner.java


示例13: getDifferentIndividuals

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
@Override
public NodeSet<OWLNamedIndividual> getDifferentIndividuals(OWLNamedIndividual individual)
		throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException,
		TimeOutException {
	Objects.requireNonNull(individual);
	logger.finer("getDifferentIndividuals(" + individual + ")");
	NodeSet<OWLNamedIndividual> ret = getTranslator()
			.translateSSI(getReasoner().getDifferentIndividuals(getTranslator().translateI(individual)));
	logger.finer("" + ret);
	return ret;
}
 
开发者ID:julianmendez,项目名称:jcel,代码行数:12,代码来源:JcelReasoner.java


示例14: findIndividuals

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
protected Set<OWLNamedIndividual> findIndividuals(OWLReasoner r, String expr, Integer numExpected) throws TimeOutException, FreshEntitiesException, InconsistentOntologyException, ClassExpressionNotInProfileException, ReasonerInterruptedException, OWLParserException {
	System.out.println("Query: "+expr);
	Set<OWLNamedIndividual> inds = r.getInstances(parseOMN(expr), false).getFlattened();
	for (OWLNamedIndividual i : inds) {
		System.out.println("  I:"+i);
	}
	if (numExpected != null) {
		assertEquals(numExpected.intValue(), inds.size());
	}
	return inds;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:12,代码来源:AbstractReasonerTest.java


示例15: getDataPropertyDomains

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
    ensurePrepared();
    DefaultNodeSet<OWLClass> result = new OWLClassNodeSet();
    for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
        for (OWLDataPropertyDomainAxiom axiom : ontology.getDataPropertyDomainAxioms(pe)) {
            result.addNode(getEquivalentClasses(axiom.getDomain()));
            if (!direct) {
                result.addAllNodes(getSuperClasses(axiom.getDomain(), false).getNodes());
            }
        }
    }
    return result;
}
 
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:14,代码来源:StructuralReasoner2.java


示例16: getInstances

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
public NodeSet<OWLNamedIndividual> getInstances(OWLClassExpression ce, boolean direct) throws InconsistentOntologyException, ClassExpressionNotInProfileException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
    ensurePrepared();
    DefaultNodeSet<OWLNamedIndividual> result = new OWLNamedIndividualNodeSet();
    if (!ce.isAnonymous()) {
        OWLClass cls = ce.asOWLClass();
        Set<OWLClass> clses = new HashSet<OWLClass>();
        clses.add(cls);
        if (!direct) {
            clses.addAll(getSubClasses(cls, false).getFlattened());
        }
        for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
            for (OWLClass curCls : clses) {
                for (OWLClassAssertionAxiom axiom : ontology.getClassAssertionAxioms(curCls)) {
                    OWLIndividual individual = axiom.getIndividual();
                    if (!individual.isAnonymous()) {
                        if (getIndividualNodeSetPolicy().equals(IndividualNodeSetPolicy.BY_SAME_AS)) {
                            result.addNode(getSameIndividuals(individual.asOWLNamedIndividual()));
                        }
                        else {
                            result.addNode(new OWLNamedIndividualNode(individual.asOWLNamedIndividual()));
                        }
                    }
                }
            }
        }
    }
    return result;
}
 
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:29,代码来源:StructuralReasoner2.java


示例17: getObjectPropertyValues

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
public NodeSet<OWLNamedIndividual> getObjectPropertyValues(OWLNamedIndividual ind, OWLObjectPropertyExpression pe) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
    ensurePrepared();
    OWLNamedIndividualNodeSet result = new OWLNamedIndividualNodeSet();
    Node<OWLObjectPropertyExpression> inverses = getInverseObjectProperties(pe);
    for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
        for (OWLObjectPropertyAssertionAxiom axiom : ontology.getObjectPropertyAssertionAxioms(ind)) {
            if (!axiom.getObject().isAnonymous()) {
                if (axiom.getProperty().getSimplified().equals(pe.getSimplified())) {
                    if (getIndividualNodeSetPolicy().equals(IndividualNodeSetPolicy.BY_SAME_AS)) {
                        result.addNode(getSameIndividuals(axiom.getObject().asOWLNamedIndividual()));
                    }
                    else {
                        result.addNode(new OWLNamedIndividualNode(axiom.getObject().asOWLNamedIndividual()));
                    }
                }
            }
            // Inverse of pe
            if (axiom.getObject().equals(ind) && !axiom.getSubject().isAnonymous()) {
                OWLObjectPropertyExpression invPe = axiom.getProperty().getInverseProperty().getSimplified();
                if (!invPe.isAnonymous() && inverses.contains(invPe.asOWLObjectProperty())) {
                    if (getIndividualNodeSetPolicy().equals(IndividualNodeSetPolicy.BY_SAME_AS)) {
                        result.addNode(getSameIndividuals(axiom.getObject().asOWLNamedIndividual()));
                    }
                    else {
                        result.addNode(new OWLNamedIndividualNode(axiom.getObject().asOWLNamedIndividual()));
                    }
                }
            }

        }
    }
    // Could do other stuff like inspecting owl:hasValue restrictions
    return result;
}
 
开发者ID:ernestojimenezruiz,项目名称:logmap-matcher,代码行数:35,代码来源:StructuralReasoner2.java


示例18: getEquivalentObjectProperties

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
@Override
public Node<OWLObjectPropertyExpression> getEquivalentObjectProperties(
		OWLObjectPropertyExpression objectPropertyExpression) throws InconsistentOntologyException,
		FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
	Objects.requireNonNull(objectPropertyExpression);
	logger.finer("getEquivalentObjectProperties(" + objectPropertyExpression + ")");
	throw new UnsupportedReasonerOperationInBornException(
			"Unsupported operation : getEquivalentObjectProperties(OWLObjectPropertyExpression)");
}
 
开发者ID:julianmendez,项目名称:born,代码行数:10,代码来源:BornReasoner.java


示例19: getSuperClassesOver

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
@Override
public Set<OWLClass> getSuperClassesOver(OWLClassExpression ce,
		OWLObjectProperty p, boolean direct)
		throws InconsistentOntologyException,
		ClassExpressionNotInProfileException, FreshEntitiesException,
		ReasonerInterruptedException, TimeOutException {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:10,代码来源:GraphReasoner.java


示例20: getClassNode

import org.semanticweb.owlapi.reasoner.InconsistentOntologyException; //导入依赖的package包/类
private Node<OWLClass> getClassNode(ElkClass elkClass)
		throws FreshEntitiesException, InconsistentOntologyException,
		ElkException {
	try {
		return elkConverter_
				.convertClassNode(reasoner_.getEquivalentClasses(elkClass));
	} catch (ElkException e) {
		throw elkConverter_.convert(e);
	}
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:11,代码来源:ElkReasoner.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java Metric类代码示例发布时间:2022-05-22
下一篇:
Java PacketExtension类代码示例发布时间: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