public class OAI2Fetcher extends java.lang.Object implements EntryFetcher
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OAI2_ARXIV_ARCHIVENAME |
static java.lang.String |
OAI2_ARXIV_HOST |
static java.lang.String |
OAI2_ARXIV_METADATAPREFIX |
static java.lang.String |
OAI2_ARXIV_PREFIXIDENTIFIER |
static java.lang.String |
OAI2_ARXIV_SCRIPT |
static java.lang.String |
OAI2_IDENTIFIER_FIELD |
Constructor and Description |
---|
OAI2Fetcher()
Default Constructor.
|
OAI2Fetcher(java.lang.String oai2Host,
java.lang.String oai2Script,
java.lang.String oai2Metadataprefix,
java.lang.String oai2Prefixidentifier,
java.lang.String oai2ArchiveName,
long waitTimeMs) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
constructUrl(java.lang.String key)
Construct the query URL
|
static java.lang.String |
correctLineBreaks(java.lang.String s) |
static java.lang.String |
fixKey(java.lang.String key)
Strip subcategories from ArXiv key.
|
java.lang.String |
getHelpPage()
Get the name of the help page for this activeFetcher.
|
java.net.URL |
getIcon()
Get the appropriate icon URL for this activeFetcher.
|
java.lang.String |
getKeyName()
Get the name of the key binding for this activeFetcher, if any.
|
javax.swing.JPanel |
getOptionsPanel()
If this activeFetcher requires additional options, a panel for setting up these
should be returned in a JPanel by this method.
|
java.lang.String |
getTitle()
The title for this activeFetcher, displayed in the menu and in the side pane.
|
BibtexEntry |
importOai2Entry(java.lang.String key)
Import an entry from an OAI2 archive.
|
boolean |
processQuery(java.lang.String query,
ImportInspector dialog,
OutputPrinter status)
Handle a query entered by the user.
|
void |
stopFetching()
This method is called by the dialog when the user has cancelled or
signalled a stop.
|
public static final java.lang.String OAI2_ARXIV_PREFIXIDENTIFIER
public static final java.lang.String OAI2_ARXIV_HOST
public static final java.lang.String OAI2_ARXIV_SCRIPT
public static final java.lang.String OAI2_ARXIV_METADATAPREFIX
public static final java.lang.String OAI2_ARXIV_ARCHIVENAME
public static final java.lang.String OAI2_IDENTIFIER_FIELD
public OAI2Fetcher(java.lang.String oai2Host, java.lang.String oai2Script, java.lang.String oai2Metadataprefix, java.lang.String oai2Prefixidentifier, java.lang.String oai2ArchiveName, long waitTimeMs)
oai2Host
- the host to query without leading http:// and without trailing /oai2Script
- the relative location of the oai2 interface without leading
and trailing /oai2Metadataprefix
- the urlencoded metadataprefixoai2Prefixidentifier
- the urlencoded prefix identifierwaitTimeMs
- Time to wait in milliseconds between query-requests.public OAI2Fetcher()
public java.lang.String constructUrl(java.lang.String key)
key
- The key of the OAI2 entry that the url should point to.public static java.lang.String fixKey(java.lang.String key)
key
- The key to fix.public static java.lang.String correctLineBreaks(java.lang.String s)
public BibtexEntry importOai2Entry(java.lang.String key)
key
- The OAI2 key to fetch from ArXiv.public java.lang.String getHelpPage()
EntryFetcher
getHelpPage
in interface EntryFetcher
public java.net.URL getIcon()
EntryFetcher
getIcon
in interface EntryFetcher
public java.lang.String getKeyName()
EntryFetcher
getKeyName
in interface EntryFetcher
public javax.swing.JPanel getOptionsPanel()
EntryFetcher
getOptionsPanel
in interface EntryFetcher
public java.lang.String getTitle()
EntryFetcher
getTitle
in interface EntryFetcher
public boolean processQuery(java.lang.String query, ImportInspector dialog, OutputPrinter status)
EntryFetcher
processQuery
in interface EntryFetcher
query
- The query text.dialog
- The dialog to add imported entries to.status
- An OutputPrinter passed to the activeFetcher for reporting about the
status of the fetching.public void stopFetching()
ImportInspectionDialog.CallBack
stopFetching
in interface ImportInspectionDialog.CallBack