marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wik...@apache.org
Subject [1/2] git commit: fixed alternative templating
Date Fri, 15 Mar 2013 08:31:54 GMT
fixed alternative templating


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/80c34f78
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/80c34f78
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/80c34f78

Branch: refs/heads/master
Commit: 80c34f78407e3f551dc22107f1cca8a5f1c14d49
Parents: e13d5a5
Author: Sergio Fernández <wikier@apache.org>
Authored: Fri Mar 15 09:28:59 2013 +0100
Committer: Sergio Fernández <wikier@apache.org>
Committed: Fri Mar 15 09:28:59 2013 +0100

----------------------------------------------------------------------
 .../platform/core/rio/RDFHtmlWriterImpl.java       |   11 +++--
 .../services/templating/TemplatingServiceImpl.java |    2 +-
 .../webservices/resource/ContentWebService.java    |   10 ++--
 .../core/webservices/resource/MetaWebService.java  |   14 +++---
 .../webservices/resource/ResourceWebService.java   |    2 +-
 .../resource/ResourceWebServiceHelper.java         |   13 ++++-
 .../src/main/resources/templates/404.ftl           |   23 ++++----
 .../src/main/resources/templates/rdfhtml.ftl       |   43 ++++++++-------
 .../resources/web/public/style/scheme/dark.css     |    7 ++-
 9 files changed, 70 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80c34f78/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/rio/RDFHtmlWriterImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/rio/RDFHtmlWriterImpl.java
