Package com.norconex.importer.parser
Enum ParseState
- java.lang.Object
-
- java.lang.Enum<ParseState>
-
- com.norconex.importer.parser.ParseState
-
- All Implemented Interfaces:
Serializable
,Comparable<ParseState>
public enum ParseState extends Enum<ParseState>
Act as a flag indicating if a document has been parsed or not in a given process flow.
Typically, a pre-parsed document still has its original format (HTML, PDF, etc.). A post-parsed document on the other hand, usually has its plain text extracted and all formating is gone. Pre-parsed documents can be in binary format while post-parsed onces are in text-format (unless parsing was explicitely disabled).
- Since:
- 3.0.0
- Author:
- Pascal Essiembre
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isPost()
static boolean
isPost(ParseState parseState)
boolean
isPre()
static boolean
isPre(ParseState parseState)
static ParseState
valueOf(String name)
Returns the enum constant of this type with the specified name.static ParseState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PRE
public static final ParseState PRE
-
POST
public static final ParseState POST
-
-
Method Detail
-
values
public static ParseState[] 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 (ParseState c : ParseState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ParseState 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 nameNullPointerException
- if the argument is null
-
isPre
public boolean isPre()
-
isPost
public boolean isPost()
-
isPre
public static boolean isPre(ParseState parseState)
-
isPost
public static boolean isPost(ParseState parseState)
-
-