Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create programmatic_access.vm #39

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
711ae54
customisation
Dec 1, 2015
4341232
packaging
Dec 1, 2015
1ba6a68
Configuration flag to suppress password login
der Dec 8, 2015
14c010d
Fix edit form when deployed at non-root tomcat context
der Dec 8, 2015
629a100
UI to create temporary (API) passwords
der Dec 8, 2015
4ef9ff9
Support for supressing link view, allows property view to be wider
der Dec 8, 2015
f437006
Support for displaying registers using data tables
der Dec 8, 2015
599c0aa
Fix rendering of search results in case where entity is registered in…
der Dec 9, 2015
7034afc
Reformat input query as a conjunctive Lucene query
der Dec 9, 2015
ae56269
Admin menu entry for text indexing
der Dec 9, 2015
72ac81c
Typo fix
der Dec 9, 2015
cbb4241
Make registry name a configuration item so templates are more reusable
der Dec 9, 2015
d8dc78c
Support download of versioned data
der Dec 22, 2015
d9c149d
Replace manual registry name with configurable value
der Dec 31, 2015
2aa31e6
Initial version of class diagram support
der Jan 3, 2016
a464ff8
Add configurations switch to control provision of class diagrams
der Jan 4, 2016
bde9842
Use routing restrictions instead of ports to separate in/out links
der Jan 4, 2016
c05d0ef
Protected against XSS attacks in text search parameters
der Jan 6, 2016
a1cb6df
Support basic cases of intersection/union domains
der Jan 6, 2016
83c9409
Clean out unused code fragments
der Jan 6, 2016
dec4531
Add final re-routing step to redraw links after layout
der Jan 6, 2016
dd82c78
deploy ready
Jan 8, 2016
79c1ec0
1.1-4 deploy
Jan 14, 2016
26af62b
Merge pull request #7 from marqh/newui
marqh Jan 14, 2016
c705c35
resources
marqh Feb 23, 2016
763ed51
Merge pull request #11 from marqh/resources
marqh Feb 23, 2016
cc820ea
about page structure
marqh May 3, 2016
2ed10d2
Merge pull request #18 from marqh/docs_structure
marqh May 5, 2016
425cec4
Typofix (#20)
Crocstar May 25, 2016
8dac389
Create programmatic_access.vm
Crocstar Jul 7, 2016
5696162
Update programmatic_access.vm
Crocstar Aug 4, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# registry-config-base
# codes-wmo-deploy

Provides configuration, UI templates and bootstraping for a starting registry installation.

Custom installations can fork this repository then customize the configuration and UI files. This makes it possible to pull in an merge upstream UI fixes made in this base repository.
Provides configuration, UI templates and bootstraping for the WMO codes registry installation.

N.B. Requires registry-core 0.1.1 or higher

Expand All @@ -16,8 +14,6 @@ Directory | Role

## Customizing the configuration

The base configuration is based on the UK Government Environment registry.

Files in `ldregistry` which make require customization are:

File | Role
Expand Down
13 changes: 11 additions & 2 deletions ldregistry/config/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,20 @@ facetCat = com.epimorphics.registry.webapi.facets.FacetService
facetCat.specFile = /opt/ldregistry/config/category-facets.ttl
facetCat.store = $basestore

# Additional configuration paramaters, typically to control UI behaviour
config = com.epimorphics.appbase.core.GenericConfig
config.suppressPasswordLogin = true
config.suppressLinkView = true
config.showRegisterAsDatatable = true
config.showClassDiagrams = true
config.registryName = WMO Codes Registry

# The Registry configuration itself
registry = com.epimorphics.registry.core.Registry
registry.baseUri = http://environment.data.gov.uk/registry
registry.baseUri = http://codes.wmo.int/
registry.store = $storeapi
registry.cacheSize = 100
registry.pageSize = 25
registry.pageSize = 9000
registry.forwarder = $forwarder
registry.userStore = $userstore
registry.log = /var/opt/ldregistry/logstore
Expand All @@ -59,3 +67,4 @@ registry.systemBoot = /opt/ldregistry/boot
registry.facetService = $facetService
registry.backupDir = /var/opt/ldregistry/backup
registry.redirectToHttpsOnLogin = false
registry.configExtensions = $config
2 changes: 1 addition & 1 deletion ldregistry/config/root-register.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@prefix reg: <http://purl.org/linked-data/registry#> .

@base <http://environment.data.gov.uk/registry/> .
@base <http://codes.wmo.int/> .

<> a reg:Register;
version:currentVersion <>;
Expand Down
2 changes: 1 addition & 1 deletion ldregistry/config/services.conf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ facetCat.store = basestore

# The Registry configuration itself
registry = com.epimorphics.registry.core.Registry
registry.baseURI = http://environment.data.gov.uk/registry/
registry.baseURI = http://codes.wmo.int/
registry.store = storeapi
registry.cacheSize = 100
registry.pageSize = 25
Expand Down
9 changes: 5 additions & 4 deletions ldregistry/config/user.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
# https://myopenid Update:/register/item
# https://myopenid GrantAdmin

user https://me.yahoo.com/a/rb93y8N72dK9HoXHwgNqBKlikg-- "Dave Reynolds (Yahoo)"
user dave@epimorphics.com "Dave Reynolds (email)" changeme
user http://localhost/anon "Any authenticated"

https://me.yahoo.com/a/rb93y8N72dK9HoXHwgNqBKlikg-- GrantAdmin
dave@epimorphics.com GrantAdmin
user https://profiles.google.com/101323394574484397758 "Jeremy Tandy (admin)"
https://profiles.google.com/101323394574484397758 GrantAdmin

user https://plus.google.com/100578379482821123729 "marqh"
https://plus.google.com/100578379482821123729 GrantAdmin
17 changes: 14 additions & 3 deletions ldregistry/templates/about.vm
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,26 @@

<div class="jumbotron">
<div class="container">
<h1>Environment Registry (alpha)</h1>
<h1>WMO Codes Registry</h1>
<a href="http://www.wmo.int/pages/index_en.html">
<img class="float-right" src="$uiroot/img/wmo-logo-official-blue-on-white-trunc.png" alt="World Meteorological Organization" name="logoWMO" width="169" height="144" border="5"></img>
</a>
</div>
</div>

<div class="container">
<div class="row">
<p>This is a pilot service to provide management and public access to codes and codelists used by the Defra family of organizations.</p>
<p>It is based on the UKGovLD <a href="https://github.com/UKGovLD/ukl-registry-poc/wiki">proof-of-concept design</a> for a Linked Data registry.</p>
<p> <a href="$uiroot/about/using">Making use of the content from the WMO Codes Registry service.</a> </p>
</div>

<div class="row">
<p> <a href="$uiroot/about/contributing">Contributing to the content of the WMO Codes Registry service.</a> </p>
</div>

<div class="row">
<p> <a href="$uiroot/about/expectations">What to expect from the WMO Codes Registry service</a> </p>
</div>
## container will be closed by footer


#parse("footer.vm")
23 changes: 23 additions & 0 deletions ldregistry/templates/about/contributing.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#parse("header.vm")
#set($nav="about")
#parse("navbar.vm")

<div class="jumbotron">
<div class="container">
<h1>Contributing to the WMO Codes Registry</h1>
<a href="http://www.wmo.int/pages/index_en.html">
<img class="float-right" src="$uiroot/img/wmo-logo-official-blue-on-white-trunc.png" alt="World Meteorological Organization" name="logoWMO" width="169" height="144" border="5"></img>
</a>
</div>
</div>

<div class="container">
<div class="row">

<p> <a href="$uiroot/about/typofixes">How to fix a typographical error.</a> </p>

</div>
## container will be closed by footer


#parse("footer.vm")
59 changes: 59 additions & 0 deletions ldregistry/templates/about/expectations.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#parse("header.vm")
#set($nav="about")
#parse("navbar.vm")

<div class="jumbotron">
<div class="container">
<h1>WMO Codes Registry</h1>
<a href="http://www.wmo.int/pages/index_en.html">
<img class="float-right" src="$uiroot/img/wmo-logo-official-blue-on-white-trunc.png" alt="World Meteorological Organization" name="logoWMO" width="169" height="144" border="5"></img>
</a>
</div>
</div>

<div class="container">
<div class="row">


<p>
WMO Codes Registry (Initial Operating Capability)
</p>
<p>
The primary purpose of this Service is to support the new data exchange standard developed by WMO in support of Amendment 76 to ICAO Annex 3 "Meteorological Services for International Air Navigation". This new data exchange standard (<a href="http://wis.wmo.int/page=AvXML-1">WMO AvXML</a>) enables exchange of operational aeronautical meteorological (OPMET) in XML format. It depends on availability of authoritative terms from WMO technical regulation - most notably <a href="http://www.wmo.int/pages/prog/www/WMOCodes.html">WMO No. 306 Manual on Codes</a> - as web-accessible resources that can be referenced from WMO AvXML-compliant data products.
</p>
<p>
The WMO Codes Registry is the mechanism through which the authoritative terms required for <a href="http://wis.wmo.int/page=AvXML-1">WMO AvXML</a> are published as web-accessible resources.
</p>
<p>
The <a href="http://www.metoffice.gov.uk">Met Office</a> operates this Service on behalf of <a href="http://www.wmo.int">WMO</a>. Following an initial period of two (2) years from September 2013, the Service, and the arrangements for it, will be assessed by WMO and the Met Office and a decision made as to whether this arrangement will continue or not or be amended or a new arrangement put in place.
</p>
<p>
During this initial two year period the Service is provided as an Initial Operating Capability. The <a href="http://www.metoffice.gov.uk">Met Office</a> does not anticipate that operational services will have a direct dependency on this Service and therefore does not offer any assurances regarding the availability or accuracy of the Service.
</p>
<p>
However, the <a href="http://www.metoffice.gov.uk">Met Office</a> will endeavour that information provided within the Service is accurate, albeit sparse in comparison to the scope of the WMO Technical Regulation. Furthermore, please note that the Service does not (yet) provide a multi-lingual content, nor a change history of the authoritative terms pertaining to previous versions of the WMO Technical Regulation. The initial set of authoritative terms is deemed sufficient to support the <a href="http://wis.wmo.int/page=AvXML-1">WMO AvXML data exchange standard</a>. It is anticipated that the scope of content available through this Service will expand during the Initial Operating Capability period.
</p>
<p>
The <a href="http://www.metoffice.gov.uk">Met Office</a> will endeavour that the Service is available, 24-hours per day, 7-days per week. In the event of a system fault, the <a href="http://www.metoffice.gov.uk">Met Office</a> will endeavour to restore the system to normal operation. There is no provision of an alternative service should the Service be unavailable.
</p>
<p>
<a href="http://www.wmo.int">WMO</a> provides a Google Group (<a href="http://www.google.com/url?q=https%3A%2F%2Fgroups.google.com%2Fa%2Fwmo.int%2Fforum%2F%3Fhl%3Den-GB%23!forum%2Fcbs-codes-registry">WMO Codes List Registry</a>) for discussion about the Service and content provided therein during the Initial Operating Capability period.
</p>
<p>
If you encounter technical issues, please contact the <a href="http://www.metoffice.gov.uk/about-us/contact">Met Office Weather Desk</a> during UK business hours. End-user documentation is available here: <a href="/ui/resources/WMO-Codes-Registry_user-guide-v1.0.pdf">User Guide</a> and <a href="/ui/resources/WMO-Codes-Registry_FAQ-v1.0.pdf">FAQ</a>. For technical information about the Registry software implementation and API, please refer to the documentation provided at the <a href="https://github.com/der/ukl-registry-poc/wiki">UKGovLD Registry project wiki</a>. (note that the UKGovLD Registry software and API are open source and published under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache 2 license</a>)
</p>
<p>
The information provided by the Service will be maintained by nominated members of WMO Expert Teams and the <a href="https://www.wmo.int/pages/prog/www/WDM/wdm.html">WMO Secretariat</a>. To request the provision of additional content from WMO Technical Regulation to be published via this Service please post to the <a href="http://www.google.com/url?q=https%3A%2F%2Fgroups.google.com%2Fa%2Fwmo.int%2Fforum%2F%3Fhl%3Den-GB%23!forum%2Fcbs-codes-registry">WMO Codes List Registry group</a>.
</p>
<p>
To notify the Service administrators of inappropriate information, please contact the <a href="http://www.metoffice.gov.uk/about-us/contact">Met Office Weather desk</a>.
</p>
<p>
To notify the Service administrators of erroneous information, please post to the <a href="http://www.google.com/url?q=https%3A%2F%2Fgroups.google.com%2Fa%2Fwmo.int%2Fforum%2F%3Fhl%3Den-GB%23!forum%2Fcbs-codes-registry">WMO Codes List Registry group</a>.
</p>

</div>
## container will be closed by footer


#parse("footer.vm")
10 changes: 10 additions & 0 deletions ldregistry/templates/about/simpleworkflow.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<li>Go to GitHub (you will need an account, and to be logged in) and go to <a href="https://github.com/wmo-registers/code-manuals/tree/master/typo_fixes">https://github.com/wmo-registers/code-manuals/tree/master/typo_fixes</a></li>
<li>Make a new file, using the ‘new file’ button.</li>
<li>Name the file, ending in .ttl</li>
<li>Copy and paste all the amended text into the new file.</li>
<li>When you are proposing the new file, add an extended description so we know what you’ve changed.</li>
<li>Hit the green ‘propose new file’ button.</li>
<li>Review your change and hit the green ‘create pull request’ button.</li>
<li>That’s it - thanks!</li>
<li>Next up we’ll talk to our experts about the change you’ve suggested then evaluate it in our test system.</li>
<li>We’ll get back to you through GitHub with an update to let you know what’s happening and if there’s further input we’d like from you.</li>
28 changes: 28 additions & 0 deletions ldregistry/templates/about/typofixes.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
23 lines (16 sloc) 597 Bytes
#parse("header.vm")
#set($nav="about")
#parse("navbar.vm")

<div class="jumbotron">
<div class="container">
<h1>Contributing to the WMO Codes Registry</h1>
<a href="http://www.wmo.int/pages/index_en.html">
<img class="float-right" src="$uiroot/img/wmo-logo-official-blue-on-white-trunc.png" alt="World Meteorological Organization" name="logoWMO" width="169" height="144" border="5"></img>
</a>
</div>
</div>

<div class="container">
<div class="row">
If you notice a typo in the register, for example, you notice ‘velocity’ is spelled ‘vecolity’, this is how you can get it changed:

<ol><li>The first step is to get the text so you can change it - so download the content in the RDF ttl-plain format.</li>
<li>Open the file with a text editor, find the typo and fix all instances of it.</li>
#parse("about/simpleworkflow.vm")
</ol>

</div>
## container will be closed by footer


#parse("footer.vm")
22 changes: 22 additions & 0 deletions ldregistry/templates/about/using.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#parse("header.vm")
#set($nav="about")
#parse("navbar.vm")

<div class="jumbotron">
<div class="container">
<h1>Making use of the WMO Codes Registry</h1>
<a href="http://www.wmo.int/pages/index_en.html">
<img class="float-right" src="$uiroot/img/wmo-logo-official-blue-on-white-trunc.png" alt="World Meteorological Organization" name="logoWMO" width="169" height="144" border="5"></img>
</a>
</div>
</div>

<div class="container">
<div class="row">


</div>
## container will be closed by footer


#parse("footer.vm")
106 changes: 106 additions & 0 deletions ldregistry/templates/about/using/programmatic_access.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
#parse("header.vm")
#set($nav="about")
#parse("navbar.vm")

<div class="jumbotron">
<div class="container">
<h1>Programmatic read access</h1>
<a href="http://www.wmo.int/pages/index_en.html">
<img class="float-right" src="$uiroot/img/wmo-logo-official-blue-on-white-trunc.png" alt="World Meteorological Organization" name="logoWMO" width="169" height="144" border="5"></img>
</a>
</div>
</div>

<div class="container">
<div class="row">
Programmatic read access to WMO Codes Registry
Programmatic access to the WMO Codes Registry is provided via HTTP. Examples are provided based on use of the cURL utility, but any software application capable of executing HTTP would suffice.
Unless specified otherwise, all examples use the HTTP GET operation.
Content negotiation
The Registry software supports content negotiation via HTTP. The supported formats are HTML, Turtle, RDF/XML and JSON-LD.
The registered mime-types for these formats are:

Note: This section describes only those elements of the API providing read-access to the Registry content; more details of the programmatic API can be found here, including a summary of the API operations.


HTML:Turtle:RDF/XML:JSON-LD:
text/html
text/turtle application/rdf+xml application/ld+json
The default response of the Registry is the provision of HTML content. This may be overridden either by use of the “Accept” HTTP request header.
Alternatively, one may append the _format={format} query parameter to the HTTP request:
Turtle:RDF/XML:JSON-LD:
?_format=ttl
?_format=rdf
?_format=jsonld
For consistency, all examples below will request content in turtle format.
Register retrieval
This section describes the API operations pertaining to retrieval of information about Registers.
To request details of a Register and those members with status category “accepted”.
GET http://registry/{register}
Example:
curl –i –H “Accept:text/turtle” http://codes.wmo.int/bufr4/codeflag/0-20-086
To request details of a Register, excluding members. © Crown copyright. Met Office
31
GET http://registry/{register}?non-member-properties
Example:
curl –i –H “Accept:text/turtle” http://codes.wmo.int/bufr4/codeflag/0-20-086?non-member- properties
To request details of a Register and a page of those members with status category “accepted”.
GET http://registry/{register}?firstPage
GET http://registry/{register}?_page={n}
Example:
curl –i –H “Accept:text/turtle” http://codes.wmo.int/306/4678?_page=2
To request details of a Register and those members with specified status. GET http://registry/{register}?status={status}
{status} must be one of:
- notAccepted - submitted
- reserved
- invalid
- accepted
- valid
- experimental - stable
- deprecated
- retired
Example:
curl –i –H “Accept:text/turtle” http://codes.wmo.int/bufr4/codeflag/0-20- 086?status=reserved
To request details of a Register and members – including associated Register Item resources.
GET http://registry/{register}?_view=with_metadata
Example:
© Crown copyright. Met Office
32
curl –i –H “Accept:text/turtle” http://codes.wmo.int/49- 2/AerodromeRecentWeather?_view=with_metadata
To request details of a specific version of a Register and those members valid for that version.
GET http://registry/{register}:{version}
Example:
curl –i –H “Accept:text/turtle” http://codes.wmo.int/common/c- 15:3
To request details of a Register, its members, the Register Item associated with the Register and a list of versions of that Register Item.
GET http://registry/_{register}?_view=version_list
Example:
curl –i –H “Accept:text/turtle” http://codes.wmo.int/_common?_view=version_list
To request details of a Register and its members at a specific date-time.
GET http://registry/{register}?_versionAt={dateTime}
Example:
curl –i –H “Accept:text/turtle” http://codes.wmo.int/common/c- 6?_versionAt=2013-08-05T12:00:00Z
Entity and Register Item retrieval
This section describes the API operations pertaining to retrieval of information about Entities and Register Items. Where Entities are referenced from outside the scope of the Registry, no guarantees can be made as to the behaviour of those resources. As a result, this section describes the operations pertaining to retrieval of information about those Entities managed within the scope of the Registry system.
To request information about an Entity.
GET http://registry/{register}/{entity}
Example:
curl –i –H “Accept:text/turtle” http://codes.wmo.int/bufr4/codeflag/0-20-086/6
To request information about an Entity and the associated Register Item. GET http://registry/{register}/{entity}?_view=with_metadata
© Crown copyright. Met Office
33
Example:
curl –i –H “Accept:text/turtle” http://codes.wmo.int/306/4678/FZDZ?_view=with_metadata
To request information about a Register Item and the associated Entity. GET http://registry/{register}/_{item}
Example:
curl –i –H “Accept:text/turtle” http://codes.wmo.int/49- 2/AerodromeRecentWeather/_REFZDZ
To request information about a specific version of a Register Item and the associated information known about the associated Entity for that version.
GET http://registry/{register}/_{item}:{version}
Example:
curl –i –H “Accept:text/turtle” http://codes.wmo.int/49- 2/AerodromeRecentWeather/_REFZDZ:1
To request information about a Register Item, the associated Entity and the list of each version of the Register Item – including the interval over which it was valid, which version (if any) it replaced and whether it is the current version of the item..
GET http://registry/{register}/_{item}?_view=version_list
Example:
curl –i –H “Accept:text/turtle” http://codes.wmo.int/49- 2/AerodromeRecentWeather/_REFZDZ?_view=version_list
To determine whether the Entity specified with the given URI is known within the Register sub-tree and has status category “accepted”; if found, details of the Entity are provided else a HTTP 404 “Not found” response is given.
GET http://registry/{register}?entity={uri}
Example:
curl –i –H “Accept:text/turtle” http://codes.wmo.int/ bufr4/b/12?entity=http://codes.wmo.int/common/c- 15/me/dewPointTemperature


</div>
## container will be closed by footer


#parse("footer.vm")
Loading