Interface ElementHandler

All Known Implementing Classes:
AbstractElementHandler

public interface ElementHandler
Interface for handling import and export of table data using xml
Author:
Low Heng Sin
  • Method Details

    • startElement

      void startElement(PIPOContext ctx, Element element) throws SAXException
      Handle start of xml element ( import ).
      Parameters:
      ctx -
      element -
      Throws:
      SAXException
    • endElement

      void endElement(PIPOContext ctx, Element element) throws SAXException
      Handle closing of xml element ( import ).
      Parameters:
      ctx -
      element -
      Throws:
      SAXException
    • packOut

      void packOut(PackOut packout, IPackSerializer packoutSerializer, TransformerHandler docHandler, int recordId) throws Exception
      Export a record using the provided format-agnostic serializer.
      Parameters:
      packout -
      packoutSerializer - format-agnostic record writer (XML, JSON, or YAML)
      docHandler - SAX handler for the human-readable doc file (always XML (a no-op discard handler is passed for non-XML formats))
      recordId -
      Throws:
      Exception
    • packOut

      default void packOut(PackOut packout, IPackSerializer packoutSerializer, TransformerHandler docHandler, int recordId, String uuid) throws Exception
      Export a record identified by UUID (default delegates to id-based method).
      Parameters:
      packout -
      packoutSerializer - format-agnostic record writer
      docHandler - SAX handler for the doc file (always XML (a no-op discard handler is passed for non-XML formats))
      recordId -
      uuid -
      Throws:
      Exception