Commit 16d50b38 authored by bseeger's avatar bseeger
Browse files

Adds prefer header options

parent 62f47cba
......@@ -43,6 +43,15 @@ If the fedora repository requires authentication, the following values can be se
fcrepo.authUsername=<username>
fcrepo.authPassword=<password>
It is possible to control the representation of fedora resources with Prefer headers
by including or excluding certain types of triples. For instance, ldp:contains triples
are excluded by default. This is so because, for large repositories, the ldp:contains triples
may number in the hundreds of thousands or millions of triples, which lead to very large
request/response sizes.
prefer.omit=http://www.w3.org/ns/ldp#PreferContainment
prefer.include=
The port on which the service is made available
rest.port=9109
......
......@@ -8,6 +8,11 @@ fcrepo.baseUrl=http://localhost:8080/fcrepo/rest
fcrepo.authUsername=
fcrepo.authPassword=
# Control repository prefer headers
# for example: prefer.omit=http://www.w3.org/ns/ldp#PreferContainment
prefer.omit=
prefer.include=
# API-X configuration
extension.load=false
extension.load.uri=http://apix/services//apix:load
......
......@@ -69,7 +69,8 @@ public class EntailmentRouter extends RouteBuilder {
from("direct:get").routeId("EntailementGetTriples")
.log("Building RDFS Entailment Info")
.setHeader("Accept").constant(DEFAULT_CONTENT_TYPE)
.to("fcrepo:{{fcrepo.baseUrl}}?throwExceptionOnFailure=false")
.to("fcrepo:{{fcrepo.baseUrl}}?throwExceptionOnFailure=false" +
"&preferOmit={{prefer.omit}}&preferInclude={{prefer.include}}")
.setHeader(HTTP_RESPONSE_CODE).constant(200)
.setHeader("Accept").header(ENTAILMENT_ACCEPT)
.to("direct:getTriples");
......
......@@ -16,6 +16,8 @@
<cm:property name="fcrepo.baseUrl" value="http://localhost:8080/fcrepo/rest"/>
<cm:property name="fcrepo.authUsername" value=""/>
<cm:property name="fcrepo.authPassword" value=""/>
<cm:property name="prefer.omit" value=""/>
<cm:property name="prefer.include" value=""/>
<cm:property name="extension.load" value="false" />
<cm:property name="extension.load.uri" value="http://apix/services//apix:load" />
<cm:property name="extension.load.maximumRedeliveries" value="60" />
......
# Comma separated list of ontologies that should pulled in for entailment to be done on them
rdfs.ontologies="http://purl.org/dc/terms/,http://purl.org/dc/elements/1.1/,http://id.loc.gov/ontologies/bibframe/,http://www.w3.org/2004/02/skos/core#,http://www.w3.org/2000/01/rdf-schema#"
rdfs.ontologies=http://purl.org/dc/terms/,http://purl.org/dc/elements/1.1/,http://id.loc.gov/ontologies/bibframe/,http://www.w3.org/2004/02/skos/core#,http://www.w3.org/2000/01/rdf-schema#
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment