Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add if-conditional for type in componentList #2029

Closed
wants to merge 2 commits into from

Conversation

maipet
Copy link
Contributor

@maipet maipet commented Jun 6, 2024

@maipet maipet requested review from acka47 and TobiasNx June 6, 2024 14:47
@TobiasNx
Copy link
Contributor

TobiasNx commented Jun 7, 2024

@maipet I checked for the missing type. It seems that the non GND RSWK subjects used to be typed "SubjectHeading" in ALEPH Transformation as fallback. (

<choose name="a" flushWith="$[field]-[-1]" sameEntity="true">
<data source="$[field]-[-1].9">
<regexp match="\(DE-588\)(.*)" format=""/> <!-- will be ignored -->
</data>
<data source="$[field]-[-1].e" name="a">
<constant value="$[ns-gnd-elements]ConferenceOrEvent"/>
</data>
<data source="$[field]-[-1].g" name="a">
<constant value="$[ns-gnd-elements]PlaceOrGeographicName"/>
</data>
<data source="$[field]-[-1].k" name="a">
<constant value="$[ns-gnd-elements]CorporateBody"/>
</data>
<data source="$[field]-[-1].p" name="a">
<constant value="$[ns-gnd-elements]Person"/>
</data>
<data source="$[field]-[-1].t" name="a">
<constant value="$[ns-gnd-elements]Work"/>
</data>
<data source="$[field]-[-1].?" name="a">
<constant value="$[ns-gnd-elements]SubjectHeading"/>
</data>
)

see example:
Aleph:http://aleph.lobid.org/resources/HT006813395.json

 "subject": [
    {
      "type": [
        "ComplexSubject"
      ],
      "componentList": [
        {
          "id": "https://d-nb.info/gnd/4009104-1",
          "type": [
            "SubjectHeading"
          ],
          "source": {
            "id": "https://d-nb.info/gnd/7749153-1",
            "label": "Gemeinsame Normdatei (GND)"
          },
          "label": "Burg",
          "gndIdentifier": "4009104-1"
        },
        {
          "type": [
            "SubjectHeading"
          ],
          "label": "Geschichte"
        }
      ],
      "label": "Burg | Geschichte"
    }
  ],

ALMA: http://lobid.org/resources/990026405480206441.json

 "subject": [
    {
      "type": [
        "ComplexSubject"
      ],
      "label": "Burg | Geschichte",
      "componentList": [
        {
          "type": [
            "SubjectHeading"
          ],
          "label": "Burg",
          "source": {
            "label": "Gemeinsame Normdatei (GND)",
            "id": "https://d-nb.info/gnd/7749153-1"
          },
          "id": "https://d-nb.info/gnd/4009104-1",
          "gndIdentifier": "4009104-1",
          "altLabel": [
            "Burgen"
          ]
        },
        {
          "label": "Geschichte"
        }
      ]
    }
  ]

@TobiasNx
Copy link
Contributor

TobiasNx commented Jun 7, 2024

We should open another ticket for that and close this PR. But thanks for changing the Schema and by that finding the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants