The LAPPS URI Inventory

WIP This page is a work in progress.

The LAPPS URI Inventory is the set of all URIs recognized by LAPPS Grid services. The URIs in the inventory fall into two categories:

  1. Web Service Exchange Vocabulary (or simply “The Vocabulary”)
    The URI used for annotation types produced and consumed by LAPPS services. For example the URIs for Token and Sentence.
  2. Metadata
    Anything that is not a vocabulary URI is metadata about something else. These are often referred to as discriminators since they are the URI used as the value of the discriminator field in org.lappsgrid.serialization.Data objects.

For historical reasons the Discriminator DSL language includes keywords and provisions for concepts that no longer apply. In particular, parents, offset, and bank will go away in the near future.

The only important fields are uri and description, and only uri is required.


All URI in the LAPPS inventory begin with and URI that are not one of the vocabulary types begin with


A BNF(-ish) grammar for the Discriminator DSL:

<dsl>         ::= ( <include> | <decl> | <groovy> )+
<include>     ::= 'include' <string>
<decl>        ::= <type-string> '{' <decl-body> '}'
<type-string> ::= <ident> | <string>
<decl-body>   ::= <uri> <eol> <description>
<uri>         ::= 'uri' <string>
<description> ::= 'description' <string>
<eol>         ::= ';' | '\n'

<groovy>      ::= any syntactically correct Groovy statements
<ident>       ::= any valid Groovy identifier
<string>      ::= anything that evaluates to a java.lang.String

Grammar Notes

The order of the uri and description in the decl-body does not matter.

Every line can be terminated with a semicolon, but semicolons and whitespace handling are omitted in the grammar for brevity.

Since the Disciminators DSL is a Groovy DSL Groovy code can be used almost anywhere. For example, the discriminators.config file defines several closures that are used to generate URI.

vocab = { "$it" }
token {
	uri vocab('Token')
	description '...'

Vocabulary DSL

The Vocabulary is a sub-set of the full URI inventory that is used to denote annotation types.

Creating Vocabularies

Generate the vocabulary.config file

The vocabulary.config file is a Discriminator DSL fragment that is included by the discriminator.config file.

./vocab -d -o target/ lapps.vocab


Generate the discriminator.html file

./ddsl -h target/discriminator.html -t discriminator-html.template discriminator.config


Generate individual discriminator pages

Pages in the namespace need to be generated . All other pages are generated by the Vocabulary DSL.

./ddsl -p target/ -t discriminator-page.template discriminator.config
Back to the top