|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fuberlin.wiwiss.ng4j.impl.NamedGraphSetIO
public abstract class NamedGraphSetIO
Abstract NamedGraphSet implementation providing implementations for
NamedGraphSet's various read and write methods.
| Constructor Summary | |
|---|---|
NamedGraphSetIO()
|
|
| Method Summary | |
|---|---|
void |
read(InputStream source,
String lang,
String baseURI)
Read Named Graphs from an InputStream into the NamedGraphSet. |
void |
read(Reader source,
String lang,
String baseURI)
Read Named Graphs from a Reader into the NamedGraphSet. |
void |
read(String url,
String lang)
Read Named Graphs from an URL into the NamedGraphSet. |
void |
write(OutputStream out,
String lang,
String baseURI)
Writes a serialized represention of the NamedGraphSet to an OutputStream. |
void |
write(Writer out,
String lang,
String baseURI)
Writes a serialized represention of the NamedGraphSet to a Writer. |
| 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 |
|---|
addGraph, addQuad, asJenaGraph, asJenaModel, clear, close, containsGraph, containsGraph, containsQuad, countGraphs, countQuads, createGraph, createGraph, findQuads, findQuads, getGraph, getGraph, isEmpty, listGraphs, removeGraph, removeGraph, removeQuad |
| Constructor Detail |
|---|
public NamedGraphSetIO()
| Method Detail |
|---|
public void read(InputStream source,
String lang,
String baseURI)
NamedGraphSetSerialization languages that support named graphs (like TriX) will take the graph name(s) from the serialization. Other languages will take the base URI as the name of the graph.
If some of the graph names from the source are already used in the NamedGraphSet, then the statements from the old graphs will be replaced by those from the source.
read in interface NamedGraphSetsource - The source of the input serializationlang - The RDF serialization language of the inputbaseURI - The URI from where the input was read
public void read(Reader source,
String lang,
String baseURI)
NamedGraphSetSerialization languages that support named graphs (like TriX) will take the graph name(s) from the serialization. Other languages will take the base URI as the name of the graph.
If some of the graph names from the source are already used in the NamedGraphSet, then the statements from the old graphs will be replaced by those from the source.
read in interface NamedGraphSetsource - The source of the input serializationlang - The RDF serialization language of the inputbaseURI - The URI from where the input was read
public void read(String url,
String lang)
NamedGraphSetSerialization languages that support named graphs (like TriX) will take the graph name(s) from the serialization. Other languages will take the URL as the name of the graph.
If some of the graph names from the source are already used in the NamedGraphSet, then the statements from the old graphs will be replaced by those from the source.
read in interface NamedGraphSeturl - The source of the input serializationlang - The RDF serialization language of the input
public void write(OutputStream out,
String lang,
String baseURI)
NamedGraphSetIf the specified serialization language doesn't support named graphs, then the union graph will be serialized, and knowledge about the graph name of each statement is lost. Only TriX supports named graphs.
The serialization will be UTF-8 encoded. There is currently no way to select a different encoding.
write in interface NamedGraphSetout - The stream into which the serialization will be writtenlang - The RDF serialization language to be usedbaseURI - The base URI of the output file, or null if don't care
public void write(Writer out,
String lang,
String baseURI)
NamedGraphSetIf the specified serialization language doesn't support named graphs, then the union graph will be serialized, and knowledge about the graph name of each statement is lost. Only TriX supports named graphs.
Note that this method might generate wrong results if the Writer
is translated to bytes using anything but the system's default
encoding. For this reason, NamedGraphSet.write(OutputStream, String, String)
should be used if possible.
write in interface NamedGraphSetout - The stream into which the serialization will be writtenlang - The RDF serialization language to be usedbaseURI - The base URI of the output file, or null if don't care
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||