├── .github
└── workflows
│ └── main.yml
├── LICENSE
├── LinkPropertyLookupTable.csv
├── README.md
├── VERSION.txt
├── export
├── codelists.j2
├── export.py
├── requirements-dev.txt
├── requirements.txt
└── skos.j2
└── vocab
├── LICENSE
├── README.md
├── VERSION.txt
├── app
├── app.py
└── model.py
├── pavement.py
├── requirements-dev.txt
└── requirements.txt
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: build ⚙️
2 |
3 | on: [ push, pull_request ]
4 |
5 | jobs:
6 | main:
7 | runs-on: ubuntu-latest
8 | strategy:
9 | matrix:
10 | python-version: [3.7, 3.8]
11 | steps:
12 | - uses: actions/checkout@v2
13 | - uses: actions/setup-python@v2
14 | name: Setup Python ${{ matrix.python-version }}
15 | with:
16 | python-version: ${{ matrix.python-version }}
17 | - name: Install system dependencies 📦
18 | run: sudo apt-get install -y dh-python devscripts fakeroot debhelper python3-all python3-setuptools
19 | - name: Install requirements 📦
20 | run: |
21 | python3 -m pip install --upgrade pip
22 | pip install -r export/requirements.txt
23 | pip install -r export/requirements-dev.txt
24 | - name: run exporter ⚙️
25 | run: |
26 | python3 export/export.py `cat VERSION.txt` 2022-04-28 LinkPropertyLookupTable.csv xml
27 | python3 export/export.py `cat VERSION.txt` 2022-04-28 LinkPropertyLookupTable.csv skos
28 | - name: run flake8 ⚙️
29 | run: flake8 export/export.py
30 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Open Source Geospatial Foundation
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/LinkPropertyLookupTable.csv:
--------------------------------------------------------------------------------
1 | identifier,uri,label,url,target,owner,resource_type,registrant,comments,deprecated
2 | OGC:CSW,http://www.opengis.net/def/serviceType/ogc/csw,OGC Catalogue Service for the Web,http://www.opengeospatial.org/standards/cat,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@tomkralidis,gmd:protocol value that indicates CI_OnlineResource URL is for an OGC Catalog service for the web v2.0.2 endpoint (should use differnt protocol identifier if the endpoint is not v2.0.2; these are not yet defined here). The gmd:function value in the CI_Online resource should be 'information' if the provided URL is a getCapabilities request. ,
3 | OGC:SOS,http://www.opengis.net/def/serviceType/ogc/sos,OGC Sensor Observation Service,http://www.opengeospatial.org/standards/sos,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@tomkralidis,"gmd:protocol value that indicates CI_OnlineResource URL is for an OGC Sensor Observation service v?? endpoint (should use differnt protocol identifier if the endpoint is not that version; these are not yet defined here). The gmd:function value in the CI_Online resource should be 'information' if the provided URL is a getCapabilities request. Note that if the service offers multiple datasets in different offerings, the parameters necessary to access the correct offering should be specified in the gmd:CI_OnlineResource/gmd:description element; recommended practice is to use a JSON object with keys that are parameter names and values that are the necessary parameters.",urn:x-esri:specification:ServiceType:SOS; urn:x-esri:specification:ServiceType:sos:url
4 | OGC:SPS,http://www.opengeospatial.org/standards/sps,OGC Sensor Planning Service,http://www.opengeospatial.org/standards/sps,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for an Sensor Planning Service ,
5 | OGC:SAS,http://www.ogcnetwork.net/SAS,OGC Sensor Alert Service,http://www.ogcnetwork.net/SAS,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for an Sensor Alert Service,
6 | OGC:WNS,http://www.ogcnetwork.net/WNS,OGC Web Notification Service,http://portal.opengeospatial.org/files/?artifact_id=1367,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for an Web Notification Service ,
7 | OGC:WCS,http://www.opengis.net/def/serviceType/ogc/wcs,OGC Web Coverage Service,http://www.opengeospatial.org/standards/wcs,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@tomkralidis,"gmd:protocol value that indicates CI_OnlineResource URL is for an OGC Web coverage service v?? endpoint (should use differnt protocol identifier if the endpoint is not that version; these are not yet defined here). The gmd:function value in the CI_Online resource should be 'information' if the provided URL is a getCapabilities request. Note that if the service offers multiple datasets in different coverages, the parameters necessary to access the correct coverage should be specified in the gmd:CI_OnlineResource/gmd:description element; recommended practice is to use a JSON object with keys that are parameter names and values that are the necessary parameters.",urn:x-esri:specification:ServiceType:WCS; urn:x-esri:specification:ServiceType:wcs:url
8 | OGC:WFS,http://www.opengis.net/def/serviceType/ogc/wfs,OGC Web Feature Service,http://www.opengeospatial.org/standards/wfs,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@tomkralidis,gmd:protocol value that indicates CI_OnlineResource URL is for an OGC Web Feature Service v?? endpoint (should use differnt protocol identifier if the endpoint is not that version; these are not yet defined here). The gmd:function value in the CI_Online resource should be 'information' if the provided URL is a getCapabilities request. Note that if the service offers multiple datasets in different feature types the typeName parameter necessary to access the correct data should be specified in the gmd:CI_OnlineResource/gmd:description element; recommended practice is to use a JSON object with keys that are parameter names and values that are the necessary parameters.,urn:x-esri:specification:ServiceType:WFS; urn:x-esri:specification:ServiceType:wfs:url
9 | OGC:WMS,http://www.opengis.net/def/serviceType/ogc/wms,OGC Web Map Service,http://www.opengeospatial.org/standards/wms,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@tomkralidis,"gmd:protocol value that indicates CI_OnlineResource URL is for an OGC Web Map Service v?? endpoint (should use differnt protocol identifier if the endpoint is not that version; these are not yet defined here). The gmd:function value in the CI_Online resource should be 'information' if the provided URL is a getCapabilities request. Note that if the service offers multiple datasets in different map layers, the layers parameters necessary to access the correct data should be specified in the gmd:CI_OnlineResource/gmd:description element; recommended practice is to use a JSON object with keys that are parameter names and values that are the necessary parameters.",urn:x-esri:specification:ServiceType:WMS; urn:x-esri:specification:ServiceType:wms:url
10 | OGC:WMS-C,http://www.opengis.net/def/serviceType/ogc/wms,OGC Web Map Service - Cached,https://wiki.osgeo.org/wiki/WMS_Tile_Caching,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pacioos,This is an unofficial profile of WMS using OSGeo recommendations to pull cached map tiles from the server when available. Often this is specified with a 'tiled=true' URL parameter in the GetMap request.,While WMS-C has been superceded by the OSGeo Tile Map Service specification (TMS) and the OGC Web Map Tile Service standard (WMTS) it is still widely supported.
11 | OGC:WMTS,http://www.opengeospatial.org/standards/wmts,OGC Web Map Tile Service,http://www.opengeospatial.org/standards/wmts,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for an OGC Web Map Tile Service,
12 | OGC:WPS,http://www.opengis.net/def/serviceType/ogc/wps,OGC Web Processing Service,http://www.opengeospatial.org/standards/wps,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@tomkralidis,gmd:protocol value that indicates CI_OnlineResource URL is for an OGC Web Processing Service v?? endpoint (should use differnt protocol identifier if the endpoint is not that version; these are not yet defined here). The gmd:function value in the CI_Online resource should be 'information' if the provided URL is a getCapabilities request. Other parameters necessary to access the correct processing service should be specified in the gmd:CI_OnlineResource/gmd:description element; recommended practice is to use a JSON object with keys that are parameter names and values that are the necessary parameters.,
13 | OGC:ODS,http://www.opengeospatial.org/standards/ols#ods,OGC OpenLS Directory Service,http://www.opengeospatial.org/standards/ols,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for an OGC OpenLS Directory Service ,
14 | OGC:OGS,http://www.opengeospatial.org/standards/ols#ogs,OGC OpenLS Gateway Service,http://www.opengeospatial.org/standards/ols,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for an OGC OpenLS Gateway Service,
15 | OGC:OUS,http://www.opengeospatial.org/standards/ols#ous,OGC OpenLS Utility Service,http://www.opengeospatial.org/standards/ols,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for an OGC OpenLS Utility Service,
16 | OGC:OPS,http://www.opengeospatial.org/standards/ols#ops,OGC OpenLS Presentation Service,http://www.opengeospatial.org/standards/ols,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for an OGC OpenLS Presentation Service ,
17 | OGC:ORS,http://www.opengeospatial.org/standards/ols#ors,OGC OpenLS Route Service,http://www.opengeospatial.org/standards/ols,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for an OGC OpenLS Route Service,
18 | OGC:CT,http://www.opengeospatial.org/standards/ct,OGC Coordinate Transformation Service,http://www.opengeospatial.org/standards/ct,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for an OGC Coordinate Transformation Service,
19 | OGC:WFS-G,http://www.opengeospatial.org/standards/wfs-g,Gazetteer Service Profile of the Web Feature Service Implementation Specification,http://portal.opengeospatial.org/files/?artifact_id=7175,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for an OGC Gazetteer Service Profile of the Web Feature Service Implementation Specification,
20 | OGC:OWC,http://www.opengeospatial.org/standards/owc,OGC OWS Context,http://www.opengeospatial.org/standards/owc,gmd:MD_Format/gmd:name;gmd:applicationProfile,,data,@pvgenuchten,Specifies a fully configured service set which can be exchanged,
21 | OGC:GPKG,http://www.opengeospatial.org/standards/geopackage,OGC Geopackage,http://www.opengeospatial.org/standards/geopackage,gmd:MD_Format/gmd:name;gmd:applicationProfile,,data,@pvgenuchten,SQLite Extension for exchange or direct use of vector geospatial features and / or tile matrix sets of earth images and raster maps at various scales,
22 | OGC:IoT,http://www.ogcnetwork.net/IoT,OGC SensorThings API,http://ogc-iot.github.io/ogc-iot-api,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for a SensorThings API,
23 | OGCFeat,http://www.opengis.net/def/interface/ogcapi-features,OGC API - Features,https://ogcapi.ogc.org/features,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@opengeospatial,an API that offers the capability to create modify and query spatial data on the Web,
24 | OGCMaps,http://www.opengis.net/def/interface/ogcapi-maps,OGC API - Maps,https://ogcapi.ogc.org/maps,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@opengeospatial,OGC API - Maps offers a modern approach to the OGC Web Map Service (WMS) standard for provision map and raster content,
25 | OGCTile,http://www.opengis.net/def/interface/ogcapi-tiles,OGC API - Tiles,https://ogcapi.ogc.org/tiles,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@opengeospatial,OGC API - Tiles provides extended functionality to other OGC API standards to deliver tiled data such as Map Tiles,
26 | OGCCov,http://www.opengis.net/def/interface/ogcapi-coverages,OGC API - Coverages,https://ogcapi.ogc.org/coverages,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@opengeospatial,OGC API - Coverages allows discovery visualization and query of complex raster stacks and data cubes,
27 | OGCRec,http://www.opengis.net/def/interface/ogcapi-records,OGC API - Records,https://ogcapi.ogc.org/records,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@opengeospatial,OGC API - Records updates OGCs Catalog Services for the Web by building on the simple access to content in OGC API - Features,
28 | OGCProc,http://www.opengis.net/def/interface/ogcapi-processes,OGC API - Processes,https://ogcapi.ogc.org/processes,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@opengeospatial,OGC API - Processes allows for processing tools to be called and combined from many sources and applied to data in other OGC API resources though a simple API,
29 | OGCStyl,http://www.opengis.net/def/interface/ogcapi-styles,OGC API - Styles,https://ogcapi.ogc.org/styles,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@opengeospatial,The OGC API - Styles defines a Web API that enables map servers clients as well as visual style editors to manage and fetch styles,
30 | OGCEDR,http://www.opengis.net/def/interface/ogcapi-edr,OGC API - EDR,https://ogcapi.ogc.org/edr,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@opengeospatial,Environmental Data Retrieval (EDR) API provides a family of lightweight interfaces to access Environmental Data resources,
31 | OGCDGGS,http://www.opengis.net/def/interface/ogcapi-dggs,OGC API - DGGS,https://ogcapi.ogc.org/dggs,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@opengeospatial,Enables applications to organise and access data arranged according to a Discrete Global Grid System (DGGS),
32 | OGCRout,http://www.opengis.net/def/interface/ogcapi-routes,OGC API - Routes,https://ogcapi.ogc.org/routes,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@opengeospatial,Enables applications to request routes in a manner independent of the underlying routing data set routing engine or algorithm,
33 | OGCAPI:Joins,http://www.opengis.net/def/interface/ogcapi-joins,OGC API - Joins,https://ogcapi.ogc.org/joins,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@opengeospatial,OGC API - Joins supports the joining of data from multiple sources with feature collections or directly with other input files,
34 | OGCAPI:MovingFeatures,http://www.opengis.net/def/interface/ogcapi-moving-features,OGC API - Moving Features,https://ogcapi.ogc.org/movingfeatures,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@opengeospatial,OGC API - Moving Features defines an API that provides access to data representing features that move as rigid bodies,
35 | OGCAPI:3DGeoVolumes,http://www.opengis.net/def/interface/ogcapi-3d-geo-volumes,OGC API - 3D GeoVolumes,https://ogcapi.ogc.org/geovolumes,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@opengeospatial,OGC API - 3D GeoVolumes facilitates efficient discovery of and access to 3D content in multiple formats based on a space-centric perspective,
36 | OSGEO:TMS,https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification,OSGeo Tile Map Service Specification,https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification,gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,"A Tile Map Service (TMS) provides access to cartographic maps of geo-referenced data not direct access to the data itself. This document standardizes the way in which map tiles are requested by clients and the ways that servers describe their holdings.",
37 | OSM:XYZ,https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames,XYZ,https://en.wikipedia.org/wiki/Tiled_web_map,gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,"Properties of tiled web maps that require convention or standards include the size of tiles, the numbering of zoom levels, the projection to use, the way individual tiles are numbered or otherwise identified, and the method for requesting them",
38 | radiantearth:stac,https://stacspec.org,SpatioTemporal Asset Catalog,https://stacspec.org,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,code@radiant.earth,SpatioTemporal Asset Catalog specification provides a common language to describe a range of geospatial information,
39 | ESRI:ArcIMS,urn:x-esri:serviceType:ArcIMS,ESRI ArcIMS Service,,srv:serviceType;gmd:protocol;usgin:overlayAPI,Esri Inc.,service,@tomkralidis,gmd:protocol value that indicates CI_OnlineResource URL is for an ArcIMS endpoint. ArcIMS requests are tunneled via HTTP Get URL's,
40 | ESRI:ArcGIS,urn:x-esri:serviceType:ArcGIS,ESRI ArcGIS Service,,srv:serviceType;gmd:protocol;usgin:overlayAPI,Esri Inc.,service,@tomkralidis,gmd:protocol value that indicates CI_OnlineResource URL is for an ESRI Map service endpoint. ESRI REST requests are tunneled via HTTP Get URL's,
41 | ESRI:MPK,http://esriurl.com/mpk.xml,ArcGIS Map Package,http://esriurl.com/mpk.xml,gmd:MD_Format/gmd:name;gmd:applicationProfile,Esri Inc.,data,@mhogeweg,"Example URI for ArcGIS Map Package. Mpk is a file format. A map package contains a map document (.mxd) and the data referenced by the layers it contains, packaged into one convenient, portable file.",
42 | OPeNDAP:OPeNDAP,,OPeNDAP root URL,http://docs.opendap.org/index.php/UserGuideOPeNDAPMessages,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@tomkralidis,"Link is the root URL for an OpenDAP endpoint. An OPeNDAP server replies to queries for data and other services in the form of specially formed URLs that start with a root URL, and use a suffix on the root URL and a constraint expression to indicate which service is requested and what the parameters are. Example suffixes are dods, das, dds, nc. OpenDAP defines a syntax for constraint expressions as well.",urn:x-esri:specification:ServiceType:OPeNDAP; urn:x-esri:specification:ServiceType:odp:url
43 | OPeNDAP:Hyrax,,OPeNDAP Hyrax server,http://docs.opendap.org/index.php/Hyrax,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@amilan17,"Link is the root URL for an This is the OPeNDAP 4 Data Server, also known as Hyrax. Hyrax is a data server that implements the DAP2 and DAP4 protocols, works with a number of different data formats and supports a wide variety of customization options from tailoring the look of the server's web pages to complex server-side processing operations.",
44 | UNIDATA:NCSS,,NetCDF Subset Service,https://www.unidata.ucar.edu/software/thredds/current/tds/interfaceSpec/NetcdfSubsetService.html,gmd:protocol; usgin:overlayAPI,,service,@tomkralidis,"Link is the root URL for a THREDDS datasets. The NetCDF Subset Service enables subsetting CDM scientific datasets using earth coordinates, such as lat/lon bounding boxes and date ranges; requests are made via HTTP GET with key-value pairs (KVP) for parameters encoded in HTTP URIs. The resources identified are THREDDS datasets. The resource URIs have a root host name and path, typically something like http://servername:8080/thredds/ncss/, followed by a path that identifies a particular dataset {path/dataset}. A subset of the dataset is considered a view of a resource, specified by query parameters following the character '?' after the dataset path: http://servername:8080/thredds/ncss/{path/dataset}?{subset}. An 'accept' parameter may be used to specify the desired resource representation.",
45 | UNIDATA:CDM,,Common Data Model Remote Web Service,https://www.unidata.ucar.edu/software/thredds/current/netcdf-java/stream/CdmRemote.html,srv:serviceType;gmd:protocol;usgin:overlayAPI,Unidata,service,@tomkralidis,Example,
46 | UNIDATA:CdmRemote,,Common Data Model index subsetting,https://www.unidata.ucar.edu/software/thredds/current/netcdf-java/stream/CdmRemote.html,gmd:protocol; usgin:overlayAPI,Unidata,service,@smrazgs,"CDM Remote provides remote access to UNIDATA Common Data Model (CDM) datasets, using ncstream as the on-the-wire protocol. Client requests are of the form endpoint?query, and the specification defines a vocabulary of valid query parameters. There are two levels of service: 1) CdmRemote provides index subsetting on remote CDM datasets; 2) CdmrFeature provides coordinate subsetting on remote CDM Feature Datasets",
47 | UNIDATA:CdmrFeature,,Common Data Model coordinate subsetting,https://www.unidata.ucar.edu/software/thredds/current/netcdf-java/stream/CdmRemote.html,gmd:protocol; usgin:overlayAPI,Unidata,,@smrazgs,"Link is endpoint URL that provides coordinate subsetting on UNIDATA Common Data Model (CDM) datasets, using ncstream as the on-the-wire protocol. Client requests are of the form endpoint?query, and the specification defines a vocabulary of valid query parameters.",
48 | UNIDATA:THREDDS,http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0,THREDDS Catalog,http://www.unidata.ucar.edu/software/thredds/current/tds/catalog/InvCatalogSpec.html,srv:serviceType;gmd:protocol;usgin:overlayAPI,Unidata,service,@kwilcox,Link is a THREDDS Catalog URL that provides the XML for traversing programatically. Can be used for datasets and collections of datasets.,
49 | OGC:GML,http://www.opengis.net/gml,OGC Geography Markup Language,,gmd:MD_Format/gmd:name;gmd:applicationProfile,,data,@tomkralidis,Example,
50 | WWW:LINK,http://www.w3.org/TR/xlink/,Web Address (URL),,dct:references/@scheme,,information,@tomkralidis @smrazgs,Indicates that XLINK properties are encoded as key-value pairs in content of a dct:references element to provide a machine actionable link. ,
51 | WWW:WSDL,http://www.w3.org/TR/wsdl,Web Service Description Language XML document describing service operation,http://www.w3.org/TR/wsdl,gmd:applicationProfile,W3C,,@smrazgs,,
52 | WWW:SPARQL:1.1,http://www.w3.org/TR/sparql11-protocol,SPARQL protocol for HTTP,http://www.w3.org/TR/rdf-sparql-query,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,SPARQL Protocol specifies a means for conveying SPARQL queries and updates to a SPARQL processing service and returning the results via HTTP to the entity that requested them,
53 | OpenSearch1.1,http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_URL_template_syntax,OpenSearch template,http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_URL_template_syntax,usgin:template;gmd:applicationProfile,OpenSearch.org,,@smrazgs,use to indicate link is a template conforming to the OpenSearch specification,
54 | OpenSearch1.1:Description,http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_description_document,OpenSearch description document,http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_description_document,gmd:applicationProfile,OpenSearch.org,,@smrazgs,indicates a link to get an openSearch description document,
55 | information,,link provides information about resource,,gmd:function,ISO TC211,,@smrazgs,function of link it to http:GET information about resource,
56 | template,http://tools.ietf.org/html/rfc6570,link provides template to access resource,http://tools.ietf.org/html/rfc6570,gmd:function,USGIN,,@smrazgs,Link text is a URI template; applicationProfile attribute value associated with the link should indicate the specification for the template scheme (e.g. OpenSearch1.1).,
57 | download,,link will get resource,,gmd:function,ISO TC211,,@smrazgs,function of link it to http:GET a representation of the resource; the link type attribute value(s) should indicate the MIME types of available representations,
58 | service,,link is service endpoint,,gmd:function,ISO TC211,,@smrazgs,"Link value is the URL of a service endpoint; the link protocol and applicationProfile (and possibly other link properties like overlayAPI, depending on the link attributes profile in use) attribute values should identify the service protocol specification",
59 | order,,link provides form to obtain resource,,gmd:function,ISO TC211,,@smrazgs,link value is URL of web application requiring user interaction to order/request access to the resource,
60 | search,,link provides form for searching resource,,gmd:function,ISO TC211,,@smrazgs,link value is URL of web application requiring user interaction to search/browse/subset the resource.,
61 | esip:CollectionCast,http://commons.esipfed.org/ns/discovery/1.2/collectionCast# ,ESIP collection cast,,gmd:applicationProfile,ESIP,,@smrazgs,,
62 | tilejson:2.0.0,,tile mill map service description,https://github.com/mapbox/tilejson-spec,gmd:applicationProfile,MapBox,,@smrazgs,link is description of a TileMill map service endpoint. Link type would be application/json; function would be information.,
63 | iris:fdsnws-event,http://service.iris.edu/fdsnws/event/1/,IRIS Seismic event service,http://service.iris.edu/fdsnws/event/1,gmd:applicationProfile;usgin:overlayAPI,IRIS,,@smrazgs,Link returns event (earthquake) information from the catalogs submitted to the IRIS DMC,
64 | QuakeML1.2,http://quakeml.org /xmlns /quakeml/1.2,Earthquake markup language,https://quake.ethz.ch/quakeml,gmd:MD_Format/gmd:name;gmd:applicationProfile,quakeml@sed.ethz.ch,,@smrazgs,XML markup language for earthquake hypocenter data,
65 | file,,a file,http://docs.ckan.org/en/ckan-1.8/domain-model-resource.html,gmd:function,OKFN,,@smrazgs,CKAN metadata vocabulary for populating the type attribute on a CKAN resource; indicates that an http GET of this url should yield a bitstream,
66 | ISO 19115:2003/19139,,ISO 19115 metadata in ISO19139 encoding,,gmd:metadataStandardName,GeoNetwork,,@smrazgs,This is the CharacterString value used by Geonetwork OpenSource to identify ISO metadata record instances; apparently have to assume that its using the 2006 corrigendum with no specific profile conventions.,
67 | ISO-USGIN,,USGIN-profile ISO 19115 metadata,http://repository.usgin.org/uri_gin/usgin/dlio/337,gmd:metadataStandardName,USGIN,,@smrazgs,This is the CharacterString Value mandated by the USGIN profile of ISO19115/19139 for instance documents to self-identify. ,
68 | ISO-USGIN-1.3,,USGIN-profile v.1.3 ISO 19115 metadata,http://repository.usgin.org/uri_gin/usgin/dlio/337,gmd:metadataStandardVersion,USGIN,,@smrazgs,This is the CharacterString Value mandated by the USGIN profile of ISO19115/19139 for instance documents to self-identify. Note change from earlier versions; use geonetwork string for metadataStandardName and this string for metadataStandardVersion to flat USGIN profile instnace documents. ,
69 | http,https://www.ietf.org/rfc/rfc2616,"Hypertext transfer Protocol, v1.1",https://www.ietf.org/rfc/rfc2616.txt,gmd:protocol,IETF,,@smrazgs,Use to indicate gmd:CI_OnlineResource URLs that are simple http links to a target resource representation for download; redundant as the URL prefix 'http:' conveys the same information.,
70 | https,https://tools.ietf.org/html/rfc2818,HTTP over TLS,https://www.ietf.org/rfc/rfc2818.txt,gmd:protocol,IETF,,@amilan17,Use to indicate gmd:CI_OnlineResource URLs that are simple https links to a target resource representation for download; redundant as the URL prefix 'https:' conveys the same information.,
71 | ftp,https://tools.ietf.org/html/rfc959,FILE TRANSFER PROTOCOL (FTP),https://www.ietf.org/rfc/rfc959.txt,gmd:protocol,IETF,,@amilan17,Use to indicate gmd:CI_OnlineResource URLs that are simple ftp links to a target resource representation for download; redundant as the URL prefix 'ftp:' conveys the same information.,
72 | IETF:GeoJSON,http://geojson.org,GeoJSON,https://datatracker.ietf.org/doc/draft-butler-geojson,gmd:MD_Format/gmd:name;gmd:applicationProfile,,data,@pvgenuchten,GeoJSON is a geospatial data interchange format based on JavaScript Object Notation (JSON),
73 | GIT,http://git-scm.com/,GIT,http://git-scm.com/book/commands,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for a GIT repository,
74 | OKFN:datapackage,http://data.okfn.org/doc/data-package,OKFN Data Package,http://dataprotocols.org/data-packages,gmd:MD_Format/gmd:name;gmd:applicationProfile,,data,@pvgenuchten,A Data Package is a simple way of packaging up data,
75 | boundless:geogig,http://geogig.org,Boundless GeoGig,http://geogig.org/docs/interaction/web-api.html,srv:serviceType;gmd:protocol;usgin:overlayAPI,Boundless,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for a GeoGig REST API,
76 | OASIS:OData:4.0,http://docs.oasis-open.org/odata/odata/v4.0,OData v4.0,http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for an OData JSON endpoint,
77 | maxogden:dat,http://dat-data.com,dat REST API,https://github.com/maxogden/dat/blob/master/docs/rest-api.md,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for a dat REST API,
78 | geoserver:rest,http://docs.geoserver.org/latest/en/user/rest,GeoServer REST configuration API,http://docs.geoserver.org/latest/en/user/rest,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for a Geoserver rest API to configure featuretypes in Geoserver (and mapserver) remotely,
79 | google:protocol-buffers,https://developers.google.com/protocol-buffers,Google Protocol Buffers,https://developers.google.com/protocol-buffers,gmd:MD_Format/gmd:name;gmd:applicationProfile,Google,data,@pvgenuchten,Googles mechanism for serializing structured data,
80 | google:fusion-tables,http://google.com/fusiontables,Google Fusion Tables,https://developers.google.com/fusiontables,gmd:MD_Format/gmd:name;gmd:applicationProfile,Google,data,@pvgenuchten,Google mechanism for interating with online data tables,
81 | NOAA:LAS,http://ferret.pmel.noaa.gov/LAS,Live Access Server,http://ferret.pmel.noaa.gov/LAS/documentation/developer-documentation/the-xml-messages-used-by-las,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is a LAS endpoint,
82 | OSM,http://wiki.openstreetmap.org/wiki/API,Open Street Map API,http://wiki.openstreetmap.org/wiki/API,srv:serviceType;gmd:protocol;usgin:overlayAPI,,service,@pvgenuchten,gmd:protocol value that indicates CI_OnlineResource URL is for a OSM APIfor fetching and saving raw geodata from/to an OpenStreetMap database ,
83 | ERDDAP:griddap,http://coastwatch.pfeg.noaa.gov/erddap/griddap/documentation.html,ERDDAP Data Service for Gridded Datasets,http://coastwatch.pfeg.noaa.gov/erddap/griddap/documentation.html,srv:serviceType;gmd:protocol;usgin:overlayAPI,@BobSimons,service,@BobSimons,"griddap lets you request a data subset, graph, or map from a gridded dataset (for example, sea surface temperature data from a satellite), via a specially formed URL. griddap uses the OPeNDAP (external link) Data Access Protocol (DAP) (external link) and its projection constraints (external link). Link is the root URL for an ERDDAP griddap service endpoint. The service responds to OPeNDAP requests and related ERDDAP-specific requests to a gridded dataset. A request starts with this root URL, adds a file type extension, and sometimes a constraint expression to specify a subset of data. Example file type extensions which don't require a constraint are .das, .dds, .html, and .graph. Example file type extensions which do require a constraint are .dods, .nc, .mat, .json, and .htmlTable. Full documentation for ERDDAP API at http://coastwatch.pfeg.noaa.gov/erddap/rest.html",
84 | ERDDAP:tabledap,http://coastwatch.pfeg.noaa.gov/erddap/tabledap/documentation.html,ERDDAP Data Service for Tabular Datasets,http://coastwatch.pfeg.noaa.gov/erddap/tabledap/documentation.html,srv:serviceType;gmd:protocol;usgin:overlayAPI,@BobSimons,service,@BobSimons,"Tabledap lets you request a data subset, a graph, or a map from a tabular dataset (for example, buoy data), via a specially formed URL. tabledap uses the OPeNDAP (external link) Data Access Protocol (DAP) (external link) and its selection constraints (external link). Link is the root URL for an ERDDAP tabledap service endpoint. The service responds to OPeNDAP requests and related ERDDAP-specific requests to a tabular (sequence) dataset. A request starts with this root URL, adds a file type extension, and sometimes a constraint expression to specify a subset of data. Example file type extensions which don't require a constraint are .das, .dds, .html, and .graph. Example file type extensions which do require a constraint are .dods, .nc, .mat, .json, and .htmlTable. Full documentation for ERDDAP API at http://coastwatch.pfeg.noaa.gov/erddap/rest.html",
85 | OASIS:AMQP,https://amqp.org,Advanced Message Queuing Protocol,https://amqp.org,gmd:protocol,,service,@tomkralidis,gmd:protocol value that indicates CI_OnlineResource URL is for an AMQP broker,
86 | Amazon:AWS:S3,https://aws.amazon.com/documentation/s3/,Amazon Simple Storage Solution,https://aws.amazon.com/documentation/s3/,gmd:protocol,Amazon,,@amilan17,,
87 | Google:GCP:BigQuery,https://cloud.google.com/bigquery/,Google Big Query,https://cloud.google.com/bigquery/,gmd:protocol,Google,,@amilan17,,
88 | Google:GCP:GCS,https://cloud.google.com/storage/,Google Cloud Storage,https://cloud.google.com/storage/,gmd:protocol,Google,,@amilan17,,
89 | IIIF:Image,http://iiif.io/api/image,IIIF Image API,http://iiif.io/api/image/2.1/,,IIIF,service,@mejackreed,,
90 | FILE:GEO,,Vector file on the network,,gmd:protocol,,data,@nyalldawson,Used by GeoNetwork and Geonode,
91 | FILE:RASTER,,Raster file on the network,,gmd:protocol,,data,@nyalldawson,Used by GeoNetwork and Geonode,
92 | DB:POSTGIS,,PostGIS table,https://postgis.net,gmd:protocol,PostGIS,service,@nyalldawson,Used by GeoNetwork OpenSource and GeoNode,
93 | OASIS:MQTT,https://mqtt.org,MQTT,https://mqtt.org,gmd:protocol,,service,@tomkralidis,gmd:protocol value that indicates CI_OnlineResource URL is for a MQTT broker,
94 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://github.com/OSGeo/Cat-Interop/actions)
2 |
3 | ## OSGeo Catalogue Interoperability Working Group
4 | A place to version documents and discuss issues surrounding the Cat-Interop Project.
5 |
6 | * Here's more about the overall project: http://wiki.osgeo.org/wiki/Cat-Interop.
7 | * Let's discuss issues as Github issues: https://github.com/OSGeo/Cat-Interop/issues
8 | * And document what we find here on our Github wiki: https://github.com/OSGeo/Cat-Interop/wiki
9 |
10 |
--------------------------------------------------------------------------------
/VERSION.txt:
--------------------------------------------------------------------------------
1 | master
2 |
--------------------------------------------------------------------------------
/export/codelists.j2:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Cat-Interop CodeLists
5 |
6 |
7 | Better interoperability between open source metadata servers and clients
8 |
9 |
10 | https://github.com/OSGeo/Cat-Interop
11 |
12 |
13 | {{ version }}
14 |
15 |
16 | {{ version_date }}
17 |
18 |
19 | eng
20 |
21 |
22 | utf8
23 |
24 |
25 |
26 | link property lookup codes
27 |
28 | LinkPropertyCode
29 | {% for link_type in link_types %}
30 |
31 |
32 | {{ link_type['label'] }}
33 | {{ link_type['identifier'] }}
34 |
35 |
36 | {% endfor %}
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/export/export.py:
--------------------------------------------------------------------------------
1 | # =================================================================
2 | #
3 | # Authors: Tom Kralidis
4 | #
5 | # Copyright (c) 2019 Tom Kralidis
6 | #
7 | # Permission is hereby granted, free of charge, to any person
8 | # obtaining a copy of this software and associated documentation
9 | # files (the "Software"), to deal in the Software without
10 | # restriction, including without limitation the rights to use,
11 | # copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | # copies of the Software, and to permit persons to whom the
13 | # Software is furnished to do so, subject to the following
14 | # conditions:
15 | #
16 | # The above copyright notice and this permission notice shall be
17 | # included in all copies or substantial portions of the Software.
18 | #
19 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
21 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23 | # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 | # OTHER DEALINGS IN THE SOFTWARE.
27 | #
28 | # =================================================================
29 |
30 | import csv
31 | import os
32 | import sys
33 |
34 | from jinja2 import Environment, FileSystemLoader
35 | from slugify import slugify
36 |
37 | THISDIR = os.path.dirname(os.path.realpath(__file__))
38 |
39 |
40 | def slugify_identifier(value):
41 | """helper function to slugify identifiers to pass gml:id constraints"""
42 |
43 | return slugify(value)
44 |
45 |
46 | def dump_csv(version, version_date, csvfile, format_):
47 | """transforms link type CSV into ISO Codelist Catalogue or SKOS"""
48 |
49 | reader = csv.DictReader(open(csvfile))
50 | env = Environment(loader=FileSystemLoader(THISDIR))
51 | env.filters['slugify_identifier'] = slugify_identifier
52 | if format_ == 'skos':
53 | template = env.get_template('skos.j2')
54 | else:
55 | template = env.get_template('codelists.j2')
56 | return template.render(version=version, version_date=version_date,
57 | link_types=reader)
58 |
59 |
60 | if __name__ == '__main__':
61 | if len(sys.argv) < 5:
62 | print('Usage: {} '.format(
63 | sys.argv[0]))
64 | sys.exit(1)
65 |
66 | print(dump_csv(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4]))
67 |
--------------------------------------------------------------------------------
/export/requirements-dev.txt:
--------------------------------------------------------------------------------
1 | flake8
2 |
--------------------------------------------------------------------------------
/export/requirements.txt:
--------------------------------------------------------------------------------
1 | Jinja2
2 | python-slugify
3 |
--------------------------------------------------------------------------------
/export/skos.j2:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Cat-Interop CodeLists
8 | <://github.com/OSGeo/Cat-Interop
9 | Cat-Interop CodeLists
10 | {% for link_type in link_types %}
11 |
12 |
13 | {{ link_type['label'] }}
14 | {{ link_type['identifier'] }}
15 |
16 |
17 | {% endfor %}
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/vocab/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Open Source Geospatial Foundation
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/vocab/README.md:
--------------------------------------------------------------------------------
1 | # OSGeo Vocabulary Resolver
2 |
3 |
4 |
--------------------------------------------------------------------------------
/vocab/VERSION.txt:
--------------------------------------------------------------------------------
1 | 0.1-dev
2 |
--------------------------------------------------------------------------------
/vocab/app/app.py:
--------------------------------------------------------------------------------
1 | ###################################################################
2 | #
3 | # Authors: Tom Kralidis
4 | #
5 | # Copyright (c) 2019 Tom Kralidis
6 | #
7 | # Permission is hereby granted, free of charge, to any person
8 | # obtaining a copy of this software and associated documentation
9 | # files (the "Software"), to deal in the Software without
10 | # restriction, including without limitation the rights to use,
11 | # copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | # copies of the Software, and to permit persons to whom the
13 | # Software is furnished to do so, subject to the following
14 | # conditions:
15 | #
16 | # The above copyright notice and this permission notice shall be
17 | # included in all copies or substantial portions of the Software.
18 | #
19 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
21 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23 | # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 | # OTHER DEALINGS IN THE SOFTWARE.
27 | #
28 | ###################################################################
29 |
30 | from flask import abort, Flask, redirect, Response
31 |
32 | from model import Vocabulary
33 |
34 | APP = Flask(__name__)
35 |
36 | VOCAB = Vocabulary()
37 |
38 |
39 | @APP.route('/')
40 | @APP.route('/vocab/')
41 | def index():
42 | """return json of entire vocabulary"""
43 |
44 | return Response(VOCAB.dumps(), mimetype='application/json')
45 |
46 |
47 | @APP.route('/vocab//')
48 | def resolve_resource_type(resource_type):
49 | """resolve a given vocabulary resource type"""
50 |
51 | if resource_type not in ['service', 'data']:
52 | abort(404)
53 |
54 | url = 'http://osgeo.org/vocab/{}'.format(resource_type)
55 | members = VOCAB.filter(url)
56 |
57 | return Response(VOCAB.dumps(data=members), mimetype='application/json')
58 |
59 |
60 | @APP.route('/vocab///')
61 | def resolve_resource_type_provider(resource_type, provider):
62 | """resolve a given vocabulary resource type and provider"""
63 |
64 | url = 'http://osgeo.org/vocab/{}/{}'.format(resource_type, provider)
65 | members = VOCAB.filter(url)
66 |
67 | return Response(VOCAB.dumps(data=members), mimetype='application/json')
68 |
69 |
70 | @APP.route('/vocab////')
71 | def resolve_vocab_member(provider, resource_type, identifier, version):
72 | """resolve a given vocabulary member"""
73 |
74 | url = 'http://osgeo.org/vocab/{}'.format('/'.join([resource_type, provider,
75 | identifier, version]))
76 |
77 | # check if the link_type exists:
78 | for link in VOCAB.json:
79 | if link['link_type'] == url:
80 | return redirect(link['redirect'])
81 |
82 |
83 | if __name__ == '__main__': # run locally, for fun
84 | APP.run(host='0.0.0.0', port=8000, use_reloader=True, debug=True)
85 |
--------------------------------------------------------------------------------
/vocab/app/model.py:
--------------------------------------------------------------------------------
1 | ###################################################################
2 | #
3 | # Authors: Tom Kralidis
4 | #
5 | # Copyright (c) 2019 Tom Kralidis
6 | #
7 | # Permission is hereby granted, free of charge, to any person
8 | # obtaining a copy of this software and associated documentation
9 | # files (the "Software"), to deal in the Software without
10 | # restriction, including without limitation the rights to use,
11 | # copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | # copies of the Software, and to permit persons to whom the
13 | # Software is furnished to do so, subject to the following
14 | # conditions:
15 | #
16 | # The above copyright notice and this permission notice shall be
17 | # included in all copies or substantial portions of the Software.
18 | #
19 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
21 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23 | # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 | # OTHER DEALINGS IN THE SOFTWARE.
27 | #
28 | ###################################################################
29 |
30 | import csv
31 | import json
32 |
33 |
34 | class Vocabulary(object):
35 | """Vocabulary object"""
36 | def __init__(self):
37 | """constructor"""
38 |
39 | with open('build/LinkPropertyLookupTable.csv') as vocab:
40 | # serialize to JSON
41 | csvobj = csv.reader(vocab)
42 | # skip CSV header
43 | next(csvobj)
44 | self.json = []
45 | for row in csvobj:
46 | self.json.append({'link_type': row[0],
47 | 'description': row[2],
48 | 'redirect': row[3]})
49 |
50 | def filter(self, startswith):
51 | """rudimentary filtering mechanism"""
52 |
53 | members = []
54 | for link in self.json:
55 | if link['link_type'].startswith(startswith):
56 | members.append(link)
57 | return members
58 |
59 | def dumps(self, data=None):
60 | """return json as string"""
61 |
62 | if data is not None:
63 | return json.dumps(data)
64 | return json.dumps(self.json)
65 |
--------------------------------------------------------------------------------
/vocab/pavement.py:
--------------------------------------------------------------------------------
1 | # =================================================================
2 | #
3 | # Authors: Tom Kralidis
4 | #
5 | # Copyright (c) 2019 Tom Kralidis
6 | #
7 | # Permission is hereby granted, free of charge, to any person
8 | # obtaining a copy of this software and associated documentation
9 | # files (the "Software"), to deal in the Software without
10 | # restriction, including without limitation the rights to use,
11 | # copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | # copies of the Software, and to permit persons to whom the
13 | # Software is furnished to do so, subject to the following
14 | # conditions:
15 | #
16 | # The above copyright notice and this permission notice shall be
17 | # included in all copies or substantial portions of the Software.
18 | #
19 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
21 | # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23 | # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24 | # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 | # OTHER DEALINGS IN THE SOFTWARE.
27 | #
28 | # =================================================================
29 |
30 | import os
31 | import shutil
32 | from urllib.request import urlopen
33 |
34 | from paver.easy import Bunch, cmdopts, options, path, task
35 |
36 |
37 | options(
38 | app=Bunch(
39 | home=path('app'),
40 | voc='https://raw.githubusercontent.com/OSGeo/Cat-Interop/{}/LinkPropertyLookupTable.csv', # noqa
41 | build=path('app/build'),
42 | version=open('VERSION.txt').read().strip()
43 | )
44 | )
45 |
46 |
47 | @task
48 | def setup():
49 | """setup install"""
50 |
51 | if not os.path.exists(options.app.build):
52 | options.app.build.mkdir()
53 | if not os.path.exists(options.app.build / 'LinkPropertyLookupTable.csv'):
54 | if options.app.version.endswith('-dev'): # master
55 | url = options.app.voc.format('master')
56 | else:
57 | url = options.app.voc.format(options.app.version)
58 | file_ = options.app.build / 'LinkPropertyLookupTable.csv'
59 | with open(file_, 'wb') as fileobj:
60 | fileobj.write(urlopen(url).read())
61 |
62 |
63 | @task
64 | def clean():
65 | """return to pristine state"""
66 |
67 | if os.path.exists(options.app.build):
68 | shutil.rmtree(options.app.build)
69 |
70 |
71 | @task
72 | @cmdopts([
73 | ('venv=', 'v', 'path to virtual environment'),
74 | ])
75 | def deploy():
76 | """deploy install"""
77 |
78 | venv = options.get('venv', None)
79 | if venv is None:
80 | raise ValueError('path to virtual environment required')
81 | venv = os.path.abspath(venv)
82 |
83 | loc = [
84 | 'import sys',
85 | 'sys.path.insert(0, "{}/app")'.format(venv),
86 | 'activate = "{}/bin/activate_this.py"'.format(venv),
87 | 'execfile(activate_this, {__file__: activate})',
88 | 'from app import APP as application'
89 | ]
90 |
91 | with open(options.app.build / 'vocab.wsgi', 'w') as fileobj:
92 | fileobj.write('\n'.join(loc))
93 |
94 | loc = [
95 | 'WSGIDaemonProcess vocab user=user1 group=group1 threads=5',
96 | 'WSGIScriptAlias /vocab {}'.format(options.app.home),
97 | ''.format(path(venv)),
98 | ' WSGIProcessGroup vocab',
99 | ' WSGIApplicationGroup %{GLOBAL}',
100 | ' Order deny,allow',
101 | ' Allow from all',
102 | '']
103 |
104 | with open(options.app.build / 'osgeo.vocab.conf', 'w') as fileobj:
105 | fileobj.write('\n'.join(loc))
106 |
--------------------------------------------------------------------------------
/vocab/requirements-dev.txt:
--------------------------------------------------------------------------------
1 | flake8
2 |
--------------------------------------------------------------------------------
/vocab/requirements.txt:
--------------------------------------------------------------------------------
1 | Flask
2 | Paver
3 |
--------------------------------------------------------------------------------