public class CrawlState extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static CrawlState |
BAD_STATUS |
static CrawlState |
DELETED |
static CrawlState |
ERROR |
static CrawlState |
MODIFIED |
static CrawlState |
NEW |
static CrawlState |
NOT_FOUND |
static CrawlState |
PREMATURE
For collectors that support it, this state indicates a previously
crawled document is not yet ready to be re-crawled.
|
static CrawlState |
REJECTED |
static CrawlState |
UNMODIFIED |
static CrawlState |
UNSUPPORTED
Typically when a reference cannot be processed since it is
not supported by the collector or one of its configured
component.
|
Modifier | Constructor and Description |
---|---|
protected |
CrawlState(String state)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
int |
hashCode() |
boolean |
isGoodState()
Returns whether a reference should be considered "good" (the
corresponding document is not in a "bad" state, such as being rejected
or produced an error.
|
boolean |
isNewOrModified()
Returns whether a state indicates new or modified.
|
boolean |
isOneOf(CrawlState... states) |
boolean |
isSkipped()
Returns whether a state indicate the document is to be skipped
(
UNMODIFIED or PREMATURE ). |
String |
toString() |
static CrawlState |
valueOf(String state) |
public static final CrawlState NEW
public static final CrawlState MODIFIED
public static final CrawlState UNMODIFIED
public static final CrawlState ERROR
public static final CrawlState REJECTED
public static final CrawlState BAD_STATUS
public static final CrawlState DELETED
public static final CrawlState NOT_FOUND
public static final CrawlState PREMATURE
public static final CrawlState UNSUPPORTED
protected CrawlState(String state)
state
- state codepublic boolean isGoodState()
NEW
, MODIFIED
, UNMODIFIED
,
and PREMATURE
.
This method can be overridden to provide different logic for a valid
reference.true
if status is valid.public boolean isNewOrModified()
true
if new or modifiedpublic boolean isSkipped()
UNMODIFIED
or PREMATURE
).true
if skippedpublic boolean isOneOf(CrawlState... states)
public static CrawlState valueOf(String state)
Copyright © 2014–2023 Norconex Inc.. All rights reserved.