Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

hbz/lobid-rdf-to-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Converts lobid Ntriples created in https://github.com/hbz/lobid-resources to nested JSON-LD using etikett generated configuration.

Build

Prerequisites: Java 8, Maven 3; verify with mvn -version

Create and change into a folder where you want to store the projects:

  • git clone https://github.com/hbz/lobid-rdf-to-json.git
  • cd lobid-resources
  • mvn clean install -DskipTests

See the .travis.yml file for details on the CI config used by Travis.

Developer instructions

This section explains what to do if the generated data changes, e.g. when updating labels.json.
The procedure is similar to the one in the lobid-resources repo.

Errors in tests

After your changes you build the project like:
mvn clean install

A BUILD FAILURE results when newly generated data isn’t equal to the test resources. This is a good thing because you wanted the change!

Doing mvn test -DgenerateTestData=true the test data is generated and also updated in the filesystem.
These new data will now act as the template for sucessful tests. So, if you would rebuild now, the build will pass successfully.
You just must approve the new outcome by committing it.

So, let’s see what has changed:

git status

Let’s make a diff on the changes, e.g. all JSON-LD documents:

git diff src/test/resources/output/json/

If you are satisfied with the changes, go ahead – add and commit them:

git add src/test/resources/jsonld/; git commit

Do this respectivly for all other test files (Ntriples).
If you’ve added and commited everything, check again if all is ok:

mvn clean install

This should result in BUILD SUCCESS. Push your changes. You’re done :)

If you get errors from building the project, change the log4j.xml file to get more detailed error messages after mvn test:
<priority value="info"/> to <priority value="debug"/>.

For updating the old test files in lobid-rdf-to-json use:

bash src/test/resources/copyNtriplesToLobid-Rdf-To-Json.sh.

License

GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007

Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.