/** * Records an annotation of an anonymous node (either an annotation of an annotation, or an * annotation of an axiom for example). * * @param annotatedAnonSource The source that the annotation annotates * @param annotationMainNode The annotations */ public void addAnnotatedSource(IRI annotatedAnonSource, IRI annotationMainNode) { annotatedAnonSource2AnnotationMap .computeIfAbsent(annotatedAnonSource, x -> createLinkedSet()).add(annotationMainNode); }
/** * Records an annotation of an anonymous node (either an annotation of an annotation, or an * annotation of an axiom for example). * * @param annotatedAnonSource The source that the annotation annotates * @param annotationMainNode The annotations */ public void addAnnotatedSource(IRI annotatedAnonSource, IRI annotationMainNode) { annotatedAnonSource2AnnotationMap .computeIfAbsent(annotatedAnonSource, x -> createLinkedSet()).add(annotationMainNode); }
/** * Records an annotation of an anonymous node (either an annotation of an annotation, or an * annotation of an axiom for example). * * @param annotatedAnonSource The source that the annotation annotates * @param annotationMainNode The annotations */ public void addAnnotatedSource(IRI annotatedAnonSource, IRI annotationMainNode) { annotatedAnonSource2AnnotationMap .computeIfAbsent(annotatedAnonSource, x -> createLinkedSet()).add(annotationMainNode); }
/** * Records an annotation of an anonymous node (either an annotation of an annotation, or an * annotation of an axiom for example). * * @param annotatedAnonSource The source that the annotation annotates * @param annotationMainNode The annotations */ public void addAnnotatedSource(IRI annotatedAnonSource, IRI annotationMainNode) { annotatedAnonSource2AnnotationMap .computeIfAbsent(annotatedAnonSource, x -> createLinkedSet()).add(annotationMainNode); }
protected void addTriple(IRI subject, IRI predicate, OWLLiteral con) { Map<IRI, OWLLiteral> subjObjMap = singleValuedLitTriplesByPredicate.get(predicate); if (subjObjMap != null) { subjObjMap.put(subject, con); } else { litTriplesBySubject.computeIfAbsent(subject, x -> createMap()) .computeIfAbsent(predicate, x -> createLinkedSet()).add(con); } } }
protected void addTriple(IRI subject, IRI predicate, IRI object) { Map<IRI, IRI> subjObjMap = singleValuedResTriplesByPredicate.get(predicate); if (subjObjMap != null) { subjObjMap.put(subject, object); } else { resTriplesBySubject.computeIfAbsent(subject, x -> createMap()) .computeIfAbsent(predicate, x -> createLinkedSet()).add(object); } }
protected void addTriple(IRI subject, IRI predicate, IRI object) { Map<IRI, IRI> subjObjMap = singleValuedResTriplesByPredicate.get(predicate); if (subjObjMap != null) { subjObjMap.put(subject, object); } else { resTriplesBySubject.computeIfAbsent(subject, x -> createMap()) .computeIfAbsent(predicate, x -> createLinkedSet()).add(object); } }
/** * Gets the predicates by subject. * * @param subject the subject * @return the predicates by subject */ protected Set<IRI> getPredicatesBySubject(IRI subject) { Set<IRI> iris = createLinkedSet(); Map<IRI, Collection<IRI>> predObjMap = resTriplesBySubject.get(subject); if (predObjMap != null) { iris.addAll(predObjMap.keySet()); } Map<IRI, Collection<OWLLiteral>> predObjMapLit = litTriplesBySubject.get(subject); if (predObjMapLit != null) { iris.addAll(predObjMapLit.keySet()); } return iris; }
protected void addTriple(IRI subject, IRI predicate, OWLLiteral con) { Map<IRI, OWLLiteral> subjObjMap = singleValuedLitTriplesByPredicate.get(predicate); if (subjObjMap != null) { subjObjMap.put(subject, con); } else { litTriplesBySubject.computeIfAbsent(subject, x -> createMap()) .computeIfAbsent(predicate, x -> createLinkedSet()).add(con); } } }
protected void addTriple(IRI subject, IRI predicate, IRI object) { Map<IRI, IRI> subjObjMap = singleValuedResTriplesByPredicate.get(predicate); if (subjObjMap != null) { subjObjMap.put(subject, object); } else { resTriplesBySubject.computeIfAbsent(subject, x -> createMap()) .computeIfAbsent(predicate, x -> createLinkedSet()).add(object); } }
protected void addTriple(IRI subject, IRI predicate, OWLLiteral con) { Map<IRI, OWLLiteral> subjObjMap = singleValuedLitTriplesByPredicate.get(predicate); if (subjObjMap != null) { subjObjMap.put(subject, con); } else { litTriplesBySubject.computeIfAbsent(subject, x -> createMap()) .computeIfAbsent(predicate, x -> createLinkedSet()).add(con); } } }
protected void addTriple(IRI subject, IRI predicate, IRI object) { Map<IRI, IRI> subjObjMap = singleValuedResTriplesByPredicate.get(predicate); if (subjObjMap != null) { subjObjMap.put(subject, object); } else { resTriplesBySubject.computeIfAbsent(subject, x -> createMap()) .computeIfAbsent(predicate, x -> createLinkedSet()).add(object); } }
protected void addTriple(IRI subject, IRI predicate, OWLLiteral con) { Map<IRI, OWLLiteral> subjObjMap = singleValuedLitTriplesByPredicate.get(predicate); if (subjObjMap != null) { subjObjMap.put(subject, con); } else { litTriplesBySubject.computeIfAbsent(subject, x -> createMap()) .computeIfAbsent(predicate, x -> createLinkedSet()).add(con); } } }
/** * A convenience method. Although anonymous individuals are not entities * they are collected by this collector and stored in a separate set. This * method returns collected individuals. Deprecated: if the non deprecated * constructors are used, this method is useless and inefficient * * @return The set of anonymous individuals that were collected by the collector */ @Deprecated public Set<OWLAnonymousIndividual> getAnonymousIndividuals() { if (anonymousIndividuals == null) { return CollectionFactory.createLinkedSet(); } return CollectionFactory.createSet(verifyNotNull(anonymousIndividuals)); }
/** * A convenience method. Although anonymous individuals are not entities * they are collected by this collector and stored in a separate set. This * method returns collected individuals. Deprecated: if the non deprecated * constructors are used, this method is useless and inefficient * * @return The set of anonymous individuals that were collected by the collector */ @Deprecated public Set<OWLAnonymousIndividual> getAnonymousIndividuals() { if (anonymousIndividuals == null) { return CollectionFactory.createLinkedSet(); } return CollectionFactory.createSet(verifyNotNull(anonymousIndividuals)); }
/** * A convenience method. Although anonymous individuals are not entities * they are collected by this collector and stored in a separate set. This * method returns collected individuals. Deprecated: if the non deprecated * constructors are used, this method is useless and inefficient * * @return The set of anonymous individuals that were collected by the collector */ @Deprecated public Set<OWLAnonymousIndividual> getAnonymousIndividuals() { if (anonymousIndividuals == null) { return CollectionFactory.createLinkedSet(); } return CollectionFactory.createSet(verifyNotNull(anonymousIndividuals)); }
private Set<RDFTriple> getTriplesForMainNode(IRI n, IRI... augmentingTypes) { Set<RDFTriple> triples = createLinkedSet(); getPredicatesBySubject(n).forEach(p -> { getResourceObjects(n, p).forEach(o -> triples.add(getRDFTriple(n, p, o))); getLiteralObjects(n, p).forEach(object -> triples.add(getRDFTriple(n, p, object))); }); Stream.of(augmentingTypes).forEach(t -> triples.add(getRDFTriple(n, RDF_TYPE.getIRI(), t))); return triples; }
private Set<RDFTriple> getTriplesForMainNode(IRI n, IRI... augmentingTypes) { Set<RDFTriple> triples = createLinkedSet(); getPredicatesBySubject(n).forEach(p -> { getResourceObjects(n, p).forEach(o -> triples.add(getRDFTriple(n, p, o))); getLiteralObjects(n, p).forEach(object -> triples.add(getRDFTriple(n, p, object))); }); Stream.of(augmentingTypes).forEach(t -> triples.add(getRDFTriple(n, RDF_TYPE.getIRI(), t))); return triples; }
private Set<RDFTriple> getTriplesForMainNode(IRI n, IRI... augmentingTypes) { Set<RDFTriple> triples = createLinkedSet(); getPredicatesBySubject(n).forEach(p -> { getResourceObjects(n, p).forEach(o -> triples.add(getRDFTriple(n, p, o))); getLiteralObjects(n, p).forEach(object -> triples.add(getRDFTriple(n, p, object))); }); Stream.of(augmentingTypes).forEach(t -> triples.add(getRDFTriple(n, RDF_TYPE.getIRI(), t))); return triples; }
private Set<RDFTriple> getTriplesForMainNode(IRI n, IRI... augmentingTypes) { Set<RDFTriple> triples = createLinkedSet(); getPredicatesBySubject(n).forEach(p -> { getResourceObjects(n, p).forEach(o -> triples.add(getRDFTriple(n, p, o))); getLiteralObjects(n, p).forEach(object -> triples.add(getRDFTriple(n, p, object))); }); Stream.of(augmentingTypes).forEach(t -> triples.add(getRDFTriple(n, RDF_TYPE.getIRI(), t))); return triples; }