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

项目:owlapi-gwt    文件:OWLDisjointObjectPropertiesAxiomImpl.java   
@Override
public Set<OWLDisjointObjectPropertiesAxiom> splitToAnnotatedPairs() {
    List<OWLObjectPropertyExpression> ops = new ArrayList<>(getProperties());
    if (ops.size() == 2) {
        return Collections
                .<OWLDisjointObjectPropertiesAxiom> singleton(this);
    }
    Set<OWLDisjointObjectPropertiesAxiom> result = new HashSet<>();
    for (int i = 0; i < ops.size() - 1; i++) {
        OWLObjectPropertyExpression indI = ops.get(i);
        OWLObjectPropertyExpression indJ = ops.get(i + 1);
        result.add(new OWLDisjointObjectPropertiesAxiomImpl(new HashSet<>(
                Arrays.asList(indI, indJ)), getAnnotations()));
    }
    return result;
}
项目:HermiT-android    文件:OWLNormalization.java   
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
    OWLObjectPropertyExpression[] objectPropertyExpressions=new OWLObjectPropertyExpression[axiom.getProperties().size()];
    axiom.getProperties().toArray(objectPropertyExpressions);
    for (int i=0;i<objectPropertyExpressions.length;i++) {
        objectPropertyExpressions[i]=objectPropertyExpressions[i].getSimplified();
        m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(objectPropertyExpressions[i].getNamedProperty());
    }
    m_axioms.m_disjointObjectProperties.add(objectPropertyExpressions);
}
项目:HermiT-android    文件:EntailmentChecker.java   
public Boolean visit(OWLDisjointObjectPropertiesAxiom axiom) {
    int n=axiom.getProperties().size();
    OWLObjectPropertyExpression[] props=axiom.getProperties().toArray(new OWLObjectPropertyExpression[n]);
    for (int i=0;i<n-1;i++)
        for (int j=i+1;j<n;j++)
            if (!reasoner.isDisjointObjectProperty(props[i],props[j])) return Boolean.FALSE;
    return Boolean.TRUE;
}
项目:elk-reasoner    文件:AbstractElkObjectConverter.java   
@Override
public OWLDisjointObjectPropertiesAxiom visit(
        ElkDisjointObjectPropertiesAxiom axiom) {
    return owlFactory_.getOWLDisjointObjectPropertiesAxiom(
            toObjectPropertyExpressionSet(
                    axiom.getObjectPropertyExpressions()));
}
项目:elk-reasoner    文件:AbstractOwlAxiomConverterVisitor.java   
@Override
public T visit(OWLDisjointObjectPropertiesAxiom axiom) {
    throw new IllegalArgumentException(
            OWLDisjointObjectPropertiesAxiom.class.getSimpleName()
                    + " cannot be converted to "
                    + getTargetClass().getSimpleName());
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
    OWLObjectPropertyExpression[] objectPropertyExpressions=new OWLObjectPropertyExpression[axiom.getProperties().size()];
    axiom.getProperties().toArray(objectPropertyExpressions);
    for (int i=0;i<objectPropertyExpressions.length;i++) {
        objectPropertyExpressions[i]=objectPropertyExpressions[i].getSimplified();
        m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(objectPropertyExpressions[i].getNamedProperty());
    }
    m_axioms.m_disjointObjectProperties.add(objectPropertyExpressions);
}
项目:Hermit_1.3.8_android    文件:EntailmentChecker.java   
public Boolean visit(OWLDisjointObjectPropertiesAxiom axiom) {
    int n=axiom.getProperties().size();
    OWLObjectPropertyExpression[] props=axiom.getProperties().toArray(new OWLObjectPropertyExpression[n]);
    for (int i=0;i<n-1;i++)
        for (int j=i+1;j<n;j++)
            if (!reasoner.isDisjointObjectProperty(props[i],props[j])) return Boolean.FALSE;
    return Boolean.TRUE;
}
项目:Wolpertinger    文件:OWLNormalization.java   
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
    OWLObjectPropertyExpression[] objectPropertyExpressions=new OWLObjectPropertyExpression[axiom.getProperties().size()];
    axiom.getProperties().toArray(objectPropertyExpressions);
    for (int i=0;i<objectPropertyExpressions.length;i++) {
        objectPropertyExpressions[i]=objectPropertyExpressions[i].getSimplified();
        m_axioms.m_objectPropertiesOccurringInOWLAxioms.add(objectPropertyExpressions[i].getNamedProperty());
    }
    m_axioms.m_disjointObjectProperties.add(objectPropertyExpressions);
}
项目:Wolpertinger    文件:DebugTranslation.java   
/**
 * Disjoint Properties are translated into constraints:</br>
 * <code>:- r(X,Y), s(X,Y), ...</code>
 * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom)
 */

