Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
acdc
repository-extension-services
Commits
a73f7621
Commit
a73f7621
authored
Apr 10, 2017
by
acoburn
Browse files
Merge branch 'entailment_pref' into 'master'
Adds prefer header options to entailment ext See merge request
!95
parents
62f47cba
577769b3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
2 deletions
+18
-2
acrepo-exts-entailment/README.md
acrepo-exts-entailment/README.md
+9
-0
acrepo-exts-entailment/src/main/cfg/edu.amherst.acdc.exts.entailment.cfg
...ailment/src/main/cfg/edu.amherst.acdc.exts.entailment.cfg
+4
-0
acrepo-exts-entailment/src/main/java/edu/amherst/acdc/exts/entailment/EntailmentRouter.java
...va/edu/amherst/acdc/exts/entailment/EntailmentRouter.java
+2
-1
acrepo-exts-entailment/src/main/resources/OSGI-INF/blueprint/blueprint.xml
...lment/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+2
-0
acrepo-services-entailment/src/main/cfg/edu.amherst.acdc.services.entailment.cfg
...ent/src/main/cfg/edu.amherst.acdc.services.entailment.cfg
+1
-1
No files found.
acrepo-exts-entailment/README.md
View file @
a73f7621
...
...
@@ -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
...
...
acrepo-exts-entailment/src/main/cfg/edu.amherst.acdc.exts.entailment.cfg
View file @
a73f7621
...
...
@@ -8,6 +8,10 @@ fcrepo.baseUrl=http://localhost:8080/fcrepo/rest
fcrepo.authUsername=
fcrepo.authPassword=
# Control repository prefer headers
prefer.omit=http://www.w3.org/ns/ldp#PreferContainment
prefer.include=
# API-X configuration
extension.load=false
extension.load.uri=http://apix/services//apix:load
...
...
acrepo-exts-entailment/src/main/java/edu/amherst/acdc/exts/entailment/EntailmentRouter.java
View file @
a73f7621
...
...
@@ -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"
);
...
...
acrepo-exts-entailment/src/main/resources/OSGI-INF/blueprint/blueprint.xml
View file @
a73f7621
...
...
@@ -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=
"http://www.w3.org/ns/ldp#PreferContainment"
/>
<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"
/>
...
...
acrepo-services-entailment/src/main/cfg/edu.amherst.acdc.services.entailment.cfg
View file @
a73f7621
# 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#
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment