marc21 0.5.2
A python library for creating MARC21 records with an extendible and mutable dictionary of allowed MARC21 tags and subfields.
Requires Python: >=3.10

# marc21 module

marc21 is a Python library for writing marc21 bibliographic records.

marc is an acronym for **MA**chine **R**eadable **C**atalogue.

## Installation

Use the Python package manager [pip](https://pip.pypa.io/en/stable/) to install marc21.

```commandline
pip install marc21
```

## Usage

```python
import marc21

# view recognized marc21 fields and subfields in json format
# the information is taken from the website of the Library of Congress
# the option True denotes to include the description of the field/subfield
print(get_dictionary(True))

# create marc21 data transfer object
dto = MarcDto()

# add the control fields  (please note when outputting the record the fields gets sorted)
# control fields in marc21 have a data field and no subfields
fld = dto.create_field(tag='001', data='3303902')
dto.insert_field(fld)

# this can also be done in one line
dto.insert_field(dto.create_field(tag='003', data='LoC'))

# add fields with subfields
# with default indicators as double space '  '
fld = dto.create_field(tag='010')
fld.addSubField(tag='a', value='83165326')
dto.insert_field(fld)

# or with specific indicators
fld = dto.create_field(tag='100', indicators='1 ')
fld.addSubField(tag='a', value='Orwell, George')
fld.addSubField(tag='d', value='1903-1950')
dto.insert_field(fld)

# subfields can also be chained
fld = dto.create_field(tag='245', indicators='10')
fld.addSubField(tag='a', value='1984').addSubField(tag='b', value='a novel').addSubField(tag='c',
                                                                                         value='by George Orwell')
dto.insert_field(fld)

# fields do not need to be added in order
# indicators can also be set after creating the field
fld = dto.create_field(tag='240', indicators='10')
fld.addSubField(tag='a', value='Nineteen eighty-four')
dto.insert_field(fld)

# and this can also be done on one line
dto.insert_field(dto.create_field(tag='300').addSubField(tag='a', value='267 p. ;').addSubField(tag='c', value='21 cm'))

# when the record is finished, it can be printed

print(dto)
```

Which results in:
```marc21
^^001^_3303902
^^003^_LoC
^^010  ^_a83165326
^^1001 ^_aOrwell, George^_d1903-1950
^^24010^_aNineteen eighty-four
^^24510^_a1984^_ba novel^_cby George Orwell
^^300  ^_a267 p. ;^_c21 cm
```

In order to change the default record-separator (^^) and field-seperator (^_), one can
call set_separators before printing the MarcDto instance

```python
dto.set_separators(field_separator='  ', subfield_separator=' $')

print(dto)
```

### extending the dictionary

The marc21 standard reserved the 9xx range of fields for custom-fields.

This library supports the addition of new fields and the alteration of existing fields.

```python
    # create a MarcField, separate SubFields, link them together adn add them to the dictionary

    mf = MarcField(tag='905', type='d', repeatable=False, description='Address')
    sf = SubField(tag='a', repeatable=False, description='country')
    mf.add_SubField(new_sf=sf)
    sf = SubField(tag='b', repeatable=False, description='city')
    mf.add_SubField(new_sf=sf)

    add_field_to_list(mf)

    # Or do it in one go, adding the subfields as a list 
    add_field_to_list(MarcField(tag='908', type='d', repeatable=True, description='Fictional Character', subfields=[
        SubField(tag='a', repeatable=False, description='Name'),
        SubField(tag='b', repeatable=True, description='Characterization')
    ]))

    # Or in bulk, add a list of MarcFields to the dictionary
    add_additional_fields_to_list( [
        MarcField('400', 'd', True, 'alternative name', True, '  ', '', [
            SubField('a', False, 'full name'),
            SubField('3', False, 'name use'),
            SubField('2', False, 'source')
        ]),
        MarcField('671', 'd', True, 'title URLs', True, '  ', '', [
            SubField('g', False, 'type'),
            SubField('u', False, 'url'),
            SubField('2', False, 'source')
        ]),
        MarcField('902', 'd', True, 'ISSN', True, '  ', '', [
            SubField('a', False, 'ISSN'),
            SubField('2', False, 'source')
        ])
    ])
```

### Exceptions

A **MarcException** is raised when: 

- You try to add a subfield without a tag
- You try to add a subfield without a value
- You try to add a field with a unknown type (other **c**-ontrol or **d**-ata)
- You supplied to few information to add a subfield to a field
- You try to add a non-repeatable subfield more than once
- You try to add a non-defined subfield to a field (not in dictionary)
- You try to add a non-repeatable field more than once
- You try to add a non-defined field (not in dictionary)

## API

### Overview classes
- MarcDto           : marc data transfer object, holds up to 1 record at a time
- CField            : internal definition of a control field
- DField            : internal definition of a data field
- BaseField         : internal base class for CField and DField
- MarcField         : external definition of a field in a marc record (can be a CField or DField)
- SubField          : external definition of a subfield for MarcField of type 'd' (DField)
- MarcDictionary    : internal dictionary containing the definition of the marc fields
- MarcException     : custom exception (see section Exceptions above)

#### MarcDto

- **MarcDto**()

  initializes a new record
  
- __repr__([show_description:bool = False])

  When show_description is supplied as True, the fields and subfields will contain the description of these fields

- __len__([count_characters:bool = False])

  if count_characters is omitted or supplied as False this method returns the number of fields in the record
  otherwise is returns the total number of characters in the fields

- __json__()

  returns json representation of the record
  
  ```text
  [
	{
		'tag': <tag>,
		'...': ''
	},
	{
		'tag': <tag>,
		'...': ''
	},
	...
  ]
  ```
	
- **set_separators**(field_separator: str, subfield_separator:str)

  if both the field_separator and subfield_separator are non-empty strings the supplied separators will be used within the representation of the record
  
  <field_separator><tag><data>		for control fields
  <field_separator><tag><indicators>[<subfield_separator><tag><value>]+
  
- **create_field**(tag: str, [indicators: str = ''], [data: str = ''], [subfields = None]) -> CField | DField

  prepares a new field for the current record (**but does not insert it yet**)
  if tag does not point to an existing field definition in the MarcDictionary, a MarcException is raised.
  depending on the field definition:
  - the field created is a control field (CField) or data field (DField).
  - if is checked whether a field if repeatable or not (and whether it is already present in the current record)
  
  Depending on the type of the created field:
  - control field (CField): the data argument is used
  - data field (DField): the indicators and subfields are used
  
  returns the prepared field
  
- **insert_field**(marc_field: CField | DField)

  inserts the field to the current record if the field is not an exact duplicate of a field already present in the record
  
- **is_tag_present**(tag:str)

  returns true if at least one field with the supplied tag is present in the current record
  
- **perform_filter**(tag_present: str, tag_remove: str)

  if at least one field with the supplied tag_present is present in the current record, fields with the supplied tag_remove will be removed from the current record
  

#### CField  (subclass of BaseField)

- **CField**(tag: str, description: str, data: str)

  Initializes a new control field (CField)
  
- __repr__([show_description: bool = False])

  returns the contents of the field. The format depends on the value of show_description:
	if show_description is False: <field_separator><tag><data>
	if show_description is True : <field_separator><tag> [<description>] <data>
  
- __json__()

  returns the json representation of the field as:
  ```text
  {
     'tag': <tag>,
	 'data': <data>
  }
  ```
  
#### DField  (subclass of BaseField)
    
- **DField**(tag:str, description: str, inidicators: str, subfields: list[SubField])

  Initializes a new data field (DField)
  
- __repr__([show_description: bool = False])

  returns the contents of the field. The format depends on the value of show_description:
	if show_description is False: <field_separator><tag><indicators>[<subfield_separator><tag><value>]+
	if show_description is True : <field_separator><tag> [<description>] <indicators>[<subfield_separator><tag><value>]+

- __json__()

  returns the json representation of the field as:
  
  ```text
  {
	  'tag': <tag>,
	  'indicators': <indicators>
	  'subfields': [
	     {
		    'tag': <tag>
			'value': <value>
		 },
	     {
		    'tag': <tag>
			'value': <value>
		 },
         ...
	  ]
  }
  ```
  
- **addSubField**(tag: str, value: str)

  if tag does not refer to a subfield defined for current DField tag a MarcException is raised
  if defined subfield is not repeatable and it is already in the subfield list for the DField a MarcException is raised
  
  a new SubField object is created and added to the list of subfields for the DField
  

#### MarcField

This class is primarily used in the MarcDictionary and used to instantiate CField and DField objects

- **MarcField**(tag: str, fieldtype: str, repeatable: bool = False, description: str = 'not supplied', has_indicators: bool = True, indicators: str = '  ', data: str = '  ', subfields: Optional[list[SubField]] = None)

  initializes a new MarcField object

  - fieldtype is 'c' for control field or 'd' for data field
  - repeatable denotes whether more than 1 instance of this field can exist in a record
  - has_indicators denotes whether the field uses indicators
  
  if fieldtype is not 'c' or 'd' a MarcException is raised
  if fieldtype is 'c' has_indicators is set to False
  
- __json__()

  returns a json representation of the MarcField
  
  depending on the fieldtype as
  - 'c':
  
  ```text
  {
	'tag': <tag>,
	'fieldtype': <fieldtype>,
	'description': <description>
  }
  ```
  - 'd':
  ```text
  {
	'tag': <tag>,
	'fieldtype': <fieldtype>,
	'description': <description>,
	'has_indicators': <has_indicators>,
	'indicators': <indicators>,
	'subfields': [
	   [ { <subfield> } ]+
	]
  ```
  
- **add_SubField**([new_sf: SubField = None], [tag: str = ''], [repeatable: bool = False], [description: str = ''])

  if both new_sf is None and tag is empty a MarcException is raised
  
  if new_sf is None, but tag is supplied a new SubField instance is created with the tag, repeatable and description
  
  if new_sf.repeatable is False, it is checked if no other instance of the subfield is already present in the list of subfields, otherwise a MarcException is raised.
  
  the new subfield is added to the list of subfields of the current MarcField.
  
- **is_subfield_present**(tag: str)

  returns True if a subfield with the given tag is present in the list of subfields of the current MarcField
  
- **get_subfields**()

  returns the list of subfields for t he current MarcField, if the fieldtype is 'd', otherwise an empty list.

#### SubField

- **SubField**([tag: str = ''], [repeatable: bool = True], [description: str = ''], [value: str = 'dummy'])

  initializes a new SubField

  if either tag or value is an empty string a MarcException is raised

- __repr__([show_description: bool = False])

  if show_description is False returns <tag><value>
  otherwise returns <tag> [<description>] <value>
  
- __json__()

  returns the json representation of the current subfield
  
  ```text
  {
	'tag': <tag>,
	'description': <description>,
	'value': <value>
  }
  ```
  
## ISO 2709 Support

You can serialize a `MarcDto` to ISO 2709 (binary MARC21 format) and back using the provided functions:

### 🔄 Convert to ISO 2709
```python
from marc21 import MarcDto, to_iso2709

record = MarcDto()
record.insert_field(record.create_field(tag="001", data="123456"))
...
binary = to_iso2709(record)
with open("record.iso2709", "wb") as f:
    f.write(binary)
```

### 🔁 Load from ISO 2709
```python
from marc21 import from_iso2709

with open("record.iso2709", "rb") as f:
    binary = f.read()
record = from_iso2709(binary)
print(record.to_string())
```

---

## MARCXML Support

The library can also generate and read MARCXML format.

### 🔄 Convert to MARCXML
```python
from marc21 import to_marcxml

xml_string = to_marcxml(record)
print(xml_string)
```

### 🔁 Load from MARCXML
```python
from marc21 import from_xml

record = from_xml(xml_string)
print(record.to_string())
```

---

Both formats support full round-trip conversion, and are verified via unit tests for integrity. These functions are especially useful for interoperability with systems like library catalogs, OAI-PMH services, and archival platforms.


  
## Contributing

Feel free to suggest improvements and/or open a pull request

## To Do

Add functionality to:
- read marc21 records
- supply marc21 fields as json
- remove fields from dictionary

## Contact

- Author: John van der Vuurst
- Email (@OCLC)   : vdvuursj@oclc.org
- Email (external): JWvdVuurst@gmail.com

## Appendix - the current default dictionary

```json
[
    {
        "tag": "001",
        "type": "c",
        "repeatable": false,
        "description": "Control Number"
    },
    {
        "tag": "003",
        "type": "c",
        "repeatable": false,
        "description": "Control Number Identifier"
    },
    {
        "tag": "005",
        "type": "c",
        "repeatable": false,
        "description": "Date and Time of Latest Transaction"
    },
    {
        "tag": "006",
        "type": "c",
        "repeatable": false,
        "description": "Fixed-Length Data Elements - Additional Material Characteristics"
    },
    {
        "tag": "007",
        "type": "c",
        "repeatable": false,
        "description": "Physical Description Fixed Field-General Information"
    },
    {
        "tag": "008",
        "type": "c",
        "repeatable": false,
        "description": "Fixed-Length Data Elements"
    },
    {
        "tag": "010",
        "type": "d",
        "repeatable": false,
        "description": "Library of Congress Control Number",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "LC control number"
            },
            {
                "tag": "b",
                "repeatable": true,
                "description": "NUCMC control number"
            },
            {
                "tag": "z",
                "repeatable": true,
                "description": "Cancelled/Invalid LC control number"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field Link and Sequence number"
            }
        ]
    },
    {
        "tag": "013",
        "type": "d",
        "repeatable": true,
        "description": "Patent Control Information",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "Number"
            },
            {
                "tag": "b",
                "repeatable": true,
                "description": "Country"
            },
            {
                "tag": "c",
                "repeatable": true,
                "description": "Type of number"
            },
            {
                "tag": "d",
                "repeatable": true,
                "description": "Date"
            },
            {
                "tag": "e",
                "repeatable": true,
                "description": "Status"
            },
            {
                "tag": "f",
                "repeatable": true,
                "description": "Party of document"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "015",
        "type": "d",
        "repeatable": true,
        "description": "National Bibliography Number",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "National Bibliography number"
            },
            {
                "tag": "q",
                "repeatable": true,
                "description": "Qualifying information"
            },
            {
                "tag": "z",
                "repeatable": true,
                "description": "Cancelled/Invalid national bibliography number"
            },
            {
                "tag": "2",
                "repeatable": false,
                "description": "Source"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "017",
        "type": "d",
        "repeatable": true,
        "description": "Copyright or legal deposit number",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "Copyright or legal deposit number"
            },
            {
                "tag": "b",
                "repeatable": true,
                "description": "Assigning agency"
            },
            {
                "tag": "d",
                "repeatable": true,
                "description": "Date"
            },
            {
                "tag": "i",
                "repeatable": true,
                "description": "Display Text"
            },
            {
                "tag": "z",
                "repeatable": true,
                "description": "Cancelled/Invalid Copyright or legal deposit number"
            },
            {
                "tag": "2",
                "repeatable": false,
                "description": "Source"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "018",
        "type": "d",
        "repeatable": false,
        "description": "Copyright Article-Fee Code ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "Copyright article-fee code"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            }
        ]
    },
    {
        "tag": "020",
        "type": "d",
        "repeatable": true,
        "description": "International Standard Book Number ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "International Standard Book Number"
            },
            {
                "tag": "c",
                "repeatable": true,
                "description": "Terms of availability"
            },
            {
                "tag": "q",
                "repeatable": true,
                "description": "Qualifying information"
            },
            {
                "tag": "z",
                "repeatable": true,
                "description": "Canceled/invalid ISBN"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "022",
        "type": "d",
        "repeatable": true,
        "description": "International Standard Serial Number ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "International Standard Serial Number"
            },
            {
                "tag": "l",
                "repeatable": true,
                "description": "ISSN-L"
            },
            {
                "tag": "m",
                "repeatable": true,
                "description": "Canceled ISSN-L"
            },
            {
                "tag": "y",
                "repeatable": true,
                "description": "Incorrect ISSN"
            },
            {
                "tag": "z",
                "repeatable": true,
                "description": "Canceled ISSN"
            },
            {
                "tag": "0",
                "repeatable": true,
                "description": "Authority record control number or standard number"
            },
            {
                "tag": "1",
                "repeatable": true,
                "description": "Real World Object URI"
            },
            {
                "tag": "2",
                "repeatable": false,
                "description": "Source"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "024",
        "type": "d",
        "repeatable": true,
        "description": "Other Standard Identifier ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "Standard number or code"
            },
            {
                "tag": "c",
                "repeatable": true,
                "description": "Terms of availability"
            },
            {
                "tag": "d",
                "repeatable": true,
                "description": "Additional codes following the standard number or code"
            },
            {
                "tag": "q",
                "repeatable": true,
                "description": "Qualifying information"
            },
            {
                "tag": "z",
                "repeatable": true,
                "description": "Canceled/invalid standard number or code"
            },
            {
                "tag": "2",
                "repeatable": true,
                "description": "Source of number or code"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "025",
        "type": "d",
        "repeatable": true,
        "description": "Overseas Acquisition Number ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "Overseas acquisition number"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "026",
        "type": "d",
        "repeatable": true,
        "description": "Fingerprint Identifier ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "First and second groups of characters"
            },
            {
                "tag": "b",
                "repeatable": true,
                "description": "Third and fourth groups of characters"
            },
            {
                "tag": "c",
                "repeatable": true,
                "description": "Date"
            },
            {
                "tag": "d",
                "repeatable": true,
                "description": "Number of volume or part"
            },
            {
                "tag": "e",
                "repeatable": true,
                "description": "Unparsed fingerprint"
            },
            {
                "tag": "2",
                "repeatable": false,
                "description": "Source"
            },
            {
                "tag": "5",
                "repeatable": true,
                "description": "Institution to which field applies"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "027",
        "type": "d",
        "repeatable": true,
        "description": "Standard Technical Report Number ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "Standard technical report number"
            },
            {
                "tag": "q",
                "repeatable": true,
                "description": "Qualifying information"
            },
            {
                "tag": "z",
                "repeatable": true,
                "description": "Canceled/invalid number"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "028",
        "type": "d",
        "repeatable": true,
        "description": "Publisher or Distributor Number ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "Publisher or distributor number"
            },
            {
                "tag": "b",
                "repeatable": true,
                "description": "Source"
            },
            {
                "tag": "q",
                "repeatable": true,
                "description": "Qualifying information"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "030",
        "type": "d",
        "repeatable": true,
        "description": "CODEN Designation ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "CODEN"
            },
            {
                "tag": "z",
                "repeatable": true,
                "description": "Canceled/invalid CODEN"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "031",
        "type": "d",
        "repeatable": true,
        "description": "Musical Incipits Information ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "Number of work"
            },
            {
                "tag": "b",
                "repeatable": true,
                "description": "Number of movement"
            },
            {
                "tag": "c",
                "repeatable": true,
                "description": "Number of excerpt"
            },
            {
                "tag": "d",
                "repeatable": true,
                "description": "Caption or heading"
            },
            {
                "tag": "e",
                "repeatable": true,
                "description": "Role"
            },
            {
                "tag": "g",
                "repeatable": true,
                "description": "Clef"
            },
            {
                "tag": "m",
                "repeatable": true,
                "description": "Voice/instrument"
            },
            {
                "tag": "n",
                "repeatable": true,
                "description": "Key signature"
            },
            {
                "tag": "o",
                "repeatable": true,
                "description": "Time signature"
            },
            {
                "tag": "p",
                "repeatable": true,
                "description": "Musical notation"
            },
            {
                "tag": "q",
                "repeatable": true,
                "description": "General note"
            },
            {
                "tag": "r",
                "repeatable": true,
                "description": "Key or mode"
            },
            {
                "tag": "s",
                "repeatable": true,
                "description": "Coded validity note"
            },
            {
                "tag": "t",
                "repeatable": true,
                "description": "Text incipit"
            },
            {
                "tag": "u",
                "repeatable": true,
                "description": "Uniform Resource Identifier"
            },
            {
                "tag": "y",
                "repeatable": true,
                "description": "Link text"
            },
            {
                "tag": "z",
                "repeatable": true,
                "description": "Public note"
            },
            {
                "tag": "2",
                "repeatable": true,
                "description": "System code"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "032",
        "type": "d",
        "repeatable": true,
        "description": "Postal Registration Number ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "Postal registration number"
            },
            {
                "tag": "b",
                "repeatable": true,
                "description": "Source agency assigning number"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "033",
        "type": "d",
        "repeatable": true,
        "description": "Date/Time and Place of an Event ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "Formatted date/time"
            },
            {
                "tag": "b",
                "repeatable": true,
                "description": "Geographic classification area code"
            },
            {
                "tag": "c",
                "repeatable": true,
                "description": "Geographic classification subarea code"
            },
            {
                "tag": "p",
                "repeatable": true,
                "description": "Place of event"
            },
            {
                "tag": "0",
                "repeatable": true,
                "description": "Authority record control number or standard number"
            },
            {
                "tag": "1",
                "repeatable": true,
                "description": "Real World Object URI"
            },
            {
                "tag": "2",
                "repeatable": true,
                "description": "Source of term"
            },
            {
                "tag": "3",
                "repeatable": true,
                "description": "Materials specified"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "034",
        "type": "d",
        "repeatable": true,
        "description": "Coded Cartographic Mathematical Data ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "Category of scale"
            },
            {
                "tag": "b",
                "repeatable": true,
                "description": "Constant ratio linear horizontal scale"
            },
            {
                "tag": "c",
                "repeatable": true,
                "description": "Constant ratio linear vertical scale"
            },
            {
                "tag": "d",
                "repeatable": true,
                "description": "Coordinates - westernmost longitude"
            },
            {
                "tag": "e",
                "repeatable": true,
                "description": "Coordinates - easternmost longitude"
            },
            {
                "tag": "f",
                "repeatable": true,
                "description": "Coordinates - northernmost latitude"
            },
            {
                "tag": "g",
                "repeatable": true,
                "description": "Coordinates - southernmost latitude"
            },
            {
                "tag": "h",
                "repeatable": true,
                "description": "Angular scale"
            },
            {
                "tag": "j",
                "repeatable": true,
                "description": "Declination - northern limit"
            },
            {
                "tag": "k",
                "repeatable": true,
                "description": "Declination - southern limit"
            },
            {
                "tag": "m",
                "repeatable": true,
                "description": "Right ascension - eastern limit"
            },
            {
                "tag": "n",
                "repeatable": true,
                "description": "Right ascension - western limit"
            },
            {
                "tag": "p",
                "repeatable": true,
                "description": "Equinox"
            },
            {
                "tag": "r",
                "repeatable": true,
                "description": "Distance from earth"
            },
            {
                "tag": "s",
                "repeatable": true,
                "description": "G-ring latitude"
            },
            {
                "tag": "t",
                "repeatable": true,
                "description": "G-ring longitude"
            },
            {
                "tag": "x",
                "repeatable": true,
                "description": "Beginning date"
            },
            {
                "tag": "y",
                "repeatable": true,
                "description": "Ending date"
            },
            {
                "tag": "z",
                "repeatable": true,
                "description": "Name of extraterrestrial body"
            },
            {
                "tag": "0",
                "repeatable": true,
                "description": "Authority record control number or standard number"
            },
            {
                "tag": "1",
                "repeatable": true,
                "description": "Real World Object URI"
            },
            {
                "tag": "2",
                "repeatable": false,
                "description": "Source"
            },
            {
                "tag": "3",
                "repeatable": true,
                "description": "Materials specified"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "035",
        "type": "d",
        "repeatable": true,
        "description": "System Control Number ",
        "indicators": "  ",
        "subfields": [
            {
                "tag": "a",
                "repeatable": false,
                "description": "System control number"
            },
            {
                "tag": "z",
                "repeatable": true,
                "description": "Canceled/invalid control number"
            },
            {
                "tag": "6",
                "repeatable": true,
                "description": "Linkage"
            },
            {
                "tag": "8",
                "repeatable": true,
                "description": "Field link and sequence number"
            }
        ]
    },
    {
        "tag": "036",
        "type": "d",
        "repeatable": true,
        "description": "Original Study Number for Computer Data Files ",
        "indicator