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
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanthe source is in Alephseq formatprotected String[]protected org.apache.commons.cli.CommandLineprotected DataSourcedata source ('file' or 'stream')static final MarcVersionstatic final Stringprotected Stringdefault character encodingprotected MarcLeader.Typethe default record type if the record's type is undetectableprotected booleanprotected booleanprotected booleanfix the known issues of Alephseq formatprotected booleanfix the known issues of Alma formatprotected booleanfix the known issues of Alma format in KBR recordsprotected Stringthe field used as identifier of the record (content of 001)protected IgnorableFieldsThe fields that can be ignored during analysesprotected Stringignore records from the analysisprotected intlimit the number of records to processprotected booleanthe source is in line separated MARC formatprotected MarcFormatserialization format (like 'ISO' or 'MARCXML')protected MarcVersionMARC version (like 'OCLC' or 'DNB')protected booleanthe source is in MARCXML formatprotected intthe first record to processprotected org.apache.commons.cli.Optionsprotected static final org.apache.commons.cli.CommandLineParserprotected RecordFilterprotected RecordIgnoratorprotected InputStreamprotected booleanremove spaces from the end of record IDs -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandoHelp()booleandoLog()booleanbooleanfixAlma()booleanfixKbr()String[]getArgs()getId()Returns the ignorable fieldsintgetLimit()intorg.apache.commons.cli.OptionsbooleanbooleanhasId()booleanbooleanbooleanisMarc21()booleanbooleanisPica()booleanvoidsetAlephseq(boolean alephseq) voidsetDataSource(DataSource dataSource) voidsetDataSource(String dataSourceString) voidsetDefaultRecordType(MarcLeader.Type defaultRecordType) voidsetDefaultRecordType(String defaultRecordType) voidsetDoHelp(boolean doHelp) voidsetDoLog(boolean doLog) voidsetFixAlephseq(boolean fixAlephseq) voidsetFixAlma(boolean fixAlma) voidsetFixKbr(boolean fixKbr) voidvoidsetIgnorableFields(String ignorableFields) voidsetLimit(int limit) voidsetLineSeparated(boolean lineSeparated) voidsetMarcFormat(MarcFormat marcFormat) voidsetMarcFormat(String marcFormatString) voidsetMarcVersion(MarcVersion marcVersion) voidsetMarcVersion(String marcVersion) voidsetMarcxml(boolean marcxml) voidsetOffset(int offset) protected voidvoidsetOutputDir(String outputDir) voidsetPicaIdField(String picaIdField) voidsetPicaSubfieldSeparator(String picaSubfieldSeparator) voidsetProcessRecordsWithoutId(Boolean processRecordsWithoutId) voidsetRecordFilter(String allowableRecords) voidsetRecordIgnorator(String ignorableRecords) voidsetStream(InputStream stream) voidsetTrimId(boolean trimId)
-
Field Details
-
args
-
DEFAULT_OUTPUT_DIR
- See Also:
-
DEFAULT_MARC_VERSION
-
marcVersion
MARC version (like 'OCLC' or 'DNB') -
marcFormat
serialization format (like 'ISO' or 'MARCXML') -
dataSource
data source ('file' or 'stream') -
doHelp
protected boolean doHelp -
doLog
protected boolean doLog -
limit
protected int limitlimit the number of records to process -
offset
protected int offsetthe first record to process -
id
the field used as identifier of the record (content of 001) -
defaultRecordType
the default record type if the record's type is undetectable -
fixAlephseq
protected boolean fixAlephseqfix the known issues of Alephseq format -
fixAlma
protected boolean fixAlmafix the known issues of Alma format -
fixKbr
protected boolean fixKbrfix the known issues of Alma format in KBR records -
alephseq
protected boolean alephseqthe source is in Alephseq format -
marcxml
protected boolean marcxmlthe source is in MARCXML format -
lineSeparated
protected boolean lineSeparatedthe source is in line separated MARC format -
trimId
protected boolean trimIdremove spaces from the end of record IDs -
ignorableRecords
ignore records from the analysis -
recordIgnorator
-
recordFilter
-
ignorableFields
The fields that can be ignored during analyses -
stream
-
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
- Throws:
org.apache.commons.cli.ParseException
-
-
Method Details
-
setOptions
protected void setOptions() -
getOptions
public org.apache.commons.cli.Options getOptions() -
getMarcVersion
-
setMarcVersion
-
setMarcVersion
- Throws:
org.apache.commons.cli.ParseException
-
getMarcFormat
-
setMarcFormat
-
setMarcFormat
- Throws:
org.apache.commons.cli.ParseException
-
getDataSource
-
setDataSource
-
setDataSource
- 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
-
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
-
setId
-
getDefaultRecordType
-
setDefaultRecordType
-
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
-
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
-
setOutputDir
-
getTrimId
public boolean getTrimId() -
setTrimId
public void setTrimId(boolean trimId) -
getIgnorableFields
Returns the ignorable fields- Returns:
- See Also:
-
setIgnorableFields
-
getRecordIgnorator
-
setRecordIgnorator
-
getRecordFilter
-
setRecordFilter
-
getStream
-
setStream
-
getDefaultEncoding
-
getAlephseqLineType
-
getPicaIdField
-
setPicaIdField
-
getPicaSubfieldSeparator
-
setPicaSubfieldSeparator
-
getPicaSchemaFile
-
getSchemaType
-
getPicaRecordTypeField
-
isMarc21
public boolean isMarc21() -
isPica
public boolean isPica() -
isUnimarc
public boolean isUnimarc() -
getGroupBy
-
getGroupListFile
-
getSolrForScoresUrl
-
getProcessRecordsWithoutId
-
setProcessRecordsWithoutId
-
formatParameters
-