当前位置: 首页>>代码示例>>Java>>正文


Java OWLDisjointUnionAxiom类代码示例

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


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

示例1: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
public void visit(OWLDisjointUnionAxiom axiom) {
    // DisjointUnion(C CE1 ... CEn)
    // 1. add C implies CE1 or ... or CEn, which is { not C or CE1 or ... or CEn }
    Set<OWLClassExpression> inclusion=new HashSet<OWLClassExpression>(axiom.getClassExpressions());
    inclusion.add(m_expressionManager.getComplementNNF(axiom.getOWLClass()));
    OWLClassExpression[] inclusionArray=new OWLClassExpression[axiom.getClassExpressions().size()+1];
    inclusion.toArray(inclusionArray);
    m_classExpressionInclusionsAsDisjunctions.add(inclusionArray);
    // 2. add CEi implies C, which is { not CEi or C }
    for (OWLClassExpression description : axiom.getClassExpressions())
        m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { negative(description),axiom.getOWLClass() });
    // 3. add CEi and CEj implies bottom (not CEi or not CEj) for 1 <= i < j <= n
    OWLClassExpression[] descriptions=new OWLClassExpression[axiom.getClassExpressions().size()];
    axiom.getClassExpressions().toArray(descriptions);
    for (int i=0;i<descriptions.length;i++)
        descriptions[i]=m_expressionManager.getComplementNNF(descriptions[i]);
    for (int i=0;i<descriptions.length;i++)
        for (int j=i+1;j<descriptions.length;j++)
            m_classExpressionInclusionsAsDisjunctions.add(new OWLClassExpression[] { descriptions[i],descriptions[j] });
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:21,代码来源:OWLNormalization.java

示例2: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
public Boolean visit(OWLDisjointUnionAxiom axiom) {
    // C = C1 or ... or Cn, for 1 <= i < j <= n: Ci and Cj -> bottom
    OWLClass c=axiom.getOWLClass();
    Set<OWLClassExpression> cs=new HashSet<OWLClassExpression>(axiom.getClassExpressions());
    cs.add(factory.getOWLObjectComplementOf(c));
    OWLClassExpression incl1=factory.getOWLObjectUnionOf(cs);
    OWLClassExpression incl2=factory.getOWLObjectUnionOf(factory.getOWLObjectComplementOf(factory.getOWLObjectUnionOf(axiom.getClassExpressions())),c);
    // incl1: not C or C1 or ... or Cn
    // incl2: not(C1 or ... or Cn) or C
    Set<OWLClassExpression> conjuncts=new HashSet<OWLClassExpression>();
    conjuncts.add(incl1);
    conjuncts.add(incl2);
    int n=axiom.getClassExpressions().size();
    OWLClassExpression[] descs=axiom.getClassExpressions().toArray(new OWLClassExpression[n]);
    for (int i=0;i<n-1;i++) {
        for (int j=i+1;j<n;j++) {
            conjuncts.add(factory.getOWLObjectUnionOf(factory.getOWLObjectComplementOf(descs[i]),factory.getOWLObjectComplementOf(descs[j])));
        }
    }
    OWLClassExpression entailmentDesc=factory.getOWLObjectIntersectionOf(conjuncts);
    return !reasoner.isSatisfiable(factory.getOWLObjectComplementOf(entailmentDesc));
}
 
开发者ID:robertoyus,项目名称:HermiT-android,代码行数:23,代码来源:EntailmentChecker.java

示例3: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
@Override
public void visit(OWLDisjointUnionAxiom axiom) {
	OWLClass cls = axiom.getOWLClass();
	sparql += expressionConverter.asGroupGraphPattern(cls, subjectVar);
	
	List<OWLClassExpression> classExpressions = new LinkedList<>(axiom.getClassExpressions());
	
	for(int i = 0; i < classExpressions.size(); i++){
		sparql += "{";
		OWLClassExpression ce = classExpressions.remove(i);
		
		// add triple pattern for class to be
		sparql += expressionConverter.asGroupGraphPattern(ce, subjectVar);
		
		// add NOT EXISTS for classes not to be
		sparql += notExists(subjectVar, classExpressions, false);
		
		classExpressions.add(i, ce);
		sparql += "}";
		if(i < classExpressions.size()-1){
			sparql += " UNION ";
		}
	}
}
 
