Interface OutputSerializable

  • All Superinterfaces:
    EntityProvider, Formats, Outputable

    public interface OutputSerializable
    extends Outputable
    Allows this entity to better control the data that is going to be output by allowing it to intercept the entities and return them as whatever objects which should be serialized for output, if you just want to use the internal methods to handle formatting the output then simply use Outputable
    Author:
    Aaron Zeckoski (aaron@caret.cam.ac.uk)
    • Method Detail

      • makeSerializableObject

        Object makeSerializableObject​(EntityReference ref,
                                      Object entity)
        Take the entity and convert it to whatever objects (Map, List, String, etc.) that you want to output, this will be called every time that an entity is about to serialized but only if the type of object matches that of the entities handled by your provider
        Parameters:
        the - entity reference for the current entity
        entity - an object of the type handled by your provider
        Returns:
        the object you want to be serialized