Skip to content

Commit

Permalink
RDF Export (#1138)
Browse files Browse the repository at this point in the history
* Very basic start to RDF output.

* WIP - get documents by schema and attempt to convert basic properties to RDF

* Add apache-jena-libs dependency for Riot

* specify imports, write turtle instead

* Move RDF method to GET, allow request for JSON-LD, Turtle, or RDF/XML

* formatting, change some exception messages

* Make atlas name available to export servlet for use in semantic export

* Fix check with json.optString, write out WKT as GeoSPARQL if available

* Set RDF response properties, move work to ExportFormatRDF class

* formatting

* Create typed literal geo:wktLiteral for WKTs

* Remove test leaflet and tiles pages

* formatting, move from get back to post and merge into existing postDefinition method

* flush is done in export servlet

* Add other formats

* Fix display format by layer, add other formats for export page

* remove unused import

---------

Co-authored-by: Brendan Billingsley <[email protected]>
# Conflicts:
#	nunaliit2-couch-application/src/main/atlas_couchapp/_attachments/tools/js/export.js
#	nunaliit2-couch-application/src/main/atlas_couchapp/_attachments/tools/test_leaflet.html
#	nunaliit2-couch-application/src/main/atlas_couchapp/_attachments/tools/tiles.html
  • Loading branch information
alexgao1 committed Apr 4, 2023
1 parent 6cdb063 commit c9a1abe
Show file tree
Hide file tree
Showing 22 changed files with 299 additions and 7,672 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function showDocs(opts_){
} else if( layerId ) {
exportService.exportByLayerId({
layerId: layerId
,format: 'csv'
,format: format
,onSuccess: function(csv){
$('.exportResult').empty();
var $textarea = $('<textarea class="exportCsv"></textarea>');
Expand Down Expand Up @@ -82,17 +82,16 @@ function downloadDocs(opts_){

var schema = opts.schema;
var layerId = opts.layerId;

var format = 'csv';
var fileName = 'export.csv';
if (opts.format) {
format = opts.format;

if (format === 'geojson') {
fileName = 'export.geojson';
};
};

const format = opts.format || 'csv';
let fileName = 'export.';
if ('csv' === format) fileName += 'csv';
else if ('geojson' === format) fileName += 'geojson';
else if ('turtle' === format) fileName += 'ttl';
else if ('jsonld' === format) fileName += 'jsonld';
else if ('rdfxml' === format) fileName += 'rdf';
else fileName = fileName.slice(0, -1);

var windowId = $n2.getUniqueId();

// Open a new iframe to get results
Expand Down Expand Up @@ -218,6 +217,18 @@ function showButtons(opts_){
{
"value": "geojson",
"text": "geojson"
},
{
"value": "turtle",
"text": "turtle"
},
{
"value": "jsonld",
"text": "jsonld"
},
{
"value": "rdfxml",
"text": "rdfxml"
}
]
});
Expand Down

This file was deleted.

Loading

0 comments on commit c9a1abe

Please sign in to comment.