org.apache.jackrabbit.commons.cnd
Class Lexer

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

public class Lexer
extends Object

Lexer of the CND definition.


Field Summary
static String[] ABORT
           
static String[] ABSTRACT
           
static String[] AUTOCREATED
           
static char BEGIN_NODE_TYPE_NAME
           
static char BEGIN_TYPE
           
static String[] BINARY
           
static String[] BOOLEAN
           
static char CHILD_NODE_DEFINITION
           
static String[] COMPUTE
           
static char CONSTRAINT
           
static String[] COPY
           
static String[] DATE
           
static String[] DECIMAL
           
static char DEFAULT
           
static String[] DOUBLE
           
static char DOUBLE_QUOTE
           
static char END_NODE_TYPE_NAME
           
static char END_TYPE
           
static String EOF
           
static char EXTENDS
           
static String[] IGNORE
           
static String[] INITIALIZE
           
static char LIST_DELIMITER
           
static String[] LONG
           
static String[] MANDATORY
           
static String[] MIXIN
           
static String[] MULTIPLE
           
static String[] NAME
           
static String[] NODE_ATTRIBUTE
           
static String[] NOFULLTEXT
           
static String[] NOQUERY
           
static String[] NOQUERYORDER
           
static String[] ORDERABLE
           
static String[] PATH
           
static String[] PRIMARY
           
static String[] PRIMARYITEM
           
static String[] PROP_ATTRIBUTE
           
static char PROPERTY_DEFINITION
           
static String[] PROTECTED
           
static String QUEROPS_EQUAL
           
static String QUEROPS_GREATERTHAN
           
static String QUEROPS_GREATERTHANOREQUAL
           
static String QUEROPS_LESSTHAN
           
static String QUEROPS_LESSTHANOREQUAL
           
static String QUEROPS_LIKE
           
static String QUEROPS_NOTEQUAL
           
static String[] QUERY
           
static String[] QUERYOPS
           
static String[] REFERENCE
           
static char SINGLE_QUOTE
           
static String[] SNS
           
static String[] STRING
           
static String[] UNDEFINED
           
static String[] URI
           
static String[] VERSION
           
static String[] WEAKREFERENCE
           
 
Constructor Summary
Lexer(Reader r, String systemId)
          Creates an unitialized lexer on top of the given reader.
 
Method Summary
 void fail(String message)
          Creates a failure exception including the current line number and systemid.
 void fail(String message, Throwable e)
          Creates a failure exception including the current line number and systemid.
 void fail(Throwable e)
          Creates a failure exception including the current line number and systemid.
 int getLineNumber()
           
 String getNextToken()
          getNextToken
 String getSystemId()
          Returns the system id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 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:
Constant Field Values

QUEROPS_NOTEQUAL

public static final String QUEROPS_NOTEQUAL
See Also:
Constant Field Values

QUEROPS_LESSTHAN

public static final String QUEROPS_LESSTHAN
See Also:
Constant Field Values

QUEROPS_LESSTHANOREQUAL

public static final String QUEROPS_LESSTHANOREQUAL
See Also:
Constant Field Values

QUEROPS_GREATERTHAN

public static final String QUEROPS_GREATERTHAN
See Also:
Constant Field Values

QUEROPS_GREATERTHANOREQUAL

public static final String QUEROPS_GREATERTHANOREQUAL
See Also:
Constant Field Values

QUEROPS_LIKE

public static final String QUEROPS_LIKE
See Also:
Constant Field Values

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:
Constant Field Values
Constructor Detail

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 Detail

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


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.