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

public Class CffImporter

extends Importer
Class Inheritance
Imports
java.io.BufferedReader, .IOException, java.util.ArrayList, .HashMap, .List, .Map, org.jabref.logic.citationkeypattern.CitationKeyGenerator, .CitationKeyPatternPreferences, org.jabref.logic.exporter.CffExporter, org.jabref.logic.importer.Importer, .ParserResult, org.jabref.logic.util.StandardFileType, org.jabref.model.entry.Author, .AuthorList, .BibEntry, org.jabref.model.entry.field.BiblatexSoftwareField, .Field, .StandardField, .UnknownField, org.jabref.model.entry.types.EntryType, .StandardEntryType, com.fasterxml.jackson.annotation.JsonAnySetter, .JsonProperty, com.fasterxml.jackson.databind.ObjectMapper, com.fasterxml.jackson.dataformat.yaml.YAMLFactory, com.google.common.collect.HashBiMap

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private final CitationKeyPatternPreferences
public static final Map<String, Field>
public static final Map<String, EntryType>

Constructor Summary

AccessConstructor and Description
public
CffImporter(CitationKeyPatternPreferences citationKeyPatternPreferences)

Method Summary

Modifier and TypeMethod and Description
public String
getDescription()

Implements abstract org.jabref.logic.importer.Importer.getDescription.

Returns the description of the import format.

public StandardFileType
getFileType()

Implements abstract org.jabref.logic.importer.Importer.getFileType.

Returns the type of files that this importer can read

public String
getId()

Overrides org.jabref.logic.importer.Importer.getId.

Returns a one-word ID which identifies this importer.

public String
getName()

Implements abstract org.jabref.logic.importer.Importer.getName.

Returns the name of this import format.

public ParserResult
importDatabase(BufferedReader
the input to read from
reader
)

Implements abstract org.jabref.logic.importer.Importer.importDatabase.

Parse the database in the source.

public boolean
isRecognizedFormat(BufferedReader reader)

Implements abstract org.jabref.logic.importer.Importer.isRecognizedFormat.

Check whether the source is in the correct format for this importer.

private String
private BibEntry
private void
parseFields(Map<String, String> values, Map<Field, String> entryMap)

Inherited from org.jabref.logic.importer.Importer:
compareToequalsgetCharsetgetReadergetReaderhashCodeimportDatabaseimportDatabaseisRecognizedFormatisRecognizedFormattoString

Field Detail

citationKeyPatternPreferencesback to summary
private final CitationKeyPatternPreferences citationKeyPatternPreferences
FIELDS_MAPback to summary
public static final Map<String, Field> FIELDS_MAP
TYPES_MAPback to summary
public static final Map<String, EntryType> TYPES_MAP

Constructor Detail

CffImporterback to summary
public CffImporter(CitationKeyPatternPreferences citationKeyPatternPreferences)

Method Detail

getDescriptionback to summary
public String getDescription()

Implements abstract org.jabref.logic.importer.Importer.getDescription.

Doc from org.jabref.logic.importer.Importer.getDescription.

Returns the description of the import format.

The description should specify

  • what kind of entries from what sources and based on what specification it is able to import
  • by what criteria it recognizes an import format
Returns:String

description of the import format

Annotations
@Override
getFileTypeback to summary
public StandardFileType getFileType()

Implements abstract org.jabref.logic.importer.Importer.getFileType.

Doc from org.jabref.logic.importer.Importer.getFileType.

Returns the type of files that this importer can read

Returns:StandardFileType

FileType corresponding to the importer

Annotations
@Override
getIdback to summary
public String getId()

Overrides org.jabref.logic.importer.Importer.getId.

Doc from org.jabref.logic.importer.Importer.getId.

Returns a one-word ID which identifies this importer. Used for example, to identify the importer when used from the command line.

Returns:String

ID, must be unique and not null

Annotations
@Override
getNameback to summary
public String getName()

Implements abstract org.jabref.logic.importer.Importer.getName.

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

Returns the name of this import format.

The name must be unique.

Returns:String

format name, must be unique and not null

Annotations
@Override
importDatabaseback to summary
public ParserResult importDatabase(BufferedReader reader) throws IOException

Implements abstract org.jabref.logic.importer.Importer.importDatabase.

Doc from org.jabref.logic.importer.Importer.importDatabase.

Parse the database in the source.

This method can be called in two different contexts - either when importing in a specified format, or when importing in unknown format. In the latter case, JabRef cycles through all available import formats. No error messages or feedback is displayed from individual import formats in this case.

If importing in a specified format and an empty library is returned, JabRef reports that no entries were found.

This method should never return null.

Parameters
reader:BufferedReader

the input to read from

Annotations
@Override
isRecognizedFormatback to summary
public boolean isRecognizedFormat(BufferedReader reader) throws IOException

Implements abstract org.jabref.logic.importer.Importer.isRecognizedFormat.

Doc from org.jabref.logic.importer.Importer.isRecognizedFormat.

Check whether the source is in the correct format for this importer.

