Skip to content

Commit

Permalink
Added favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
Miel Vander Sande committed Dec 23, 2016
1 parent 3b382fd commit 6572bb1
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 24 deletions.
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<name>Ruben Verborgh</name>
<email>[email protected]</email>
<url>http://ruben.verborgh.org</url>
<organization>iMinds</organization>
<organizationUrl>http://iminds.be</organizationUrl>
<organization>imec</organization>
<organizationUrl>http://imec.be</organizationUrl>
<timezone>Europe/Brussels</timezone>
</developer>
<developer>
Expand All @@ -39,7 +39,7 @@
<email>[email protected]</email>
<url>http://semweb.mmlab.be</url>
<organization>iMinds</organization>
<organizationUrl>http://iminds.be</organizationUrl>
<organizationUrl>http://imec.be</organizationUrl>
<timezone>Europe/Brussels</timezone>
</developer>
</developers>
Expand All @@ -60,22 +60,22 @@
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-core</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.5</version>
<version>4.3.6</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.5</version>
<version>2.7</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
Expand All @@ -13,8 +15,6 @@
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.riot.Lang;
import org.linkeddatafragments.config.ConfigReader;
import org.linkeddatafragments.datasource.DataSourceFactory;
Expand Down Expand Up @@ -46,7 +46,7 @@ public class LinkedDataFragmentServlet extends HttpServlet {
/**
*
*/
public final static String CFGFILE = "configFile";
public final static String CFGFILE = "configFile";

private ConfigReader config;
private final HashMap<String, IDataSource> dataSources = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
package org.linkeddatafragments.standalone;

import java.net.URL;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.ResourceHandler;
import org.eclipse.jetty.servlet.DefaultServlet;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.util.resource.Resource;
import org.linkeddatafragments.servlet.LinkedDataFragmentServlet;

/**
Expand All @@ -36,7 +31,7 @@
public class JettyServer {
private static void printHelp(Options options) {
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp(JettyServer.class.getName() + " [config-example.json] [<options>]",
formatter.printHelp("java -jar target/ldf-server.jar [config-example.json] [<options>]",
"Starts a standalone LDF Triple Pattern server. Options:", options, "");
}

Expand All @@ -52,13 +47,13 @@ public static void main(String[] args) throws Exception {

CommandLineParser parser = new DefaultParser();
CommandLine commandLine = parser.parse(options, args);

String config = null;
if (!commandLine.getArgList().isEmpty()) {
config = commandLine.getArgs()[0];
}

if (config == null || commandLine.hasOption('h')) {
if (commandLine.hasOption('h')) {
printHelp(options);
System.exit(-1);
}
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/views/base.ftl.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<html lang="en" prefix="hydra: http://www.w3.org/ns/hydra/core# void: http://rdfs.org/ns/void#">
<head>
<meta charset="utf-8">
<title>${ title!header!"Linked Data Fragments Server" }</title>
<title>${ title!header!"Linked Data Fragments Server" }</title>
<link rel="shortcut icon" href="assets/favicon.ico">
<link rel="stylesheet" href="${ assetsPath }style.css" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:700italic,400,700|Droid+Sans+Mono" type="text/css" />
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1">
Expand All @@ -22,7 +23,7 @@ <h1><a href="/">${header!"Linked Data Fragments Server"}</a></h1>
<footer>
<p>
Powered by a <a href="https://github.com/LinkedDataFragments/Server.java" target="_blank">Linked Data Fragments Server</a>
©2013–${date?string.yyyy} Multimedia Lab – iMinds – Ghent University
©2013–${date?string.yyyy} Ghent University - imec
</p>
</footer>
</body>
Expand Down
30 changes: 27 additions & 3 deletions src/main/resources/views/fragment.ftl.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,38 @@ <h3>Matches in ${datasource.getTitle()} for <em class="pattern">${ (query.getPat
<#assign object = triple.getObject().asNode().toString()>
<li>
<a href="?subject=${subject?url}">
<abbr title="${ subject }"><#if (subject?last_index_of("/") > -1)>${ subject?keep_after_last("/") }<#else>${ subject }</#if></abbr>
<abbr title="${ subject }">
<#if (subject?last_index_of("#") > -1) >
${ subject?keep_after_last("#") }
<#elseif (subject?last_index_of("/") > -1)>
${ subject?keep_after_last("/") }
<#else>
${ subject }
</#if>
</abbr>
</a>
<a href="?predicate=${predicate?url}">
<abbr title="${ predicate }">${predicate?keep_after_last("/")}</abbr>
<abbr title="${ predicate }">
<#if (predicate?last_index_of("#") > -1) >
${ predicate?keep_after_last("#") }
<#elseif (predicate?last_index_of("/") > -1)>
${ predicate?keep_after_last("/") }
<#else>
${ predicate }
</#if>
</abbr>
</a>
<#if !triple.getObject().isLiteral()>
<a href="?object=${object?url}" resource="${ subject}">
<abbr title="${ object }" property="${ predicate }" resource="${ object }"><#if (object?last_index_of("/") > -1)>${ object?keep_after_last("/") }<#else>${ object }</#if></abbr>
<abbr title="${ object }" property="${ predicate }" resource="${ object }">
<#if (object?last_index_of("#") > -1) >
${ object?keep_after_last("#") }
<#elseif (object?last_index_of("/") > -1)>
${ object?keep_after_last("/") }
<#else>
${ object }
</#if>
</abbr>
</a>.
<#else>
<a href="?object=${object?url}" resource="${ subject}">${object}</a>.
Expand Down

0 comments on commit 6572bb1

Please sign in to comment.