@Service(value=SerializingProvider.class) public class RdfJsonSerializingProvider extends Object implements SerializingProvider
SerializingProvider
for
rdf/json.
This implementation is based on first sorting the triples within the parsed
TripleCollection
based on the subject
.
The serialization is done on a subject scope. Meaning that all triples for a
subject are serialized and instantly written to the provided
OutputStream
.
'UFT-8' is used as encoding to write the data.
Modifier and Type | Field and Description |
---|---|
static Comparator<Triple> |
SUBJECT_COMPARATOR
Compares only the subjects of the triples.
|
Constructor and Description |
---|
RdfJsonSerializingProvider() |
Modifier and Type | Method and Description |
---|---|
void |
serialize(OutputStream serializedGraph,
TripleCollection tc,
String formatIdentifier)
Serializes a
TripleCollection to a specified
OutputStream in the format identified by
formatIdentifier . |
public static final Comparator<Triple> SUBJECT_COMPARATOR
0
is returned. This will ensure that all triples with the
same subjects are sorted correctly. However it does not sort predicates
and objects!public void serialize(OutputStream serializedGraph, TripleCollection tc, String formatIdentifier)
SerializingProvider
TripleCollection
to a specified
OutputStream
in the format identified by
formatIdentifier
. This method will be invoked
for a supported format, a format is considered as supported if the part
before a ';'-character in the formatIdentifier
matches
a SupportedFormat
annotation of the implementing class.serialize
in interface SerializingProvider
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.