Class TextHandler


  • public class TextHandler
    extends Object
    Provides a handler for reading text and writing a PEF-file.
    • Field Detail

      • DATE_FORMAT

        public static final SimpleDateFormat DATE_FORMAT
        Defines a date format (yyyy-MM-dd).
      • KEY_TITLE

        public static final String KEY_TITLE
        Key for parseTextFile setting, corresponding settings value should contain the title of the publication.
        See Also:
        Constant Field Values
      • KEY_AUTHOR

        public static final String KEY_AUTHOR
        Key for parseTextFile setting, corresponding settings value should contain the author of the publication.
        See Also:
        Constant Field Values
      • KEY_IDENTIFIER

        public static final String KEY_IDENTIFIER
        Key for parseTextFile setting, corresponding settings value should contain the identifier for the publication.
        See Also:
        Constant Field Values
      • KEY_MODE

        public static final String KEY_MODE
        Key for parseTextFile setting, corresponding settings value should match the table to use.
        See Also:
        Constant Field Values
      • KEY_LANGUAGE

        public static final String KEY_LANGUAGE
        Key for parseTextFile setting, corresponding settings value should contain the language of the publication.
        See Also:
        Constant Field Values
      • KEY_DUPLEX

        public static final String KEY_DUPLEX
        Key for parseTextFile setting, corresponding settings value should be "true" for duplex or "false" for simplex.
        See Also:
        Constant Field Values
      • KEY_DATE

        public static final String KEY_DATE
        Key for parseTextFile setting, corresponding settings value should be a string containing a valid date on the form yyyy-MM-dd.
        See Also:
        Constant Field Values
    • Method Detail

      • with

        public static TextHandler.Builder with​(File input,
                                               File output,
                                               TableCatalogService factory)
        Creates a new builder with the supplied parameters.
        Parameters:
        input - the input file
        output - the output file
        factory - the table catalog
        Returns:
        returns a new builder
      • parse

        public void parse()
                   throws IOException
        Parse using current settings.
        Throws:
        IOException - if an I/O error occurs