public class RDFGraph extends Object implements Serializable
Constructor and Description |
---|
RDFGraph() |
Modifier and Type | Method and Description |
---|---|
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() |
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 false
public void addTriple(RDFTriple triple)
triple
- triple to addpublic Collection<RDFTriple> getTriplesForSubject(RDFNode subject)
subject
- subjectpublic void forceIdOutput()
public Set<RDFResourceBlankNode> getRootAnonymousNodes()
public void dumpTriples(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()
Copyright © 2020 The University of Manchester. All rights reserved.