The effect of this method is primarily to avoid unnecessary processing of files when searching for a suitable import format. If this method returns false, the import routine will move on to the next import format.

Thus, the correct behaviour is to return false if it is certain that the file is not of the suitable type, and true otherwise. Returning true is the safe choice if not certain.

Annotations
@Override
parseAuthorsback to summary
private String parseAuthors(List<CffImporter.CffEntity> authors)
parseEntryback to summary
private BibEntry parseEntry(CffImporter.CffReference reference)
parseFieldsback to summary
private void parseFields(Map<String, String> values, Map<Field, String> entryMap)
org.jabref.logic.importer.fileformat back to summary

private Class CffImporter.CffEntity

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final HashMap<String, String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
setValues(String key, String value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

valuesback to summary
private final HashMap<String, String> values

Constructor Detail

CffEntityback to summary
public CffEntity()

Method Detail

setValuesback to summary
private void setValues(String key, String value)
Annotations
@JsonAnySetter
org.jabref.logic.importer.fileformat back to summary

private Class CffImporter.CffFormat

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private List<CffImporter.CffEntity>
private List<CffImporter.CffIdentifier>
private List<String>
private CffImporter.CffReference
private List<CffImporter.CffReference>
private final HashMap<String, String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
setValues(String key, String value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

authorsback to summary
private List<CffImporter.CffEntity> authors
Annotations
@JsonProperty:authors
idsback to summary
private List<CffImporter.CffIdentifier> ids
Annotations
@JsonProperty:identifiers
keywordsback to summary
private List<String> keywords
Annotations
@JsonProperty:keywords
preferredback to summary
private CffImporter.CffReference preferred
Annotations
@JsonProperty:preferred-citation
referencesback to summary
private List<CffImporter.CffReference> references
Annotations
@JsonProperty:references
valuesback to summary
private final HashMap<String, String> values

Constructor Detail

CffFormatback to summary
public CffFormat()

Method Detail

setValuesback to summary
private void setValues(String key, String value)
Annotations
@JsonAnySetter
org.jabref.logic.importer.fileformat back to summary

private Class CffImporter.CffIdentifier

extends Object
Class Inheritance
  • java.lang.Object
  • org.jabref.logic.importer.fileformat.CffImporter.CffIdentifier

Field Summary

Modifier and TypeField and Description
private String
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

typeback to summary
private String type
Annotations
@JsonProperty:type
valueback to summary
private String value
Annotations
@JsonProperty:value

Constructor Detail

CffIdentifierback to summary
public CffIdentifier()
org.jabref.logic.importer.fileformat back to summary

private Class CffImporter.CffReference

extends Object
Class Inheritance
  • java.lang.Object
  • org.jabref.logic.importer.fileformat.CffImporter.CffReference

Field Summary

Modifier and TypeField and Description
private List<CffImporter.CffEntity>
private CffImporter.CffEntity
private CffImporter.CffEntity
private CffImporter.CffEntity
private List<CffImporter.CffEntity>
private List<CffImporter.CffEntity>
private CffImporter.CffEntity
private List<String>
private List<String>
private CffImporter.CffEntity
private CffImporter.CffEntity
private List<CffImporter.CffEntity>
private List<CffImporter.CffEntity>
private List<CffImporter.CffEntity>
private String
private final HashMap<String, String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
setValues(String key, String value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

authorsback to summary
private List<CffImporter.CffEntity> authors
Annotations
@JsonProperty:authors
conferenceback to summary
private CffImporter.CffEntity conference
Annotations
@JsonProperty:conference
contactback to summary
private CffImporter.CffEntity contact
Annotations
@JsonProperty:contact
databaseProviderback to summary
private CffImporter.CffEntity databaseProvider
Annotations
@JsonProperty:database-provider
editorsback to summary
private List<CffImporter.CffEntity> editors
Annotations
@JsonProperty:editors
editorsSeriesback to summary
private List<CffImporter.CffEntity> editorsSeries
Annotations
@JsonProperty:editors-series
institutionback to summary
private CffImporter.CffEntity institution
Annotations
@JsonProperty:institution
keywordsback to summary
private List<String> keywords
Annotations
@JsonProperty:keywords
languagesback to summary
private List<String> languages
Annotations
@JsonProperty:languages
locationback to summary
private CffImporter.CffEntity location
Annotations
@JsonProperty:location
publisherback to summary
private CffImporter.CffEntity publisher
Annotations
@JsonProperty:publisher
recipientsback to summary
private List<CffImporter.CffEntity> recipients
Annotations
@JsonProperty:recipients
sendersback to summary
private List<CffImporter.CffEntity> senders
Annotations
@JsonProperty:senders
translatorsback to summary
private List<CffImporter.CffEntity> translators
Annotations
@JsonProperty:translators
typeback to summary
private String type
Annotations
@JsonProperty:type
valuesback to summary
private final HashMap<String, String> values

Constructor Detail

CffReferenceback to summary
public CffReference()

Method Detail

setValuesback to summary
private void setValues(String key, String value)
Annotations
@JsonAnySetter