java.lang.Object
org.apache.jena.ontology.models.BaseGraphMaker
org.apache.jena.ontology.models.SimpleGraphMaker
- All Implemented Interfaces:
GraphMaker
A SimpleGraphFactory produces memory-based graphs and records them
in a local map.
-
Constructor Summary
ConstructorsConstructorDescriptionInitialise a SimpleGraphMaker with reification style Minimal -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this factory - we choose to do nothing.create()createGraph(String name, boolean strict) Create a graph and record it with the given name in the local map.booleanReturn true iff we have a graph with the given nameAnswer an [extended] iterator where each element is the name of a graph in the maker, and the complete sequence exhausts the set of names.Answer the default graph of this GraphMaker, if it has one.Open (aka find) a graph with the given name in the local map.voidremoveGraph(String name) Remove the mapping from name to any graph from the local map.Methods inherited from class org.apache.jena.ontology.models.BaseGraphMaker
createGraph, createGraph, getGraph, openGraph
-
Constructor Details
-
SimpleGraphMaker
public SimpleGraphMaker()Initialise a SimpleGraphMaker with reification style Minimal
-
-
Method Details
-
create
-
createGraph
Create a graph and record it with the given name in the local map.- Parameters:
name- the name to give to the new graphstrict- true to cause existing bindings to throw an exception
-
openGraph
Open (aka find) a graph with the given name in the local map.- Parameters:
name- the name of the graph to find and returnstrict- false to create a new one if one doesn't already exist
-
openGraph
Description copied from interface:GraphMakerAnswer the default graph of this GraphMaker, if it has one. If not, throw an exception.- Specified by:
openGraphin interfaceGraphMaker- Overrides:
openGraphin classBaseGraphMaker
-
removeGraph
Remove the mapping from name to any graph from the local map.- Parameters:
name- the name to disassociate
-
hasGraph
Return true iff we have a graph with the given name- Parameters:
name- the name of the graph to look for- Returns:
- true iff there's a graph with that name
-
close
public void close()Close this factory - we choose to do nothing. -
listGraphs
Description copied from interface:GraphMakerAnswer an [extended] iterator where each element is the name of a graph in the maker, and the complete sequence exhausts the set of names. No particular order is expected from the list.- Returns:
- an extended iterator over the names of graphs known to this Maker.
-