input
stringlengths
10
828
output
stringlengths
5
107
public void trigger wdog on exit boolean trigger on exit if this trigger on exit trigger on exit log event trigger on exit enabling thread exit disabling thread exit false this trigger on exit trigger on exit
set whether thread death should trigger the watchdog
private string get rft param map string string params string key string value params get key if value null value params get rft key return value
get an parameter either without or with the rft
protected void thread exited exit daemon constants exit code thread exit thread exited
called if thread exited unexpectedly
public boolean wait exited deadline timeout if thread current thread is interrupted return false try if log is debug3 log debug3 waiting for get name to exit return exited sem wait full timeout catch interrupted exception e thread current thread interrupt maintain interrupted status return exited sem is full
wait until the thread has exited more precisely until just before
private void parse url url url throws malformed urlexception url string url to string string id url get host string spec url get file if spec null spec starts with spec spec substring 1 spec length cached url string url util decode url spec if log is debug3 log debug3 parse url url log debug3 id id log debug3 spec spec log debug3 cached url string cached url string au id id
parse and store identifying info for cached url
public void set priority string name int default priority int prio get priority from param name default priority if prio 1 log debug3 leaving priority of get name thread at thread get priority return log debug2 setting priority of get name thread to prio thread set priority prio
set the priority of the thread from a parameter value
private string get rft start page map string string params string spage get rft param params spage if spage null spage get rft param params artnum return spage
get start page base rft spage parameter or artnum if page not specified
public void add text to string rest of url string text if add text null add text new hashtable add text put rest of url text
after explosion the collected set of text where pairs
public void interrupt thread thread th thread if th null th interrupt
interrupt the thread this runnable is running in if any
protected boolean is match string url return is match regexp util get matcher url
perform the match in a synchronized block so that the pattern isnt
public int match string url boolean match is match url if logger is debug3 logger debug3 this match url match action match return match action match
determine whether the url is included excluded or ignored by this rule
protected int match action boolean match switch action case match include return match include ignore case match exclude return match exclude ignore case no match include return match include ignore case no match exclude return match exclude ignore case match include else exclude return match include exclude case match exclude else include return match include exclude return ignore
map the match result and the specified action to one of
public int match string url if logger is debug3 logger debug3 match called with url perl5 matcher matcher regexp util get matcher boolean match is match matcher url if match match is condition met matcher get match return match action match
apply the matcher then check the condition if the match succeeds
protected boolean is condition met match result match result string sub match result group 1 if sub null return false switch mode case long try long val long parse long sub return min long val val max long catch number format exception e return false case comp ign case sub sub to lower case fall through case comp return min comp compare to sub 0 max comp compare to sub 0 return false
return true iff the subexpression falls within the range
protected boolean is condition met match result match result string sub match result group 1 if sub null return false switch mode case ign case sub sub to lower case break case equal break if logger is debug3 logger debug3 checking if sub is in set if set contains sub logger debug3 it is else logger debug3 it isn t return set contains sub
return true iff the subexpression is a member of the set
public void set new activity int new activity long expire in if logger is debug logger debug changing activity on cus null au au get name cus cus get url from activity code to string activity to activity code to string new activity with expiration in string util time interval to string expire in activity new activity expiration deadline in expire in if cus null if cur au activity lock null cur au activity lock get activity cus activity cur au activity lock extend expire in else logger error cus lock changing during non cus activity
sets a new activity and expiration
public open url info resolve from url string a url string url resolve url a url return open url info new instance url
resolves from a url
protected void notify deleted au string au id int article count
notify listeners that an au has been removed
public void expire super expire check au activity
overridden to check the au to see if cus activity should be terminated
public configuration get configuration return au get configuration
return the aus current configuration
public title config get title config return au get title config
return the aus title config if any
public string get au id return au get au id
returns a globally unique string identifier for the archival unit
public string get name return au get name
returns a human readable name for the archival unit
public void extend long extension super extend extension cur au activity lock extend extension
overridden to also extend the au cus activity lock
public open url info resolve from doi string doi if metadata util is doi doi return null open url info resolved no open url info try resolve from metadata manager metadata manager metadata mgr daemon get metadata manager resolved resolve from doi metadata mgr doi catch illegal argument exception ex if resolved resolved url null use doi international resolver for doi resolved resolve from url http dx doi org doi return resolved
return the article url from a doi using either the mdb or tdb
public configuration get configuration return get remote api get stored au configuration this
return the aus current configuration
public string get plugin id return get remote api plugin id from au id get au id
returns the plugins id
public string get name configuration config get configuration string name config get plugin manager au param display name if string util is null string name return auid return name
returns a human readable name for the archival unit
public string get plugin id return plugin get plugin id
return a string that uniquely represents the identity of this plugin
public string get version return plugin get version
return a string that represents the current version of this plugin
public string get plugin name return plugin get plugin name
return the humad readable name of the plugin
public list get supported titles return plugin get supported titles
return the list of names of the
public title config get title config string title return plugin get title config title
return the possibly incomplete parameter assignments
public list get au config descrs return plugin get au config descrs
return a list of descriptors for configuration parameters required to
public config param descr find au config descr string key return plugin find au config descr key
find the config param descr for a param
public collection get all aus return remote api map aus to proxies plugin get all aus
return a collection of
public void check substance string url if has substance state yes no need to check if already established has substance return check substance url url
if substance not detected yet check whether this url is a substance
public au proxy find au proxy string auid return find au proxy get au from id auid
create or return an au proxy for the au corresponding to the auid
protected void notify finish reindexing au archival unit au reindexing status status
notify listeners that an au is finshed being reindexed
public iterator get votes return new array list votes iterator
returns an iterator of votes
public string get id return id str
returns the votes id string
public void set id string id str this id str id str
sets the id string
public boolean get agree state return agree
returns the agree disagree state
public void set agree state boolean agree state agree agree state
sets the agree disagree state
public string get challenge string return challenge str
returns the votes challenge in base64
public void set challenge string string challenge str this challenge str challenge str
sets the challenge
public string get verifier string return verifier str
returns the votes verifier in base64
public void set verifier string string verifier str this verifier str verifier str
sets the verifier
public string get hash string return hash str
returns the votes hash in base64
public void set hash string string hash str this hash str hash str
sets the hash
private void run reindexing task final reindexing task task temporarily running task in its own thread rather than using sched service todo update sched service to handle this case lockss runnable runnable new lockss runnable make thread name task public void lockss run task call callback schedule event type start while task is finished task step integer max value task call callback schedule event type finish thread run thread new thread runnable run thread start
run the specified reindexing task
public configuration get stored au configuration au proxy aup return plugin mgr get stored au configuration aup get au id
return the stored config info for an au from config file not from
public au state load au state castor change to make object serializer when castor is phased out return load au state make au state serializer
p loads the state of an au
private open url info get book url plugin plugin typed entry map param map open url info resolved get plugin url plugin au bookau features param map if resolved resolved url null resolved open url info new instance param map get string base url open url info resolved to publisher return resolved
gets the book url for a definable plugin and parameter definitions
public configuration get current au configuration au proxy aup return plugin mgr get current au configuration aup get au id
return the current config info for an au from current configuration
public damaged node set load damaged node set castor change to make object serializer when castor is phased out return load damaged node set make damaged node set serializer
p loads a damaged node set from file
public list get all aus return map aus to proxies plugin mgr get all aus
return a list of au proxies for all configured archival units
public list load identity agreements return load identity agreements make identity agreement list serializer
p loads an identity agreement list
private publication date get date field article metadata md publication date pub date null string date str md get metadata field field date if date str null locale locale md get locale if locale null locale locale get default pub date new publication date date str locale return pub date
return the date field to store in the database
public node state load node state cached url set cus return load node state make node state serializer cus
p loads the node state for a cached url set
public void load poll histories node state node state load poll histories make poll histories serializer node state
p loads the poll histories associated with the node state
public list find all titles return plugin mgr find all titles
return all the known titles from the title db
private void cancel au task string au id reindexing task task reindexing tasks get au id if task null task cancellation will remove task and schedule next one log debug2 canceling pending reindexing task for au id au id task cancel
cancel a reindexing task for the specified au
public collection get title plugins string title return map plugins to proxies plugin mgr get title plugins title
find all the plugins that support the given title
public void store au state au state au state castor replace by make object serializer store au state make au state serializer au state
p stores the state of an au
public list get repository list return repo mgr get repository list
return list of repository specs for all available repositories
public void store identity agreements list id list castor change to make object serializer when castor is phased out store identity agreements make identity agreement list serializer id list
p stores an identity agreement list
public void store node state node state node state castor change to make object serializer when castor is phased out store node state make node state serializer node state
p stores the node state
public boolean add au to reindex archival unit au synchronized reindexing tasks connection conn null try log debug2 adding au to reindex au get name add pending au conn new connection if conn null log error cannot connect to database cannot add aus to pending aus return false cancel au task au get au id add to pending aus conn collections singleton au conn commit start reindexing conn return true catch sqlexception ex log error cannot add au to pending aus au get name ex return false finally safe close conn
this method adds an au to be reindexed
public void store poll histories node state node state castor change to make object serializer when castor is phased out store poll histories make poll histories serializer node state
p stores the poll histories associated with the node state
protected object serializer make au state serializer castor phase out with castor return make object serializer au state bean class
p builds a new serializer for au state
protected object serializer make damaged node set serializer castor phase out with castor return make object serializer damaged node set class
p builds a new serializer for damaged node sets
protected object serializer make identity agreement list serializer castor phase out with castor return make object serializer identity agreement list class
p builds a new serializer for identity agreement lists
protected object serializer make node state serializer castor phase out with castor return make object serializer node state bean class
p builds a new serializer for poll histories
public void set type int the type type the type
sets the crawl type
public void set type int type super type type
sets the type
public void set status int the status status the status
sets the status of the crawl
public void set lwr bound string lwr bound super lwr bound lwr bound
sets the lower boundar of the range
public void set start time long the time start time the time
sets the start time of the crawl
public void set upr bound string upr bound super upr bound upr bound
sets the upper boundary of the range
public void set status int status super status status
sets the status
public void set lwr bound string the lwr bnd lwr bound the lwr bnd
sets the lower boundary for a ranged match this poll
public void set upr bound string the upr bnd upr bound the upr bnd
sets the upper boundary for a ranged match this poll
public void set start time long start time super start time start time
sets the start time
protected object serializer make object serializer class cla castor remove parameter return an xstream serializer cxserializer serializer new cxserializer get daemon castor serializer get mapping mapping files cla serializer set failed deserialization mode cxserializer failed deserialization rename serializer set compatibility mode get compatibility mode return serializer
p builds a new object serializer suitable for the given class
public void set duration long duration super duration duration
sets the duration
public void set our poll boolean our poll super our poll our poll
sets whether its our poll
public long get deadline time return deadline time
returns the deadline time of the poll a long
public void set deadline time long the deadline deadline time the deadline
sets the deadline long for the poll absolute
public collection get vote beans return vote beans
gets the vote beans collection
public void set our poll boolean our poll flag our poll our poll flag
sets the poll owner boolean
public void set vote beans collection vote beans this vote beans vote beans
sets the vote beans collection
public boolean get our poll return our poll
identical to is our poll
private void convert votes to vote beans if votes null votes new array list vote beans new array list votes size iterator vote iter votes iterator while vote iter has next vote vote vote vote iter next vote beans add new vote bean vote
populates the list of votebeans from the votes list
private void convert vote beans to votes votes new array list vote beans size iterator bean iter vote beans iterator while bean iter has next vote bean bean vote bean bean iter next votes add bean get vote
populates the vote list from the list of vote beans
public iterator get votes convert vote beans to votes return super get votes
override which does the conversion from unmarshalled vote beans to votes
protected void clear nodes with damage clear cus to repair clear
clears both the damaged nodes and the cuss to repair
public void set crawl urls hash set new col crawl urls new col
sets the crawl urls
public void set last crawl time long new crawl time last crawl time new crawl time
sets the last crawl time to a new value
public boolean contains with damage string node url return nodes with damage contains node url
checks if the given url is damaged