开发者ID:SmartDataAnalytics,项目名称:OWL2SPARQL,代码行数:25,代码来源:OWLAxiomToSPARQLConverter.java

示例4: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
@Override
public T visit(OWLDisjointUnionAxiom axiom) {
	throw new IllegalArgumentException(
			OWLDisjointUnionAxiom.class.getSimpleName()
					+ " cannot be converted to "
					+ getTargetClass().getSimpleName());
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:8,代码来源:AbstractOwlAxiomConverterVisitor.java

示例5: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
@Override
public OWLAxiom visit(OWLDisjointUnionAxiom axiom) {
    Set<OWLClassExpression> descs = new HashSet<>();
    for (OWLClassExpression op : axiom.getClassExpressions()) {
        descs.add(op.accept(this));
    }
    return dataFactory.getOWLDisjointUnionAxiom(axiom.getOWLClass(), descs);
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:9,代码来源:NNF.java

示例6: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
@Override
public void visit(OWLDisjointUnionAxiom axiom) {
    hashCode = primes[11];
    hashCode = hashCode * MULT + axiom.getOWLClass().hashCode();
    hashCode = hashCode * MULT + axiom.getClassExpressions().hashCode();
    hashCode = hashCode * MULT + axiom.getAnnotations().hashCode();
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:8,代码来源:HashCode.java

示例7: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
@Override
public Set<OWLClassExpression> visit(OWLDisjointUnionAxiom axiom) {
    Set<OWLClassExpression> result = new HashSet<>();
    result.add(axiom.getOWLClass());
    for (OWLClassExpression ce : axiom.getClassExpressions()) {
        result.addAll(ce.accept(this));
    }
    return result;
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:10,代码来源:OWLClassExpressionCollector.java

示例8: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
@Override
public void visit(@Nonnull OWLDisjointUnionAxiom axiom) {
    axiom.getOWLClass().accept((OWLEntityVisitor) this);
    for (OWLClassExpression desc : axiom.getClassExpressions()) {
        desc.accept(this);
    }
    processAxiomAnnotations(axiom);
}
 
开发者ID:matthewhorridge,项目名称:owlapi-gwt,代码行数:9,代码来源:AbstractEntityRegistrationManager.java

示例9: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
public void visit(OWLDisjointUnionAxiom axiom) {
    notSupported(axiom);
}
 
开发者ID:kbss-cvut,项目名称:jopa,代码行数:4,代码来源:IntegrityConstraintParser.java

示例10: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
@Override
public OWLDisjointUnionAxiom visit(ElkDisjointUnionAxiom axiom) {
	return owlFactory_.getOWLDisjointUnionAxiom(
			convert(axiom.getDefinedClass()),
			toClassExpressionSet(axiom.getClassExpressions()));
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:7,代码来源:AbstractElkObjectConverter.java

示例11: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
@Override
public ElkClassAxiom visit(OWLDisjointUnionAxiom owlDisjointUnionAxiom) {
	return CONVERTER.convert(owlDisjointUnionAxiom);
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:5,代码来源:OwlClassAxiomConverterVisitor.java

示例12: convert

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
@SuppressWarnings("static-method")
public ElkDisjointUnionAxiom convert(
		OWLDisjointUnionAxiom owlDisjointUnionAxiom) {
	return new ElkDisjointUnionAxiomWrap<OWLDisjointUnionAxiom>(
			owlDisjointUnionAxiom);
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:7,代码来源:OwlConverter.java

示例13: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
@Override
public ElkAxiom visit(OWLDisjointUnionAxiom owlDisjointUnionAxiom) {
	return CONVERTER.convert(owlDisjointUnionAxiom);
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:5,代码来源:OwlAxiomConverterVisitor.java

示例14: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
@Override
public void visit(OWLDisjointUnionAxiom axiom) {
	defaultVisit(axiom);
}
 
开发者ID:liveontologies,项目名称:elk-reasoner,代码行数:5,代码来源:FailingOwlAxiomVisitor.java

示例15: visit

import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom; //导入依赖的package包/类
@Override
public OWLAxiom visit(OWLDisjointUnionAxiom axiom) {
	return factory.getOWLDisjointUnionAxiom(axiom.getOWLClass(), axiom.getClassExpressions(), annotations);
}
 
开发者ID:owlcollab,项目名称:owltools,代码行数:5,代码来源:AxiomAnnotationTools.java


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