lapps / vocabulary-pages

DSL files and templates used to generate the LAPPS WS-EV pages.
Apache License 2.0
0 stars 0 forks source link

Generating the LAPPS Grid Vocabulary

This project contains the vocabulary definition (DSL) and templates used to generate the LAPPS Grid vocabulary website as well as Java code for the Discriminator and Vocabulary modules.

Prerequisites

The latest versions of following programs should be available in the bin/ directory.

Vocabulary DSL
The vocabulary DSL is used to generate the web pages for vocabulary items as well as the Java class for the vocabulary Java API classes. The vocabulary DSL also generates the vocabulary.config file that is included by the discriminators.config file.
Download

Discriminator DSL
The discriminator DSL is used to generated the discriminator web pages for the vocab site as will as the Discriminators Java class for the org.lappsgrid.discriminator module.
Download

GitHub Commit
The GitHub Commit (ghc) program is a command line program used to commit files to a GitHub repository and create pull requests.
Download

Makefile

A Makefile is available to automate most of the tasks involved in generating a new vocabulary web site and related Java classes. To generate everything simply run:

make all

This uses the Vocabulary DSL and the Discriminator DSL and runs them on two user-generated files: lapps.vocabulary which has the annotation types for the LAPPS vocabulary and lapps.discriminators which has the discriminators.

Goals

vocabulary
Generates from lapps.vocabulary the target/vocabulary.config file used by the discriminator dsl
html
Generates all html pages for the http:vocab.lappsgrid.org web site. All those pages as well as css and js directories are written to target.
java
Generates Java source files for the vocabulary package (https://github.com/lapps/org.lappsgrid.vocabulary) and the discriminators package (https://github.com/lapps/org.lappsgrid.discriminator). The Java classes created (Annotations.java, Features.java and Discriminators.java) are all in the target directory.
rdf
Generates the vocabulary in all the RDF(-like) formats: rdf, owl, ttl, and json-ld. Files created are target/lapps-vocabulary.jsonld, target/lapps-vocabulary.owl, target/lapps-vocabulary.rdf and target/lapps-vocabulary.ttl.
all
Does all of the above
clean
Removes all artifacts from previous builds.
help
Displays a simply help message.

There is a goal to upload the HTML files to the http://vocab.lappsgrid.org site, but the goal is not portable and must be tailored for each person deploying to the server. In particular, the person deploying the site must have write permission for the appropriate directories.

There is also a goal to copy the generated Java files to the vocabulary and discriminator projects. But these are also not portable and must be specially tailored for each person.

Further Reading

Please see the LAPPS Grid Wiki for more information.