|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fuberlin.wiwiss.ng4j.impl.NamedGraphSetIO de.fuberlin.wiwiss.ng4j.impl.NamedGraphSetBase de.fuberlin.wiwiss.ng4j.sparql.ARQNamedGraphSet
public class ARQNamedGraphSet
Wraps an ARQ DataSource into the NamedGraphSet interface.
Note: The DataSource's default graph is not visible through the NamedGraphSet interface. Only the named graphs are exposed.
The asJenaGraph(Node)
and asJenaModel(String)
methods are not implemented.
Useful to read and write TriX and TriG from DataSources.
Constructor Summary | |
---|---|
ARQNamedGraphSet(com.hp.hpl.jena.query.DataSource source)
|
Method Summary | |
---|---|
void |
addGraph(NamedGraph graph)
Adds a NamedGraph to the set. |
Graph |
asJenaGraph(Node defaultGraphForAdding)
Returns the union graph of the NamedGraphSet. |
NamedGraphModel |
asJenaModel(String defaultGraphForAdding)
Returns a Jena Model view on the NamedGraphSet, equivalent to the union graph of all graphs in the graph set. |
void |
clear()
Deletes all NamedGraphs from the set. |
void |
close()
Closes the NamedGraphSet and frees up resources held. |
boolean |
containsGraph(Node graphName)
Tells wether the NamedGraphSet contains a NamedGraph. |
boolean |
containsGraph(String graphNameURI)
Tells wether the NamedGraphSet contains a NamedGraph. |
long |
countGraphs()
Returns the number of NamedGraphs in the set. |
NamedGraph |
createGraph(Node graphName)
Creates a new NamedGraph and adds it to the set. |
NamedGraph |
createGraph(String graphNameURI)
Creates a new NamedGraph and adds it to the set. |
NamedGraph |
getGraph(Node graphName)
Returns the NamedGraph with a specific name from the GraphSet. |
NamedGraph |
getGraph(String graphNameURI)
Returns the NamedGraph with a specific name from the GraphSet. |
boolean |
isEmpty()
Tells wether the set contains any NamedGraphs. |
Iterator |
listGraphs()
Returns an iterator over all NamedGraph s in the set. |
void |
removeGraph(Node graphName)
Removes a NamedGraph from the set. |
void |
removeGraph(String graphNameURI)
Removes the NamedGraph with a specific name. |
Methods inherited from class de.fuberlin.wiwiss.ng4j.impl.NamedGraphSetBase |
---|
addQuad, containsQuad, countQuads, findQuads, findQuads, removeQuad |
Methods inherited from class de.fuberlin.wiwiss.ng4j.impl.NamedGraphSetIO |
---|
read, read, read, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.fuberlin.wiwiss.ng4j.NamedGraphSet |
---|
read, read, read, write, write |
Constructor Detail |
---|
public ARQNamedGraphSet(com.hp.hpl.jena.query.DataSource source)
Method Detail |
---|
public NamedGraph getGraph(String graphNameURI)
NamedGraphSet
graphNameURI
- The name of the NamedGraph to be returned
public NamedGraph getGraph(Node graphName)
NamedGraphSet
graphName
- The name of the NamedGraph to be returned
public void addGraph(NamedGraph graph)
NamedGraphSet
graph
- The NamedGraph to be addedpublic void removeGraph(Node graphName)
NamedGraphSet
graphName
- The name of the NamedGraph to be removedpublic void removeGraph(String graphNameURI)
NamedGraphSet
graphNameURI
- The name of the NamedGraph to be removedpublic boolean containsGraph(Node graphName)
NamedGraphSet
graphName
- The name of a NamedGraph
public boolean containsGraph(String graphNameURI)
NamedGraphSet
graphNameURI
- The name of a NamedGraph
public NamedGraph createGraph(Node graphName)
NamedGraphSet
graphName
- The name of the NamedGraph to be created;
must be an URI node
public NamedGraph createGraph(String graphNameURI)
NamedGraphSet
graphNameURI
- The name of the NamedGraph to be created;
must be an URI
public long countGraphs()
NamedGraphSet
public Iterator listGraphs()
NamedGraphSet
NamedGraph
s in the set.
public Graph asJenaGraph(Node defaultGraphForAdding)
NamedGraphSet
Add operations to the union graph are all written to the default graph specified as the argument.
Delete operations remove the triple from all NamedGraphs.
defaultGraphForAdding
- The name of the default graph used for
adding triples; must be an URI
public NamedGraphModel asJenaModel(String defaultGraphForAdding)
NamedGraphSet
Add operations on the returned model are all written to the default graph.
Read and write operations one the returned
model have the behaviour of NamedGraphSet.read(String, String)
and
NamedGraphSet.write(OutputStream, String, String)
.
All Statements returned by the NamedGraphModel can be casted to
NamedGraphStatement
to access information about the graphs
they are contained in.
defaultGraphForAdding
- The name of the default graph used for
adding triples; must be an URI
public void clear()
NamedGraphSet
public void close()
NamedGraphSet
public boolean isEmpty()
NamedGraphSet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |