Class Lexer
- java.lang.Object
-
- org.apache.jackrabbit.commons.cnd.Lexer
-
public class Lexer extends java.lang.Object
Lexer of the CND definition.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]
ABORT
static java.lang.String[]
ABSTRACT
static java.lang.String[]
AUTOCREATED
static char
BEGIN_NODE_TYPE_NAME
static char
BEGIN_TYPE
static java.lang.String[]
BINARY
static java.lang.String[]
BOOLEAN
static char
CHILD_NODE_DEFINITION
static java.lang.String[]
COMPUTE
static char
CONSTRAINT
static java.lang.String[]
COPY
static java.lang.String[]
DATE
static java.lang.String[]
DECIMAL
static char
DEFAULT
static java.lang.String[]
DOUBLE
static char
DOUBLE_QUOTE
static char
END_NODE_TYPE_NAME
static char
END_TYPE
static java.lang.String
EOF
static char
EXTENDS
static java.lang.String[]
IGNORE
static java.lang.String[]
INITIALIZE
static char
LIST_DELIMITER
static java.lang.String[]
LONG
static java.lang.String[]
MANDATORY
static java.lang.String[]
MIXIN
static java.lang.String[]
MULTIPLE
static java.lang.String[]
NAME
static java.lang.String[]
NODE_ATTRIBUTE
static java.lang.String[]
NOFULLTEXT
static java.lang.String[]
NOQUERY
static java.lang.String[]
NOQUERYORDER
static java.lang.String[]
ORDERABLE
static java.lang.String[]
PATH
static java.lang.String[]
PRIMARY
static java.lang.String[]
PRIMARYITEM
static java.lang.String[]
PROP_ATTRIBUTE
static char
PROPERTY_DEFINITION
static java.lang.String[]
PROTECTED
static java.lang.String
QUEROPS_EQUAL
static java.lang.String
QUEROPS_GREATERTHAN
static java.lang.String
QUEROPS_GREATERTHANOREQUAL
static java.lang.String
QUEROPS_LESSTHAN
static java.lang.String
QUEROPS_LESSTHANOREQUAL
static java.lang.String
QUEROPS_LIKE
static java.lang.String
QUEROPS_NOTEQUAL
static java.lang.String[]
QUERY
static java.lang.String[]
QUERYOPS
static java.lang.String[]
REFERENCE
static char
SINGLE_QUOTE
static java.lang.String[]
SNS
static java.lang.String[]
STRING
static java.lang.String[]
UNDEFINED
static java.lang.String[]
URI
static java.lang.String[]
VERSION
static java.lang.String[]
WEAKREFERENCE
-
Constructor Summary
Constructors Constructor Description Lexer(java.io.Reader r, java.lang.String systemId)
Creates an unitialized lexer on top of the given reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fail(java.lang.String message)
Creates a failure exception including the current line number and systemid.void
fail(java.lang.String message, java.lang.Throwable e)
Creates a failure exception including the current line number and systemid.void
fail(java.lang.Throwable e)
Creates a failure exception including the current line number and systemid.int
getLineNumber()
java.lang.String
getNextToken()
getNextTokenjava.lang.String
getSystemId()
Returns the system id
-
-
-
Field Detail
-
SINGLE_QUOTE
public static final char SINGLE_QUOTE
- See Also:
- Constant Field Values
-
DOUBLE_QUOTE
public static final char DOUBLE_QUOTE
- See Also:
- Constant Field Values
-
BEGIN_NODE_TYPE_NAME
public static final char BEGIN_NODE_TYPE_NAME
- See Also:
- Constant Field Values
-
END_NODE_TYPE_NAME
public static final char END_NODE_TYPE_NAME
- See Also:
- Constant Field Values
-
EXTENDS
public static final char EXTENDS
- See Also:
- Constant Field Values
-
LIST_DELIMITER
public static final char LIST_DELIMITER
- See Also:
- Constant Field Values
-
PROPERTY_DEFINITION
public static final char PROPERTY_DEFINITION
- See Also:
- Constant Field Values
-
CHILD_NODE_DEFINITION
public static final char CHILD_NODE_DEFINITION
- See Also:
- Constant Field Values
-
BEGIN_TYPE
public static final char BEGIN_TYPE
- See Also:
- Constant Field Values
-
END_TYPE
public static final char END_TYPE
- See Also:
- Constant Field Values
-
DEFAULT
public static final char DEFAULT
- See Also:
- Constant Field Values
-
CONSTRAINT
public static final char CONSTRAINT
- See Also:
- Constant Field Values
-
ORDERABLE
public static final java.lang.String[] ORDERABLE
-
MIXIN
public static final java.lang.String[] MIXIN
-
ABSTRACT
public static final java.lang.String[] ABSTRACT
-
NOQUERY
public static final java.lang.String[] NOQUERY
-
QUERY
public static final java.lang.String[] QUERY
-
PRIMARYITEM
public static final java.lang.String[] PRIMARYITEM
-
PRIMARY
public static final java.lang.String[] PRIMARY
-
AUTOCREATED
public static final java.lang.String[] AUTOCREATED
-
MANDATORY
public static final java.lang.String[] MANDATORY
-
PROTECTED
public static final java.lang.String[] PROTECTED
-
MULTIPLE
public static final java.lang.String[] MULTIPLE
-
SNS
public static final java.lang.String[] SNS
-
QUERYOPS
public static final java.lang.String[] QUERYOPS
-
NOFULLTEXT
public static final java.lang.String[] NOFULLTEXT
-
NOQUERYORDER
public static final java.lang.String[] NOQUERYORDER
-
COPY
public static final java.lang.String[] COPY
-
VERSION
public static final java.lang.String[] VERSION
-
INITIALIZE
public static final java.lang.String[] INITIALIZE
-
COMPUTE
public static final java.lang.String[] COMPUTE
-
IGNORE
public static final java.lang.String[] IGNORE
-
ABORT
public static final java.lang.String[] ABORT
-
PROP_ATTRIBUTE
public static final java.lang.String[] PROP_ATTRIBUTE
-
NODE_ATTRIBUTE
public static final java.lang.String[] NODE_ATTRIBUTE
-
QUEROPS_EQUAL
public static final java.lang.String QUEROPS_EQUAL
- See Also:
- Constant Field Values
-
QUEROPS_NOTEQUAL
public static final java.lang.String QUEROPS_NOTEQUAL
- See Also:
- Constant Field Values
-
QUEROPS_LESSTHAN
public static final java.lang.String QUEROPS_LESSTHAN
- See Also:
- Constant Field Values
-
QUEROPS_LESSTHANOREQUAL
public static final java.lang.String QUEROPS_LESSTHANOREQUAL
- See Also:
- Constant Field Values
-
QUEROPS_GREATERTHAN
public static final java.lang.String QUEROPS_GREATERTHAN
- See Also:
- Constant Field Values
-
QUEROPS_GREATERTHANOREQUAL
public static final java.lang.String QUEROPS_GREATERTHANOREQUAL
- See Also:
- Constant Field Values
-
QUEROPS_LIKE
public static final java.lang.String QUEROPS_LIKE
- See Also:
- Constant Field Values
-
STRING
public static final java.lang.String[] STRING
-
BINARY
public static final java.lang.String[] BINARY
-
LONG
public static final java.lang.String[] LONG
-
DOUBLE
public static final java.lang.String[] DOUBLE
-
BOOLEAN
public static final java.lang.String[] BOOLEAN
-
DATE
public static final java.lang.String[] DATE
-
NAME
public static final java.lang.String[] NAME
-
PATH
public static final java.lang.String[] PATH
-
REFERENCE
public static final java.lang.String[] REFERENCE
-
WEAKREFERENCE
public static final java.lang.String[] WEAKREFERENCE
-
URI
public static final java.lang.String[] URI
-
DECIMAL
public static final java.lang.String[] DECIMAL
-
UNDEFINED
public static final java.lang.String[] UNDEFINED
-
EOF
public static final java.lang.String EOF
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNextToken
public java.lang.String getNextToken() throws ParseException
getNextToken- Returns:
- the next token
- Throws:
ParseException
- if an error during parsing occurs
-
getSystemId
public java.lang.String getSystemId()
Returns the system id- Returns:
- the system id
-
getLineNumber
public int getLineNumber()
-
fail
public void fail(java.lang.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(java.lang.String message, java.lang.Throwable e) throws ParseException
Creates a failure exception including the current line number and systemid.- Parameters:
message
- messagee
- root cause- Throws:
ParseException
- the created exception
-
fail
public void fail(java.lang.Throwable e) throws ParseException
Creates a failure exception including the current line number and systemid.- Parameters:
e
- root cause- Throws:
ParseException
- the created exception
-
-