de.fzi.kadmos.parser
Enum ParsingLevel

java.lang.Object
  extended by java.lang.Enum<ParsingLevel>
      extended by de.fzi.kadmos.parser.ParsingLevel
All Implemented Interfaces:
Serializable, Comparable<ParsingLevel>

public enum ParsingLevel
extends Enum<ParsingLevel>

Parsing levels for alignment parsers. Specific parsers must implement a parse(ParsingLevel parsingLevel) method that takes a certain parsing level. The following levels are supported: Level 1: Parser continues processing if MultiplicityException, IncompatibleEntityTypesException and/or AlignmentParserException is thrown Level 2: Parser continues processing if AlignmentParserException is thrown, but terminates if IncompatibleEntityTypesException and/or MultiplicityException is thrown Level 3: Parser terminates processing if AlignmentParserException, IncompatibleEntityTypesException and/or MultiplicityException is thrown Types of Exceptions: AlignmentParserException: Any exception which is thrown within the parser during parsing of an alignment. MultiplicityException: See MultiplicityException

Since:
1.0.1
Version:
1.3.0
Author:
Matthias Stumpp
See Also:
de.fzi.kadmos.parser

Enum Constant Summary
ONE
           
THREE
           
TWO
           
 
Method Summary
 int getLevel()
          Getter for the field level.
 boolean terminateOnError()
          toProcessAPE.
 boolean terminateOnException(Exception ex)
          Returns whether parsing must terminate when a given exception is thrown.
static ParsingLevel valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ParsingLevel[] 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

ONE

public static final ParsingLevel ONE

TWO

public static final ParsingLevel TWO

THREE

public static final ParsingLevel THREE
Method Detail

values

public static ParsingLevel[] 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 (ParsingLevel c : ParsingLevel.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ParsingLevel valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getLevel

public int getLevel()

Getter for the field level.


terminateOnException

public boolean terminateOnException(Exception ex)
Returns whether parsing must terminate when a given exception is thrown.

Parameters:
ex - The exception which has been thrown during parsing of a document.
Returns:
boolean Whether to terminate when a given exception is thrown.

terminateOnError

public boolean terminateOnError()

toProcessAPE.



Copyright © 2012. All Rights Reserved.