Git Product home page Git Product logo

orcid-conversion-lib's Introduction

ORCID CONVERSION UTIL

Simple application that takes an ORCID XML or JSON file and outputs the other version to the console or a file. Available as a stand-alone executable jar, which can can be found in the /target directory. The application is designed to work with full ORCID record metadata. Partial records will not be processed. This application can also process convert the ORCID data dump from XML to JSON.

Works with V2.0, V2.1, v3_0rc1 and v3.0 (default) versions of the schema.

If you wish to use the JAXB beans directly, please use the maven model at https://mvnrepository.com/artifact/org.orcid

Usage

  • Make sure you have Java 1.8 or greater installed on your machine
  • Download the orcid-conversion-lib-3.0.7-full.jar executable jar and execute: java -jar orcid-conversion-lib-3.0.7-full.jar OPTIONS

Options:

  • --input-file [-i] (a string; default: "") Location of the input file (optional, can pipe in)
  • --format [-f] (xml or json; default: "xml") the format of the source file
  • --output-file [-o] (a string; default: "") Location of the output file (optional, can pipe out)
  • --schema-version [-v] (v2_0, v2_1, v3_0rc1 or v3_0; default: "v3_0") the schema version of the source file
  • --[no]schema-validate [-s] (a boolean; default: "false") If true, validate XML input and output against the schema
  • --[no]tarball [-t] (a boolean; default: "false") If true, input is a tar.gz containing XML, output is tar.gz containing JSON

Example usage:

  • java -jar orcid-conversion-lib-3.0.7-full.jar --help
  • java -jar orcid-conversion-lib-3.0.7-full.jar < ../src/test/resources/test-publiclib-record-3.0.xml
  • java -jar orcid-conversion-lib-3.0.7-full.jar -i ../src/test/resources/test-publiclib-record-3.0.xml
  • java -jar orcid-conversion-lib-3.0.7-full.jar -i ../src/test/resources/test-publiclib-record-3.0.json -f json
  • java -jar orcid-conversion-lib-3.0.7-full.jar -i ../src/test/resources/test-publiclib-record-3.0.json -f json -o /tmp/record.xml
  • java -jar orcid-conversion-lib-3.0.7-full.jar -i ../src/test/resources/test-publiclib-record-2.0.xml -v v2_0

Converting the ORCID data dump

The following will convert the entire contents of a tar.gz file from XML to JSON, preserving paths. Files are renamed from *.xml to *.json.

  • java -jar orcid-conversion-lib-3.0.7-full.jar --tarball -i ../src/test/resources/test-archive-2.0.tar.gz -v v2_0 -o /tmp/output.tar.gz

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.