public final class ProtoProvenanceSerialization extends Object implements ProvenanceSerialization
Uses Base64 to encode and decode binary protobufs into and out of Strings if requested, though it
is preferable to use protobuf's built-in text format.
| Constructor and Description |
|---|
ProtoProvenanceSerialization(boolean textFormat)
Construct a ProtoProvenanceSerialization.
|
| Modifier and Type | Method and Description |
|---|---|
List<ObjectMarshalledProvenance> |
deserializeFromFile(Path path) |
List<ObjectMarshalledProvenance> |
deserializeFromProto(RootProvenanceProto proto)
Deserialize the marshalled provenances from the supplied protobuf.
|
List<ObjectMarshalledProvenance> |
deserializeFromString(String input) |
String |
getFileExtension() |
void |
serializeToFile(List<ObjectMarshalledProvenance> marshalledProvenances,
Path path) |
RootProvenanceProto |
serializeToProto(List<ObjectMarshalledProvenance> marshalledProvenances)
Serialize the marshalled provenances into a protobuf.
|
String |
serializeToString(List<ObjectMarshalledProvenance> marshalledProvenances) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeserializeAndUnmarshal, deserializeAndUnmarshal, marshalAndSerialize, marshalAndSerializepublic ProtoProvenanceSerialization(boolean textFormat)
textFormat - Output a pbtxt.public String getFileExtension()
getFileExtension in interface ProvenanceSerializationpublic List<ObjectMarshalledProvenance> deserializeFromFile(Path path) throws IOException
deserializeFromFile in interface ProvenanceSerializationIOExceptionpublic List<ObjectMarshalledProvenance> deserializeFromString(String input)
deserializeFromString in interface ProvenanceSerializationpublic List<ObjectMarshalledProvenance> deserializeFromProto(RootProvenanceProto proto)
proto - The protobuf to deserialize.public RootProvenanceProto serializeToProto(List<ObjectMarshalledProvenance> marshalledProvenances)
marshalledProvenances - The provenances to serialize.public String serializeToString(List<ObjectMarshalledProvenance> marshalledProvenances)
serializeToString in interface ProvenanceSerializationpublic void serializeToFile(List<ObjectMarshalledProvenance> marshalledProvenances, Path path) throws IOException
serializeToFile in interface ProvenanceSerializationIOExceptionCopyright © 2022. All rights reserved.