Class Lexer

java.lang.Object
org.apache.jackrabbit.commons.cnd.Lexer

public class Lexer extends Object
Lexer of the CND definition.
  • Field Details

    • SINGLE_QUOTE

      public static final char SINGLE_QUOTE
      See Also:
    • DOUBLE_QUOTE

      public static final char DOUBLE_QUOTE
      See Also:
    • BEGIN_NODE_TYPE_NAME

      public static final char BEGIN_NODE_TYPE_NAME
      See Also:
    • END_NODE_TYPE_NAME

      public static final char END_NODE_TYPE_NAME
      See Also:
    • EXTENDS

      public static final char EXTENDS
      See Also:
    • LIST_DELIMITER

      public static final char LIST_DELIMITER
      See Also:
    • PROPERTY_DEFINITION

      public static final char PROPERTY_DEFINITION
      See Also:
    • CHILD_NODE_DEFINITION

      public static final char CHILD_NODE_DEFINITION
      See Also:
    • BEGIN_TYPE

      public static final char BEGIN_TYPE
      See Also:
    • END_TYPE

      public static final char END_TYPE
      See Also:
    • DEFAULT

      public static final char DEFAULT
      See Also:
    • CONSTRAINT

      public static final char CONSTRAINT
      See Also:
    • ORDERABLE

      public static final String[] ORDERABLE
    • MIXIN

      public static final String[] MIXIN
    • ABSTRACT

      public static final String[] ABSTRACT
    • NOQUERY

      public static final String[] NOQUERY
    • QUERY

      public static final String[] QUERY
    • PRIMARYITEM

      public static final String[] PRIMARYITEM
    • PRIMARY

      public static final String[] PRIMARY
    • AUTOCREATED

      public static final String[] AUTOCREATED
    • MANDATORY

      public static final String[] MANDATORY
    • PROTECTED

      public static final String[] PROTECTED
    • MULTIPLE

      public static final String[] MULTIPLE
    • SNS

      public static final String[] SNS
    • QUERYOPS

      public static final String[] QUERYOPS
    • NOFULLTEXT

      public static final String[] NOFULLTEXT
    • NOQUERYORDER

      public static final String[] NOQUERYORDER
    • COPY

      public static final String[] COPY
    • VERSION

      public static final String[] VERSION
    • INITIALIZE

      public static final String[] INITIALIZE
    • COMPUTE

      public static final String[] COMPUTE
    • IGNORE

      public static final String[] IGNORE
    • ABORT

      public static final String[] ABORT
    • PROP_ATTRIBUTE

      public static final String[] PROP_ATTRIBUTE
    • NODE_ATTRIBUTE

      public static final String[] NODE_ATTRIBUTE
    • QUEROPS_EQUAL

      public static final String QUEROPS_EQUAL
      See Also:
    • QUEROPS_NOTEQUAL

      public static final String QUEROPS_NOTEQUAL
      See Also:
    • QUEROPS_LESSTHAN

      public static final String QUEROPS_LESSTHAN
      See Also:
    • QUEROPS_LESSTHANOREQUAL

      public static final String QUEROPS_LESSTHANOREQUAL
      See Also:
    • QUEROPS_GREATERTHAN

      public static final String QUEROPS_GREATERTHAN
      See Also:
    • QUEROPS_GREATERTHANOREQUAL

      public static final String QUEROPS_GREATERTHANOREQUAL
      See Also:
    • QUEROPS_LIKE

      public static final String QUEROPS_LIKE
      See Also:
    • STRING

      public static final String[] STRING
    • BINARY

      public static final String[] BINARY
    • LONG

      public static final String[] LONG
    • DOUBLE

      public static final String[] DOUBLE
    • BOOLEAN

      public static final String[] BOOLEAN
    • DATE

      public static final String[] DATE
    • NAME

      public static final String[] NAME
    • PATH

      public static final String[] PATH
    • REFERENCE

      public static final String[] REFERENCE
    • WEAKREFERENCE

      public static final String[] WEAKREFERENCE
    • URI

      public static final String[] URI
    • DECIMAL

      public static final String[] DECIMAL
    • UNDEFINED

      public static final String[] UNDEFINED
    • EOF

      public static final String EOF
      See Also:
  • Constructor Details

    • Lexer

      public Lexer(Reader r, String systemId)
      Creates an unitialized lexer on top of the given reader.
      Parameters:
      r - the reader
      systemId - informational systemid of the given stream
  • Method Details

    • getNextToken

      public String getNextToken() throws ParseException
      getNextToken
      Returns:
      the next token
      Throws:
      ParseException - if an error during parsing occurs
    • getSystemId

      public String getSystemId()
      Returns the system id
      Returns:
      the system id
    • getLineNumber

      public int getLineNumber()
    • fail

      public void fail(String message) throws ParseException
      Creates a failure exception including the current line number and systemid.
      Parameters:
      message - message
      Throws:
      ParseException - the created exception
    • fail

      public void fail(String message, Throwable e) throws ParseException
      Creates a failure exception including the current line number and systemid.
      Parameters:
      message - message
      e - root cause
      Throws:
      ParseException - the created exception
    • fail

      public void fail(Throwable e) throws ParseException
      Creates a failure exception including the current line number and systemid.
      Parameters:
      e - root cause
      Throws:
      ParseException - the created exception