Class AccJsonFragmentBody

All Implemented Interfaces:
AccJson, AccJsonNode, AccJsonObjectLike

public class AccJsonFragmentBody extends AccJsonObjectLikeBase
An accumulator for a set of fields.
  • Constructor Details

    • AccJsonFragmentBody

      public AccJsonFragmentBody()
      Should not be used directly; use AggJsonEdge as the builder
    • AccJsonFragmentBody

      protected AccJsonFragmentBody(Map<org.apache.jena.graph.Node,Integer> fieldIdToIndex, AccJsonEdge[] edgeAccs)
  • Method Details

    • of

      public static AccJsonFragmentBody of(Map<org.apache.jena.graph.Node,Integer> fieldIdToIndex, AccJsonEdge[] edgeAccs)
      Create a new instance and set it as the parent on all the property accumulators
    • begin

      public void begin(org.apache.jena.graph.Node source, AccContextRdf context, boolean skipOutput) throws IOException
      Description copied from interface: AccJson
      Start accumulation based on a given node in the underlying graph. Calls cannot be nested.
      Specified by:
      begin in interface AccJson
      Overrides:
      begin in class AccJsonBase
      Parameters:
      source - The source node to which the next incoming edge(s) will connect to
      context - The context which holds the JSON serializers
      skipOutput - When output should be disabled (used e.g. to skip over lists of items where just one was expected)
      Throws:
      IOException
    • transition

      public AccJson transition(org.apache.jena.graph.Triple input, AccContextRdf context) throws IOException
      Description copied from interface: AccJson
      Process an edge. Based on the given edge, this accumulator attempts to transition to another AccJson instance and return it. If there is no valid transition then this method returns null.
      Throws:
      IOException
    • end

      public void end(AccContextRdf context) throws IOException
      Description copied from interface: AccJson
      End the accumulator's current node
      Specified by:
      end in interface AccJson
      Overrides:
      end in class AccJsonBase
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object