Enum Class DataFileElementReader

java.lang.Object
java.lang.Enum<DataFileElementReader>
repast.simphony.integration.DataFileElementReader
All Implemented Interfaces:
Serializable, Comparable<DataFileElementReader>, java.lang.constant.Constable

public enum DataFileElementReader extends Enum<DataFileElementReader>
This handles the reading of elements of a data file. Each element of the enum will handle a different type of element (the element with the same tag as the enum element).
Author:
Jerry Vos
  • Enum Constant Details

  • Field Details

    • STRING_DELIMITER

      public static String STRING_DELIMITER
    • DOUBLE_PATTERN

      public static String DOUBLE_PATTERN
    • INT_PATTERN

      public static String INT_PATTERN
    • tag

      public final String tag
  • Method Details

    • values

      public static DataFileElementReader[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DataFileElementReader valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getElementHandler

      public static DataFileElementReader getElementHandler(org.jdom.Element nodeToHandle)
    • handle

      public abstract Object[] handle(DataFileReader parserInst, OutputBuilder<?,?> outWriter, org.jdom.Element nodeToHandle) throws IOException
      Handles the specified node. Any elements to be added to the data tree should be added in this method and also returned by this method.
      Parameters:
      parserInst - the instance of the reader that this is working with
      OutputBuilder - the writer to use for writing
      nodeToHandle - the node providing data
      Returns:
      any elements added to the data tree
      Throws:
      IOException - when there is an error reading
    • fakeRecord

      public static List<org.jdom.Element> fakeRecord(DataFileReader parserInst, OutputBuilder<?,?> outWriter, org.jdom.Element recordElement) throws IOException
      Throws:
      IOException