private boolean add(final ATermAppl r1, final ATermAppl r2, final ATermAppl superRole) { MultiValueMap<ATermAppl, ATermAppl> innerMap = _binaryRoleInclusions.get(r1); if (innerMap == null) { innerMap = new MultiValueMap<>(); _binaryRoleInclusions.put(r1, innerMap); } return innerMap.add(r2, superRole); }
private boolean add(final ATermAppl r1, final ATermAppl r2, final ATermAppl superRole) { MultiValueMap<ATermAppl, ATermAppl> innerMap = _binaryRoleInclusions.get(r1); if (innerMap == null) { innerMap = new MultiValueMap<>(); _binaryRoleInclusions.put(r1, innerMap); } return innerMap.add(r2, superRole); }
/** * Reads information about the modules from the input stream that has the information stored in a form of ontology. * * @param inputStream the input stream from which the ontology should be read * @return the read information about the modules * @throws IOException if an error occurs during the read process. */ public static MultiValueMap<OWLEntity, OWLEntity> loadModules(final InputStream is) throws IOException { final MultiValueMap<OWLEntity, OWLEntity> modules = new MultiValueMap<>(); final LineNumberReader lnr = new LineNumberReader(new InputStreamReader(is)); while (readModule(lnr, modules)) { // nothing to do } return modules; } }
/** * Reads information about the modules from the input stream that has the information stored in a form of ontology. * * @param inputStream the input stream from which the ontology should be read * @return the read information about the modules * @throws IOException if an error occurs during the read process. */ public static MultiValueMap<OWLEntity, OWLEntity> loadModules(final InputStream is) throws IOException { final MultiValueMap<OWLEntity, OWLEntity> modules = new MultiValueMap<>(); final LineNumberReader lnr = new LineNumberReader(new InputStreamReader(is)); while (readModule(lnr, modules)) { // nothing to do } return modules; } }
public void resetModules() { // _cache the axiom signatures processAdditions(); _additions.clear(); // no need to consider _deletions for initial module extraction _deletions.clear(); _changes.clear(); _nonLocalAxioms = false; _modules = new MultiValueMap<>(); }
public void resetModules() { // _cache the axiom signatures processAdditions(); _additions.clear(); // no need to consider _deletions for initial module extraction _deletions.clear(); _changes.clear(); _nonLocalAxioms = false; _modules = new MultiValueMap<>(); }
public ConceptInfo(final ATermAppl c, final boolean storeSuccessors, final boolean noTriggers) { _concept = c; _successors = storeSuccessors ? new MultiValueMap<>() : null; _predecessors.clear(); _triggers = noTriggers ? null : SetUtils.create(); }
public ConceptInfo(final ATermAppl c, final boolean storeSuccessors, final boolean noTriggers) { _concept = c; _successors = storeSuccessors ? new MultiValueMap<>() : null; _predecessors.clear(); _triggers = noTriggers ? null : SetUtils.create(); }
/** * Extract modules from scratch * * @return */ @Override public MultiValueMap<OWLEntity, OWLEntity> extractModules() { final Optional<Timer> timer = _timers.startTimer("extractModules"); // _cache the axiom signatures processAdditions(); _additions.clear(); // no need to consider _deletions for initial module extraction _deletions.clear(); _changes.clear(); _nonLocalAxioms = false; _modules = new MultiValueMap<>(); extractModuleSignatures(_entityAxioms.keySet()); timer.ifPresent(t -> t.stop()); return _modules; }
/** * Extract modules from scratch * * @return */ @Override public MultiValueMap<OWLEntity, OWLEntity> extractModules() { final Optional<Timer> timer = _timers.startTimer("extractModules"); // _cache the axiom signatures processAdditions(); _additions.clear(); // no need to consider _deletions for initial module extraction _deletions.clear(); _changes.clear(); _nonLocalAxioms = false; _modules = new MultiValueMap<>(); extractModuleSignatures(_entityAxioms.keySet()); timer.ifPresent(t -> t.stop()); return _modules; }
protected MultiValueMap<ATermAppl, ATermAppl> getSubsumptions(final Graph graph) { final MultiValueMap<ATermAppl, ATermAppl> subsumers = new MultiValueMap<>(); final ExtendedIterator<?> it = graph.find(Node.ANY, PRED_SUB, Node.ANY); while (it.hasNext()) { final Triple tri = (Triple) it.next(); final Node sub = tri.getSubject(); final Node sup = tri.getObject(); if (NameStore.isAnon(sub) || NameStore.isAnon(sup)) continue; subsumers.add(toATermAppl(sub), toATermAppl(sup)); } it.close(); return subsumers; }
protected MultiValueMap<ATermAppl, ATermAppl> getSubsumptions(final Graph graph) { final MultiValueMap<ATermAppl, ATermAppl> subsumers = new MultiValueMap<>(); final ExtendedIterator<?> it = graph.find(Node.ANY, PRED_SUB, Node.ANY); while (it.hasNext()) { final Triple tri = (Triple) it.next(); final Node sub = tri.getSubject(); final Node sup = tri.getObject(); if (NameStore.isAnon(sub) || NameStore.isAnon(sup)) continue; subsumers.add(toATermAppl(sub), toATermAppl(sup)); } it.close(); return subsumers; }
protected MultiValueMap<ATermAppl, ATermAppl> getSubsumptions(final Graph graph) { final MultiValueMap<ATermAppl, ATermAppl> subsumers = new MultiValueMap<>(); final ExtendedIterator<?> it = graph.find(Node.ANY, PRED_SUB, Node.ANY); while (it.hasNext()) { final Triple tri = (Triple) it.next(); final Node sub = tri.getSubject(); final Node sup = tri.getObject(); if (NameStore.isAnon(sub) || NameStore.isAnon(sup)) continue; subsumers.add(toATermAppl(sub), toATermAppl(sup)); } it.close(); return subsumers; }
protected MultiValueMap<OWLEntity, OWLAxiom> _entityAxioms = new MultiValueMap<>();
protected MultiValueMap<OWLEntity, OWLAxiom> _entityAxioms = new MultiValueMap<>();
private static MultiValueMap<ATermAppl, Role> collectNeighbors(final CachedNode ind) { final MultiValueMap<ATermAppl, Role> neighbors = new MultiValueMap<>(); for (final Edge edge : ind.getInEdges()) { final Role role = edge.getRole(); final ATermAppl neighbor = edge.getFromName(); if (!ATermUtils.isBnode(neighbor)) neighbors.putSingle(neighbor, role); } for (final Edge edge : ind.getOutEdges()) { final Role role = edge.getRole(); final ATermAppl neighbor = edge.getToName(); if (role.isObjectRole() && !ATermUtils.isBnode(neighbor)) neighbors.putSingle(neighbor, role.getInverse()); } return neighbors; }
private static MultiValueMap<ATermAppl, Role> collectNeighbors(final CachedNode ind) { final MultiValueMap<ATermAppl, Role> neighbors = new MultiValueMap<>(); for (final Edge edge : ind.getInEdges()) { final Role role = edge.getRole(); final ATermAppl neighbor = edge.getFromName(); if (!ATermUtils.isBnode(neighbor)) neighbors.putSingle(neighbor, role); } for (final Edge edge : ind.getOutEdges()) { final Role role = edge.getRole(); final ATermAppl neighbor = edge.getToName(); if (role.isObjectRole() && !ATermUtils.isBnode(neighbor)) neighbors.putSingle(neighbor, role.getInverse()); } return neighbors; }