blob: cb9f40d8889ca47d80d8c6179773c9b94417b02c [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<!--###BEGIN_HEAD###-->
<title>Exporter</title>
<script type="text/javascript" src="../public/js/lib/jquery-1.7.2.js"></script>
<script type="text/javascript">
var updateDownloadLink = function() {
var format = $("#formats").val();
var context = $("#contexts").val();
var downloadLink = _SERVER_URL + "export/download?";
if(context != null && format != null) {
if(context != "all") {
downloadLink += "context="+encodeURIComponent(context)+"&format="+encodeURIComponent(format);
} else {
downloadLink += "format="+encodeURIComponent(format);
}
$("#download").removeAttr("disabled");
$("#download").attr("href",downloadLink);
}
};
$(document).ready(function() {
// load contexts
$.get(_SERVER_URL + "context/list?labels=true", function(data) {
$("#contexts").empty();
$("#contexts").append("<option>all</option>");
$.each(data, function(row,item) {
$("#contexts").append("<option value='"+item.uri+"'>"+item.label+"</option>");
});
$("#contexts").change(updateDownloadLink);
updateDownloadLink();
}, "json");
// load supported formats
$.get(_SERVER_URL + "export/types", function(data) {
$("#formats").empty();
$.each(data, function(row,item) {
$("#formats").append("<option>"+item+"</option>");
});
$("#formats").change(updateDownloadLink);
updateDownloadLink();
}, "json");
// initialise download link
});
</script>
<style>
.export_table {
margin: 0px auto;
background-color: #eeeeee;
padding: 20px;
border: 1px solid gray;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.export_table td {
padding: 3px;
}
</style>
<!--###END_HEAD###-->
</head>
<body>
<!--###BEGIN_CONTENT###-->
<h1>Export Data</h1>
<p>
The following page allows you to export and download RDF data contained in the Linked Media Framework. You can choose
from different serialization formats and either export all RDF data or only the RDF data contained in a certain
context (named graph). If you want to download the data instead of displaying in the browser, right-click the download
link and choose "save as".
</p>
<div id="exporter_div">
<table class="export_table">
<tr><td><strong>Format:</strong></td><td><select id="formats"></select></td></tr>
<tr><td><strong>Context:</strong></td><td><select id="contexts"></select></td></tr>
<tr><td><strong>Download:</strong></td><td><a style="font-weight: bold" id="download" href="" disabled="disabled">Download Link</a></td></tr>
</table>
</div>
<!--###END_CONTENT###-->
</body>
</html>