Top Fields Constructors Methods
org.jabref.logic.importer.fileformat

public Class ACMPortalParser

extends Object
implements Parser
Class Inheritance
All Implemented Interfaces
org.jabref.logic.importer.Parser
Imports
java.io.IOException, .InputStream, java.net.CookieHandler, .CookieManager, .MalformedURLException, .URISyntaxException, .URL, java.nio.charset.StandardCharsets, java.util.ArrayList, .Arrays, .List, .Map, java.util.stream.Collectors, org.jabref.logic.importer.FetcherException, .ParseException, .Parser, org.jabref.logic.net.URLDownload, org.jabref.model.entry.Author, .AuthorList, .BibEntry, org.jabref.model.entry.field.StandardField, org.jabref.model.entry.types.StandardEntryType, com.google.common.base.CaseFormat, .Enums, com.google.gson.JsonArray, .JsonElement, .JsonObject, .JsonParser, org.apache.hc.core5.net.URIBuilder, org.jsoup.Jsoup, org.jsoup.nodes.Document, .Element, org.jsoup.select.Elements

Field Summary

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private String
public List<BibEntry>

Returns:

BibEntry List
getBibEntriesFromDoiList
(List<String>
DOI List
doiList
)

Obtain BibEntry according to DOI

public URL

Returns:

query URL
getUrlFromDoiList
(List<String>
DOI List
doiList
)

Constructing the query url for the doi

public BibEntry

Returns:

BibEntry parsed from query result
parseBibEntry
(String
query result in JSON format
jsonStr
)

Parse BibEntry from query result xml

public List<String>

Returns:

DOI list
parseDoiSearchPage
(InputStream
html stream
stream
)

Parse all DOIs from the ACM Portal search results page

public List<BibEntry>

Returns:

BibEntry List
parseEntries
(InputStream
html stream
stream
)

Implements org.jabref.logic.importer.Parser.parseEntries.

Parse the DOI of the ACM Portal search result page and obtain the corresponding BibEntry

private StandardEntryType
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DOI_URLback to summary
private static final String DOI_URL
HOSTback to summary
private static final String HOST

Constructor Detail

ACMPortalParserback to summary
public ACMPortalParser()

Method Detail

getAuthorsLastFirstback to summary
private String getAuthorsLastFirst(JsonArray authors)
getBibEntriesFromDoiListback to summary
public List<BibEntry> getBibEntriesFromDoiList(List<String> doiList) throws FetcherException

Obtain BibEntry according to DOI

Parameters
doiList:List<String>

DOI List

Returns:List<BibEntry>

BibEntry List

getUrlFromDoiListback to summary
public URL getUrlFromDoiList(List<String> doiList) throws URISyntaxException, MalformedURLException

Constructing the query url for the doi

Parameters
doiList:List<String>

DOI List

Returns:URL

query URL

parseBibEntryback to summary
public BibEntry parseBibEntry(String jsonStr)

Parse BibEntry from query result xml

Parameters
jsonStr:String

query result in JSON format

Returns:BibEntry

BibEntry parsed from query result

parseDoiSearchPageback to summary
public List<String> parseDoiSearchPage(InputStream stream) throws ParseException

Parse all DOIs from the ACM Portal search results page

Parameters
stream:InputStream

html stream

Returns:List<String>

DOI list

parseEntriesback to summary
public List<BibEntry> parseEntries(InputStream stream) throws ParseException

Implements org.jabref.logic.importer.Parser.parseEntries.

Parse the DOI of the ACM Portal search result page and obtain the corresponding BibEntry

Parameters
stream:InputStream

html stream

Returns:List<BibEntry>

BibEntry List

Annotations
@Override
typeStrToEnumback to summary
private StandardEntryType typeStrToEnum(String typeStr)