Package com.stardog.stark.io.binary
Class BinaryRDFWriter
java.lang.Object
com.stardog.stark.io.binary.BinaryRDFWriter
- All Implemented Interfaces:
BinaryRDFConstants,RDFHandler,RDFWriter
Writer for RDF in a binary format
- Since:
- 1.0
- Version:
- 6.1.2
- Author:
- Jeen Broekstra, Michael Grove
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionBuffer size for output stream.Maximum number of value IDs that needs to be remembered during writing and parsingFields inherited from interface com.stardog.stark.io.binary.BinaryRDFConstants
BNODE_VALUE, COMMENT, DATATYPE_LITERAL_VALUE, EMBEDDED_QUAD, EMBEDDED_TRIPLE, END_OF_DATA, FORMAT_VERSION, FORMAT_VERSION_UTF8, LANG_LITERAL_VALUE, LONG_STRING_MARKER, MAGIC_NUMBER, NAMESPACE_DECL, NULL_VALUE, PLAIN_LITERAL_VALUE, QUAD, TRIPLE, URI_VALUE, VALUE_DECL, VALUE_REF -
Method Summary
Modifier and TypeMethodDescriptionvoidWrite a comment to the output.voidend()Signals the writing process is completed.format()Theformatthis writer will serialize output in.voidWrite the givenStatementvoidProvide a namespace to the writer.voidstart()Signals that the RDF writing process is starting.
-
Field Details
-
MAX_HIST_SIZE
Maximum number of value IDs that needs to be remembered during writing and parsing -
MAX_BUF_SIZE
Buffer size for output stream. Set to 0 to disable buffering.
-
-
Method Details
-
format
Theformatthis writer will serialize output in. -
start
public void start()Signals that the RDF writing process is starting.- Specified by:
startin interfaceRDFHandler- Specified by:
startin interfaceRDFWriter
-
end
public void end()Signals the writing process is completed. The underlyingInputStreamis *not* closed, but the caller should not call additional methods on this writer as that will normally yield syntax errors in the output.- Specified by:
endin interfaceRDFHandler- Specified by:
endin interfaceRDFWriter
-
namespace
Provide a namespace to the writer. This method can be called before writing hasstarted, in which case, the namespace bindings are buffered and written when appropriate after writing has begun.- Specified by:
namespacein interfaceRDFHandler- Specified by:
namespacein interfaceRDFWriter- Parameters:
thePrefix- the namespace prefixtheIRI- the associated IRI
-
comment
Write a comment to the output. Writing need not bestartedat this point; comments can be written prior to any actual serialized RDF -
handle
Write the givenStatement- Specified by:
handlein interfaceRDFHandler- Specified by:
handlein interfaceRDFWriter- Parameters:
st- the statement to write
-