Skip to content

Commit

Permalink
kitodo#3408 fix reformating
Browse files Browse the repository at this point in the history
  • Loading branch information
markusweigelt committed Oct 6, 2021
1 parent 7a03133 commit 2ba9c73
Showing 1 changed file with 16 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ public class TitleGenerator extends Generator {
/**
* Constructor for TitleGenerator.
*
* @param atstsl
* field used for title generation
* @param processDetailsList
* fields used for title generation
* @param atstsl field used for title generation
* @param processDetailsList fields used for title generation
*/
public TitleGenerator(String atstsl, List<ProcessDetail> processDetailsList) {
super(atstsl, processDetailsList);
Expand All @@ -43,10 +41,8 @@ public TitleGenerator(String atstsl, List<ProcessDetail> processDetailsList) {
/**
* Generate title for process.
*
* @param titleDefinition
* definition for title to generation
* @param genericFields
* Map of Strings
* @param titleDefinition definition for title to generation
* @param genericFields Map of Strings
* @return String
*/
public String generateTitle(String titleDefinition, Map<String, String> genericFields)
Expand Down Expand Up @@ -96,15 +92,15 @@ public String generateTitle(String titleDefinition, Map<String, String> genericF
}

/**
* Forms the author title key, or the title key (4/2/2/1) if no author is given.
* The author title key is a librarian sort criteria, composed out of the first
* four letters of the first author’s last name, followed by the first four
* letters of the title of the works. The title key (4/2/2/1) a librarian sort
* criteria composed of the title of the works, taking the first four letters of
* the first word, each the first two letters of the second and third word, and
* the first letter of the fourth word of the title. Note that this
* implementation removes non-word characters (any characters except A-Z, such
* as letters with diacritics).
* Forms the author title key, or the title key (4/2/2/1) if no author is
* given. The author title key is a librarian sort criteria, composed out of
* the first four letters of the first author’s last name, followed by the
* first four letters of the title of the works. The title key (4/2/2/1) a
* librarian sort criteria composed of the title of the works, taking the
* first four letters of the first word, each the first two letters of the
* second and third word, and the first letter of the fourth word of the
* title. Note that this implementation removes non-word characters (any
* characters except A-Z, such as letters with diacritics).
*
* <p>
* <u>Examples:</u><br>
Expand All @@ -115,7 +111,8 @@ public String generateTitle(String titleDefinition, Map<String, String> genericF
* @param title
* the title of the work
* @param author
* the last name of the (first) author, may be {@code null} or empty
* the last name of the (first) author, may be {@code null} or
* empty
* @return the author title key, or the title key (4/2/2/1)
*/
public static String createAtstsl(String title, String author) {
Expand Down Expand Up @@ -173,8 +170,7 @@ private String evaluateAdditionalDetailsRows(String currentTitle, String current
for (ProcessDetail row : this.processDetailsList) {
String rowMetadataID = row.getMetadataID();
String rowValue = ImportService.getProcessDetailValue(row);
// if it is the ATS or TSL field, then use the calculated atstsl if it does not
// already exist
// if it is the ATS or TSL field, then use the calculated atstsl if it does not already exist
if ("TSL_ATS".equals(rowMetadataID)) {
if (StringUtils.isBlank(rowValue)) {
this.atstsl = createAtstsl(currentTitle, currentAuthors);
Expand Down

0 comments on commit 2ba9c73

Please sign in to comment.