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

项目:logmap-matcher    文件:StructuralReasoner2.java   
public Node<OWLNamedIndividual> getSameIndividuals(OWLNamedIndividual ind) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException {
    ensurePrepared();
    Set<OWLNamedIndividual> inds = new HashSet<OWLNamedIndividual>();
    Set<OWLSameIndividualAxiom> processed = new HashSet<OWLSameIndividualAxiom>();
    List<OWLNamedIndividual> stack = new ArrayList<OWLNamedIndividual>();
    stack.add(ind);
    while (!stack.isEmpty()) {
        OWLNamedIndividual currentInd = stack.remove(0);
        for (OWLOntology ontology : getRootOntology().getImportsClosure()) {
            for (OWLSameIndividualAxiom axiom : ontology.getSameIndividualAxioms(currentInd)) {
                if (!processed.contains(axiom)) {
                    processed.add(axiom);
                    for (OWLIndividual i : axiom.getIndividuals()) {
                        if (!i.isAnonymous()) {
                            OWLNamedIndividual namedInd = i.asOWLNamedIndividual();
                            if (!inds.contains(namedInd)) {
                                inds.add(namedInd);
                                stack.add(namedInd);
                            }
                        }
                    }
                }
            }
        }
    }

    return new OWLNamedIndividualNode(inds);
}
项目:elk-reasoner    文件:AbstractOwlAxiomConverterVisitor.java   
@Override
public T visit(OWLSameIndividualAxiom axiom) {
    throw new IllegalArgumentException(
            OWLSameIndividualAxiom.class.getSimpleName()
                    + " cannot be converted to "
                    + getTargetClass().getSimpleName());
}
项目:jcel    文件:AxiomTranslator.java   
@Override
public Set<ComplexIntegerAxiom> visit(OWLSameIndividualAxiom axiom) {
    Objects.requireNonNull(axiom);
    Set<OWLIndividual> individualSet = axiom.getIndividuals();
    Set<Integer> individualIdSet = new HashSet<>();
    individualSet.forEach(individual -> individualIdSet.add(translateIndividual(individual)));
    ComplexIntegerAxiom ret = getAxiomFactory().createSameIndividualAxiom(individualIdSet,
            translateAnnotations(axiom.getAnnotations()));
    return Collections.singleton(ret);
}
项目:SciGraph    文件:GraphOwlVisitor.java   
@Override
public Void visit(OWLSameIndividualAxiom axiom) {
  List<Long> nodes = transform(axiom.getIndividualsAsList(), new Function<OWLIndividual, Long>() {
    @Override
    public Long apply(OWLIndividual individual) {
      return getOrCreateNode(getIri(individual));
    }
  });
  getOrCreateRelationshipPairwise(nodes, OwlRelationships.OWL_SAME_AS);
  return null;
}
项目:owlapi-gwt    文件:AbstractEntityRegistrationManager.java   
@Override
public void visit(@Nonnull OWLSameIndividualAxiom axiom) {
    for (OWLIndividual ind : axiom.getIndividuals()) {
        ind.accept(this);
    }
    processAxiomAnnotations(axiom);
}
项目:owlapi-gwt    文件:OWLSameIndividualAxiomImpl.java   
@Override
public OWLSameIndividualAxiom getAxiomWithoutAnnotations() {
    if (!isAnnotated()) {
        return this;
    }
    return new OWLSameIndividualAxiomImpl(getIndividuals(), NO_ANNOTATIONS);
}
项目:owlapi-gwt    文件:OWLSameIndividualAxiomImpl.java   
@Override
public Set<OWLSameIndividualAxiom> asPairwiseAxioms() {
    List<OWLIndividual> inds = getIndividualsAsList();
    Set<OWLSameIndividualAxiom> result = new HashSet<>();
    for (int i = 0; i < inds.size() - 1; i++) {
        OWLIndividual indI = inds.get(i);
        OWLIndividual indJ = inds.get(i + 1);
        result.add(new OWLSameIndividualAxiomImpl(new HashSet<>(Arrays
                .asList(indI, indJ)), NO_ANNOTATIONS));
    }
    return result;
}
项目:owlapi-gwt    文件:OWLSameIndividualAxiomImpl.java   
@Override
public Set<OWLSameIndividualAxiom> splitToAnnotatedPairs() {
    List<OWLIndividual> individuals = getIndividualsAsList();
    if (individuals.size() == 2) {
        return Collections.<OWLSameIndividualAxiom> singleton(this);
    }
    Set<OWLSameIndividualAxiom> result = new HashSet<>();
    for (int i = 0; i < individuals.size() - 1; i++) {
        OWLIndividual indI = individuals.get(i);
        OWLIndividual indJ = individuals.get(i + 1);
        result.add(new OWLSameIndividualAxiomImpl(new HashSet<>(Arrays
                .asList(indI, indJ)), getAnnotations()));
    }
    return result;
}
项目:owlapi-gwt    文件:OWLSameIndividualAxiomImpl.java   
@Override
public boolean equals(Object obj) {
    if (this == obj) {
        return true;
    }
    if (!super.equals(obj)) {
        return false;
    }
    return obj instanceof OWLSameIndividualAxiom;
}
项目:jopa    文件:IntegrityConstraintParser.java   
public void visit(OWLSameIndividualAxiom axiom) {
    notSupported(axiom);
}
项目:HermiT-android    文件:BuiltInPropertyManager.java   
public void visit(OWLSameIndividualAxiom object) {
}
项目:HermiT-android    文件:OWLNormalization.java   
public void visit(OWLSameIndividualAxiom axiom) {
    if (axiom.containsAnonymousIndividuals())
        throw new IllegalArgumentException("The axiom "+axiom+" contains anonymous individuals, which is not allowed in OWL 2. ");
    addFact(axiom);
}
项目:HermiT-android    文件:OWLClausification.java   
public void visit(OWLSameIndividualAxiom object) {
    OWLIndividual[] individuals=new OWLIndividual[object.getIndividuals().size()];
    object.getIndividuals().toArray(individuals);
    for (int i=0;i<individuals.length-1;i++)
        m_positiveFacts.add(Atom.create(Equality.create(),getIndividual(individuals[i]),getIndividual(individuals[i+1])));
}
项目:HermiT-android    文件:ReducedABoxOnlyClausification.java   
public void visit(OWLSameIndividualAxiom object) {
    OWLIndividual[] individuals=new OWLIndividual[object.getIndividuals().size()];
    object.getIndividuals().toArray(individuals);
    for (int i=0;i<individuals.length-1;i++)
        m_positiveFacts.add(Atom.create(Equality.create(),getIndividual(individuals[i]),getIndividual(individuals[i+1])));
}
项目:HermiT-android    文件:EntailmentChecker.java   
public void visit(OWLSameIndividualAxiom axiom) {
}
项目:elk-reasoner    文件:AbstractElkObjectConverter.java   
@Override
public OWLSameIndividualAxiom visit(ElkSameIndividualAxiom axiom) {
    return owlFactory_.getOWLSameIndividualAxiom(
            toIndividualSet(axiom.getIndividuals()));
}
项目:elk-reasoner    文件:OwlConverter.java   
@SuppressWarnings("static-method")
public ElkSameIndividualAxiom convert(
        OWLSameIndividualAxiom owlSameIndividualAxiom) {
    return new ElkSameIndividualAxiomWrap<OWLSameIndividualAxiom>(
            owlSameIndividualAxiom);
}
项目:elk-reasoner    文件:OwlAxiomConverterVisitor.java   
@Override
public ElkAxiom visit(OWLSameIndividualAxiom axiom) {
    return CONVERTER.convert(axiom);
}
项目:elk-reasoner    文件:OwlIndividualAxiomConverterVisitor.java   
@Override
public ElkAssertionAxiom visit(OWLSameIndividualAxiom axiom) {
    return CONVERTER.convert(axiom);
}
项目:elk-reasoner    文件:FailingOwlAxiomVisitor.java   
@Override
public void visit(OWLSameIndividualAxiom axiom) {
    defaultVisit(axiom);
}
项目:Hermit_1.3.8_android    文件:BuiltInPropertyManager.java   
public void visit(OWLSameIndividualAxiom object) {
}
项目:Hermit_1.3.8_android    文件:OWLNormalization.java   
public void visit(OWLSameIndividualAxiom axiom) {
    if (axiom.containsAnonymousIndividuals())
        throw new IllegalArgumentException("The axiom "+axiom+" contains anonymous individuals, which is not allowed in OWL 2. ");
    addFact(axiom);
}
项目:Hermit_1.3.8_android    文件:OWLClausification.java   
public void visit(OWLSameIndividualAxiom object) {
    OWLIndividual[] individuals=new OWLIndividual[object.getIndividuals().size()];
    object.getIndividuals().toArray(individuals);
    for (int i=0;i<individuals.length-1;i++)
        m_positiveFacts.add(Atom.create(Equality.create(),getIndividual(individuals[i]),getIndividual(individuals[i+1])));
}
项目:Hermit_1.3.8_android    文件:ReducedABoxOnlyClausification.java   
public void visit(OWLSameIndividualAxiom object) {
    OWLIndividual[] individuals=new OWLIndividual[object.getIndividuals().size()];
    object.getIndividuals().toArray(individuals);
    for (int i=0;i<individuals.length-1;i++)
        m_positiveFacts.add(Atom.create(Equality.create(),getIndividual(individuals[i]),getIndividual(individuals[i+1])));
}
项目:Hermit_1.3.8_android    文件:EntailmentChecker.java   
public void visit(OWLSameIndividualAxiom axiom) {
}
项目:owltools    文件:AxiomAnnotationTools.java   
@Override
public OWLAxiom visit(OWLSameIndividualAxiom axiom) {
    return factory.getOWLSameIndividualAxiom(axiom.getIndividuals(), annotations);
}
项目:owltools    文件:CardinalityContraintsTools.java   
@Override
public void visit(OWLSameIndividualAxiom axiom) {
}
项目:Wolpertinger    文件:OWLNormalization.java   
public void visit(OWLSameIndividualAxiom axiom) {
    if (axiom.containsAnonymousIndividuals())
        throw new IllegalArgumentException("The axiom "+axiom+" contains anonymous individuals, which is not allowed in OWL 2. ");
    addFact(axiom);
}
项目:born    文件:CycleDetector.java   
@Override
public Boolean visit(OWLSameIndividualAxiom axiom) {
    return true;
}
项目:born    文件:ElAxiomFilter.java   
@Override
public Boolean visit(OWLSameIndividualAxiom axiom) {
    return false;
}
项目:born    文件:AnnotationProcessor.java   
@Override
public Boolean visit(OWLSameIndividualAxiom axiom) {
    Objects.requireNonNull(axiom);
    return add(this.df.getOWLSameIndividualAxiom(axiom.getIndividuals(), reg(axiom.getAnnotations())));
}
项目:born    文件:AnnotationCreator.java   
@Override
public Boolean visit(OWLSameIndividualAxiom axiom) {
    Objects.requireNonNull(axiom);
    return add(this.df.getOWLSameIndividualAxiom(axiom.getIndividuals(), empty()));
}
项目:semantika    文件:TMappingProcessor.java   
@Override
public void visit(OWLSameIndividualAxiom axiom)
{
   ignoreOwlAxiom("SameIndividual", axiom);
}
项目:OWL2SPARQL    文件:OWLAxiomToSPARQLConverter.java   
@Override
public void visit(OWLSameIndividualAxiom axiom) {
    aBoxAxiomsNotSupportedWarning(axiom);
}
项目:owlapi-gwt    文件:OWLObjectVisitorExAdapter.java   
@Override
public O visit(OWLSameIndividualAxiom axiom) {
    return doDefault(axiom);
}
项目:owlapi-gwt    文件:OWLObjectTypeIndexProvider.java   
@Override
public void visit(OWLSameIndividualAxiom axiom) {
    type = AXIOM_TYPE_INDEX_BASE + axiom.getAxiomType().getIndex();
}
项目:owlapi-gwt    文件:NNF.java   
@Override
public OWLAxiom visit(OWLSameIndividualAxiom axiom) {
    return axiom;
}
项目:owlapi-gwt    文件:HashCode.java   
@Override
public void visit(OWLSameIndividualAxiom axiom) {
    hashCode = primes[29];
    hashCode = hashCode * MULT + axiom.getIndividuals().hashCode();
    hashCode = hashCode * MULT + axiom.getAnnotations().hashCode();
}
项目:owlapi-gwt    文件:OWLAxiomVisitorAdapter.java   
@Override
public void visit(OWLSameIndividualAxiom axiom) {
    handleDefault(axiom);
}
项目:owlapi-gwt    文件:OWLSameIndividualAxiomImpl.java   
@Override
public OWLSameIndividualAxiom getAnnotatedAxiom(
        Set<OWLAnnotation> annotations) {
    return new OWLSameIndividualAxiomImpl(getIndividuals(),
            mergeAnnos(annotations));
}