input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public string get role url string key return url or null get role cu key
|
get the url associated with the role
|
public boolean is empty return full text cu null roles is empty
|
return true if no urls have been stored
|
public string pp string int indent string builder sb new string builder sb append string util tab indent sb append article files n string tab string util tab indent 2 for string role string util case independent sorted set roles key set sb append tab sb append role sb append sb append get role url role sb append n return sb to string
|
return a pretty printed string
|
private int determine last active version file inactive prop file get inactive props file if inactive prop file exists properties old props new properties try load props into inactive prop file old props catch exception e logger error error loading last active version from inactive prop file get path throw new lockss repository repository state exception couldn t load version from properties file if old props null return integer parse int old props get property lockss version number 1 return 1
|
queries the inactive
|
protected void write node properties try output stream os new buffered output stream new file output stream node props file node props store os node properties os close catch ioexception ioe logger error couldn t write node properties for node props file get path throw new lockss repository repository state exception couldn t write node properties file
|
writes the node properties to disk
|
public reader create filtered reader reader reader reader cur reader reader loop through our list of filters for iterator it m readers iterator it has next cur reader filter reader it next make filter reader cur reader if m filter white space cur reader new white space filter cur reader return cur reader
|
create filtered reader
|
protected string make name return au name null au name m exploded base url
|
return a string that represents the plugin registry
|
protected string make start url return m exploded base url
|
return a string that points to the plugin registry page
|
public boolean should be cached string url for iterator it url stems iterator it has next string stem string it next logger debug3 should be cached url stem stem if url starts with stem return true return false
|
determine whether the url falls within the crawl spec
|
protected crawl spec make crawl spec throws lockss regexp exception return new exploded crawl spec get new content crawl urls
|
return a new crawl spec with the appropriate collect and redistribute
|
public boolean should crawl for new content au state aus return false
|
exploded archival units should never be crawled
|
public void add url stem to au string url try string stem url util get url prefix url permission page urls add url if url stems index of stem 0 url stems add stem catch malformed urlexception ex logger debug3 add url stem to au url threw ex
|
add the url to the list of permission pages for the au
|
public string get from cu cached url cu throws malformed urlexception string res get from mime cu get content type if res null res get from url cu get url return res
|
return the archive file type corresponding to the cus mime type or
|
public string get from url string url throws malformed urlexception if string util ends with ignore case url tar gz return get ext mime map get tar gz string ext url util get file extension url to lower case return get ext mime map get ext
|
return the archive file type corresponding to the filename extension
|
public string get from mime string content type string mime type header util get mime type from content type content type if mime type null return null return get ext mime map get mime type to lower case
|
return the archive file type corresponding to the mime type or null
|
public archival unit get au return au
|
the au that changed
|
public int get num urls return num urls
|
the number of urls that changed
|
public cached url set spec get spec return spec
|
return the cached url set spec
|
public string to string return bcus spec
|
overridden to return the to string method of the cached url set spec
|
protected crawl window make crawl window if crawl window null return crawl window crawl window window crawl window definition map get map element definable archival unit key au crawl window ser if window null string window class definition map get string definable archival unit key au crawl window null if window class null configurable crawl window ccw configurable crawl window new aux class window class configurable crawl window class try window ccw make crawl window catch plugin exception e throw new runtime exception e crawl window window return window
|
create a crawl window if necessary and return it
|
public article iterator factory get article iterator factory if article iterator fact null string fact class definition map get string key plugin article iterator factory null if fact class null article iterator fact article iterator factory new aux class fact class article iterator factory class return article iterator fact
|
returns the plugins article iterator factory if any
|
public string get required daemon version return 0 0 0
|
subclasses should override this if they want to require a minimum
|
public string get publishing platform return null
|
subclasses should override this if they want to supply a publishing
|
public title config get title config string title if title config map null return null return title config title config map get title
|
default implementation looks in title config map
|
public string get url return orig url
|
returns the original url the one the url cacher was created with
|
public string to string return buc orig url
|
overrides normal code to string code to return a string like
|
public cached url make cached url string url archive member spec ams archive member spec from url this url if ams null cached url cu new base cached url this ams get url return cu get archive member cu ams return new base cached url this url
|
return a cached url for the specified url in this au
|
public cached url set get cached url set throw new unsupported operation exception no longer implemented
|
return the cached url set to which this url cacher belongs
|
public config param descr find au config descr string key get au config descrs return param descr map get key
|
find the config param descr that this plugin uses for the specified key
|
public cached url get cached url return au make cached url orig url
|
return a cached url for the content stored
|
public lockss daemon get daemon return the daemon
|
return the lockss daemon instance
|
public cache result map get cache result map return result map
|
return the cache result map to use with this plugin
|
public crawl spec get crawl spec for speed we return the cached value return crawl spec return crawl spec param map get map element au crawl spec
|
return the crawl spec
|
public filter rule get filter rule string content type if content type null object obj filter map get content type filter rule rule null if obj null rule construct filter rule content type if rule null if log is debug3 log debug3 content type filter rule filter map put content type rule else if log is debug3 log debug3 no filter for content type else if obj instanceof filter rule rule filter rule obj return rule log debug3 get filter rule null content type return null
|
returns a filter rule from the cache if found otherwise calls
|
public boolean should be cached string url boolean val get crawl spec is included url return val
|
determine whether the url falls within the crawl spec
|
protected filter rule construct filter rule string content type log debug3 construct filter rule default null return null
|
override to provide proper filter rules
|
public filter factory get hash filter factory string content type mime type info mti get mime type info content type if mti null return null if log is debug3 log debug3 content type filter mti get hash filter factory return mti get hash filter factory
|
returns the hash filter factory for the mime type if any
|
public filter factory get crawl filter factory string content type mime type info mti get mime type info content type if mti null return null if log is debug3 log debug3 content type crawl filter mti get crawl filter factory return mti get crawl filter factory
|
returns the crawl filter factory for the mime type if any
|
public link rewriter factory get link rewriter factory string content type mime type info mti get mime type info content type if mti null return null if log is debug3 log debug3 content type rewriter mti get link rewriter factory return mti get link rewriter factory
|
returns the link rewriter factory for the mime type if any
|
public article iterator factory get article iterator factory return null
|
returns the plugins article iterator factory if any
|
public cached url set get au cached url set tk use singleton instance return make cached url set new au cached url set spec
|
return the cached url set representing the entire contents
|
public string get default article mime type return null
|
returns null plugins do not have a default article mime type unless
|
public string to string return bcu get url
|
return a string bcu url
|
public input stream open for hashing if current config get boolean param param should filter hash stream default should filter hash stream logger debug3 filtering on returning filtered stream return get filtered stream else logger debug3 filtering off returning unfiltered stream return get unfiltered input stream
|
return a stream suitable for hashing
|
public file metadata extractor get file metadata extractor metadata target target string ct get content type file metadata extractor ret au get file metadata extractor target ct return ret
|
return a file metadata extractor for the cached urls content type or
|
private void open connection string last modified throws ioexception if conn null if is redirect option redirect option if crawl spec redirect option on host only open with redirects last modified else open one connection last modified
|
if we havent already connected creates a connection from url setting
|
protected string make start url throws configuration exception throw new unsupported operation exception plugin must implement make start url or make start urls
|
compute the aus single start url
|
public boolean should crawl for new content au state aus if au util is pub down this logger debug2 pub down no new content crawl possible for aus return false long time diff time base ms since aus get last crawl time if logger is debug2 logger debug2 deciding whether to do new content crawl for aus if aus has crawled time diff new content crawl intv logger debug2 new content crawl needed for aus return true logger debug2 no new content crawl needed for aus return false
|
returns true if there has been no treewalk within the last
|
public string to string return bcu v get version url
|
return a string bcu v n url
|
public boolean has content if super has content return false try tfile tf get tfile if tf null return false if tf is directory return false return get member tfile exists catch exception e string msg couldn t open member for which exists was true this logger error msg throw new lockss repository repository state exception msg e
|
true if the archive exists and the member exists
|
public boolean should call top level poll au state aus string flags au util get title attribute this flags if flags null string util index of ignore case flags nopoll 0 return false return true
|
simplified implementation which gets the poll interval parameter
|
public filter factory get hash filter factory string content type return plugin get hash filter factory content type
|
returns the hash filter factory specified by the plugin or null
|
public filter factory get crawl filter factory string content type return plugin get crawl filter factory content type
|
returns the crawl filter factory specified by the plugin or null
|
public void stop service tk checkpoint if nec for plugin plugin plugin map values plugin stop plugin au event handlers new array list au event handler plugin status unregister get daemon unregister au event handler reg au event handler super stop service
|
stop the plugin manager
|
public spec set mime type string mime type this mime type mime type return this
|
set the mime type of the desired files
|
public link rewriter factory get link rewriter factory string content type return plugin get link rewriter factory content type
|
returns the link rewriter factory specified by the plugin or null
|
private boolean is redirect option int option return redirect options option 0
|
return true iff there are options in common between the argument and
|
public spec set target metadata target target this target target return this
|
the metadata target determines the type of articles desired
|
public metadata target get target return target
|
return the target
|
public void start loadable plugins if loadable plugins ready return configuration config current config get current config log debug initializing loadable plugin registries before starting aus init loadable plugin registries get plugin registry urls config synch static plugin list config configure all plugins config start watching for changes to plugin registry aus register au event handler reg au event handler loadable plugins ready true
|
start loadable plugins ensure that they are properly loaded and
|
public spec set root string root return set roots list util list root
|
set the url of the root of the subtree below which to iterate
|
public spec set roots list string roots if root templates null throw new illegal argument exception can t set both roots and root templates this roots roots return this
|
set the urls of the roots of the subtrees below which to iterate
|
public void set permission map source permission map source permission map source this permission map source permission map source
|
sets the permission map source object which is what base url cacher
|
public spec set pattern pattern regex get match pat spec set pattern regex return this
|
set the regular expression the article urls must match
|
public spec set pattern string regex return set pattern regex 0
|
set the regular expression the article urls must match
|
public spec set pattern string regex int flags get match pat spec set pattern regex flags return this
|
set the regular expression the article urls must match
|
public spec set pattern template string pattern template return set pattern template pattern template 0
|
set the regular expression the article urls must match to the
|
public spec set pattern template string pattern template int flags get match pat spec set pattern template pattern template flags return this
|
set the regular expression the article urls must match to the
|
public pattern get pattern return get match pat spec get pattern
|
return the pattern
|
public string get pattern template return get match pat spec get pattern template
|
return the pattern template
|
public int get pattern flags return get match pat spec get pattern flags
|
return the pattern compilation flags
|
public spec set include sub tree pattern pattern regex get include pat spec set pattern regex return this
|
include only subtrees that match the pattern
|
public spec set include sub tree pattern string regex return set include sub tree pattern regex 0
|
include only subtrees that match the pattern
|
public spec set include sub tree pattern string regex int flags get include pat spec set pattern regex flags return this
|
include only subtrees that match the pattern
|
public spec set include sub tree pattern template string pattern template return set include sub tree pattern template pattern template 0
|
include only subtrees that match the pattern
|
protected string make name return plugin registry at m registry url
|
return a string that represents the plugin registry
|
protected string make start url return m registry url
|
return a string that points to the plugin registry page
|
public pattern get include sub tree pattern return get include pat spec get pattern
|
return the include subtrees pattern
|
protected crawl spec make crawl spec throws lockss regexp exception crawl rule rule make rules list start urls get new content crawl urls return new spider crawl spec start urls start urls rule m max refetch depth null null
|
return a new crawl spec with the appropriate collect and redistribute
|
protected crawl rule make rules return new registry rule
|
return the collection of crawl rules used to crawl and cache a
|
public string get include sub tree pattern template return get include pat spec get pattern template
|
return the include subtrees pattern template
|
public int get include sub tree pattern flags return get include pat spec get pattern flags
|
return the include subtrees pattern compilation flags
|
public spec set exclude sub tree pattern pattern regex get exclude pat spec set pattern regex return this
|
exclude subtrees that match the pattern
|
protected void set title config from config configuration all titles no implementation
|
registry plugin does not have a configuration
|
public rate limiter info set url rates map string string url rates this url rates url rates return this
|
set the url regexp rate map
|
public spec set exclude sub tree pattern string regex return set exclude sub tree pattern regex 0
|
exclude subtrees that match the pattern
|
public rate limiter info set mime rates map string string mime rates this mime rates mime rates return this
|
set the mime type rate map
|
public string get crawl pool key return crawl pool key
|
return the crawl pool identifier
|
public rate limiter info set crawl pool key string crawl pool key this crawl pool key crawl pool key return this
|
set the crawl pool identifier
|
public string get default rate return rate
|
return the default rate string
|
public spec set exclude sub tree pattern string regex int flags get exclude pat spec set pattern regex flags return this
|
exclude subtrees that match the pattern
|
public spec set exclude sub tree pattern template string pattern template return set exclude sub tree pattern template pattern template 0
|
exclude subtrees that match the pattern
|
public pattern get exclude sub tree pattern return get exclude pat spec get pattern
|
return the exclude subtrees pattern
|
public string get exclude sub tree pattern template return get exclude pat spec get pattern template
|
return the exclude subtrees pattern template
|
public list get sequence page stream transform pdf page stream transform return collections unmodifiable list pdf page stream transform get output list
|
p computes a sequence of tokens to be examined by the
|
public int get exclude sub tree pattern flags return get exclude pat spec get pattern flags
|
return the exclude subtrees pattern compilation flags
|
public spec set visit archive members boolean val is visit archive members val return this
|
if true will descend into archive files
|
public void add document transform document transforms if document transforms null string log message cannot add a null array of document transforms logger error log message throw new null pointer exception log message for int tra 0 tra document transforms length tra logger debug3 adding document transform at index tra add document transforms tra
|
p registers new
|
public boolean is visit archive members return is visit archive members
|
return true if should descend into archive files
|
public void add page transform page transforms if page transforms null string log message cannot add a null array of page transforms logger error log message throw new null pointer exception log message for int tra 0 tra page transforms length tra logger debug3 adding page transform at index tra add page transforms tra
|
p registers new
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.