public void visit(OWLDisjointObjectPropertiesAxiom disProperties) {
    writer.write("icons " + ASP2CoreSymbols.IMPLICATION);
    writer.write(String.format(" activated(%d), ", nConstraints++));
    String cVar = var.currentVar();
    String nVar = var.nextVariable();

    boolean isFirst=true;
    for (OWLObjectPropertyExpression property : disProperties.getProperties()) {
        String propertyName = mapper.getPredicateName(property.getNamedProperty());

        if (!isFirst) {
            writer.write(ASP2CoreSymbols.CONJUNCTION);

        }
        isFirst = false;
        writer.write(propertyName);
        writer.write(ASP2CoreSymbols.BRACKET_OPEN);
        writer.write(cVar);
        writer.write(ASP2CoreSymbols.ARG_SEPERATOR);
        writer.write(nVar);
        writer.write(ASP2CoreSymbols.BRACKET_CLOSE);
    }

    writer.write(ASP2CoreSymbols.EOR);
}
项目:Wolpertinger    文件:NaiveTranslation.java   
/**
 * Disjoint Properties are translated into constraints:</br>
 * <code>:- r(X,Y), s(X,Y), ...</code>
 * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom)
 */

public void visit(OWLDisjointObjectPropertiesAxiom disProperties) {
    writer.write(ASP2CoreSymbols.IMPLICATION);

    String cVar = var.currentVar();
    String nVar = var.nextVariable();

    boolean isFirst=true;
    for (OWLObjectPropertyExpression property : disProperties.getProperties()) {
        String propertyName = mapper.getPredicateName(property.getNamedProperty());

        if (!isFirst) {
            writer.write(ASP2CoreSymbols.CONJUNCTION);
        }

        isFirst = false;
        writer.write(propertyName);
        writer.write(ASP2CoreSymbols.BRACKET_OPEN);
        writer.write(cVar);
        writer.write(ASP2CoreSymbols.ARG_SEPERATOR);
        writer.write(nVar);
        writer.write(ASP2CoreSymbols.BRACKET_CLOSE);
    }

    writer.write(ASP2CoreSymbols.EOR);
}
项目:OWL2SPARQL    文件:OWLAxiomToSPARQLConverter.java   
@Override
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
    List<OWLObjectPropertyExpression> propertyExpressions = new LinkedList<>(axiom.getProperties());

    for(int i = 0; i < propertyExpressions.size(); i++){
        sparql += "{";
        OWLObjectPropertyExpression pe = propertyExpressions.remove(i);
        if(pe.isAnonymous()){
            sparql += objectVar + "<" + pe.getInverseProperty().asOWLObjectProperty().toStringID() + "> " + subjectVar + " .";
        } else {
            sparql += subjectVar + "<" + pe.asOWLObjectProperty().toStringID() + "> " + objectVar + " .";
        }
        for (OWLObjectPropertyExpression pe2 : propertyExpressions) {
            String pattern;
            if(pe2.isAnonymous()){
                pattern = objectVar + "<" + pe2.getInverseProperty().asOWLObjectProperty().toStringID() + "> " + subjectVar + " .";
            } else {
                pattern = subjectVar + "<" + pe2.asOWLObjectProperty().toStringID() + "> " + objectVar + " .";
            }
            sparql += notExists(pattern);
        }
        propertyExpressions.add(i, pe);
        sparql += "}";
        if(i < propertyExpressions.size()-1){
            sparql += " UNION ";
        }
    }
}
项目:owlapi-gwt    文件:AbstractEntityRegistrationManager.java   
@Override
public void visit(@Nonnull OWLDisjointObjectPropertiesAxiom axiom) {
    for (OWLObjectPropertyExpression prop : axiom.getProperties()) {
        prop.accept(this);
    }
    processAxiomAnnotations(axiom);
}
项目:owlapi-gwt    文件:OWLDisjointObjectPropertiesAxiomImpl.java   
@Nonnull
@Override
public OWLDisjointObjectPropertiesAxiom getAxiomWithoutAnnotations() {
    if (!isAnnotated()) {
        return this;
    }
    return new OWLDisjointObjectPropertiesAxiomImpl(getProperties(),
            NO_ANNOTATIONS);
}
项目:owlapi-gwt    文件:OWLDisjointObjectPropertiesAxiomImpl.java   
@Nonnull
@Override
public OWLDisjointObjectPropertiesAxiom getAnnotatedAxiom(
        @Nonnull Set<OWLAnnotation> annotations) {
    return new OWLDisjointObjectPropertiesAxiomImpl(getProperties(),
            mergeAnnos(annotations));
}
项目:owlapi-gwt    文件:OWLDisjointObjectPropertiesAxiomImpl.java   
@Nonnull
@Override
public Set<OWLDisjointObjectPropertiesAxiom> asPairwiseAxioms() {
    Set<OWLDisjointObjectPropertiesAxiom> result = new HashSet<>();
    List<OWLObjectPropertyExpression> list = new ArrayList<>(
            getProperties());
    for (int i = 0; i < list.size() - 1; i++) {
        for (int j = i + 1; j < list.size(); j++) {
            result.add(new OWLDisjointObjectPropertiesAxiomImpl(
                    new HashSet<>(Arrays.asList(list.get(i), list.get(j))),
                    NO_ANNOTATIONS));
        }
    }
    return result;
}
项目:owlapi-gwt    文件:OWLDisjointObjectPropertiesAxiomImpl.java   
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!super.equals(obj)) {
        return false;
    }
    return obj instanceof OWLDisjointObjectPropertiesAxiom;
}
项目:jopa    文件:IntegrityConstraintParser.java   
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
    notSupported(axiom);
}
项目:HermiT-android    文件:EntailmentChecker.java   
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
}
项目:elk-reasoner    文件:OwlConverter.java   
@SuppressWarnings("static-method")
public ElkDisjointObjectPropertiesAxiom convert(
        OWLDisjointObjectPropertiesAxiom owlDisjointObjectPropertiesAxiom) {
    return new ElkDisjointObjectPropertiesAxiomWrap<OWLDisjointObjectPropertiesAxiom>(
            owlDisjointObjectPropertiesAxiom);
}
项目:elk-reasoner    文件:OwlAxiomConverterVisitor.java   
@Override
public ElkAxiom visit(
        OWLDisjointObjectPropertiesAxiom owlDisjointObjectPropertiesAxiom) {
    return CONVERTER.convert(owlDisjointObjectPropertiesAxiom);
}
项目:elk-reasoner    文件:OwlObjectPropertyAxiomConverterVisitor.java   
@Override
public ElkObjectPropertyAxiom visit(
        OWLDisjointObjectPropertiesAxiom owlDisjointObjectPropertiesAxiom) {
    return CONVERTER.convert(owlDisjointObjectPropertiesAxiom);
}
项目:elk-reasoner    文件:FailingOwlAxiomVisitor.java   
@Override
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
    defaultVisit(axiom);
}
项目:Hermit_1.3.8_android    文件:EntailmentChecker.java   
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
}
项目:owltools    文件:AxiomAnnotationTools.java   
@Override
public OWLAxiom visit(OWLDisjointObjectPropertiesAxiom axiom) {
    return factory.getOWLDisjointObjectPropertiesAxiom(axiom.getProperties(), annotations);
}
项目:owltools    文件:CardinalityContraintsTools.java   
@Override
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
}
项目:born    文件:CycleDetector.java   
@Override
public Boolean visit(OWLDisjointObjectPropertiesAxiom axiom) {
    return true;
}
项目:born    文件:ElAxiomFilter.java   
@Override
public Boolean visit(OWLDisjointObjectPropertiesAxiom axiom) {
    return false;
}
项目:born    文件:AnnotationProcessor.java   
@Override
public Boolean visit(OWLDisjointObjectPropertiesAxiom axiom) {
    Objects.requireNonNull(axiom);
    return add(this.df.getOWLDisjointObjectPropertiesAxiom(axiom.getProperties(), reg(axiom.getAnnotations())));
}
项目:born    文件:AnnotationCreator.java   
@Override
public Boolean visit(OWLDisjointObjectPropertiesAxiom axiom) {
    Objects.requireNonNull(axiom);
    return add(this.df.getOWLDisjointObjectPropertiesAxiom(axiom.getProperties(), empty()));
}
项目:jcel    文件:AxiomTranslator.java   
@Override
public Set<ComplexIntegerAxiom> visit(OWLDisjointObjectPropertiesAxiom axiom) {
    Objects.requireNonNull(axiom);
    throw TranslationException.newUnsupportedAxiomException(axiom);
}
项目:semantika    文件:TMappingProcessor.java   
@Override
public void visit(OWLDisjointObjectPropertiesAxiom axiom)
{
   ignoreOwlAxiom("DisjointObjectProperty", axiom);
}
项目:owlapi-gwt    文件:OWLObjectVisitorExAdapter.java   
@Override
public O visit(OWLDisjointObjectPropertiesAxiom axiom) {
    return doDefault(axiom);
}
项目:owlapi-gwt    文件:OWLObjectTypeIndexProvider.java   
@Override
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
    type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex();
}
项目:owlapi-gwt    文件:NNF.java   
@Override
public OWLAxiom visit(OWLDisjointObjectPropertiesAxiom axiom) {
    return axiom;
}
项目:owlapi-gwt    文件:HashCode.java   
@Override
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
    hashCode = primes[10];
    hashCode = hashCode * MULT + axiom.getProperties().hashCode();
    hashCode = hashCode * MULT + axiom.getAnnotations().hashCode();
}
项目:owlapi-gwt    文件:OWLAxiomVisitorAdapter.java   
@Override
public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
    handleDefault(axiom);
}
项目:SVoNt    文件:PelletOWL2ELProfile.java   
public Object visit(OWLDisjointObjectPropertiesAxiom axiom) {
  profileViolations.add(new UseOfIllegalAxiom(getCurrentOntology(), axiom));
  return null;
}
项目:SVoNt    文件:CEXOWL2ELProfile.java   
public void visit(OWLDisjointObjectPropertiesAxiom arg0) {
    unusedAxiom(arg0);
}
项目:binaryowl    文件:OWLDisjointObjectPropertiesAxiomSerializer.java   
@Override
protected void writeAxiom(OWLDisjointObjectPropertiesAxiom axiom, BinaryOWLOutputStream outputStream) throws IOException {
    outputStream.writeOWLObjects(axiom.getProperties());
}
项目:binaryowl    文件:OWLDisjointObjectPropertiesAxiomSerializer.java   
@Override
protected OWLDisjointObjectPropertiesAxiom readAxiom(BinaryOWLInputStream inputStream, Set<OWLAnnotation> annotations) throws IOException, BinaryOWLParseException {
    Set<OWLObjectPropertyExpression> propertyExpressions = inputStream.readOWLObjects();
    return inputStream.getDataFactory().getOWLDisjointObjectPropertiesAxiom(propertyExpressions, annotations);
}