|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.common.utils.cdx.CDXReader
public class CDXReader
This class handles reading CDX files and finding entries in them. Furthermore it implements the possibillity to do filtering of searchresults
Field Summary | |
---|---|
(package private) static java.lang.String |
SEPARATOR_REGEX
The regular expression that defines seperation between fields. |
Constructor Summary | |
---|---|
CDXReader()
Create a new CDXReader with no file. |
|
CDXReader(java.io.File cdxFile)
Create a new CDXReader that reads the given file. |
Method Summary | |
---|---|
void |
addCDXFile(java.io.File cdxFile)
Add another CDX file to those being searched. |
void |
addCDXRecordFilter(CDXRecordFilter cdxrecfilter)
Add another CDXRecordFilter to the list of filters to use when searching. |
void |
clearCDXFiles()
Forget about all CDX files. |
CDXRecordFilter |
getCDXRecordFilter(java.lang.String filtername)
Get a specific filter by the name of the filter - if not found return null. |
java.util.Map<java.lang.String,CDXRecordFilter> |
getFilters()
Get a table of all filters. |
ARCKey |
getKey(java.lang.String uri)
Look up an entry in CDX files. |
void |
removeAllCDXRecordFilters()
Remove all CDXRecordFilters. |
void |
removeCDXRecordFilter(java.lang.String filtername)
Remove a specific filter by the name of the filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final java.lang.String SEPARATOR_REGEX
Constructor Detail |
---|
public CDXReader(java.io.File cdxFile)
cdxFile
- A CDX file to read.
IOFailure
- If the file cannot be found.public CDXReader()
Method Detail |
---|
public void addCDXFile(java.io.File cdxFile)
cdxFile
- A CDX file to search.
IOFailure
- If the file cannot be found or readpublic void clearCDXFiles()
public void addCDXRecordFilter(CDXRecordFilter cdxrecfilter) throws ArgumentNotValid
cdxrecfilter
- A CDXRecordFilter to use when searching.
ArgumentNotValid
- If the filter is invalid or another filter
exists with the same name.public void removeAllCDXRecordFilters()
public java.util.Map<java.lang.String,CDXRecordFilter> getFilters()
public CDXRecordFilter getCDXRecordFilter(java.lang.String filtername)
filtername
- The given filtername.
public void removeCDXRecordFilter(java.lang.String filtername)
filtername
- The given filtername.
UnknownID
- if there is no filter of that name.public ARCKey getKey(java.lang.String uri)
uri
- A URI to find in the CDX files.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |