@Service(value=SerializingProvider.class) public class StableSerializerProvider extends Object implements SerializingProvider
SerializingProvider
that tries
to provide similar results when serializing graphs. Specifically it tries to
label blank nodes deterministically with reasonable complexity.
This serializer does not guarantee a deterministic result but it may minimize
the amount of modified lines in serialized output.Modifier and Type | Field and Description |
---|---|
static String |
MAX_LABELING_ITERATIONS |
Constructor and Description |
---|
StableSerializerProvider() |
Modifier and Type | Method and Description |
---|---|
protected void |
activate(org.osgi.service.component.ComponentContext cCtx) |
void |
serialize(OutputStream os,
TripleCollection tc,
String formatIdentifier)
Serializes a
TripleCollection to a specified
OutputStream in the format identified by
formatIdentifier . |
@Property(description="Specifies maximum amount of blank nodes labeling recursions, may increase performance at the expense of stability (0 = no limit).", intValue=0) public static final String MAX_LABELING_ITERATIONS
protected void activate(org.osgi.service.component.ComponentContext cCtx)
public void serialize(OutputStream os, 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.