Class CommonParameters

java.lang.Object
de.gwdg.metadataqa.marc.cli.parameters.CommonParameters
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ClassificationParameters, CompletenessParameters, FormatterParameters, MarcToSolrParameters, NetworkParameters, SerialScoreParameters, Shacl4bibParameters, ShelfReadyCompletenessParameters, ThompsonTraillCompletenessParameters, ValidatorParameters

public class CommonParameters extends Object implements Serializable
See Also:
  • Field Details

    • args

      protected String[] args
    • DEFAULT_OUTPUT_DIR

      public static final String DEFAULT_OUTPUT_DIR
      See Also:
    • DEFAULT_MARC_VERSION

      public static final MarcVersion DEFAULT_MARC_VERSION
    • marcVersion

      protected MarcVersion marcVersion
      MARC version (like 'OCLC' or 'DNB')
    • marcFormat

      protected MarcFormat marcFormat
      serialization format (like 'ISO' or 'MARCXML')
    • dataSource

      protected DataSource dataSource
      data source ('file' or 'stream')
    • doHelp

      protected boolean doHelp
    • doLog

      protected boolean doLog
    • limit

      protected int limit
      limit the number of records to process
    • offset

      protected int offset
      the first record to process
    • id

      protected String id
      the field used as identifier of the record (content of 001)
    • defaultRecordType

      protected MarcLeader.Type defaultRecordType
      the default record type if the record's type is undetectable
    • fixAlephseq

      protected boolean fixAlephseq
      fix the known issues of Alephseq format
    • fixAlma

      protected boolean fixAlma
      fix the known issues of Alma format
    • fixKbr

      protected boolean fixKbr
      fix the known issues of Alma format in KBR records
    • alephseq

      protected boolean alephseq
      the source is in Alephseq format
    • marcxml

      protected boolean marcxml
      the source is in MARCXML format
    • lineSeparated

      protected boolean lineSeparated
      the source is in line separated MARC format
    • trimId

      protected boolean trimId
      remove spaces from the end of record IDs
    • ignorableRecords

      protected String ignorableRecords
      ignore records from the analysis
    • recordIgnorator

      protected RecordIgnorator recordIgnorator
    • recordFilter

      protected RecordFilter recordFilter
    • ignorableFields

      protected IgnorableFields ignorableFields
      The fields that can be ignored during analyses
    • stream

      protected InputStream stream
    • defaultEncoding

      protected String defaultEncoding
      default character encoding
    • options

      protected org.apache.commons.cli.Options options
    • parser

      protected static final org.apache.commons.cli.CommandLineParser parser
    • cmd

      protected org.apache.commons.cli.CommandLine cmd
  • Constructor Details

    • CommonParameters

      public CommonParameters()
    • CommonParameters

      public CommonParameters(String[] arguments) throws org.apache.commons.cli.ParseException
      Throws:
      org.apache.commons.cli.ParseException
  • Method Details

    • setOptions

      protected void setOptions()
    • getOptions

      public org.apache.commons.cli.Options getOptions()
    • getMarcVersion

      public MarcVersion getMarcVersion()
    • setMarcVersion

      public void setMarcVersion(MarcVersion marcVersion)
    • setMarcVersion

      public void setMarcVersion(String marcVersion) throws org.apache.commons.cli.ParseException
      Throws:
      org.apache.commons.cli.ParseException
    • getMarcFormat

      public MarcFormat getMarcFormat()
    • setMarcFormat

      public void setMarcFormat(MarcFormat marcFormat)
    • setMarcFormat

      public void setMarcFormat(String marcFormatString) throws org.apache.commons.cli.ParseException
      Throws:
      org.apache.commons.cli.ParseException
    • getDataSource

      public DataSource getDataSource()
    • setDataSource

      public void setDataSource(DataSource dataSource)
    • setDataSource

      public void setDataSource(String dataSourceString) throws org.apache.commons.cli.ParseException
      Throws:
      org.apache.commons.cli.ParseException
    • doHelp

      public boolean doHelp()
    • setDoHelp

      public void setDoHelp(boolean doHelp)
    • doLog

      public boolean doLog()
    • setDoLog

      public void setDoLog(boolean doLog)
    • getArgs

      public String[] getArgs()
    • getLimit

      public int getLimit()
    • setLimit

      public void setLimit(int limit)
    • getOffset

      public int getOffset()
    • setOffset

      public void setOffset(int offset)
    • hasId

      public boolean hasId()
    • getId

      public String getId()
    • setId

      public void setId(String id)
    • getDefaultRecordType

      public MarcLeader.Type getDefaultRecordType()
    • setDefaultRecordType

      public void setDefaultRecordType(MarcLeader.Type defaultRecordType)
    • setDefaultRecordType

      public void setDefaultRecordType(String defaultRecordType) throws org.apache.commons.cli.ParseException
      Throws:
      org.apache.commons.cli.ParseException
    • fixAlephseq

      public boolean fixAlephseq()
    • setFixAlephseq

      public void setFixAlephseq(boolean fixAlephseq)
    • fixAlma

      public boolean fixAlma()
    • setFixAlma

      public void setFixAlma(boolean fixAlma)
    • fixKbr

      public boolean fixKbr()
    • setFixKbr

      public void setFixKbr(boolean fixKbr)
    • getReplacementInControlFields

      public String getReplacementInControlFields()
    • isAlephseq

      public boolean isAlephseq()
    • setAlephseq

      public void setAlephseq(boolean alephseq)
    • isMarcxml

      public boolean isMarcxml()
    • setMarcxml

      public void setMarcxml(boolean marcxml)
    • isLineSeparated

      public boolean isLineSeparated()
    • setLineSeparated

      public void setLineSeparated(boolean lineSeparated)
    • getOutputDir

      public String getOutputDir()
    • setOutputDir

      public void setOutputDir(String outputDir)
    • getTrimId

      public boolean getTrimId()
    • setTrimId

      public void setTrimId(boolean trimId)
    • getIgnorableFields

      public IgnorableFields getIgnorableFields()
      Returns the ignorable fields
      Returns:
      See Also:
    • setIgnorableFields

      public void setIgnorableFields(String ignorableFields)
    • getRecordIgnorator

      public RecordIgnorator getRecordIgnorator()
    • setRecordIgnorator

      public void setRecordIgnorator(String ignorableRecords)
    • getRecordFilter

      public RecordFilter getRecordFilter()
    • setRecordFilter

      public void setRecordFilter(String allowableRecords)
    • getStream

      public InputStream getStream()
    • setStream

      public void setStream(InputStream stream)
    • getDefaultEncoding

      public String getDefaultEncoding()
    • getAlephseqLineType

      public AlephseqLine.TYPE getAlephseqLineType()
    • getPicaIdField

      public String getPicaIdField()
    • setPicaIdField

      public void setPicaIdField(String picaIdField)
    • getPicaSubfieldSeparator

      public String getPicaSubfieldSeparator()
    • setPicaSubfieldSeparator

      public void setPicaSubfieldSeparator(String picaSubfieldSeparator)
    • getPicaSchemaFile

      public String getPicaSchemaFile()
    • getSchemaType

      public SchemaType getSchemaType()
    • getPicaRecordTypeField

      public String getPicaRecordTypeField()
    • isMarc21

      public boolean isMarc21()
    • isPica

      public boolean isPica()
    • isUnimarc

      public boolean isUnimarc()
    • getGroupBy

      public String getGroupBy()
    • getGroupListFile

      public String getGroupListFile()
    • getSolrForScoresUrl

      public String getSolrForScoresUrl()
    • getProcessRecordsWithoutId

      public Boolean getProcessRecordsWithoutId()
    • setProcessRecordsWithoutId

      public void setProcessRecordsWithoutId(Boolean processRecordsWithoutId)
    • formatParameters

      public String formatParameters()