Package org.semanticweb.owlapi.rdf.model
Class RDFGraph
java.lang.Object
org.semanticweb.owlapi.rdf.model.RDFGraph
- All Implemented Interfaces:
Serializable
- Since:
- 2.0.0
- Author:
- Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
void
void
Ensure ids are output for reused individuals and annotated expressions.getRootIRIs
(OWLEntity toSkip) getTriplesForSubject
(RDFNode subject) boolean
isEmpty()
Determines if this graph is empty (i.e.void
setOntology
(RDFResource mappedNode) toString()
-
Constructor Details
-
RDFGraph
public RDFGraph()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Determines if this graph is empty (i.e. whether or not it contains any triples).- Returns:
true
if the graph contains triples, otherwisefalse
- Since:
- 3.5
-
addTriple
- Parameters:
triple
- triple to add
-
getTriplesForSubject
- Parameters:
subject
- subject- Returns:
- sorted triples
-
forceIdOutput
public void forceIdOutput()Ensure ids are output for reused individuals and annotated expressions. -
getRootAnonymousNodes
- Returns:
- root anonymous nodes
-
dumpTriples
- Parameters:
w
- writer to write to- Throws:
IOException
- if exceptions happen
-
getAllTriples
- Returns:
- all triples in an unmodifiable set
-
toString
-
getSubjectsForObject
- Parameters:
node
- node to search- Returns:
- list of subjects of triples that include the object
-
setOntology
- Parameters:
mappedNode
- ontology node
-
getOntology
- Returns:
- ontology node
-
addRootIRIs
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. To render all triples, a1 and a2 must be rendered; usual process would render only a1, and so a3 would be lost.- Parameters:
i
- root IRI for this graph
-
getRootIRIs
- Parameters:
toSkip
- entity to skip- Returns:
- root entities, minus the one to be skipped, sorted
-