1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
var LV = LV || {};
// ※テーブルの項目名とプロパティの対応の設定
LV.property = [
["名称","名称"],
["所在地","所在地"],
["カテゴリー","カテゴリー"]
]
window.onload = function() {
$("#result").append("<table class='display' id='data_list'></table>" );
var colList=[];
$('#data_list').dataTable({
"aoColumns": setColName(colList),
"asSorting": [[0,"desc"]],
"bJQueryUI": true,
"bAutoWidth": false,
/* 空の値が来たらハイフン表示(alert対策) */
"columnDefs": [{
"defaultContent": "-",
"targets": "_all"
}],
/* 日本語化 */
"language": {
"emptyTable" : "データが登録されていません。",
"info" : "_TOTAL_ 件中 _START_ 件から _END_ 件までを表示",
"infoEmpty" : "",
"infoFiltered" : "(_MAX_ 件からの絞り込み表示)",
"infoPostFix" : "",
"thousands" : ",",
"lengthMenu" : "1ページあたりの表示件数: _MENU_",
"loadingRecords" : "ロード中",
"processing" : "処理中...",
"search" : "検索:",
"zeroRecords" : "該当するデータが見つかりませんでした。",
"paginate" : {
"first" : "先頭",
"previous" : "前へ",
"next" : "次へ",
"last" : "末尾"
}
});
/* LinkDataからデータを取得 */
$.each(LinkData.getWorks(), function(workKey, workValue) {
var propList = stringToUri(LV.property, workValue);
$.each(LinkData.getFiles(workValue), function(fileKey, fileValue) {
$.each(LinkData.getSubjects(workValue, fileValue), function(subjKey, subjValue) {
var dataList = [];
/* その他の列のデータを取得 */
$.each( LinkData.getProperties(workValue, fileValue), function(propKey, propValue) {
$.each (propList, function(i, propUri){
if (propUri == propValue) {
var objList = [];
$.each( LinkData.getObjects(workValue, fileValue, subjValue, propValue), function(objkey, objValue) {
objList.push(objValue);
dataList[i] = objList.toString();
/* テーブルにデータを追加 */
$('#data_list').dataTable().fnAddData(dataList);
/* プロパティがリテラルで指定された場合にURIに変換 */
function stringToUri (p, workId) {
var arr = [];
$.each (p, function(){
if(this[1].indexOf("http") != 0){
arr.push("http://linkdata.org/property/" + workId + "#" + encodeURIComponent(this[1]));
} else {
arr.push(this[1]);
})
return arr;
/* カラム名を設定 */
function setColName(arr) {
$.each(LV.property, function(){
var col = {};
col.sTitle = this[0];
arr.push(col);
#result {
margin: 10px;
<div id="result"></div>
Click the Browse button or drag and drop to choose files to upload
The Maximum upload size is 1MB.(bmp,gif,jpeg,jpg,png)
*Required field
Add name for another language
You can upload jpg, gif, png file formats
Add description for another language
Fork original application has been updated. >>see
Original application has been updated. >>see
Playing...
Please enter a valid URL