Verified Owner
Top Fields Constructors Methods
org.jabref.http.server.resources

public Class EntryResource

extends Object
Class Inheritance
Annotations
@Path:libraries/{id}/entries/{entryId}
Imports
java.io.IOException, .InputStream, java.nio.file.Files, .StandardCopyOption, java.time.ZoneId, .ZonedDateTime, java.time.format.DateTimeFormatter, java.util.List, .Optional, org.jabref.http.SrvStateManager, org.jabref.http.server.services.ServerUtils, org.jabref.logic.externalfiles.LinkedFileHandler, org.jabref.logic.preferences.CliPreferences, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, .LinkedFile, org.jabref.model.entry.field.StandardField, com.google.common.html.HtmlEscapers, jakarta.inject.Inject, jakarta.ws.rs.BadRequestException, .Consumes, .GET, .NotFoundException, .POST, .Path, .PathParam, .Produces, jakarta.ws.rs.core.MediaType, .Response, org.slf4j.Logger, .LoggerFactory

Field Summary

Modifier and TypeField and Description
private static final Logger
pack-priv CliPreferences
pack-priv SrvStateManager

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Response
addFile(String id, String entryId, InputStream fileInputStream)

private BibDatabaseContext
getDatabaseContext(String
- also "demo" for the Chocolate.bib file
id
)

public String

Returns:

a basic entry preview as HTML text
getHTMLRepresentation
(String
The name of the library
id
,
String
The CitationKey of the BibEntry
entryId
)

At http://localhost:23119/libraries/{id}/entries/{entryId}

Combines attributes of a given BibEntry into a basic entry preview for as HTML text.

public String

Returns:

a basic entry preview as plain text
getPlainRepresentation
(String
The name of the library
id
,
String
The CitationKey of the BibEntry
entryId
)

At http://localhost:23119/libraries/){id}/entries/{entryId}{id}/entries/{entryId}

Combines attributes of a given BibEntry into a basic entry preview for as plain text.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGGERback to summary
private static final Logger LOGGER
preferencesback to summary
pack-priv CliPreferences preferences
Annotations
@Inject
srvStateManagerback to summary
pack-priv SrvStateManager srvStateManager
Annotations
@Inject

Constructor Detail

EntryResourceback to summary
public EntryResource()

Method Detail

addFileback to summary
public Response addFile(String id, String entryId, InputStream fileInputStream) throws IOException
Annotations
@POST
@Path:files
@Consumes:application/pdf
getDatabaseContextback to summary
private BibDatabaseContext getDatabaseContext(String id) throws IOException
Parameters
id:String

- also "demo" for the Chocolate.bib file

getHTMLRepresentationback to summary
public String getHTMLRepresentation(String id, String entryId) throws IOException

At http://localhost:23119/libraries/{id}/entries/{entryId}

Combines attributes of a given BibEntry into a basic entry preview for as HTML text.

Parameters
id:String

The name of the library

entryId:String

The CitationKey of the BibEntry

Returns:String

a basic entry preview as HTML text

Annotations
@GET
@Path:entries/{entryId}
@Produces:text/html;charset=UTF-8
getPlainRepresentationback to summary
public String getPlainRepresentation(String id, String entryId) throws IOException

At http://localhost:23119/libraries/){id}/entries/{entryId}{id}/entries/{entryId}

Combines attributes of a given BibEntry into a basic entry preview for as plain text.

Parameters
id:String

The name of the library

entryId:String

The CitationKey of the BibEntry

Returns:String

a basic entry preview as plain text

Annotations
@GET
@Produces:text/plain;charset=UTF-8