17 Export mapping table
17.1 to Avram JSON
Some background info: MARC21 structure in JSON.
Usage:
java -cp $JAR de.gwdg.metadataqa.marc.cli.utils.MappingToJson [options] > avram-schema.json
or
./qa-catalogue --params="[options]" export-schema-files
options:
- general parameters
-c
,--withSubfieldCodelists
: with subfield codelists-s
,--withSelfDescriptiveCode
: with self-descriptive codes-t <type>
,--solrFieldType <type>
: type of Solr fields, could be one ofmarc-tags
,human-readable
, ormixed
-f
,--withFrbrFunctions
: with FRBR functions (see Tom Delsey: Functional analysis of the MARC 21 bibliographic and holdings formats. Tech. report, 2nd revision. Library of Congress, 2003.)-l
,--withComplianceLevel
: with compliance levels (national, minimal) (see National Level Full and Minimal Requirements. Library of Congress, 1999.)
An example output:
...
"010":{
"tag":"010",
"label":"Library of Congress Control Number",
"url":"https:\/\/www.loc.gov\/marc\/bibliographic\/bd010.html",
"repeatable":false,
"compilance-level":{
"national":"Mandatory if applicable",
"minimal":"Mandatory if applicable"
},
"indicator1":null,
"indicator2":null,
"subfields":{
"a":{
"label":"LC control number",
"repeatable":false,
"frbr-functions":[
"Data Management\/Identify",
"Data Management\/Process"
],
"compilance-level":{
"national":"Mandatory if applicable",
"minimal":"Mandatory if applicable"
}
},
...
}
},
"013":{
"tag":"013",
"label":"Patent Control Information",
"url":"https:\/\/www.loc.gov\/marc\/bibliographic\/bd013.html",
"repeatable":true,
"compilance-level":{"national":"Optional"},
"indicator1":null,
"indicator2":null,
"subfields":{
...
"b":{
"label":"Country",
"repeatable":false,
"codelist":{
"name":"MARC Code List for Countries",
"url":"http:\/\/www.loc.gov\/marc\/countries\/countries_code.html",
"codes":{
"aa":{"label":"Albania"},
"abc":{"label":"Alberta"},
"-ac":{"label":"Ashmore and Cartier Islands"},
"aca":{"label":"Australian Capital Territory"},
...
},
...
},
},
...
}
},
...
The script version generates 3 files, with different details: * avram-schemas/marc-schema.json
* avram-schemas/marc-schema-with-solr.json
* avram-schemas/marc-schema-with-solr-and-extensions.json
To validate these files install the Avram reference implementation in Node with npm ci
and run:
./avram-schemas/validate-schemas
17.2 to HTML
To export the HTML table described at Self Descriptive MARC code
java -cp $JAR de.gwdg.metadataqa.marc.cli.utils.MappingToHtml > mapping.html