Verified Owner
Top Description Fields Constructors Methods
org.jabref.logic.quality.consistency

public Class BibliographyConsistencyCheckResultErrorFormatWriter

extends BibliographyConsistencyCheckResultWriter
Class Inheritance
Imports
java.io.IOException, .Writer, java.nio.file.Path, java.util.Optional, .Set, org.jabref.logic.importer.ParserResult, org.jabref.model.database.BibDatabaseMode, org.jabref.model.entry.BibEntry, .BibEntryTypesManager, org.jabref.model.entry.field.Field

Outputs the findings in a line-oriented file:line:column:citationKey:field: message format suitable for editors and CI tooling.

This is the same format produced by org.jabref.logic.integrity.IntegrityCheckResultErrorFormatWriter. One line is emitted per deviating field of a reported entry:

Both findings are field-level, so every line carries both the citation key and the field name.

Field Summary

Modifier and TypeField and Description
private final Path
private final ParserResult
Inherited from org.jabref.logic.quality.consistency.BibliographyConsistencyCheckResultWriter:
allReportedFieldsbibDatabaseModecolumnCountcolumnNamesentryTypesManagerisPorcelainOPTIONAL_FIELD_AT_ENTRY_TYPE_CELL_ENTRYREQUIRED_FIELD_AT_ENTRY_TYPE_CELL_ENTRYresultUNKNOWN_FIELD_AT_ENTRY_TYPE_CELL_ENTRYUNSET_FIELD_AT_ENTRY_TYPE_CELL_ENTRYwriter

Constructor Summary

AccessConstructor and Description
public
BibliographyConsistencyCheckResultErrorFormatWriter(BibliographyConsistencyCheck.Result result, Writer writer, boolean isPorcelain, BibEntryTypesManager entryTypesManager, BibDatabaseMode bibDatabaseMode, ParserResult parserResult, Path inputFile)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

private void
write(ParserResult.Range range, String citationKey, Field field, String message)

protected void
Inherited from org.jabref.logic.quality.consistency.BibliographyConsistencyCheckResultWriter:
getFindingsAsListwriteFindingswriteMapEntry

Field Detail

inputFileback to summary
private final Path inputFile
parserResultback to summary
private final ParserResult parserResult

Constructor Detail

BibliographyConsistencyCheckResultErrorFormatWriterback to summary
public BibliographyConsistencyCheckResultErrorFormatWriter(BibliographyConsistencyCheck.Result result, Writer writer, boolean isPorcelain, BibEntryTypesManager entryTypesManager, BibDatabaseMode bibDatabaseMode, ParserResult parserResult, Path inputFile)

Method Detail

closeback to summary
public void close() throws IOException

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
writeback to summary
private void write(ParserResult.Range range, String citationKey, Field field, String message) throws IOException
writeBibEntryback to summary
protected void writeBibEntry(BibEntry bibEntry, String entryType, Set<Field> requiredFields, Set<Field> optionalFields) throws IOException

Implements abstract org.jabref.logic.quality.consistency.BibliographyConsistencyCheckResultWriter.writeBibEntry.

Annotations
@Override