/** * @param entities entity set where entities will be added * @return the modified input entities */ default Set<OWLEntity> addSignatureEntitiesToSet(Set<OWLEntity> entities) { accept(new OWLEntityCollector(entities)); return entities; }
/** * Returns the entities referenced in an axiom. * * @param axiom axiom whose signature is being computed * @return the entities referenced in the axiom */ private static Set<OWLEntity> getSignature(OWLAxiom axiom) { Set<OWLEntity> toReturn = new HashSet<>(); OWLEntityCollector collector = new OWLEntityCollector(toReturn); axiom.accept(collector); return toReturn; }
/** * @param entities entity set where entities will be added * @return the modified input entities */ default Set<OWLEntity> addSignatureEntitiesToSet(Set<OWLEntity> entities) { accept(new OWLEntityCollector(entities)); return entities; }
/** * @param entities entity set where entities will be added * @return the modified input entities */ default Set<OWLEntity> addSignatureEntitiesToSet(Set<OWLEntity> entities) { accept(new OWLEntityCollector(entities)); return entities; }
/** * Returns the entities referenced in an axiom. * * @param axiom axiom whose signature is being computed * @return the entities referenced in the axiom */ private static Set<OWLEntity> getSignature(OWLAxiom axiom) { Set<OWLEntity> toReturn = new HashSet<>(); OWLEntityCollector collector = new OWLEntityCollector(toReturn); axiom.accept(collector); return toReturn; }
/** * @param entities entity set where entities will be added * @return the modified input entities */ default Set<OWLEntity> addSignatureEntitiesToSet(Set<OWLEntity> entities) { accept(new OWLEntityCollector(entities)); return entities; }
/** * Returns the entities referenced in an axiom. * * @param axiom axiom whose signature is being computed * @return the entities referenced in the axiom */ private static Set<OWLEntity> getSignature(OWLAxiom axiom) { Set<OWLEntity> toReturn = new HashSet<>(); OWLEntityCollector collector = new OWLEntityCollector(toReturn); axiom.accept(collector); return toReturn; }
public HSTExplanationGenerator(TransactionAwareSingleExpGen singleExplanationGenerator) { this.singleExplanationGenerator = singleExplanationGenerator; collector = new OWLEntityCollector(); collector.setCollectDatatypes(false); }
public UnmatchedSourceAxiomImpl(OWLAxiom axiom) { this.axiom = axiom; referencedUnmatchedEntities = new HashSet<OWLEntity>(); referencedUnmatchedAnonymousIndividuals = new HashSet<OWLAnonymousIndividual>(); OWLEntityCollector collector = new OWLEntityCollector(referencedUnmatchedEntities, referencedUnmatchedAnonymousIndividuals); axiom.accept(collector); }
/** * Returns the entities referenced in an axiom. * * @param axiom axiom whose signature is being computed * @return the entities referenced in the axiom */ private static Set<OWLEntity> getSignature(OWLAxiom axiom) { Set<OWLEntity> toReturn = new HashSet<>(); OWLEntityCollector collector = new OWLEntityCollector(toReturn); axiom.accept(collector); return toReturn; }
public Set<OWLEntity> getSignature() { if (signature == null) { Set<OWLEntity> sig = new HashSet<OWLEntity>(); OWLEntityCollector collector = new OWLEntityCollector(); accept(collector); sig.addAll(collector.getObjects()); signature = new HashSet<OWLEntity>(sig); } return Collections.unmodifiableSet(signature); }
/** * Given a set of OWL-API axiom, return its signature. */ public static Set<OWLEntity> getSignature(OWLAxiom axiom) { Set<OWLEntity> entities = new HashSet<OWLEntity>(); OWLEntityCollector collector = new OWLEntityCollector(entities); collector.setCollectDatatypes( false ); axiom.accept(collector); return entities; }
public Set<OWLEntity> getReferencedEntities() { OWLEntityCollector collector = new OWLEntityCollector(); this.accept(collector); return collector.getObjects(); }
/** * A convenience method that obtains the entities which are * referenced in the axiom contained within this change. * @return A <code>Set</code> of entities which are referenced * by the axiom contained within this change. */ public Set<OWLEntity> getEntities() { OWLEntityCollector collector = new OWLEntityCollector(); axiom.accept(collector); return collector.getObjects(); } }
private void createMap() { for (OWLAxiom ax : axioms) { OWLAxiomPartExtractor extractor = new OWLAxiomPartExtractor(); ax.accept(extractor); Set<OWLEntity> lhscollected = new HashSet<>(); OWLEntityCollector lhsCollector = new OWLEntityCollector(lhscollected); extractor.getLHS().forEach(l -> l.accept(lhsCollector)); lhscollected.forEach(l -> axiomsByLHS.put(l, ax)); } buildChildren(desc); }
private void createMap() { for (OWLAxiom ax : axioms) { OWLAxiomPartExtractor extractor = new OWLAxiomPartExtractor(); ax.accept(extractor); Set<OWLEntity> lhscollected = new HashSet<>(); OWLEntityCollector lhsCollector = new OWLEntityCollector(lhscollected); extractor.getLHS().forEach(l -> l.accept(lhsCollector)); lhscollected.forEach(l -> axiomsByLHS.put(l, ax)); } buildChildren(desc); }
private void indexAxiomsByRHSEntities(OWLObject rhs, OWLAxiom axiom) { OWLEntityCollector collector = new OWLEntityCollector(); rhs.accept(collector); getIndexedSet(axiom, entitiesByAxiomRHS, true).addAll(collector.getObjects()); }
private void createMap() { for (OWLAxiom ax : axioms) { OWLAxiomPartExtractor extractor = new OWLAxiomPartExtractor(); ax.accept(extractor); Set<OWLEntity> lhscollected = new HashSet<>(); OWLEntityCollector lhsCollector = new OWLEntityCollector(lhscollected); extractor.getLHS().forEach(l -> l.accept(lhsCollector)); lhscollected.forEach(l -> axiomsByLHS.put(l, ax)); } buildChildren(desc); }
private void createMap() { for (OWLAxiom ax : axioms) { OWLAxiomPartExtractor extractor = new OWLAxiomPartExtractor(); ax.accept(extractor); Set<OWLEntity> lhscollected = new HashSet<>(); OWLEntityCollector lhsCollector = new OWLEntityCollector(lhscollected); extractor.getLHS().forEach(l -> l.accept(lhsCollector)); lhscollected.forEach(l -> axiomsByLHS.put(l, ax)); } buildChildren(desc); }
private void buildChildren(OWLClassExpression seed) { // Return the axioms that have the entity on the LHS OWLEntityCollector collector = new OWLEntityCollector(); seed.accept(collector); Set<OWLAxiom> result = new HashSet<OWLAxiom>(); for (OWLEntity ent : collector.getObjects()) { Set<OWLAxiom> axs = getAxiomsByLHS(ent); for (OWLAxiom ax : axs) { result.add(ax); usedAxioms.add(ax); } } rootAxioms.addAll(result); buildChildren(result); }