Enum Class LineType

java.lang.Object
java.lang.Enum<LineType>
org.tentackle.model.parse.LineType
All Implemented Interfaces:
Serializable, Comparable<LineType>, Constable

public enum LineType extends Enum<LineType>
The configuration file line type.
  1. All lines beginning with a '#' are comments. Anything following a # is comment as well.
  2. Lines containing a '=' not containing a ':' in between the start-of-line and the '=' are configuration lines.
    • pdo = <Pdo-Interface>
    • index <name> = column_1, ...
    • unique index <name> = column1, ...
  3. Lines beginning with '[' are global options.
  4. Lines with the first word (sep. by whitespaces) not followed by a colon are attributes.
  5. Lines with a word starting in lowercase followed by a colon are attribute option lines (e.g. for validation).
  6. Lines with a word starting in uppercase followed by a colon are relation lines.
Leading whitespaces are ignored when determining the line type.
Author:
harald
  • Enum Constant Details

    • EMPTY

      public static final LineType EMPTY
      the empty line.
    • COMMENT

      public static final LineType COMMENT
      comment line.
    • CONFIGURATION

      public static final LineType CONFIGURATION
      configuration line.
    • GLOBAL_OPTION

      public static final LineType GLOBAL_OPTION
      global options line.
    • ATTRIBUTE

      public static final LineType ATTRIBUTE
      attribute line.
    • ATTRIBUTE_OPTION

      public static final LineType ATTRIBUTE_OPTION
      attribute options line.
    • RELATION

      public static final LineType RELATION
      relation line.
    • RELATION_OPTION

      public static final LineType RELATION_OPTION
      relation options line.
  • Method Details

    • values

      public static LineType[] 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 LineType 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
    • createLine

      public Line createLine(Document document, int offset)
      Creates a line for this line type.
      Parameters:
      document - the model's document
      offset - the start of line within the document
      Returns:
      the created line