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

public Class MapResource

extends Object
Class Inheritance
Annotations
@Path:libraries/{id}/map
Imports
java.io.IOException, java.nio.file.Files, org.jabref.http.SrvStateManager, org.jabref.http.server.services.ServerUtils, jakarta.inject.Inject, jakarta.ws.rs.Consumes, .GET, .PUT, .Path, .PathParam, .Produces, jakarta.ws.rs.core.MediaType, org.slf4j.Logger, .LoggerFactory

Field Summary

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private Path
public String

Returns:

A JSON String containing the mindmap data. If no {id}.jmp file was found, returns the standard mindmap
getJabMapJson
(String
The given library
id
)

At http://localhost:23119/libraries/{id}/map

Looks for the .jmp file in the directory of the given library ({id}.bib file).

private Path
public void
updateJabMapJson(String
The given library
id
,
String fileContent)

At http://localhost:23119/libraries/{id}/map

Saves the mindmap next to its associated library.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

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

Constructor Detail

MapResourceback to summary
public MapResource()

Method Detail

getJabMapDemoPathback to summary
private Path getJabMapDemoPath()
getJabMapJsonback to summary
public String getJabMapJson(String id) throws IOException

At http://localhost:23119/libraries/{id}/map

Looks for the .jmp file in the directory of the given library ({id}.bib file).

Parameters
id:String

The given library

Returns:String

A JSON String containing the mindmap data. If no {id}.jmp file was found, returns the standard mindmap

Annotations
@GET
@Produces:application/json
getJabMapPathback to summary
private Path getJabMapPath(String id)
updateJabMapJsonback to summary
public void updateJabMapJson(String id, String fileContent) throws IOException

At http://localhost:23119/libraries/{id}/map

Saves the mindmap next to its associated library.

Parameters
id:String

The given library

Annotations
@PUT
@Consumes:application/json