Java 类org.semanticweb.owlapi.model.OWLDisjointUnionAxiom 实例源码

项目:HermiT-android    文件:OWLNormalization.java   
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] });
}
项目:HermiT-android    文件:EntailmentChecker.java   
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));
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
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] });
}
项目:Hermit_1.3.8_android    文件:EntailmentChecker.java   
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));
}
项目:Wolpertinger    文件:OWLNormalization.java   
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] });
}
项目:OWL2SPARQL    文件:OWLAxiomToSPARQLConverter.java   
@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 ";
        }
    }
}
项目:elk-reasoner    文件:AbstractOwlAxiomConverterVisitor.java   
@Override
public T visit(OWLDisjointUnionAxiom axiom) {
    throw new IllegalArgumentException(
            OWLDisjointUnionAxiom.class.getSimpleName()
                    + " cannot be converted to "
                    + getTargetClass().getSimpleName());
}
项目:owlapi-gwt    文件:NNF.java   
@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);
}
项目:owlapi-gwt    文件:HashCode.java   
@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();
}
项目:owlapi-gwt    文件:OWLClassExpressionCollector.java   
@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;
}
项目:owlapi-gwt    文件:AbstractEntityRegistrationManager.java   
@Override
public void visit(@Nonnull OWLDisjointUnionAxiom axiom) {
    axiom.getOWLClass().accept((OWLEntityVisitor) this);
    for (OWLClassExpression desc : axiom.getClassExpressions()) {
        desc.accept(this);
    }
    processAxiomAnnotations(axiom);
}
项目:jopa    文件:IntegrityConstraintParser.java   
public void visit(OWLDisjointUnionAxiom axiom) {
    notSupported(axiom);
}
项目:HermiT-android    文件:EntailmentChecker.java   
public void visit(OWLDisjointUnionAxiom axiom) {
}
项目:elk-reasoner    文件:AbstractElkObjectConverter.java   
@Override
public OWLDisjointUnionAxiom visit(ElkDisjointUnionAxiom axiom) {
    return owlFactory_.getOWLDisjointUnionAxiom(
            convert(axiom.getDefinedClass()),
            toClassExpressionSet(axiom.getClassExpressions()));
}
项目:elk-reasoner    文件:OwlClassAxiomConverterVisitor.java   
@Override
public ElkClassAxiom visit(OWLDisjointUnionAxiom owlDisjointUnionAxiom) {
    return CONVERTER.convert(owlDisjointUnionAxiom);
}
项目:elk-reasoner    文件:OwlConverter.java   
@SuppressWarnings("static-method")
public ElkDisjointUnionAxiom convert(
        OWLDisjointUnionAxiom owlDisjointUnionAxiom) {
    return new ElkDisjointUnionAxiomWrap<OWLDisjointUnionAxiom>(
            owlDisjointUnionAxiom);
}
项目:elk-reasoner    文件:OwlAxiomConverterVisitor.java   
@Override
public ElkAxiom visit(OWLDisjointUnionAxiom owlDisjointUnionAxiom) {
    return CONVERTER.convert(owlDisjointUnionAxiom);
}
项目:elk-reasoner    文件:FailingOwlAxiomVisitor.java   
@Override
public void visit(OWLDisjointUnionAxiom axiom) {
    defaultVisit(axiom);
}
项目:Hermit_1.3.8_android    文件:EntailmentChecker.java   
public void visit(OWLDisjointUnionAxiom axiom) {
}
项目:owltools    文件:AxiomAnnotationTools.java   
@Override
public OWLAxiom visit(OWLDisjointUnionAxiom axiom) {
    return factory.getOWLDisjointUnionAxiom(axiom.getOWLClass(), axiom.getClassExpressions(), annotations);
}
项目:owltools    文件:CardinalityContraintsTools.java   
@Override
public void visit(OWLDisjointUnionAxiom axiom) {
}
项目:Wolpertinger    文件:DebugTranslation.java   
public void visit(OWLDisjointUnionAxiom arg0) {
    throw new IllegalStateException("OWLDisjointUnionAxiom should have been normalized (rewritten) already.");
}
项目:Wolpertinger    文件:NaiveTranslation.java   
public void visit(OWLDisjointUnionAxiom arg0) {
    throw new IllegalStateException("OWLDisjointUnionAxiom should have been normalized (rewritten) already.");
}
项目:born    文件:CycleDetector.java   
@Override
public Boolean visit(OWLDisjointUnionAxiom axiom) {
    return true;
}
项目:born    文件:ElAxiomFilter.java   
@Override
public Boolean visit(OWLDisjointUnionAxiom axiom) {
    return false;
}
项目:born    文件:AnnotationProcessor.java   
@Override
public Boolean visit(OWLDisjointUnionAxiom axiom) {
    Objects.requireNonNull(axiom);
    return add(this.df.getOWLDisjointUnionAxiom(axiom.getOWLClass(), axiom.getClassExpressions(),
            reg(axiom.getAnnotations())));
}
项目:born    文件:AnnotationCreator.java   
@Override
public Boolean visit(OWLDisjointUnionAxiom axiom) {
    Objects.requireNonNull(axiom);
    return add(this.df.getOWLDisjointUnionAxiom(axiom.getOWLClass(), axiom.getClassExpressions(), annot()));
}
项目:jcel    文件:AxiomTranslator.java   
@Override
public Set<ComplexIntegerAxiom> visit(OWLDisjointUnionAxiom axiom) {
    Objects.requireNonNull(axiom);
    throw TranslationException.newUnsupportedAxiomException(axiom);
}
项目:semantika    文件:TMappingProcessor.java   
@Override
public void visit(OWLDisjointUnionAxiom axiom)
{
   ignoreOwlAxiom("DisjointUnion", axiom);
}
项目:owlapi-gwt    文件:OWLObjectVisitorExAdapter.java   
@Override
public O visit(OWLDisjointUnionAxiom axiom) {
    return doDefault(axiom);
}
项目:owlapi-gwt    文件:OWLObjectTypeIndexProvider.java   
@Override
public void visit(OWLDisjointUnionAxiom axiom) {
    type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex();
}
项目:owlapi-gwt    文件:OWLAxiomVisitorAdapter.java   
@Override
public void visit(OWLDisjointUnionAxiom axiom) {
    handleDefault(axiom);
}
项目:SVoNt    文件:PelletOWL2ELProfile.java   
public Object visit(OWLDisjointUnionAxiom axiom) {
  profileViolations.add(new UseOfIllegalAxiom(getCurrentOntology(), axiom));
  return null;
}
项目:SVoNt    文件:CEXOWL2ELProfile.java   
public void visit(OWLDisjointUnionAxiom arg0) {
    unusedAxiom(arg0);
}
项目:binaryowl    文件:OWLDisjointUnionAxiomSerializer.java   
@Override
protected void writeAxiom(OWLDisjointUnionAxiom axiom, BinaryOWLOutputStream outputStream) throws IOException {
    outputStream.writeOWLObject(axiom.getOWLClass());
    outputStream.writeOWLObjects(axiom.getClassExpressions());
}
项目:binaryowl    文件:OWLDisjointUnionAxiomSerializer.java   
@Override
protected OWLDisjointUnionAxiom readAxiom(BinaryOWLInputStream inputStream, Set<OWLAnnotation> annotations) throws IOException, BinaryOWLParseException {
    OWLClass cls = inputStream.readOWLObject();
    Set<OWLClassExpression> classExpressions = inputStream.readOWLObjects();
    return inputStream.getDataFactory().getOWLDisjointUnionAxiom(cls, classExpressions, annotations);
}
项目:logmap-matcher    文件:OWLMappingAxiomVisitor.java   
public void visit(OWLDisjointUnionAxiom arg0) {

}
项目:logmap-matcher    文件:ELAxiomVisitor.java   
public void visit(OWLDisjointUnionAxiom arg0) {

}
项目:Wolpertinger    文件:NiceAxiomPrinter.java   
public void visit(OWLDisjointUnionAxiom arg0) {
    // TODO Auto-generated method stub

}
项目:Wolpertinger    文件:DirectTranslation.java   
public void visit(OWLDisjointUnionAxiom arg0) {
    // TODO Auto-generated method stub

}