marmottawrapper 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/Gemfile +3 -0
- data/LICENSE +202 -0
- data/README.md +13 -0
- data/Rakefile +6 -0
- data/Vagrantfile +24 -0
- data/bin/setup +26 -0
- data/lib/marmottawrapper/version.rb +3 -0
- data/lib/marmottawrapper.rb +116 -0
- data/marmotta/pom.xml +571 -0
- data/marmotta/src/main/resources/META-INF/beans.xml +28 -0
- data/marmotta/src/main/resources/config-defaults.properties +21 -0
- data/marmotta/src/main/resources/config-descriptions.properties +24 -0
- data/marmotta/src/main/resources/logback.xml +37 -0
- data/marmotta/src/main/webapp/META-INF/context.xml +23 -0
- data/marmotta/src/main/webapp/META-INF/jetty-web.xml +27 -0
- data/marmotta/src/main/webapp/WEB-INF/jetty-web.xml +34 -0
- data/marmotta/src/main/webapp/WEB-INF/templates/404.ftl +84 -0
- data/marmotta/src/main/webapp/WEB-INF/templates/admin.ftl +104 -0
- data/marmotta/src/main/webapp/WEB-INF/templates/rdfhtml.ftl +335 -0
- data/marmotta/src/main/webapp/WEB-INF/web.xml +177 -0
- data/marmotta/src/main/webapp/index.jsp +25 -0
- data/marmotta/src/test/resources/META-INF/beans.xml +26 -0
- data/marmotta/src/test/resources/WEB-INF/test-web.xml +188 -0
- data/marmotta/src/test/resources/jndi.properties +14 -0
- data/marmotta/src/test/resources/logback.xml +60 -0
- data/marmotta/src/test/resources/test-config.properties +68 -0
- data/marmotta/src/test/resources/verification.xml +31 -0
- data/marmottawrapper.gemspec +24 -0
- data/pom.xml +571 -0
- data/tasks/marmottawrapper.rake +32 -0
- metadata +119 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!--
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
4
|
+
contributor license agreements. See the NOTICE file distributed with
|
5
|
+
this work for additional information regarding copyright ownership.
|
6
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
7
|
+
(the "License"); you may not use this file except in compliance with
|
8
|
+
the License. You may obtain a copy of the License at
|
9
|
+
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
See the License for the specific language governing permissions and
|
16
|
+
limitations under the License.
|
17
|
+
-->
|
18
|
+
|
19
|
+
<configuration>
|
20
|
+
|
21
|
+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
22
|
+
<encoder>
|
23
|
+
<pattern>%d{HH:mm:ss.SSS} %-5level - %msg%n</pattern>
|
24
|
+
</encoder>
|
25
|
+
</appender>
|
26
|
+
|
27
|
+
<logger name="org.apache.marmotta" level="WARN" />
|
28
|
+
<logger name="org.apache.marmotta.platform.core" level="INFO" />
|
29
|
+
|
30
|
+
<logger name="org.apache.marmotta.platform.reasoner" level="INFO" />
|
31
|
+
|
32
|
+
<logger name="la.dp" level="DEBUG" />
|
33
|
+
|
34
|
+
<root level="info">
|
35
|
+
<appender-ref ref="STDOUT" />
|
36
|
+
</root>
|
37
|
+
</configuration>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!--
|
3
|
+
~ Licensed to the Apache Software Foundation (ASF) under one or more
|
4
|
+
~ contributor license agreements. See the NOTICE file distributed with
|
5
|
+
~ this work for additional information regarding copyright ownership.
|
6
|
+
~ The ASF licenses this file to You under the Apache License, Version 2.0
|
7
|
+
~ (the "License"); you may not use this file except in compliance with
|
8
|
+
~ the License. You may obtain a copy of the License at
|
9
|
+
~
|
10
|
+
~ http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
~
|
12
|
+
~ Unless required by applicable law or agreed to in writing, software
|
13
|
+
~ distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
~ See the License for the specific language governing permissions and
|
16
|
+
~ limitations under the License.
|
17
|
+
-->
|
18
|
+
<Context>
|
19
|
+
<Resource name="BeanManager"
|
20
|
+
auth="Container"
|
21
|
+
type="javax.enterprise.inject.spi.BeanManager"
|
22
|
+
factory="org.jboss.weld.resources.ManagerObjectFactory"/>
|
23
|
+
</Context>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!--
|
3
|
+
|
4
|
+
Licensed to the Apache Software Foundation (ASF) under one
|
5
|
+
or more contributor license agreements. See the NOTICE file
|
6
|
+
distributed with this work for additional information
|
7
|
+
regarding copyright ownership. The ASF licenses this file
|
8
|
+
to you under the Apache License, Version 2.0 (the
|
9
|
+
"License"); you may not use this file except in compliance
|
10
|
+
with the License. You may obtain a copy of the License at
|
11
|
+
|
12
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
|
14
|
+
Unless required by applicable law or agreed to in writing, software
|
15
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
See the License for the specific language governing permissions and
|
18
|
+
limitations under the License.
|
19
|
+
|
20
|
+
-->
|
21
|
+
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
|
22
|
+
|
23
|
+
<Configure id="webAppCtx" class="org.mortbay.jetty.webapp.WebAppContext">
|
24
|
+
<Call class="org.jboss.weld.environment.jetty.WeldServletHandler" name="process">
|
25
|
+
<Arg><Ref id="webAppCtx"/></Arg>
|
26
|
+
</Call>
|
27
|
+
</Configure>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!--
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
4
|
+
contributor license agreements. See the NOTICE file distributed with
|
5
|
+
this work for additional information regarding copyright ownership.
|
6
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
7
|
+
(the "License"); you may not use this file except in compliance with
|
8
|
+
the License. You may obtain a copy of the License at
|
9
|
+
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
See the License for the specific language governing permissions and
|
16
|
+
limitations under the License.
|
17
|
+
-->
|
18
|
+
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
|
19
|
+
"http://jetty.mortbay.org/configure.dtd">
|
20
|
+
|
21
|
+
<Configure id="webAppCtx" class="org.mortbay.jetty.webapp.WebAppContext">
|
22
|
+
|
23
|
+
<Array id="annotationConfig" type="java.lang.String">
|
24
|
+
<Item>org.mortbay.jetty.webapp.WebInfConfiguration</Item>
|
25
|
+
<Item>org.mortbay.jetty.plus.webapp.EnvConfiguration</Item>
|
26
|
+
<Item>org.mortbay.jetty.annotations.Configuration</Item> <!-- Enables annotation support -->
|
27
|
+
<Item>org.mortbay.jetty.webapp.JettyWebXmlConfiguration</Item>
|
28
|
+
<Item>org.mortbay.jetty.webapp.TagLibConfiguration</Item>
|
29
|
+
</Array>
|
30
|
+
|
31
|
+
<Call class="org.jboss.weld.environment.jetty.MortbayWeldServletHandler" name="process">
|
32
|
+
<Arg><Ref id="webAppCtx"/></Arg>
|
33
|
+
</Call>
|
34
|
+
</Configure>
|
@@ -0,0 +1,84 @@
|
|
1
|
+
<#--
|
2
|
+
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one
|
4
|
+
or more contributor license agreements. See the NOTICE file
|
5
|
+
distributed with this work for additional information
|
6
|
+
regarding copyright ownership. The ASF licenses this file
|
7
|
+
to you under the Apache License, Version 2.0 (the
|
8
|
+
"License"); you may not use this file except in compliance
|
9
|
+
with the License. You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
See the License for the specific language governing permissions and
|
17
|
+
limitations under the License.
|
18
|
+
|
19
|
+
-->
|
20
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
21
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
22
|
+
|
23
|
+
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
|
24
|
+
|
25
|
+
<head>
|
26
|
+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
27
|
+
<title>404 Not Found - Marmotta Linked Data Explorer</title>
|
28
|
+
<script src="${SERVER_URL}webjars/jquery/1.8.2/jquery.min.js" type="text/javascript" ></script>
|
29
|
+
<link href="${SERVER_URL}${DEFAULT_STYLE}style.css" rel="stylesheet" type="text/css" />
|
30
|
+
<link href="${SERVER_URL}${DEFAULT_STYLE}rdfhtml.css" rel="stylesheet" type="text/css" />
|
31
|
+
<link href="${SERVER_URL}${DEFAULT_STYLE}404.css" rel="stylesheet" type="text/css" />
|
32
|
+
</head>
|
33
|
+
|
34
|
+
<body>
|
35
|
+
|
36
|
+
<div id="wrapper">
|
37
|
+
<div id="header">
|
38
|
+
<a id="logo" href="${SERVER_URL}" title="${PROJECT}">
|
39
|
+
<img src="${SERVER_URL}${LOGO}" alt="${PROJECT} logo" />
|
40
|
+
</a>
|
41
|
+
<h1>Marmotta Linked Data Explorer</h1>
|
42
|
+
<div class="clean"></div>
|
43
|
+
</div>
|
44
|
+
<div class="clear"></div>
|
45
|
+
<div id="center">
|
46
|
+
<div id="content">
|
47
|
+
|
48
|
+
<h2>404 Not Found</h2>
|
49
|
+
|
50
|
+
<p>
|
51
|
+
<strong><a href="${SERVER_URL}resource?uri=${encoded_uri}">${uri}</a></strong><a href="${uri}"><img src="${SERVER_URL}core/public/img/icon/link.png" alt="${uri}" title="go to ${uri} directly" /></a>
|
52
|
+
</p>
|
53
|
+
|
54
|
+
<p>
|
55
|
+
Sorry, but ${message}.
|
56
|
+
</p>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div class="clear"></div>
|
63
|
+
<div id="footer">
|
64
|
+
<div id="footer_line">
|
65
|
+
<span>
|
66
|
+
${FOOTER}
|
67
|
+
</span>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
</div>
|
72
|
+
|
73
|
+
<script type="text/javascript">
|
74
|
+
|
75
|
+
$(document).ready(function() {
|
76
|
+
|
77
|
+
});
|
78
|
+
|
79
|
+
</script>
|
80
|
+
|
81
|
+
</body>
|
82
|
+
|
83
|
+
</html>
|
84
|
+
|
@@ -0,0 +1,104 @@
|
|
1
|
+
<#--
|
2
|
+
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one
|
4
|
+
or more contributor license agreements. See the NOTICE file
|
5
|
+
distributed with this work for additional information
|
6
|
+
regarding copyright ownership. The ASF licenses this file
|
7
|
+
to you under the Apache License, Version 2.0 (the
|
8
|
+
"License"); you may not use this file except in compliance
|
9
|
+
with the License. You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
See the License for the specific language governing permissions and
|
17
|
+
limitations under the License.
|
18
|
+
|
19
|
+
-->
|
20
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
21
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
22
|
+
|
23
|
+
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
|
24
|
+
|
25
|
+
<head>
|
26
|
+
|
27
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
28
|
+
<link href="${SERVER_URL}${DEFAULT_STYLE}javadoc.css" rel="stylesheet" type="text/css" />
|
29
|
+
<link href="${SERVER_URL}${DEFAULT_STYLE}style.css" rel="stylesheet" type="text/css" />
|
30
|
+
<link href="${SERVER_URL}core/public/img/icon/lmf.ico" rel="SHORTCUT ICON">
|
31
|
+
<script type="text/javascript">
|
32
|
+
var _BASIC_URL = "${BASIC_URL}";
|
33
|
+
//use _SERVER_URL for webservice calls
|
34
|
+
var _SERVER_URL = "${SERVER_URL}";
|
35
|
+
|
36
|
+
var _CURRENT_STYLE = "${DEFAULT_STYLE}";
|
37
|
+
|
38
|
+
</script>
|
39
|
+
<#if USER_MODULE_IS_ACTIVE>
|
40
|
+
<link href="${SERVER_URL}user/admin/style/style.css" rel="stylesheet" type="text/css">
|
41
|
+
<script type="text/javascript" src="${SERVER_URL}user/admin/widgets/user.js"></script>
|
42
|
+
<script type="text/javascript">
|
43
|
+
window.onload = function () {
|
44
|
+
LoginLogout.draw(_SERVER_URL,"login_logout");
|
45
|
+
}
|
46
|
+
</script>
|
47
|
+
</#if>
|
48
|
+
|
49
|
+
${HEAD}
|
50
|
+
|
51
|
+
</head>
|
52
|
+
|
53
|
+
<body>
|
54
|
+
|
55
|
+
<div id="wrapper">
|
56
|
+
<div id="header">
|
57
|
+
<a id="logo" href="${SERVER_URL}" title="${PROJECT}">
|
58
|
+
<img src="${SERVER_URL}${LOGO}" alt="${PROJECT} logo" />
|
59
|
+
</a>
|
60
|
+
<h1>${CURRENT_MODULE} - ${CURRENT_TITLE}</h1>
|
61
|
+
<#if USER_MODULE_IS_ACTIVE>
|
62
|
+
<div id="login_logout"></div>
|
63
|
+
</#if>
|
64
|
+
</div>
|
65
|
+
<div class="clear"></div>
|
66
|
+
<div id="left">
|
67
|
+
<ul id="menu">
|
68
|
+
<#list MODULE_MENU as menu>
|
69
|
+
<li
|
70
|
+
<#if menu.properties["active"]>
|
71
|
+
class="menu_item active"
|
72
|
+
<#else>
|
73
|
+
class="menu_item"
|
74
|
+
</#if>
|
75
|
+
>
|
76
|
+
<div class="menu_heading"><a href="${menu.submenu[0].properties["path"]}">${menu.properties["title"]}</a></div>
|
77
|
+
<ul class="submenu">
|
78
|
+
<#list menu.submenu as submenu>
|
79
|
+
<li
|
80
|
+
<#if submenu.properties["active"]> class="active" </#if>
|
81
|
+
>
|
82
|
+
<a href="${submenu.properties["path"]}">${submenu.properties["title"]}</a>
|
83
|
+
</li>
|
84
|
+
</#list>
|
85
|
+
</ul>
|
86
|
+
</li>
|
87
|
+
</#list>
|
88
|
+
</ul>
|
89
|
+
</div>
|
90
|
+
<div id="center">
|
91
|
+
<div id="content">
|
92
|
+
${CONTENT}
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
<div class="clear"></div>
|
96
|
+
<div id="footer">
|
97
|
+
<div id="footer_line">
|
98
|
+
<span>
|
99
|
+
${FOOTER}
|
100
|
+
</span>
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
|
@@ -0,0 +1,335 @@
|
|
1
|
+
<#--
|
2
|
+
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one
|
4
|
+
or more contributor license agreements. See the NOTICE file
|
5
|
+
distributed with this work for additional information
|
6
|
+
regarding copyright ownership. The ASF licenses this file
|
7
|
+
to you under the Apache License, Version 2.0 (the
|
8
|
+
"License"); you may not use this file except in compliance
|
9
|
+
with the License. You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
See the License for the specific language governing permissions and
|
17
|
+
limitations under the License.
|
18
|
+
|
19
|
+
-->
|
20
|
+
<!DOCTYPE html>
|
21
|
+
<html lang="en" prefix="${prefixMappings}" xmlns="http://www.w3.org/1999/html">
|
22
|
+
|
23
|
+
<head>
|
24
|
+
<title>Resource/s in HTML</title>
|
25
|
+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
26
|
+
<meta http-equiv="Default-Style" content="${DEFAULT_STYLE}">
|
27
|
+
<script type="text/javascript" src="${SERVER_URL}webjars/jquery/1.8.2/jquery.min.js"></script>
|
28
|
+
<link href="${SERVER_URL}${DEFAULT_STYLE}style.css" rel="stylesheet" type="text/css" />
|
29
|
+
<link href="${SERVER_URL}${DEFAULT_STYLE}rdfhtml.css" rel="stylesheet" type="text/css" />
|
30
|
+
<#if resources?size = 1>
|
31
|
+
<link rel="alternate" type="application/rdf+xml" href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&format=application/rdf%2Bxml" />
|
32
|
+
<link rel="alternate" type="text/rdf+n3" href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&format=text/rdf%2Bn3" />
|
33
|
+
<link rel="alternate" type="text/turtle" href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&format=text/turtle" />
|
34
|
+
<link rel="alternate" type="application/rdf+json" href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&format=application/rdf%2Bjson" />
|
35
|
+
<link rel="alternate" type="application/ld+json" href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&format=application/ld%2Bjson" />
|
36
|
+
</#if>
|
37
|
+
|
38
|
+
<script>
|
39
|
+
$(document).ready(function(){
|
40
|
+
$(".submenu li").click(function(event){
|
41
|
+
event.preventDefault();
|
42
|
+
if(!$(this).hasClass("active")) {
|
43
|
+
$(".submenu").children().removeClass("active");
|
44
|
+
$(this).addClass("active");
|
45
|
+
var tabid = $(this).children(":first").attr("href").substring(1);
|
46
|
+
$("#content").children().hide();
|
47
|
+
$("#"+tabid).show();
|
48
|
+
}
|
49
|
+
})
|
50
|
+
|
51
|
+
$("a.ldcache").each(function(index) {
|
52
|
+
$(this).click(function() {
|
53
|
+
window.location.href = "${SERVER_URL}resource?uri=" + encodeURIComponent($(this).attr("href"));
|
54
|
+
return false;
|
55
|
+
});
|
56
|
+
});
|
57
|
+
|
58
|
+
function loader(uri, type, target) {
|
59
|
+
|
60
|
+
var table = $("#"+target);
|
61
|
+
|
62
|
+
function linkify(text) {
|
63
|
+
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
|
64
|
+
return text.replace(exp,"<a href='$1' class='ldcache'>$1</a>");
|
65
|
+
}
|
66
|
+
function zebra(index) {
|
67
|
+
return ( index % 2 ? "even": "odd" );
|
68
|
+
}
|
69
|
+
function createRow(data, cssClass) {
|
70
|
+
return $("<tr>", {})
|
71
|
+
.append($("<td>", {html: linkify(data.s)}))
|
72
|
+
.append($("<td>", {html: linkify(data.p)}))
|
73
|
+
.append($("<td>", {html: linkify(data.o)}))
|
74
|
+
.append($("<td>", {html: linkify(data.c)}))
|
75
|
+
.addClass(cssClass);
|
76
|
+
}
|
77
|
+
return {
|
78
|
+
resource: uri,
|
79
|
+
target: table,
|
80
|
+
offset: 0,
|
81
|
+
limit: 10,
|
82
|
+
fetch: function() {
|
83
|
+
var self = this;
|
84
|
+
$.getJSON("${SERVER_URL}inspect/" + type, {uri: self.resource, start: self.offset, limit: self.limit}, function(data) {
|
85
|
+
if(data.length == 0) {
|
86
|
+
console.log(table);
|
87
|
+
table.replaceWith("<p class='no_triples'>No triples to display</p>");
|
88
|
+
}
|
89
|
+
for( var i in data) {
|
90
|
+
var t = data[i];
|
91
|
+
table.append(createRow(t, zebra(i)));
|
92
|
+
}
|
93
|
+
});
|
94
|
+
},
|
95
|
+
next: function(step) {
|
96
|
+
step = step || this.limit;
|
97
|
+
this.offset += step;
|
98
|
+
this.fetch();
|
99
|
+
},
|
100
|
+
prev: function(step) {
|
101
|
+
step = step || this.limit
|
102
|
+
this.offset = Math.max(this.offset - step, 0);
|
103
|
+
this.fetch();
|
104
|
+
},
|
105
|
+
more: function() {
|
106
|
+
this.limit += 5;
|
107
|
+
this.fetch();
|
108
|
+
},
|
109
|
+
less: function() {
|
110
|
+
this.limit = Math.max(this.limit - 5, 5);
|
111
|
+
this.fetch();
|
112
|
+
},
|
113
|
+
first: function() {
|
114
|
+
this.offset = 0;
|
115
|
+
this.fetch();
|
116
|
+
}
|
117
|
+
};
|
118
|
+
}
|
119
|
+
|
120
|
+
<#if resources?size = 1>
|
121
|
+
var subjLoader = new loader("${resources[0].uri}", "subject", "inspect_subject");
|
122
|
+
subjLoader.fetch();
|
123
|
+
$("#s0").click(function() {subjLoader.first();});
|
124
|
+
$("#s1").click(function() {subjLoader.prev();});
|
125
|
+
$("#s2").click(function() {subjLoader.next();});
|
126
|
+
$("#s3").click(function() {subjLoader.more();});
|
127
|
+
$("#s4").click(function() {subjLoader.less();});
|
128
|
+
|
129
|
+
var propLoader = new loader("${resources[0].uri}", "predicate", "inspect_property");
|
130
|
+
propLoader.fetch();
|
131
|
+
|
132
|
+
var objLoader = new loader("${resources[0].uri}", "object", "inspect_object");
|
133
|
+
objLoader.fetch();
|
134
|
+
</#if>
|
135
|
+
|
136
|
+
})
|
137
|
+
</script>
|
138
|
+
</head>
|
139
|
+
|
140
|
+
<body>
|
141
|
+
<#function zebra index>
|
142
|
+
<#if (index % 2) == 0>
|
143
|
+
<#return "odd" />
|
144
|
+
<#else>
|
145
|
+
<#return "even" />
|
146
|
+
</#if>
|
147
|
+
</#function>
|
148
|
+
|
149
|
+
<#function cacheClass object>
|
150
|
+
<#if object.cache?has_content>
|
151
|
+
<#return "ldcache" />
|
152
|
+
<#else>
|
153
|
+
<#return "" />
|
154
|
+
</#if>
|
155
|
+
</#function>
|
156
|
+
|
157
|
+
<#function rdfaAttributes object>
|
158
|
+
<#return "${rdfaDatatype(object)} ${rdfaLanguage(object)}" />
|
159
|
+
</#function>
|
160
|
+
|
161
|
+
<#function rdfaDatatype object>
|
162
|
+
<#if object.datatype?has_content>
|
163
|
+
<#return "datatype=\"${object.datatype}\"" />
|
164
|
+
<#else>
|
165
|
+
<#return "" />
|
166
|
+
</#if>
|
167
|
+
</#function>
|
168
|
+
|
169
|
+
<#function rdfaLanguage object>
|
170
|
+
<#if object.lang?has_content>
|
171
|
+
<#return "lang=\"${object.lang}\"" />
|
172
|
+
<#else>
|
173
|
+
<#return "" />
|
174
|
+
</#if>
|
175
|
+
</#function>
|
176
|
+
|
177
|
+
<div id="wrapper">
|
178
|
+
<div id="header">
|
179
|
+
<a id="logo" href="${SERVER_URL}" title="${PROJECT}">
|
180
|
+
<img src="${SERVER_URL}${LOGO}" alt="${PROJECT} logo" />
|
181
|
+
</a>
|
182
|
+
<h1>RDF/HTML</h1>
|
183
|
+
<#if resources?size = 1>
|
184
|
+
<div id="top_serialisation_links">
|
185
|
+
<a href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&format=application/rdf%2Bxml">RDF/XML</a> |
|
186
|
+
<a href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&format=text/rdf%2Bn3">N3</a> |
|
187
|
+
<a href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&format=text/turtle">Turtle</a> |
|
188
|
+
<a href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&format=application/rdf%2Bjson">RDF/JSON</a> |
|
189
|
+
<a href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&format=application/ld%2Bjson">JSON-LD</a>
|
190
|
+
</div>
|
191
|
+
<div class="clean"></div>
|
192
|
+
</#if>
|
193
|
+
</div>
|
194
|
+
<div class="clear"></div>
|
195
|
+
<div id="left">
|
196
|
+
<ul id="menu">
|
197
|
+
<li class="menu_item">
|
198
|
+
<div class="menu_heading">Views</div>
|
199
|
+
<ul class="submenu">
|
200
|
+
<li class="active"><a href="#tab-raw-triples">Triples</a></li>
|
201
|
+
<#if resources?size = 1>
|
202
|
+
<li><a href="#tab-inspection">Inspector</a></li>
|
203
|
+
</#if>
|
204
|
+
</ul>
|
205
|
+
</li>
|
206
|
+
</ul>
|
207
|
+
</div>
|
208
|
+
<div id="center">
|
209
|
+
<div id="content">
|
210
|
+
<div id="tab-raw-triples">
|
211
|
+
|
212
|
+
<h1>Triples</h1>
|
213
|
+
<#if resources?has_content>
|
214
|
+
<#list resources as resource>
|
215
|
+
<h2><a href="${resource.uri}" class="ldcache">${resource.uri}</a>
|
216
|
+
<#if timemaplink??>
|
217
|
+
<a style="float:right" id="timemap_link" href="${SERVER_URL}${timemaplink}${resource.uri}">
|
218
|
+
<img style="width: 24px" title="browser versions" alt="memento" src="${SERVER_URL}core/public/img/icon/memento_logo_128.png">
|
219
|
+
</a>
|
220
|
+
</#if>
|
221
|
+
</h2>
|
222
|
+
<table class="simple_table">
|
223
|
+
<tr class="trClassHeader">
|
224
|
+
<th>property</th>
|
225
|
+
<th>has value</th>
|
226
|
+
<th>context</th>
|
227
|
+
<th id="info">info</th>
|
228
|
+
</tr>
|
229
|
+
<#list resource.triples as triple>
|
230
|
+
<tr class="${zebra(triple_index)}">
|
231
|
+
<td><a href="${triple.predicate.uri}" class="ldcache">${triple.predicate.curie}</a></td>
|
232
|
+
<td about="${resource.uri}">
|
233
|
+
<#if triple.object.uri?has_content>
|
234
|
+
<a rel="${triple.predicate.curie}" href="${triple.object.uri}" class="${cacheClass(triple.object)}">${triple.object.curie}</a>
|
235
|
+
<#else>
|
236
|
+
<span property="${triple.predicate.curie}" ${rdfaAttributes(triple.object)}>${triple.object.value}</span>
|
237
|
+
</#if>
|
238
|
+
</td>
|
239
|
+
<td><a href="${triple.context.uri}">${triple.context.curie}</a></td>
|
240
|
+
<td>${triple.info}</td>
|
241
|
+
</tr>
|
242
|
+
</#list>
|
243
|
+
</table>
|
244
|
+
<#if resources?size != 1>
|
245
|
+
<p id="rawrdf">
|
246
|
+
Get this resource in raw RDF:
|
247
|
+
<a href="${SERVER_URL}resource?uri=${resource.encoded_uri}&format=application/rdf%2Bxml">RDF/XML</a>,
|
248
|
+
<a href="${SERVER_URL}resource?uri=${resource.encoded_uri}&format=text/rdf%2Bn3">N3</a>,
|
249
|
+
<a href="${SERVER_URL}resource?uri=${resource.encoded_uri}&format=text/turtle">Turtle</a>,
|
250
|
+
<a href="${SERVER_URL}resource?uri=${resource.encoded_uri}&format=application/rdf%2Bjson">RDF/JSON</a>,
|
251
|
+
<a href="${SERVER_URL}resource?uri=${resource.encoded_uri}&format=application/ld%2Bjson">JSON-LD</a>
|
252
|
+
</p>
|
253
|
+
</#if>
|
254
|
+
</#list>
|
255
|
+
<#else>
|
256
|
+
<p>
|
257
|
+
No local triples to display!
|
258
|
+
</p>
|
259
|
+
</#if>
|
260
|
+
|
261
|
+
</div>
|
262
|
+
|
263
|
+
<#if resources?size = 1>
|
264
|
+
<div id="tab-inspection" style="display: none">
|
265
|
+
<h1>Inspection of <a href="${resources[0].uri}" class="ldcache">${resources[0].uri}</a></h1>
|
266
|
+
<div class="introspectionDetails">
|
267
|
+
<h2>Resource as Subject</h2>
|
268
|
+
<div id="table_buttons">
|
269
|
+
<button id="s0">|<</button>
|
270
|
+
<button id="s1"><</button>
|
271
|
+
<button id="s2">></button>
|
272
|
+
<button id="s3">+</button>
|
273
|
+
<button id="s4">-</button>
|
274
|
+
</div>
|
275
|
+
<table id="inspect_subject" class="simple_table">
|
276
|
+
<tr class="trClassHeader">
|
277
|
+
<th>Subject</th>
|
278
|
+
<th>Property</th>
|
279
|
+
<th>Object</th>
|
280
|
+
<th>Context</th>
|
281
|
+
</tr>
|
282
|
+
</table>
|
283
|
+
</div>
|
284
|
+
<div class="introspectionDetails">
|
285
|
+
<h2>Resource as Property</h2>
|
286
|
+
<table id="inspect_property" class="simple_table">
|
287
|
+
<tr class="trClassHeader">
|
288
|
+
<th>Subject</th>
|
289
|
+
<th>Property</th>
|
290
|
+
<th>Object</th>
|
291
|
+
<th>Context</th>
|
292
|
+
</tr>
|
293
|
+
</table>
|
294
|
+
</div>
|
295
|
+
<div class="introspectionDetails">
|
296
|
+
<h2>Resource as Object</h2>
|
297
|
+
<table id="inspect_object" class="simple_table">
|
298
|
+
<tr class="trClassHeader">
|
299
|
+
<th>Subject</th>
|
300
|
+
<th>Property</th>
|
301
|
+
<th>Object</th>
|
302
|
+
<th>Context</th>
|
303
|
+
</tr>
|
304
|
+
</table>
|
305
|
+
</div>
|
306
|
+
<!--
|
307
|
+
<div class="introspectionDetails">
|
308
|
+
<h4><a href="${resources[0].uri}" class="ldcache">${resources[0].uri}</a> as Context</h4>
|
309
|
+
<table id="inspect_context">
|
310
|
+
<tr class="trClassHeader">
|
311
|
+
<th>Subject</th>
|
312
|
+
<th>Property</th>
|
313
|
+
<th>Object</th>
|
314
|
+
<th>Context<th>
|
315
|
+
</tr>
|
316
|
+
</table>
|
317
|
+
</div>
|
318
|
+
-->
|
319
|
+
</div>
|
320
|
+
</#if>
|
321
|
+
</div>
|
322
|
+
</div>
|
323
|
+
<div class="clear"></div>
|
324
|
+
<div id="footer">
|
325
|
+
<div id="footer_line">
|
326
|
+
<span>
|
327
|
+
${FOOTER}
|
328
|
+
</span>
|
329
|
+
</div>
|
330
|
+
</div>
|
331
|
+
</div>
|
332
|
+
</body>
|
333
|
+
|
334
|
+
</html>
|
335
|
+
|