Enum LineType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<LineType>

    public enum LineType
    extends java.lang.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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Line createLine​(Document document, int offset)
      Creates a line for this line type.
      static LineType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static LineType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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 Detail

      • values

        public static LineType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (LineType c : LineType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LineType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.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