Package org.tribuo.protos


package org.tribuo.protos
Classes which control the serialization of Tribuo objects to and from protocol buffers.

There is an automatic serialization mechanism which requires the fields to be annotated with ProtoSerializableField and similar. The enclosing class must implement ProtoSerializable and be annotated with ProtoSerializableClass. This mechanism can serialize:

  • primitive types
  • Strings
  • classes which implement ProtoSerializable
  • lists, sets and maps of supported types

Maps may be serialized in multiple ways, as protobuf does not support the full set of map type parameters that Java does. The variants are:

  • Class
    Description
    ProtoSerializable<T extends com.google.protobuf.Message>
    Interface for serializing an implementing object to the specified protobuf.
    Mark a class as being ProtoSerializable and specify the class type used to serialize the "serialized_data".
    Annotation which denotes that a field should be part of the protobuf serialized representation.
    Annotation which denotes that the map field this is applied to is serialized as two repeated fields, one for keys and one for values.
    Annotation which denotes that a map field should be part of the protobuf serialized representation.
    Annotation which denotes that the map field this is applied to is serialized as a list of values.
    Utilities for working with Tribuo protobufs.