public class RDFGraph extends Object implements Serializable
| Constructor and Description |
|---|
RDFGraph() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRootIRIs(OWLEntity i)
Some graphs have multiple root entities, i.e., sameAs(a1, a2, a3) axioms are turned to
(a1 sameAs a2), (a2 sameAs a3) because of RDF limitations. |
void |
addTriple(RDFTriple triple) |
void |
dumpTriples(Writer w) |
void |
forceIdOutput()
Ensure ids are output for reused individuals and annotated expressions.
|
Set<RDFTriple> |
getAllTriples() |
RDFResource |
getOntology() |
Set<RDFResourceBlankNode> |
getRootAnonymousNodes() |
Stream<OWLEntity> |
getRootIRIs(OWLEntity toSkip) |
List<RDFResource> |
getSubjectsForObject(RDFResource node) |
Collection<RDFTriple> |
getTriplesForSubject(RDFNode subject) |
boolean |
isEmpty()
Determines if this graph is empty (i.e.
|
void |
setOntology(RDFResource mappedNode) |
String |
toString() |
public boolean isEmpty()
true if the graph contains triples, otherwise falsepublic Collection<RDFTriple> getTriplesForSubject(RDFNode subject)
subject - subjectpublic void forceIdOutput()
@Nonnull public Set<RDFResourceBlankNode> getRootAnonymousNodes()
public void dumpTriples(@Nonnull Writer w) throws IOException
w - writer to write toIOException - if exceptions happenpublic List<RDFResource> getSubjectsForObject(RDFResource node)
node - node to searchpublic void setOntology(@Nullable RDFResource mappedNode)
mappedNode - ontology node@Nullable public RDFResource getOntology()
public void addRootIRIs(OWLEntity i)
(a1 sameAs a2), (a2 sameAs a3) because of RDF limitations. To render all triples, a1
and a2 must be rendered; usual process would render only a1, and so a3 would be lost.i - root IRI for this graphCopyright © 2022 The University of Manchester. All rights reserved.