forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor code improvements to ImportHandler (JabRef#10562)
* Minor code improvements * Introduce interface ImportCleanup (better inheritance) * Refine ImportHandler
- Loading branch information
Showing
11 changed files
with
92 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/main/java/org/jabref/logic/importer/ImportCleanupBiblatex.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.jabref.logic.importer; | ||
|
||
import org.jabref.logic.cleanup.ConvertToBiblatexCleanup; | ||
import org.jabref.model.entry.BibEntry; | ||
|
||
public class ImportCleanupBiblatex implements ImportCleanup { | ||
|
||
private final ConvertToBiblatexCleanup convertToBiblatexCleanup = new ConvertToBiblatexCleanup(); | ||
|
||
/** | ||
* Performs a format conversion of the given entry into the targeted format. | ||
* Modifies the given entry and also returns it to enable usage of doPostCleanup in streams. | ||
* | ||
* @return Cleaned up BibEntry | ||
*/ | ||
@Override | ||
public BibEntry doPostCleanup(BibEntry entry) { | ||
convertToBiblatexCleanup.cleanup(entry); | ||
return entry; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/org/jabref/logic/importer/ImportCleanupBibtex.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.jabref.logic.importer; | ||
|
||
import org.jabref.logic.cleanup.ConvertToBibtexCleanup; | ||
import org.jabref.model.entry.BibEntry; | ||
|
||
public class ImportCleanupBibtex implements ImportCleanup { | ||
|
||
private final ConvertToBibtexCleanup convertToBibtexCleanup = new ConvertToBibtexCleanup(); | ||
|
||
/** | ||
* Performs a format conversion of the given entry into the targeted format. | ||
* Modifies the given entry and also returns it to enable usage of doPostCleanup in streams. | ||
* | ||
* @return Cleaned up BibEntry | ||
*/ | ||
@Override | ||
public BibEntry doPostCleanup(BibEntry entry) { | ||
convertToBibtexCleanup.cleanup(entry); | ||
return entry; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters