Top Description Fields Constructors Methods
org.jabref.logic.exporter

pack-priv Class ModsExporter

extends Exporter
Class Inheritance
Imports
java.io.IOException, .OutputStream, .StringReader, .StringWriter, java.math.BigInteger, java.nio.file.Files, .Path, java.util.ArrayList, .Comparator, .List, .Map, .Objects, .TreeMap, javax.xml.stream.XMLOutputFactory, .XMLStreamException, .XMLStreamWriter, javax.xml.transform.OutputKeys, .Transformer, .TransformerException, .TransformerFactory, javax.xml.transform.stream.StreamResult, .StreamSource, org.jabref.logic.util.StandardFileType, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.Field, .StandardField, .UnknownField, org.jabref.model.entry.types.EntryType, org.slf4j.Logger, .LoggerFactory

TemplateExporter for exporting in MODS XML format.

Field Summary

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
private void
private void
addDate(XMLStreamWriter writer, String dateName, String value)

private void
addDetail(XMLStreamWriter writer, Field field, String value)

private void
addGenre(XMLStreamWriter writer, EntryType entryType)

private void
addIdentifier(XMLStreamWriter writer, Field field, String value)

private void
private void
private void
private void
private void
private void
private void
private void
addPart(List<String> part, String value)

private void
private void
private void
addUrl(XMLStreamWriter writer, String value)

private XMLStreamWriter
public void
export(final BibDatabaseContext
the database to export from
databaseContext
,
final Path
the file to write to
file
,
List<BibEntry>
a list containing all entries that should be exported
entries
)

Implements abstract org.jabref.logic.exporter.Exporter.export.

Performs the export.

private void
private void
trackOriginInformation(List<String> originItems, Field field, String value)

private void
writeOriginInformation(XMLStreamWriter writer, List<String> originItems, Map<Field, String> fieldMap)

private void
private void
private void
Inherited from org.jabref.logic.exporter.Exporter:
exportexportToAllFilesOfEntryexportToFileByPathgetFileTypegetIdgetNametoString

Field Detail

DOUBLE_MINUSback to summary
private static final String DOUBLE_MINUS
LOGGERback to summary
private static final Logger LOGGER
MINUSback to summary
private static final String MINUS
MODS_NAMESPACE_URIback to summary
private static final String MODS_NAMESPACE_URI
MODS_SCHEMA_LOCATIONback to summary
private static final String MODS_SCHEMA_LOCATION

Constructor Detail

ModsExporterback to summary
public ModsExporter()

Method Detail

addAbstractback to summary
private void addAbstract(XMLStreamWriter writer, String value) throws XMLStreamException
addAffiliationback to summary
private void addAffiliation(XMLStreamWriter writer, String value) throws XMLStreamException
addDateback to summary
private void addDate(XMLStreamWriter writer, String dateName, String value) throws XMLStreamException
addDetailback to summary
private void addDetail(XMLStreamWriter writer, Field field, String value) throws XMLStreamException
addGenreback to summary
private void addGenre(XMLStreamWriter writer, EntryType entryType) throws XMLStreamException
addIdentifierback to summary
private void addIdentifier(XMLStreamWriter writer, Field field, String value) throws XMLStreamException
addJournalback to summary
private void addJournal(XMLStreamWriter writer, String value) throws XMLStreamException
addKeyWordsback to summary
private void addKeyWords(XMLStreamWriter writer, String value) throws XMLStreamException
addLanguageback to summary
private void addLanguage(XMLStreamWriter writer, String value) throws XMLStreamException
addLocationback to summary
private void addLocation(XMLStreamWriter writer, String value) throws XMLStreamException
addNoteback to summary
private void addNote(XMLStreamWriter writer, String value) throws XMLStreamException
addOriginInformationback to summary
private void addOriginInformation(XMLStreamWriter writer, Field field, String value) throws XMLStreamException
addPagesback to summary
private void addPages(XMLStreamWriter writer, String value) throws XMLStreamException
addPartback to summary
private void addPart(List<String> part, String value)
addStartAndEndPageback to summary
private void addStartAndEndPage(XMLStreamWriter writer, String value, String minus) throws XMLStreamException
addTitleback to summary
private void addTitle(XMLStreamWriter writer, String value) throws XMLStreamException
addUrlback to summary
private void addUrl(XMLStreamWriter writer, String value) throws XMLStreamException
createWriterback to summary
private XMLStreamWriter createWriter(StringWriter sw) throws XMLStreamException
exportback to summary
public void export(final BibDatabaseContext databaseContext, final Path file, List<BibEntry> entries) throws SaveException

Implements abstract org.jabref.logic.exporter.Exporter.export.

Doc from org.jabref.logic.exporter.Exporter.export.

Performs the export.

Parameters
databaseContext:BibDatabaseContext

the database to export from

file:Path

the file to write to

entries:List<BibEntry>

a list containing all entries that should be exported

Annotations
@Override
handleAuthorsback to summary
private void handleAuthors(XMLStreamWriter writer, String value) throws XMLStreamException
trackOriginInformationback to summary
private void trackOriginInformation(List<String> originItems, Field field, String value)
writeOriginInformationback to summary
private void writeOriginInformation(XMLStreamWriter writer, List<String> originItems, Map<Field, String> fieldMap) throws XMLStreamException
writePartInformationback to summary
private void writePartInformation(XMLStreamWriter writer, List<String> parts, Map<Field, String> fieldMap) throws XMLStreamException
writeRelatedInformationback to summary
private void writeRelatedInformation(XMLStreamWriter writer, List<String> parts, Map<Field, String> fieldMap) throws XMLStreamException
writerFormattedback to summary
private void writerFormatted(Path file, StringWriter sw) throws TransformerException, IOException