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

Support zip import of RDF data with title in dc:title element #110

Open
wants to merge 1 commit into
base: 7.x
Choose a base branch
from

Conversation

kayakr
Copy link

@kayakr kayakr commented Mar 8, 2018

JIRA Ticket: https://jira.duraspace.org/browse/ISLANDORA-2171

  • Other Relevant Links (Google Groups discussion, related pull requests, Release pull requests, etc.)

What does this Pull Request do?

The University of Canterbury QuakeStudies archive uses Islandora with RDF datastreams instead of MODS. To allow bulk ingest via the Zip importer, I've modified the importer code to handle an RDF datastream. The RDF should define a dc:title element. An XSLT to map from RDF to DC is required (not included).

A brief description of what the intended result of the PR will be and/or what problem it solves.
Content models using RDF instead of MODS can be imported via the Zip importer.

What's new?

  • Add ability to import objects with RDF datastreams via Zip importer.

How should this be tested?

  1. Create RDF XML files to match several JPEG images, e.g.
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:schema="http://schema.org" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <dc:title>Test photograph 1 (BULK INGEST)</dc:title> </rdf:RDF>
  2. Provide an XSLT to convert RDF to DC, e.g.
    `<xsl:stylesheet version="1.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:srw_dc="info:srw/schema/1/dc-schema"
    xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:schema="http://schema.org"
    xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
    xmlns:qsr="http://quakestudies.canterbury.ac.nz"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" indent="yes"/>
    <xsl:template match="/">
    <xsl:for-each select="rdf:RDF">
    <oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
    xsl:apply-templates/
    </oai_dc:dc>
    </xsl:for-each>
    </xsl:template>
    <xsl:template match="dc:*">
    xsl:copy
    <xsl:value-of select="."/>
    </xsl:copy>
    </xsl:template> <xsl:template match="*"/>
    </xsl:stylesheet>`
  3. Zip the XML and images.
  4. Set the path to the XSLT via the zip_importer_path_rdf_to_dc variable, e.g. via
    drush -u 1 vset --yes zip_importer_path_rdf_to_dc "sites/all/modules/custom/quakestudies_rdf/transforms/quakestudies_object_to_dc.xsl"
  5. Use the Zip import to ingest the images via the Zip file.
  6. Result should be images imported with appropriate RDF and DC datastreams.

A description of what steps someone could take to:
See above.

Additional Notes:

Any additional information that you think would be helpful when reviewing this PR.

Example:

  • Does this change require documentation to be updated?
    Zip importer docs will need to be updated.

Interested parties

@Islandora/7-x-1-x-committers

@DiegoPino
Copy link
Contributor

DiegoPino commented Mar 8, 2018

@kayakr hi.

I fully understand the use case and myself have dealt and written many importer modules that deal with complex or not native Islandora supported metadata. I don't want to be discouraging here, but this pull request is a hard sell. We don't have any Vanilla Islandora Modules that are able to deal with/display/process or even define RDF datastreams other than RELS-EXT and RELS-INT and the use case is specific to your reality there, and Islandora zip importer and main importer where designed with extendability in mind, I would encourage you to build a new module based on that instead of trying to accommodate the main importer.

I'm not saying this is bad nor am I closing doors, probably other @Islandora/7-x-1-x-committers can have a different opinion here that can prevail and support your pull. Being devil's advocate (means giving a justification against my very own!), some time ago Darwin Core was accepted into this module even when no Islandora foundation module supports that.
I was not part of that (that I remember, I forget sometimes), but in my Biology times I had to extend this module also and make my own

@kayakr
Copy link
Author

kayakr commented Mar 8, 2018

Thanks for the feedback. I can look at reworking this into a subclass. On the other hand, since Islandora CLAW is all about RDF, it may make sense to support RDF in the system whenever possible.

@DonRichards
Copy link
Member

This was discussed in the tech call today. If there is no further interest in the next 90 days we feel like this PR will be safe to close.

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.

3 participants