b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/rio/RDFHtmlWriterImpl.java
index a357b15..a5f419d 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/rio/RDFHtmlWriterImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/rio/RDFHtmlWriterImpl.java
@@ -214,10 +214,13 @@ public class RDFHtmlWriterImpl implements RDFHtmlWriter {
             data.put("resources", resources);
             data.put("prefixMappings", prefixService.serializePrefixMapping());
 
-            String project = configurationService.getStringConfiguration("kiwi.pages.project","lmf");
-            data.put("LOGO",configurationService.getStringConfiguration("kiwi.pages.project."+project+".logo","logo.png"));
-            data.put("FOOTER",configurationService.getStringConfiguration("kiwi.pages.project."+project+".footer","a
footer"));
-            data.put("SERVER_URL",configurationService.getServerUri());
+            data.put("SERVER_URL", configurationService.getServerUri());
+            data.put("BASIC_URL", configurationService.getBaseUri());
+            String project = configurationService.getStringConfiguration("kiwi.pages.project",
"marmotta");
+            data.put("PROJECT", project);
+            data.put("LOGO", configurationService.getStringConfiguration("kiwi.pages.project."+project+".logo",
project+".png"));
+            data.put("FOOTER", configurationService.getStringConfiguration("kiwi.pages.project."+project+".footer",
"(footer not properly configured for project "+project+")"));
+            data.put("DEFAULT_STYLE", configurationService.getStringConfiguration("kiwi.pages.style",
"marmotta"));
 
             //set timemap link
             if(configurationService.getBooleanConfiguration("versioning.enabled")) {

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80c34f78/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
index 001cf3f..01aa8db 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
@@ -61,7 +61,7 @@ public class TemplatingServiceImpl implements TemplatingService {
     private static final String DEFAULT_REST_FILE = "overview-summary.html";
     private static final String DEFAULT_STYLE = "screen";
     private static final String DEFAULT_TITLE_FOR_WEBSERVICES = "webservices";
-    private static final String DEFAULT_PROJECT = "lmf";
+    private static final String DEFAULT_PROJECT = "marmotta";
 
     //pattern to filter comments content
     private static final Pattern PATTERN = Pattern.compile("\\<!--###BEGIN_([^#]+)###--\\>(.+)\\<!--###END_\\1###--\\>",Pattern.DOTALL);

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80c34f78/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ContentWebService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ContentWebService.java
b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ContentWebService.java
index e728aae..a546fe3 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ContentWebService.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ContentWebService.java
@@ -192,7 +192,7 @@ public class ContentWebService {
                 if (resource != null) {
                     if (contentService.deleteContent(resource)) return Response.ok().build();
                     else
-                        return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Response.Status.NOT_FOUND, "no content found for this resource in LMF right now, but may be
available again in the future");
+                        return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Response.Status.NOT_FOUND, "no content found for this resource in LMF right now, but may be
available again in the future", configurationService);
                 }
                 return Response.status(Response.Status.NOT_FOUND).build();
             } finally {
@@ -281,7 +281,7 @@ public class ContentWebService {
                     }
                     return response;
                 } else {
-                    Response response = ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.NOT_ACCEPTABLE, "no content for mimetype " + mimetype);
+                    Response response = ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.NOT_ACCEPTABLE, "no content for mimetype " + mimetype, configurationService);
                     ResourceWebServiceHelper.addHeader(response, "Content-Type", ResourceWebServiceHelper.appendContentTypes(contentService.getContentType(resource)));
                     return response;
                 }
@@ -314,16 +314,16 @@ public class ContentWebService {
     public Response putContent(URI resource, String mimetype, HttpServletRequest request)
{
         try {
             if (request.getContentLength() == 0)
-                return ResourceWebServiceHelper.buildErrorPage(resource.stringValue(), configurationService.getBaseUri(),
Status.BAD_REQUEST, "content may not be empty for writting");
+                return ResourceWebServiceHelper.buildErrorPage(resource.stringValue(), configurationService.getBaseUri(),
Status.BAD_REQUEST, "content may not be empty for writting", configurationService);
             contentService.setContentStream(resource, request.getInputStream(), mimetype);
// store content
             if(configurationService.getBooleanConfiguration(ENHANCER_STANBOL_ENHANCER_ENABLED,
false)) {
                 afterContentCreated.fire(new ContentCreatedEvent(resource)); //enhancer
             }
             return Response.ok().build();
         } catch (IOException e) {
-            return ResourceWebServiceHelper.buildErrorPage(resource.stringValue(), configurationService.getBaseUri(),
Status.BAD_REQUEST, "could not read request body");
+            return ResourceWebServiceHelper.buildErrorPage(resource.stringValue(), configurationService.getBaseUri(),
Status.BAD_REQUEST, "could not read request body", configurationService);
         } catch (WritingNotSupportedException e) {
-            return ResourceWebServiceHelper.buildErrorPage(resource.stringValue(), configurationService.getBaseUri(),
Status.FORBIDDEN, "writting this content is not supported");
+            return ResourceWebServiceHelper.buildErrorPage(resource.stringValue(), configurationService.getBaseUri(),
Status.FORBIDDEN, "writting this content is not supported", configurationService);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80c34f78/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/MetaWebService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/MetaWebService.java
b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/MetaWebService.java
index 8a5bf0d..7c90dba 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/MetaWebService.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/MetaWebService.java
@@ -216,7 +216,7 @@ public class MetaWebService {
             }
 
         } catch (RepositoryException e) {
-            return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.INTERNAL_SERVER_ERROR, e.getMessage());
+            return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.INTERNAL_SERVER_ERROR, e.getMessage(), configurationService);
         }
     }
 
@@ -242,7 +242,7 @@ public class MetaWebService {
             RepositoryConnection conn = sesameService.getConnection();
             
             if (!ResourceUtils.existsResource(conn, uri)) {
-            	return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Response.Status.NOT_FOUND, "the requested resource could not be found in LMF right now, but
may be available again in the future");
+            	return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Response.Status.NOT_FOUND, "the requested resource could not be found in LMF right now, but
may be available again in the future", configurationService);
             }
 
             try {
@@ -319,7 +319,7 @@ public class MetaWebService {
                 }
             }
         } catch (RepositoryException e) {
-            return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.INTERNAL_SERVER_ERROR, e.getMessage());
+            return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.INTERNAL_SERVER_ERROR, e.getMessage(), configurationService);
         }
     }
 
@@ -333,7 +333,7 @@ public class MetaWebService {
                 return response;
             }
             if (request.getContentLength() == 0)
-                return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.BAD_REQUEST, "content may not be empty in resource update");
+                return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.BAD_REQUEST, "content may not be empty in resource update", configurationService);
 
             // a intercepting connection that filters out all triples that have
             // the wrong subject
@@ -356,11 +356,11 @@ public class MetaWebService {
             }
             return Response.ok().build();
         } catch (RepositoryException e) {
-            return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.INTERNAL_SERVER_ERROR, e.getMessage());
+            return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.INTERNAL_SERVER_ERROR, e.getMessage(), configurationService);
         } catch (IOException e) {
-            return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.INTERNAL_SERVER_ERROR, "could not read request body");
+            return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.INTERNAL_SERVER_ERROR, "could not read request body", configurationService);
         } catch (RDFParseException e) {
-            return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.UNSUPPORTED_MEDIA_TYPE, "could not parse request body");
+            return ResourceWebServiceHelper.buildErrorPage(uri, configurationService.getBaseUri(),
Status.UNSUPPORTED_MEDIA_TYPE, "could not parse request body", configurationService);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80c34f78/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebService.java
b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebService.java
index a770513..2987d56 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebService.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebService.java
@@ -354,7 +354,7 @@ public class ResourceWebService {
                 	log.debug("So redirecting directly to it...");
                 	return Response.seeOther(new java.net.URI(uri)).build();
                 }
