Object CopyrightStatementsProcessor
-
- All Implemented Interfaces:
public class CopyrightStatementsProcessorA copyright statement consists in most cases of three parts: a copyright prefix, years and the owner. For legal reasons the prefix part must not be modified at all while adjusting some special characters in the owner part is acceptable. Entries can be merged by year as well. The main idea of the algorithm is to process only entries with a known copyright prefix. This allows stripping the prefix and processing the remaining string separately and thus guarantees that the prefix part is not modified at all.
TODO: Maybe treat URLs similar to years, e.g. entries which differ only in URLs and years can be merged.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCopyrightStatementsProcessor.Partspublic final classCopyrightStatementsProcessor.Result
-
Field Summary
Fields Modifier and Type Field Description public final static CopyrightStatementsProcessorINSTANCE
-
Method Summary
Modifier and Type Method Description final CopyrightStatementsProcessor.PartsdetermineParts(String copyrightStatement)Split the copyrightStatement into its Parts, or return null if the Parts could not be determined. final CopyrightStatementsProcessor.Resultprocess(Collection<String> copyrightStatements)Try to process the copyrightStatements into a more condensed form grouped by owner / prefix and with years collapsed. -
-
Method Detail
-
determineParts
final CopyrightStatementsProcessor.Parts determineParts(String copyrightStatement)
Split the copyrightStatement into its Parts, or return null if the Parts could not be determined.
-
process
final CopyrightStatementsProcessor.Result process(Collection<String> copyrightStatements)
Try to process the copyrightStatements into a more condensed form grouped by owner / prefix and with years collapsed. The returned Result contains successfully processed as well as unprocessed statements.
-
-
-
-