Skip to content

Commit

Permalink
Fixed unintialized ARQ context
Browse files Browse the repository at this point in the history
  • Loading branch information
Miel Vander Sande committed Apr 11, 2018
1 parent ad12261 commit f92ee36
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
16 changes: 13 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.linkeddatafragments</groupId>
<artifactId>ldfserver</artifactId>
<version>0.2.1</version>
<version>0.2.2</version>
<packaging>war</packaging>
<name>Linked Data Fragments Server</name>
<url>http://linkeddatafragments.org</url>
Expand All @@ -20,7 +20,7 @@
<scm>
<connection>https://github.com/LinkedDataFragments/Server.Java.git</connection>
<developerConnection>https://github.com/LinkedDataFragments/Server.Java.git</developerConnection>
<tag>v0.2.1</tag>
<tag>v0.2.2</tag>
<url>https://github.com/LinkedDataFragments/Server.Java</url>
</scm>
<developers>
Expand Down Expand Up @@ -54,7 +54,7 @@
</contributor>
</contributors>
<properties>
<jettyVersion>9.3.6.v20151106</jettyVersion>
<jettyVersion>9.4.9.v20180320</jettyVersion>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -125,6 +125,16 @@
<artifactId>freemarker</artifactId>
<version>2.3.25-incubating</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.10</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) thro

fragment = dataSource.getRequestProcessor()
.createRequestedFragment( ldfRequest );
System.out.println("here");
writer.writeFragment(response.getOutputStream(), dataSource, fragment, ldfRequest);
System.out.println("not here");

} catch (DataSourceNotFoundException ex) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import java.util.Map;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;

import org.apache.jena.query.ARQ;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.riot.Lang;
Expand All @@ -26,6 +28,7 @@ class RdfWriterImpl extends LinkedDataFragmentWriterBase implements ILinkedDataF
public RdfWriterImpl(Map<String, String> prefixes, HashMap<String, IDataSource> datasources, String mimeType) {
super(prefixes, datasources);
this.contentType = RDFLanguages.contentTypeToLang(mimeType);
ARQ.init();
}

@Override
Expand All @@ -47,7 +50,6 @@ public void writeFragment(ServletOutputStream outputStream, IDataSource datasour
output.add(fragment.getMetadata());
output.add(fragment.getTriples());
output.add(fragment.getControls());

RDFDataMgr.write(outputStream, output, contentType);
}

Expand Down

0 comments on commit f92ee36

Please sign in to comment.