Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.layout.format

public Class FileLink

extends Object
implements ParamLayoutFormatter
Class Inheritance
All Implemented Interfaces
org.jabref.logic.layout.ParamLayoutFormatter, org.jabref.logic.layout.LayoutFormatter
Imports
java.nio.file.Path, java.util.List, org.jabref.logic.importer.util.FileFieldParser, org.jabref.logic.layout.ParamLayoutFormatter, org.jabref.model.entry.LinkedFile

Export formatter that handles the file link list of JabRef 2.3 and later, by selecting the first file link, if any, specified by the field.

Field Summary

Modifier and TypeField and Description
private final List<Path>
private String
private final Path

Constructor Summary

AccessConstructor and Description

Method Summary

Modifier and TypeMethod and Description
public String
format(String field)

Implements org.jabref.logic.layout.LayoutFormatter.format.

Failure Mode:

Formatters should be robust in the sense that they always return some relevant string.

public void
setArgument(String
The file type.
arg
)

Implements org.jabref.logic.layout.ParamLayoutFormatter.setArgument.

This method is called if the layout file specifies an argument for this formatter.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fileDirectoriesback to summary
private final List<Path> fileDirectories
fileTypeback to summary
private String fileType
mainFileDirectoryback to summary
private final Path mainFileDirectory

Constructor Detail

Method Detail

formatback to summary
public String format(String field)

Implements org.jabref.logic.layout.LayoutFormatter.format.

Doc from org.jabref.logic.layout.LayoutFormatter.format.

Failure Mode:

Formatters should be robust in the sense that they always return some relevant string.

If the formatter can detect an invalid input it should return the original string otherwise it may simply return a wrong output.

Annotations
@Override
setArgumentback to summary
public void setArgument(String arg)

Implements org.jabref.logic.layout.ParamLayoutFormatter.setArgument.

This method is called if the layout file specifies an argument for this formatter. We use it as an indicator of which file type we should look for.

Parameters
arg:String

The file type.

Annotations
@Override