public class SurtPrefixedDecideRule extends PredicatedDecideRule implements SeedListener, org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>, Checkpointable, org.springframework.beans.factory.BeanNameAware
Modifier and Type | Field and Description |
---|---|
protected String |
beanName |
protected Checkpoint |
recoveryCheckpoint |
protected SeedModule |
seeds |
protected boolean |
seedsAsSurtPrefixes
Should seeds also be interpreted as SURT prefixes.
|
protected SurtPrefixSet |
surtPrefixes |
protected ConfigFile |
surtsDumpFile
Dump file to save SURT prefixes actually used: Useful debugging SURTs.
|
protected ReadSource |
surtsSource
Text from which to infer SURT prefixes.
|
comment, kp
Constructor and Description |
---|
SurtPrefixedDecideRule() |
Modifier and Type | Method and Description |
---|---|
void |
addedSeed(CrawlURI curi)
If appropriate, convert seed notification into prefix-addition.
|
protected void |
buildSurtPrefixSet()
Construct the set of prefixes to use, from the seed list (
which may include both URIs and '+'-prefixed directives).
|
void |
concludedSeedBatch() |
void |
doCheckpoint(Checkpoint checkpointInProgress) |
protected void |
dumpSurtPrefixSet()
Dump the current prefixes in use to configured dump file (if any)
|
protected boolean |
evaluate(CrawlURI uri)
Evaluate whether given object's URI is covered by the SURT prefix set
|
void |
finishCheckpoint(Checkpoint checkpointInProgress) |
boolean |
getAlsoCheckVia() |
SeedModule |
getSeeds() |
boolean |
getSeedsAsSurtPrefixes() |
ConfigFile |
getSurtsDumpFile() |
ReadSource |
getSurtsSource() |
ConfigFile |
getSurtsSourceFile()
Deprecated.
redundant now that we have
surtsSource |
boolean |
nonseedLine(String line)
Consider nonseed lines as possible SURT prefix directives.
|
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event) |
protected String |
prefixFrom(String uri) |
protected void |
readPrefixes() |
void |
setAlsoCheckVia(boolean checkVia) |
void |
setBeanName(String name) |
void |
setRecoveryCheckpoint(Checkpoint recoveryCheckpoint) |
void |
setSeeds(SeedModule seeds) |
void |
setSeedsAsSurtPrefixes(boolean seedsAsSurtPrefixes) |
void |
setSurtsDumpFile(ConfigFile cp) |
void |
setSurtsSource(ReadSource surtsSource) |
void |
setSurtsSourceFile(ConfigFile cp)
Deprecated.
|
void |
startCheckpoint(Checkpoint checkpointInProgress) |
getDecision, innerDecide, onlyDecision, setDecision
accepts, decisionFor, getComment, getEnabled, getKeyedProperties, setComment, setEnabled
protected ReadSource surtsSource
protected boolean seedsAsSurtPrefixes
protected ConfigFile surtsDumpFile
protected SeedModule seeds
protected SurtPrefixSet surtPrefixes
protected String beanName
protected Checkpoint recoveryCheckpoint
public ConfigFile getSurtsSourceFile()
surtsSource
public void setSurtsSourceFile(ConfigFile cp)
public ReadSource getSurtsSource()
public void setSurtsSource(ReadSource surtsSource)
public boolean getSeedsAsSurtPrefixes()
public void setSeedsAsSurtPrefixes(boolean seedsAsSurtPrefixes)
public ConfigFile getSurtsDumpFile()
public void setSurtsDumpFile(ConfigFile cp)
public boolean getAlsoCheckVia()
public void setAlsoCheckVia(boolean checkVia)
public SeedModule getSeeds()
public void setSeeds(SeedModule seeds)
public void concludedSeedBatch()
concludedSeedBatch
in interface SeedListener
protected boolean evaluate(CrawlURI uri)
evaluate
in class PredicatedDecideRule
protected void readPrefixes()
protected void dumpSurtPrefixSet()
protected void buildSurtPrefixSet()
public void addedSeed(CrawlURI curi)
addedSeed
in interface SeedListener
SeedListener.addedSeed(org.archive.modules.CrawlURI)
public boolean nonseedLine(String line)
nonseedLine
in interface SeedListener
SeedListener.nonseedLine(java.lang.String)
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
onApplicationEvent
in interface org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
public void setBeanName(String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
public void startCheckpoint(Checkpoint checkpointInProgress)
startCheckpoint
in interface Checkpointable
public void doCheckpoint(Checkpoint checkpointInProgress) throws IOException
doCheckpoint
in interface Checkpointable
IOException
public void finishCheckpoint(Checkpoint checkpointInProgress)
finishCheckpoint
in interface Checkpointable
public void setRecoveryCheckpoint(Checkpoint recoveryCheckpoint)
setRecoveryCheckpoint
in interface Checkpointable
Copyright © 2003–2019 Internet Archive. All rights reserved.