Class Serializer

java.lang.Object
org.apache.jena.sys.Serializer

public class Serializer extends Object
The injection points for the Node and Triple Serializable process. This class is public to allow system initialization to inject handler functions for Node and Triple. See also Quad.
  • Constructor Details

    • Serializer

      public Serializer()
  • Method Details

    • setNodeSerializer

      public static void setNodeSerializer(Function<Node,Object> writeReplaceFunction)
      Set the node serializer replacement function. This is a function called by Node.writeReplace during the Serializable process. The return is an object used in place of Node for the serialization.
       ANY-ACCESS-MODIFIER Object writeReplace() throws ObjectStreamException;
       

      The returned object must provide

       ANY-ACCESS-MODIFIER Object readResolve() throws ObjectStreamException;
       

      where "Object" is a Node.

      See Also:
    • getNodeSerializer

      public static Function<Node,Object> getNodeSerializer()
      Return the current node serializer replacement function.
    • setTripleSerializer

      public static void setTripleSerializer(Function<Triple,Object> writeReplaceFunction)
      Set the triple serializer replacement function. This is a function called by Triple.writeReplace during the Serializable process. The return is an object used in place of Triple for the serialization.
       ANY-ACCESS-MODIFIER Object writeReplace() throws ObjectStreamException;
       

      The returned object must provide

       ANY-ACCESS-MODIFIER Object readResolve() throws ObjectStreamException;
       

      where "Object" is a Triple.

      See Also:
    • getTripleSerializer

      public static Function<Triple,Object> getTripleSerializer()
      Return the current triple serializer replacement function.