Top Description Fields Constructors Methods
org.jabref.logic.importer.fetcher

public Class ISIDOREFetcher

extends Object
implements PagedSearchBasedParserFetcher
Class Inheritance
All Implemented Interfaces
org.jabref.logic.importer.PagedSearchBasedParserFetcher, org.jabref.logic.importer.ParserFetcher, org.jabref.logic.importer.PagedSearchBasedFetcher, org.jabref.logic.importer.SearchBasedFetcher, org.jabref.logic.importer.WebFetcher, org.jabref.logic.importer.SearchBasedParserFetcher
Imports
java.io.IOException, .PushbackInputStream, java.net.MalformedURLException, .URISyntaxException, .URL, java.nio.charset.StandardCharsets, java.util.ArrayList, .Collections, .List, .Optional, .StringJoiner, javax.xml.parsers.DocumentBuilder, .DocumentBuilderFactory, .ParserConfigurationException, org.jabref.logic.help.HelpFile, org.jabref.logic.importer.FetcherException, .PagedSearchBasedParserFetcher, .Parser, org.jabref.logic.importer.fetcher.transformers.ISIDOREQueryTransformer, org.jabref.logic.net.URLDownload, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.StandardField, org.jabref.model.entry.types.EntryType, .StandardEntryType, jakarta.ws.rs.core.MediaType, org.apache.hc.core5.net.URIBuilder, org.apache.lucene.queryparser.flexible.core.nodes.QueryNode, org.jooq.lambda.Unchecked, org.slf4j.Logger, .LoggerFactory, org.w3c.dom.Document, .Element, .Node, .NodeList, org.xml.sax.SAXException

Fetcher for ISIDORE``` Will take in the link to the website or the last six digits that identify the reference Uses ISIDORE's API.

Field Summary

Modifier and TypeField and Description
private static final DocumentBuilderFactory
private static final Logger
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private String
getAuthor(Node itemElement)

private String
public Optional<HelpFile>
getHelpPage()

Overrides default org.jabref.logic.importer.WebFetcher.getHelpPage.

Returns the help page for this fetcher.

private String
public String
getName()

Implements org.jabref.logic.importer.WebFetcher.getName.

Returns the localized name of this fetcher.

public Parser
getParser()

Implements org.jabref.logic.importer.SearchBasedParserFetcher.getParser.

Returns the parser used to convert the response to a list of BibEntry.

private String
getPublishers(Node itemElement)

private EntryType
getType(NodeList list)

Get the type of the document, ISIDORE only seems to have select types, also their types are different to those used by JabRef.

public URLDownload
getUrlDownload(URL url)

Overrides default org.jabref.logic.importer.WebFetcher.getUrlDownload.

Constructs an URLDownload object for downloading content based on the given URL.

public URL
getURLForQuery(org.apache.lucene.queryparser.flexible.core.nodes.QueryNode
the search query
luceneQuery
,
int
the number of the page indexed from 0
pageNumber
)

Implements org.jabref.logic.importer.PagedSearchBasedParserFetcher.getURLForQuery.

Constructs a URL based on the query, size and page number.

private List<BibEntry>
parseXMl(Element element)

private String
removeNumbers(String string)

Remove numbers from a string and everything after the number, (helps with the author field).

private BibEntry
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DOCUMENT_BUILDER_FACTORYback to summary
private static final DocumentBuilderFactory DOCUMENT_BUILDER_FACTORY
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

ISIDOREFetcherback to summary
public ISIDOREFetcher()

Method Detail

getAuthorback to summary
private String getAuthor(Node itemElement)
getDOIback to summary
private String getDOI(NodeList list)
getHelpPageback to summary
public Optional<HelpFile> getHelpPage()

Overrides default org.jabref.logic.importer.WebFetcher.getHelpPage.

Doc from org.jabref.logic.importer.WebFetcher.getHelpPage.

Returns the help page for this fetcher.

Returns:Optional<HelpFile>

the HelpFile enum constant for the help page

Annotations
@Override
getJournalback to summary
private String getJournal(NodeList list)
getNameback to summary
public String getName()

Implements org.jabref.logic.importer.WebFetcher.getName.

Doc from org.jabref.logic.importer.WebFetcher.getName.

Returns the localized name of this fetcher. The title can be used to display the fetcher in the menu and in the side pane.

Returns:String

the localized name

Annotations
@Override
getParserback to summary
public Parser getParser()

Implements org.jabref.logic.importer.SearchBasedParserFetcher.getParser.

Doc from org.jabref.logic.importer.SearchBasedParserFetcher.getParser.

Returns the parser used to convert the response to a list of BibEntry.

Annotations
@Override
getPublishersback to summary
private String getPublishers(Node itemElement)
getTypeback to summary
private EntryType getType(NodeList list)

Get the type of the document, ISIDORE only seems to have select types, also their types are different to those used by JabRef.

getUrlDownloadback to summary
public URLDownload getUrlDownload(URL url)

Overrides default org.jabref.logic.importer.WebFetcher.getUrlDownload.

Doc from org.jabref.logic.importer.WebFetcher.getUrlDownload.

Constructs an URLDownload object for downloading content based on the given URL. Overwrite, if you need to send additional headers for the download.

Annotations
@Override
getURLForQueryback to summary
public URL getURLForQuery(org.apache.lucene.queryparser.flexible.core.nodes.QueryNode luceneQuery, int pageNumber) throws URISyntaxException, MalformedURLException, FetcherException

Implements org.jabref.logic.importer.PagedSearchBasedParserFetcher.getURLForQuery.

Doc from org.jabref.logic.importer.PagedSearchBasedParserFetcher.getURLForQuery.

Constructs a URL based on the query, size and page number.

Parameters
luceneQuery:org.apache.lucene.queryparser.flexible.core.nodes.QueryNode

the search query

pageNumber:int

the number of the page indexed from 0

Annotations
@Override
parseXMlback to summary
private List<BibEntry> parseXMl(Element element)
removeNumbersback to summary
private String removeNumbers(String string)

Remove numbers from a string and everything after the number, (helps with the author field).

xmlItemToBibEntryback to summary
private BibEntry xmlItemToBibEntry(Element itemElement)