Giter VIP home page Giter VIP logo

rdfxml-ingest's Introduction

RDFXML INGEST

A CLI tool that reads an XML file source, transforms it to RDF/XML with XSLT, and PUTs the result into a Fedora Repository.

USAGE

$ gradle installDist

$ cd ./ingester-core/build/install/ingester-core/bin

$ ./ingester-core -r {$filesytem path to mets source file} -x {$filesytem path to transformation xslt} -d {$output dir for transformed file}

example:
 
$ ./ingester-core/build/install/ingester-core/bin/ingester-core -r ~/IdeaProjects/rdfxml-ingest/ingester-core/src/main/resources/import-data/metsmods.xml -x ~/IdeaProjects/rdfxml-ingest/ingester-core/src/main/resources/cool.pandora.ingester/oaimets2rdf.xsl -d /tmp/output-data

Note that the default repository URI (http://localhost:8080/fcrepo/rest) is hard-coded into the XSLT example. The resource identifier is extracted from the XML source and appended onto the repository base URI.

SPARQL

The intent of this tool is to facilitate mutation of legacy XML datasets with SPARQL. Here is an example.

CONSTRUCT {  ?manifest <http://www.loc.gov/METS/FLocat> ?fLocat .
  ?fLocat <http://www.loc.gov/METS/hasDivOrder> ?divOrder .
  ?fLocat <http://www.loc.gov/METS/hasLogDivTitle> ?title .  
}
WHERE {values ?manifest {<http://localhost:8080/fcrepo/rest/id-263566823>} .
  ?manifest <http://www.loc.gov/METS/fileGrp> ?fileGrp .
  ?fileGrp <http://www.loc.gov/METS/file> ?file .
  ?file <http://www.loc.gov/METS/fileID> ?fileID .
  ?file <http://www.loc.gov/METS/FLocat> ?fLocat .
  ?file <http://www.loc.gov/METS/hasDivOrder> ?divOrder .
  ?file <http://www.loc.gov/METS/hasLogDiv> ?logDivId .
  ?logDivId <http://www.loc.gov/mods/v3title> ?title .
} 

Also, in conjunction with the fedora-import-export utility, resources can be round-tripped in the BagIt format.

For a easy to setup test Fedora API-X implementation, see APIX-OAI

rdfxml-ingest's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.