Package org.apache.jena.graph.impl
Class SimpleGraphMaker
- java.lang.Object
-
- org.apache.jena.graph.impl.BaseGraphMaker
-
- org.apache.jena.graph.impl.SimpleGraphMaker
-
- All Implemented Interfaces:
GraphMaker
public class SimpleGraphMaker extends BaseGraphMaker
A SimpleGraphFactory produces memory-based graphs and records them in a local map.
-
-
Constructor Summary
Constructors Constructor Description SimpleGraphMaker()
Initialise a SimpleGraphMaker with reification style Minimal
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close this factory - we choose to do nothing.Graph
create()
Graph
createGraph(java.lang.String name, boolean strict)
Create a graph and record it with the given name in the local map.boolean
hasGraph(java.lang.String name)
Return true iff we have a graph with the given nameExtendedIterator<java.lang.String>
listGraphs()
Answer an [extended] iterator where each element is the name of a graph in the maker, and the complete sequence exhausts the set of names.Graph
openGraph()
Answer the default graph of this GraphMaker, if it has one.Graph
openGraph(java.lang.String name, boolean strict)
Open (aka find) a graph with the given name in the local map.void
removeGraph(java.lang.String name)
Remove the mapping from name to any graph from the local map.-
Methods inherited from class org.apache.jena.graph.impl.BaseGraphMaker
createGraph, createGraph, getGraph, openGraph
-
-
-
-
Method Detail
-
create
public Graph create()
-
createGraph
public Graph createGraph(java.lang.String name, boolean strict)
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
public Graph openGraph(java.lang.String name, boolean strict)
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
public Graph openGraph()
Description copied from interface:GraphMaker
Answer the default graph of this GraphMaker, if it has one. If not, throw an exception.- Specified by:
openGraph
in interfaceGraphMaker
- Overrides:
openGraph
in classBaseGraphMaker
-
removeGraph
public void removeGraph(java.lang.String name)
Remove the mapping from name to any graph from the local map.- Parameters:
name
- the name to disassociate
-
hasGraph
public boolean hasGraph(java.lang.String name)
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
public ExtendedIterator<java.lang.String> listGraphs()
Description copied from interface:GraphMaker
Answer 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.
-
-