Search in sources :

Example 1 with ClearFormatter

use of org.jabref.logic.formatter.bibtexfields.ClearFormatter in project jabref by JabRef.

the class MathSciNet method doPostCleanup.

@Override
public void doPostCleanup(BibEntry entry) {
    new MoveFieldCleanup("fjournal", FieldName.JOURNAL).cleanup(entry);
    new MoveFieldCleanup("mrclass", FieldName.KEYWORDS).cleanup(entry);
    new FieldFormatterCleanup("mrreviewer", new ClearFormatter()).cleanup(entry);
    new FieldFormatterCleanup(FieldName.URL, new ClearFormatter()).cleanup(entry);
}
Also used : FieldFormatterCleanup(org.jabref.model.cleanup.FieldFormatterCleanup) MoveFieldCleanup(org.jabref.logic.cleanup.MoveFieldCleanup) ClearFormatter(org.jabref.logic.formatter.bibtexfields.ClearFormatter)

Example 2 with ClearFormatter

use of org.jabref.logic.formatter.bibtexfields.ClearFormatter in project jabref by JabRef.

the class AstrophysicsDataSystem method doPostCleanup.

@Override
public void doPostCleanup(BibEntry entry) {
    new FieldFormatterCleanup(FieldName.ABSTRACT, new RemoveBracesFormatter()).cleanup(entry);
    new FieldFormatterCleanup(FieldName.TITLE, new RemoveBracesFormatter()).cleanup(entry);
    new FieldFormatterCleanup(FieldName.AUTHOR, new NormalizeNamesFormatter()).cleanup(entry);
    // Remove ADS note
    new FieldFormatterCleanup("adsnote", new ClearFormatter()).cleanup(entry);
    // Move adsurl to url field
    new MoveFieldCleanup("adsurl", FieldName.URL).cleanup(entry);
}
Also used : NormalizeNamesFormatter(org.jabref.logic.formatter.bibtexfields.NormalizeNamesFormatter) RemoveBracesFormatter(org.jabref.logic.formatter.bibtexfields.RemoveBracesFormatter) FieldFormatterCleanup(org.jabref.model.cleanup.FieldFormatterCleanup) ClearFormatter(org.jabref.logic.formatter.bibtexfields.ClearFormatter) MoveFieldCleanup(org.jabref.logic.cleanup.MoveFieldCleanup)

Example 3 with ClearFormatter

use of org.jabref.logic.formatter.bibtexfields.ClearFormatter in project jabref by JabRef.

the class DBLPFetcher method doPostCleanup.

@Override
public void doPostCleanup(BibEntry entry) {
    DoiCleanup doiCleaner = new DoiCleanup();
    FieldFormatterCleanup clearTimestampFormatter = new FieldFormatterCleanup(FieldName.TIMESTAMP, new ClearFormatter());
    doiCleaner.cleanup(entry);
    clearTimestampFormatter.cleanup(entry);
}
Also used : DoiCleanup(org.jabref.logic.cleanup.DoiCleanup) FieldFormatterCleanup(org.jabref.model.cleanup.FieldFormatterCleanup) ClearFormatter(org.jabref.logic.formatter.bibtexfields.ClearFormatter)

Example 4 with ClearFormatter

use of org.jabref.logic.formatter.bibtexfields.ClearFormatter in project jabref by JabRef.

the class DoiFetcher method doPostCleanup.

private void doPostCleanup(BibEntry entry) {
    new FieldFormatterCleanup(FieldName.PAGES, new NormalizePagesFormatter()).cleanup(entry);
    new FieldFormatterCleanup(FieldName.URL, new ClearFormatter()).cleanup(entry);
}
Also used : FieldFormatterCleanup(org.jabref.model.cleanup.FieldFormatterCleanup) ClearFormatter(org.jabref.logic.formatter.bibtexfields.ClearFormatter) NormalizePagesFormatter(org.jabref.logic.formatter.bibtexfields.NormalizePagesFormatter)

Example 5 with ClearFormatter

use of org.jabref.logic.formatter.bibtexfields.ClearFormatter in project jabref by JabRef.

the class DoiCleanup method removeFieldValue.

private void removeFieldValue(BibEntry entry, String field, List<FieldChange> changes) {
    CleanupJob eraser = new FieldFormatterCleanup(field, new ClearFormatter());
    changes.addAll(eraser.cleanup(entry));
}
Also used : FieldFormatterCleanup(org.jabref.model.cleanup.FieldFormatterCleanup) ClearFormatter(org.jabref.logic.formatter.bibtexfields.ClearFormatter) CleanupJob(org.jabref.model.cleanup.CleanupJob)

Aggregations

ClearFormatter (org.jabref.logic.formatter.bibtexfields.ClearFormatter)7 FieldFormatterCleanup (org.jabref.model.cleanup.FieldFormatterCleanup)7 MoveFieldCleanup (org.jabref.logic.cleanup.MoveFieldCleanup)2 CleanupActionsListModel (org.jabref.gui.cleanup.CleanupActionsListModel)1 DoiCleanup (org.jabref.logic.cleanup.DoiCleanup)1 NormalizeMonthFormatter (org.jabref.logic.formatter.bibtexfields.NormalizeMonthFormatter)1 NormalizeNamesFormatter (org.jabref.logic.formatter.bibtexfields.NormalizeNamesFormatter)1 NormalizePagesFormatter (org.jabref.logic.formatter.bibtexfields.NormalizePagesFormatter)1 RemoveBracesFormatter (org.jabref.logic.formatter.bibtexfields.RemoveBracesFormatter)1 CleanupJob (org.jabref.model.cleanup.CleanupJob)1 FieldFormatterCleanups (org.jabref.model.cleanup.FieldFormatterCleanups)1 Test (org.junit.Test)1