Class PdfPipelineInput

All Implemented Interfaces:
DataExceptionContributor, JsonSerializable, RecordSerializable, XmlSerializable, DataReaderFactory, JavaCodeGenerator, Serializable

public class PdfPipelineInput extends FileSourcePipelineInput
A pipeline input that reads a table from a PDF in a FileSource using a PdfReader.
See Also:
  • Constructor Details

    • PdfPipelineInput

      public PdfPipelineInput()
  • Method Details

    • getName

      public String getName()
      Description copied from class: PipelineInput
      Returns a display name for this input, such as the source's name followed by its format.
      Overrides:
      getName in class FileSourcePipelineInput
    • getFileSource

      public FileSource getFileSource()
      Specified by:
      getFileSource in class FileSourcePipelineInput
    • setFileSource

      public PdfPipelineInput setFileSource(FileSource fileSource)
      Specified by:
      setFileSource in class FileSourcePipelineInput
    • createDataReader

      public DataReader createDataReader()
    • isFieldNamesInFirstRow

      public boolean isFieldNamesInFirstRow()
      Indicates if the table's first row holds the field names instead of data (default is false).
    • setFieldNamesInFirstRow

      public PdfPipelineInput setFieldNamesInFirstRow(boolean fieldNamesInFirstRow)
      Indicates if the table's first row holds the field names instead of data (default is false).
    • getTableIndex

      public int getTableIndex()
      Returns the 0-based index, counted across the whole document, of the table to read (default is 0).
    • setTableIndex

      public PdfPipelineInput setTableIndex(int tableIndex)
      Sets the 0-based index, counted across the whole document, of the table to read (default is 0).
    • getPassword

      public String getPassword()
      Returns the password used to open the PDF or null for none; it is serialized as plain text.
    • setPassword

      public PdfPipelineInput setPassword(String password)
      Sets the password used to open the PDF or null for none; it is serialized as plain text.
    • isLineageSupported

      public boolean isLineageSupported()
      Description copied from class: PipelineInput
      Indicates if this input can save data lineage on the records it reads (false unless a subclass overrides it).
      Overrides:
      isLineageSupported in class PipelineInput
    • isAutoCloseDocument

      public boolean isAutoCloseDocument()
      Indicates if the PDF document is closed when the reader closes (default is false).
    • setAutoCloseDocument

      public PdfPipelineInput setAutoCloseDocument(boolean autoCloseDocument)
      Indicates if the PDF document is closed when the reader closes (default is false).
    • toRecord

      public Record toRecord()
      Description copied from interface: RecordSerializable
      Converts this object's state to a record that RecordSerializable.fromRecord(Record) can load.
      Specified by:
      toRecord in interface RecordSerializable
      Overrides:
      toRecord in class PipelineInput
    • fromRecord

      public PdfPipelineInput fromRecord(Record source)
      Description copied from interface: RecordSerializable
      Loads this instance's state from a record and returns this (for fluid API call chaining). For fluid API call chaining, the overridden method should change the declared return type to its class.
      Specified by:
      fromRecord in interface RecordSerializable
      Overrides:
      fromRecord in class PipelineInput
      Parameters:
      source -
      Returns:
      this instance.
    • toXmlElement

      public Element toXmlElement(Document document)
      Description copied from interface: XmlSerializable
      Returns an element, created with document, describing this object; the default implementation throws a DataException.
      Specified by:
      toXmlElement in interface XmlSerializable
      Overrides:
      toXmlElement in class PipelineInput
    • fromXmlElement

      public XmlSerializable fromXmlElement(Element pipelineInputElement)
      Specified by:
      fromXmlElement in interface XmlSerializable
      Overrides:
      fromXmlElement in class PipelineInput
    • generateJavaCode

      public void generateJavaCode(JavaCodeBuilder code)
      Description copied from interface: JavaCodeGenerator
      Appends Java source code representing this object to the given builder.