Skip to content

Commit

Permalink
Moved assets and views to resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Miel Vander Sande committed Jan 18, 2016
1 parent 03e192f commit 38d68b6
Show file tree
Hide file tree
Showing 67 changed files with 49 additions and 39 deletions.
25 changes: 0 additions & 25 deletions WebContent/WEB-INF/ldf-server-example.json

This file was deleted.

6 changes: 3 additions & 3 deletions WebContent/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Linked Data Fragments Server</display-name>
<servlet>
<display-name>BasicLdfServlet</display-name>
<servlet-name>BasicLdfServlet</servlet-name>
<display-name>TpfServlet</display-name>
<servlet-name>TpfServlet</servlet-name>
<servlet-class>org.linkeddatafragments.servlet.LinkedDataFragmentServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>AssetServlet</servlet-name>
<servlet-class>org.linkeddatafragments.servlet.AssetServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>BasicLdfServlet</servlet-name>
<servlet-name>TpfServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
Expand Down
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down Expand Up @@ -226,7 +225,7 @@
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</snapshotRepository>
</distributionManagement>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.io.File;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
Expand All @@ -19,7 +20,6 @@
import org.linkeddatafragments.datasource.IDataSource;
import org.linkeddatafragments.datasource.index.IndexDataSource;
import org.linkeddatafragments.fragments.ILinkedDataFragment;
import org.linkeddatafragments.fragments.ILinkedDataFragmentRequest;
import org.linkeddatafragments.fragments.tpf.ITriplePatternFragment;
import org.linkeddatafragments.fragments.tpf.ITriplePatternFragmentRequest;

Expand All @@ -39,7 +39,6 @@ public class HtmlTriplePatternFragmentWriterImpl extends TriplePatternFragmentWr
private final Template errorTemplate;

private final String HYDRA = "http://www.w3.org/ns/hydra/core#";
private final String VOID = "http://rdfs.org/ns/void#";

/**
*
Expand All @@ -51,7 +50,7 @@ public HtmlTriplePatternFragmentWriterImpl(Map<String, String> prefixes, HashMap
super(prefixes, datasources);

cfg = new Configuration(Configuration.VERSION_2_3_22);
cfg.setDirectoryForTemplateLoading(new File(System.getProperty("user.dir") + "/views"));
cfg.setClassForTemplateLoading(getClass(), "/views");
cfg.setDefaultEncoding("UTF-8");
cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);

Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
36 changes: 36 additions & 0 deletions src/main/resources/config-example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"title": "My Linked Data Fragments server",

"datasourcetypes": {
"HdtDatasource" : "org.linkeddatafragments.datasource.hdt.HdtDataSourceType",
"JenaTDBDatasource" : "org.linkeddatafragments.datasource.tdb.JenaTDBDataSourceType"
},

"datasources": {
"dbpedia": {
"title": "DBPedia",
"type": "HdtDatasource",
"description": "DBPedia with an HDT back-end",
"settings": { "file": "data/dbpedia.hdt" }
},
"swdf": {
"title": "Semantic Web Dog Food",
"type": "HdtDatasource",
"description": "Semantic Web Dog Food with an HDT back-end",
"settings": { "file": "data/swdf.hdt" }
}
},

"prefixes": {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"dc": "http://purl.org/dc/terms/",
"foaf": "http://xmlns.com/foaf/0.1/",
"dbpedia": "http://dbpedia.org/resource/",
"dbpedia-owl": "http://dbpedia.org/ontology/",
"dbpprop": "http://dbpedia.org/property/",
"hydra": "http://www.w3.org/ns/hydra/core#",
"void": "http://rdfs.org/ns/void#"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package test.java.org.linkeddatafragments;
package org.linkeddatafragments.test;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;

import test.java.org.linkeddatafragments.datasource.HdtDataSourceTest;
import test.java.org.linkeddatafragments.datasource.JenaTDBDataSourceTest;
import org.linkeddatafragments.test.datasource.HdtDataSourceTest;
import org.linkeddatafragments.test.datasource.JenaTDBDataSourceTest;

/**
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.org.linkeddatafragments.datasource;
package org.linkeddatafragments.test.datasource;

import com.google.gson.JsonObject;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.org.linkeddatafragments.datasource;
package org.linkeddatafragments.test.datasource;

import com.google.gson.JsonObject;
import com.hp.hpl.jena.rdf.model.RDFNode;
Expand All @@ -17,6 +17,7 @@
import org.rdfhdt.hdt.hdt.HDT;
import org.rdfhdt.hdt.hdt.HDTManager;
import org.rdfhdt.hdt.options.HDTSpecification;
import org.linkeddatafragments.test.datasource.DataSourceTest;

/**
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package test.java.org.linkeddatafragments.datasource;
package org.linkeddatafragments.test.datasource;

import com.google.gson.JsonObject;

Expand Down

0 comments on commit 38d68b6

Please sign in to comment.