Package com.stardog.stark.io.binary
Class BinaryRDFWriter
- java.lang.Object
-
- com.stardog.stark.io.binary.BinaryRDFWriter
-
- All Implemented Interfaces:
BinaryRDFConstants
,RDFHandler
,RDFWriter
public final class BinaryRDFWriter extends java.lang.Object implements RDFWriter, BinaryRDFConstants
Writer
for RDF in a binary format- Since:
- 1.0
- Version:
- 6.1.2
- Author:
- Jeen Broekstra, Michael Grove
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BinaryRDFWriter.BinaryRDFWriterFactory
-
Field Summary
-
Fields inherited from interface com.stardog.stark.io.binary.BinaryRDFConstants
BNODE_VALUE, COMMENT, DATATYPE_LITERAL_VALUE, EMBEDDED_QUAD, EMBEDDED_TRIPLE, END_OF_DATA, FORMAT_VERSION, LANG_LITERAL_VALUE, MAGIC_NUMBER, NAMESPACE_DECL, NULL_VALUE, PLAIN_LITERAL_VALUE, QUAD, TRIPLE, URI_VALUE, VALUE_DECL, VALUE_REF
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
comment(java.lang.String theComment)
Write a comment to the output.void
end()
Signals the writing process is completed.RDFFormat
format()
Theformat
this writer will serialize output in.void
handle(Statement st)
Write the givenStatement
void
namespace(java.lang.String thePrefix, java.lang.String theIRI)
Provide a namespace to the writer.void
start()
Signals that the RDF writing process is starting.
-
-
-
Method Detail
-
start
public void start()
Signals that the RDF writing process is starting.- Specified by:
start
in interfaceRDFHandler
- Specified by:
start
in interfaceRDFWriter
-
end
public void end()
Signals the writing process is completed. The underlyingInputStream
is *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:
end
in interfaceRDFHandler
- Specified by:
end
in interfaceRDFWriter
-
namespace
public void namespace(@Nonnull java.lang.String thePrefix, @Nonnull java.lang.String theIRI)
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:
namespace
in interfaceRDFHandler
- Specified by:
namespace
in interfaceRDFWriter
- Parameters:
thePrefix
- the namespace prefixtheIRI
- the associated IRI
-
comment
public void comment(@Nonnull java.lang.String theComment)
Write a comment to the output. Writing need not bestarted
at this point; comments can be written prior to any actual serialized RDF
-
-