-                if (resource == null) return ResourceWebServiceHelper.buildErrorPage(uri,
configurationService.getBaseUri(), Response.Status.NOT_FOUND, "the requested resource could
not be found in LMF right now, but may be available again in the future");
+                if (resource == null) return ResourceWebServiceHelper.buildErrorPage(uri,
configurationService.getBaseUri(), Response.Status.NOT_FOUND, "the requested resource could
not be found in LMF right now, but may be available again in the future", configurationService);
                 // FIXME String appendix = uuid == null ? "?uri=" + URLEncoder.encode(uri,
"utf-8") :
                 // "/" + uuid;
 

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80c34f78/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebServiceHelper.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebServiceHelper.java
b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebServiceHelper.java
index e8e3a3c..a56a667 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebServiceHelper.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebServiceHelper.java
@@ -130,16 +130,25 @@ public class ResourceWebServiceHelper {
         }
     }
     
-    public static Response buildErrorPage(String uri, String base, Status status, String
message) {
+    public static Response buildErrorPage(String uri, String base, Status status, String
message, ConfigurationService configurationService) {
         Map<String, Object> data = new HashMap<String, Object>();
+        
         data.put("uri", uri);
-        data.put("baseUri", base);
         data.put("message", message);
         try {
             data.put("encoded_uri", URLEncoder.encode(uri, "UTF-8"));
         } catch (UnsupportedEncodingException uee) {
             data.put("encoded_uri", uri);
         }
+        
+        data.put("SERVER_URL", configurationService.getServerUri());
+        data.put("BASIC_URL", configurationService.getBaseUri());
+        String project = configurationService.getStringConfiguration("kiwi.pages.project",
"marmotta");
+        data.put("PROJECT", project);
+        data.put("LOGO", configurationService.getStringConfiguration("kiwi.pages.project."+project+".logo",
project+".png"));
+        data.put("FOOTER", configurationService.getStringConfiguration("kiwi.pages.project."+project+".footer",
"(footer not properly configured for project "+project+")"));
+        data.put("DEFAULT_STYLE", configurationService.getStringConfiguration("kiwi.pages.style",
"marmotta"));
+
         try {
             return Response.status(status)
                     .entity(TemplatingHelper.processTemplate("404.ftl", data))

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80c34f78/platform/marmotta-core/src/main/resources/templates/404.ftl
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/templates/404.ftl b/platform/marmotta-core/src/main/resources/templates/404.ftl
index 8cb14b0..d2ac81d 100644
--- a/platform/marmotta-core/src/main/resources/templates/404.ftl
+++ b/platform/marmotta-core/src/main/resources/templates/404.ftl
@@ -21,13 +21,14 @@
 <html lang="en">
 
 <head>
-  <title>404 Not Found - LMF Linked Data Explorer</title>
-  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />  
-  <script src="${baseUri}core/public/js/lib/jquery-1.7.2.js" type="text/javascript" ></script>
-  <link href="${baseUri}core/public/style/style.css" title="screen" rel="stylesheet" type="text/css"
/>
-  <link href="${baseUri}core/public/style/scheme/blue.css" title="screen" rel="stylesheet"
type="text/css" />  
-  <link href="${baseUri}core/public/style/scheme/dark.css" title="screen" rel="stylesheet"
type="text/css" />  
-  <link href="${baseUri}core/public/style/rdfhtml.css" title="screen" rel="stylesheet"
type="text/css" />  
+  <title>404 Not Found - Marmotta Linked Data Explorer</title>
+  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> 
+  <meta http-equiv="Default-Style" content="${DEFAULT_STYLE}"> 
+  <script src="${SERVER_URL}core/public/js/lib/jquery-1.7.2.js" type="text/javascript"
></script>
+  <link href="${SERVER_URL}core/public/style/style.css" title="screen" rel="stylesheet"
type="text/css" />
+  <link href="${SERVER_URL}core/public/style/scheme/blue.css" title="screen" rel="stylesheet"
type="text/css" />  
+  <link href="${SERVER_URL}core/public/style/scheme/dark.css" title="screen" rel="alternate
stylesheet" type="text/css" />  
+  <link href="${SERVER_URL}core/public/style/rdfhtml.css" title="screen" rel="stylesheet"
type="text/css" />  
   <style type="text/css">
     div#center {
       float: none; 
@@ -53,9 +54,9 @@
 <div id="wrapper">
 
     <div id="header">
-        <a id="logo" href="${baseUri}">
-            <img src="${baseUri}core/public/img/logo/lmf-logo.png" alt="LMF" />
-        </a>    
+        <a id="logo" href="${SERVER_URL}" title="${PROJECT}">
+            <img src="${SERVER_URL}${LOGO}" alt="${PROJECT} logo" />
+        </a>
         <h1>LMF Linked Data Explorer</h1>
     </div>
 
@@ -65,7 +66,7 @@
           <h2>404 Not Found</h2>
         
           <p>
-            <strong><a href="${baseUri}resource?uri=${encoded_uri}">${uri}</a></strong><a
href="${uri}"><img src="${baseUri}core/public/img/icon/link.png" alt="${uri}" title="go
to ${uri} directly" /></a>
+            <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>
           </p>
           
           <p>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80c34f78/platform/marmotta-core/src/main/resources/templates/rdfhtml.ftl
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/templates/rdfhtml.ftl b/platform/marmotta-core/src/main/resources/templates/rdfhtml.ftl
index 782d724..0c00297 100644
--- a/platform/marmotta-core/src/main/resources/templates/rdfhtml.ftl
+++ b/platform/marmotta-core/src/main/resources/templates/rdfhtml.ftl
@@ -23,11 +23,12 @@
 <head>
   <title>Resource/s in HTML</title>
   <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-  <script type="text/javascript" src="${baseUri}core/public/js/lib/jquery-1.7.2.js"></script>
-    <link href="${baseUri}core/public/style/style.css" rel="stylesheet" type="text/css"
/>
-    <link href="${baseUri}core/public/style/scheme/blue.css" title="blue" rel="stylesheet"
type="text/css" />
-    <link href="${baseUri}core/public/style/scheme/dark.css" title="dark" rel="alternate
stylesheet" type="text/css" />
-    <link href="${baseUri}core/public/style/rdfhtml.css" rel="stylesheet" type="text/css"
/>
+  <meta http-equiv="Default-Style" content="${DEFAULT_STYLE}">
+  <script type="text/javascript" src="${SERVER_URL}core/public/js/lib/jquery-1.7.2.js"></script>
+  <link href="${SERVER_URL}core/public/style/style.css" rel="stylesheet" type="text/css"
/>
+  <link href="${SERVER_URL}core/public/style/scheme/blue.css" title="blue" rel="stylesheet"
type="text/css" />
+  <link href="${SERVER_URL}core/public/style/scheme/dark.css" title="dark" rel="alternate
stylesheet" type="text/css" />
+  <link href="${SERVER_URL}core/public/style/rdfhtml.css" rel="stylesheet" type="text/css"
/>
 
   <script>
       $(document).ready(function(){
@@ -44,7 +45,7 @@
 
           $("a.ldcache").each(function(index) {
               $(this).click(function() {
-                  window.location.href = "${baseUri}resource?uri=" + encodeURIComponent($(this).attr("href"));
+                  window.location.href = "${SERVER_URL}resource?uri=" + encodeURIComponent($(this).attr("href"));
                   return false;
               });
           });
@@ -75,7 +76,7 @@
                   limit: 10,
                   fetch: function() {
                       var self = this;
-                      $.getJSON("${baseUri}inspect/" + type, {uri: self.resource, start:
self.offset, limit: self.limit}, function(data) {
+                      $.getJSON("${SERVER_URL}inspect/" + type, {uri: self.resource, start:
self.offset, limit: self.limit}, function(data) {
                           if(data.length == 0) {
                               console.log(table);
                               table.replaceWith("<p class='no_triples'>No triples to
display</p>");
@@ -170,17 +171,17 @@
 
 <div id="wrapper">
     <div id="header">
-        <a id="logo" href="${SERVER_URL}">
-            <img src="${SERVER_URL}${LOGO}">
+        <a id="logo" href="${SERVER_URL}" title="${PROJECT}">
+            <img src="${SERVER_URL}${LOGO}" alt="${PROJECT} logo" />
         </a>
         <h1>RDF/HTML</h1>
         <#if resources?size = 1>
         <div id="top_serialisation_links">
-            <a href="${baseUri}resource?uri=${resources[0].encoded_uri}&amp;format=application/rdf%2Bxml">RDF/XML</a>&nbsp;|&nbsp;
-            <a href="${baseUri}resource?uri=${resources[0].encoded_uri}&amp;format=text/rdf%2Bn3">N3</a>&nbsp;|&nbsp;
-            <a href="${baseUri}resource?uri=${resources[0].encoded_uri}&amp;format=text/turtle">Turtle</a>&nbsp;|&nbsp;
-            <a href="${baseUri}resource?uri=${resources[0].encoded_uri}&amp;format=application/rdf%2Bjson">RDF/JSON</a>&nbsp;|&nbsp;
-            <a href="${baseUri}resource?uri=${resources[0].encoded_uri}&amp;format=application/ld%2Bjson">JSON-LD</a>
+            <a href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&amp;format=application/rdf%2Bxml">RDF/XML</a>&nbsp;|&nbsp;
+            <a href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&amp;format=text/rdf%2Bn3">N3</a>&nbsp;|&nbsp;
+            <a href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&amp;format=text/turtle">Turtle</a>&nbsp;|&nbsp;
+            <a href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&amp;format=application/rdf%2Bjson">RDF/JSON</a>&nbsp;|&nbsp;
+            <a href="${SERVER_URL}resource?uri=${resources[0].encoded_uri}&amp;format=application/ld%2Bjson">JSON-LD</a>
         </div>
         <div class="clean"></div>
         </#if>
@@ -208,8 +209,8 @@
                 <#list resources as resource>
                     <h2><a href="${resource.uri}" class="ldcache">${resource.uri}</a>
                         <#if timemaplink??>
-                            <a style="float:right" id="timemap_link" href="${baseUri}${timemaplink}${resource.uri}">
-                                <img style="width: 24px" title="browser versions" alt="memento"
src="${baseUri}core/public/img/icon/memento_logo_128.png">
+                            <a style="float:right" id="timemap_link" href="${SERVER_URL}${timemaplink}${resource.uri}">
+                                <img style="width: 24px" title="browser versions" alt="memento"
src="${SERVER_URL}core/public/img/icon/memento_logo_128.png">
                             </a>
                         </#if>
                     </h2>
@@ -238,11 +239,11 @@
                     <#if resources?size != 1>
                     <p id="rawrdf">
                         Get this resource in raw RDF:
-                        <a href="${baseUri}resource?uri=${resource.encoded_uri}&amp;format=application/rdf%2Bxml">RDF/XML</a>,
-                        <a href="${baseUri}resource?uri=${resource.encoded_uri}&amp;format=text/rdf%2Bn3">N3</a>,
-                        <a href="${baseUri}resource?uri=${resource.encoded_uri}&amp;format=text/turtle">Turtle</a>,
-                        <a href="${baseUri}resource?uri=${resource.encoded_uri}&amp;format=application/rdf%2Bjson">RDF/JSON</a>,
-                        <a href="${baseUri}resource?uri=${resource.encoded_uri}&amp;format=application/ld%2Bjson">JSON-LD</a>
+                        <a href="${SERVER_URL}resource?uri=${resource.encoded_uri}&amp;format=application/rdf%2Bxml">RDF/XML</a>,
+                        <a href="${SERVER_URL}resource?uri=${resource.encoded_uri}&amp;format=text/rdf%2Bn3">N3</a>,
+                        <a href="${SERVER_URL}resource?uri=${resource.encoded_uri}&amp;format=text/turtle">Turtle</a>,
+                        <a href="${SERVER_URL}resource?uri=${resource.encoded_uri}&amp;format=application/rdf%2Bjson">RDF/JSON</a>,
+                        <a href="${SERVER_URL}resource?uri=${resource.encoded_uri}&amp;format=application/ld%2Bjson">JSON-LD</a>
                     </p>
                     </#if>
                 </#list>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/80c34f78/platform/marmotta-core/src/main/resources/web/public/style/scheme/dark.css
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/web/public/style/scheme/dark.css b/platform/marmotta-core/src/main/resources/web/public/style/scheme/dark.css
index 8476bd2..64612e6 100644
--- a/platform/marmotta-core/src/main/resources/web/public/style/scheme/dark.css
+++ b/platform/marmotta-core/src/main/resources/web/public/style/scheme/dark.css
@@ -15,6 +15,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 /* main */
 html,body {
     background-color: #4d4d4d;
@@ -46,7 +47,7 @@ a:visited {
 }
 
 #content h2 a {
-    color: #b5b5b5;
+    color: #6dcff5;
 }
 
 #content h2 {
@@ -126,5 +127,5 @@ table.simple_table tr {
 }
 
 table.simple_table tr.even {
-    background-color: #6dcff5;
-}
\ No newline at end of file
+    background-color: #8d8d8d;
+}


Mime
View raw message