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

Question: Can you show an example of template #24

Open
micahchoo opened this issue Feb 13, 2025 · 2 comments
Open

Question: Can you show an example of template #24

micahchoo opened this issue Feb 13, 2025 · 2 comments
Assignees

Comments

@micahchoo
Copy link

micahchoo commented Feb 13, 2025

I am trying to create a mapping between dublincore and Generic - I am not able to do it

{
  "@context": "https://tropy.org/v1/contexts/template.jsonld",
  "@id": "https://tropy.org/v1/templates/dc",
  "@type": "https://tropy.org/v1/tropy#Template",
  "type": "https://tropy.org/v1/tropy#Item",
  "name": "Dublin Core to Generic - iiif",
  "version": "1.0.0",
  "domain": [],
  "creator": "Micah",
  "description": "Generic template based on the Dublic Core Metadata Element Set mapped to Tropiiify",
  "field": [
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": manifest label,
      "property": "http://purl.org/dc/elements/1.1/title",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": metadata:Source,
      "property": "http://purl.org/dc/elements/1.1/creator",
      "value": null
    },
    {
      "datatype": "https://tropy.org/v1/tropy#date",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": metadata:Date,
      "property": "http://purl.org/dc/elements/1.1/date",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": metadata:Type,
      "property": "http://purl.org/dc/elements/1.1/type",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": metadata:Source,
      "property": "http://purl.org/dc/elements/1.1/source",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": manifest id,
      "property": "http://purl.org/dc/elements/1.1/identifier",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": manifest rights,
      "property": "http://purl.org/dc/elements/1.1/rights",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": metadata:Subject,
      "property": "http://purl.org/dc/elements/1.1/subject",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": metadata:Language,
      "property": "http://purl.org/dc/elements/1.1/language",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": metadata:Format,
      "property": "http://purl.org/dc/elements/1.1/format",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": metadata:Contributor,
      "property": "http://purl.org/dc/elements/1.1/contributor",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": manifest summary,
      "property": "http://purl.org/dc/elements/1.1/description",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": requiredstatement:value|metadata:Publisher,
      "property": "http://purl.org/dc/elements/1.1/publisher",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": metadata:Coverage,
      "property": "http://purl.org/dc/elements/1.1/coverage",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": metadata:Relation,
      "property": "http://purl.org/dc/elements/1.1/relation",
      "value": null
    }
  ]
}

What am I doing wrong?

@martimpassos
Copy link
Collaborator

martimpassos commented Feb 13, 2025

Hi @micahchoo, you're on the right track! Just remove "manifest" from the non-metadata fields (i.e manifest id -> id) and it should work.

@micahchoo
Copy link
Author

Hello @martimpassos, Thank you for your help
It seems my iiif export was not porducting manifests because the tropiiify plugin was an old version
This is the template I edited based on your input for anyone else who comes looking

{
  "@context": "https://tropy.org/v1/contexts/template.jsonld",
  "@id": "https://tropy.org/v1/templates/dc",
  "@type": "https://tropy.org/v1/tropy#Template",
  "type": "https://tropy.org/v1/tropy#Item",
  "name": "Dublin Core to Generic - iiif",
  "version": "1.0.0",
  "domain": [],
  "creator": "Micah",
  "description": "Generic template based on the Dublic Core Metadata Element Set mapped to Tropiiify",
  "field": [
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "label",
      "property": "http://purl.org/dc/elements/1.1/title",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "metadata:Creator",
      "property": "http://purl.org/dc/elements/1.1/creator",
      "value": null
    },
    {
      "datatype": "https://tropy.org/v1/tropy#date",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "metadata:Date",
      "property": "http://purl.org/dc/elements/1.1/date",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "metadata:Type",
      "property": "http://purl.org/dc/elements/1.1/type",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "metadata:Source",
      "property": "http://purl.org/dc/elements/1.1/source",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "id",
      "property": "http://purl.org/dc/elements/1.1/identifier",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "rights",
      "property": "http://purl.org/dc/elements/1.1/rights",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "metadata:Subject",
      "property": "http://purl.org/dc/elements/1.1/subject",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "metadata:Language",
      "property": "http://purl.org/dc/elements/1.1/language",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "metadata:Format",
      "property": "http://purl.org/dc/elements/1.1/format",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "metadata:Contributor",
      "property": "http://purl.org/dc/elements/1.1/contributor",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "summary",
      "property": "http://purl.org/dc/elements/1.1/description",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "requiredstatement:value|metadata:Publisher",
      "property": "http://purl.org/dc/elements/1.1/publisher",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "metadata:Coverage",
      "property": "http://purl.org/dc/elements/1.1/coverage",
      "value": null
    },
    {
      "datatype": "http://www.w3.org/2001/XMLSchema#string",
      "hint": null,
      "isConstant": false,
      "isRequired": false,
      "label": "metadata:Relation",
      "property": "http://purl.org/dc/elements/1.1/relation",
      "value": null
    }
  ]
}

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

No branches or pull requests

2 participants