Class ContextualAnalyzer<T extends ContextualStatistics>

java.lang.Object
de.gwdg.metadataqa.marc.analysis.contextual.ContextualAnalyzer<T>
Direct Known Subclasses:
AuthorityAnalyzer, ClassificationAnalyzer

public abstract class ContextualAnalyzer<T extends ContextualStatistics> extends Object
  • Field Details

    • NUMERIC_REGEX

      protected static final Pattern NUMERIC_REGEX
    • schemasInRecord

      protected List<Schema> schemasInRecord
    • bibliographicRecord

      protected BibliographicRecord bibliographicRecord
    • statistics

      protected final T extends ContextualStatistics statistics
      Statistics are updated during the analysis of the bibliographic record and are used to generate reports. Usually, statistics are shared among all the analyzers that are part of the same analysis, which means that the same statistics object is passed to all the analyzers.
  • Constructor Details

    • ContextualAnalyzer

      protected ContextualAnalyzer(BibliographicRecord bibliographicRecord, T statistics)
  • Method Details

    • updateSchemaSubfieldStatistics

      protected void updateSchemaSubfieldStatistics(DataField field, Schema currentSchema)
    • addSchemasToStatistics

      protected void addSchemasToStatistics(Map<Schema,Integer> fieldStatistics, List<Schema> schemas)
      Given the fieldStatistics map and a list of schemas, increment the count of each schema in the map.
      Parameters:
      fieldStatistics - The map of schemas and their counts
      schemas - The list of schemas to be added to the map
    • registerSchemas

      protected void registerSchemas(List<Schema> schemas)
    • deduplicateSchema

      protected List<Schema> deduplicateSchema(List<Schema> schemas)