...
Code Block |
---|
fcrepo.streaming.parallel:false |
If you are running Fedora on a multiprocessor machine you can level parallel processing across single requests by turning this option on. Parallel processing of streams can boost the retrieval speeds of the RDF associated with objects with large numbers of inlinks (ie dependent objects with memberOf associations). Enabling this option in conjunction with increasing with cacheSize parameter in your repository.json file can boost retrieval speeds significantly.
Skolemizing to Hash-URIs
Code Block |
---|
fcrepo.bnode.hash-uri=<true|false> |
With this property set to 'true', Fedora will skolemize incoming blank nodes to hash-URIs (with UUID fragments) on the base URI to which the request was addressed. By default this feature is turned off for backwards compatibility.
Allowing user updates to certain server managed triples
You can relax certain restrictions on updating some server managed triples using the following setting:
Code Block |
---|
fcrepo.properties.management=relaxed |
For details please refer to the following article: How to allow user-updates to certain server managed triples.
Custom Namespace registry
This optional feature allows an administrator to provide a list of custom namespace prefixes that will override the default prefix registry. The custom namespaces are loaded on start-up via a YAML file. The namespaces can be modified while Fedora is running. Changes may take a few minutes to take effect.
Below is a sample YAML namespace configuration file, custom_namespaces.yml. Notice the "awesome" prefix definition at the bottom of the list. We will use this in the following example. NB: the custom file will override all default namespace prefixes. In other words, the custom file becomes the definitive registry. Any namespaces that are not prefixed will be returned as full URIs in the response.
Code Block |
---|
premis: http://www.loc.gov/premis/rdf/v1#
test: info:fedora/test/
memento: http://mementoweb.org/ns#
rdfs: http://www.w3.org/2000/01/rdf-schema#
webac: http://fedora.info/definitions/v4/webac#
acl: http://www.w3.org/ns/auth/acl#
vcard: http://www.w3.org/2006/vcard/ns#
xsi: http://www.w3.org/2001/XMLSchema-instance
xmlns: http://www.w3.org/2000/xmlns/
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
fedora: http://fedora.info/definitions/v4/repository#
xml: http://www.w3.org/XML/1998/namespace
ebucore: http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#
ldp: http://www.w3.org/ns/ldp#
dcterms: http://purl.org/dc/terms/
iana: http://www.iana.org/assignments/relation/
xs: http://www.w3.org/2001/XMLSchema
fedoraconfig: http://fedora.info/definitions/v4/config#
foaf: http://xmlns.com/foaf/0.1/
dc: http://purl.org/dc/elements/1.1/
awesome: http://example.com/awesome/ |
Fedora can activate the file by using the -Dfcrepo.namespace.registry
system parameter, either on the command line or by adding it to the list of other params that provide paths to other configuration files:
Code Block |
---|
mvn jetty:run -Dfcrepo.namespace.registry=/my/fedora/path/custom_namespaces.yml |
In order to demonstrate how this feature works, try starting Fedora without defining a custom namespace registry:
Code Block |
---|
mvn jetty:run |
Once Fedora is running, run the following curl command
Code Block |
---|
curl -i -u fedoraAdmin:fedoraAdmin -X PUT http://localhost:8080/rest/test -H "Content-Type: text/turtle" --data "
@prefix awesome: <http://example.com/awesome/> .
<> justokay:test \"blah\"." |
When you retrieve this resource,
Code Block |
---|
curl -i -u fedoraAdmin:fedoraAdmin -X http://localhost:8080/rest/test |
notice the new predicate is expressed as the full URI.
Code Block | ||
---|---|---|
| ||
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix fedora: <http://fedora.info/definitions/v4/repository#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
<http://localhost:8080/rest/test>
...
<http://example.com/awesome/test> "blah" ;
... |
Also notice there are built in prefixes for common namespaces. Now restart Fedora with the custom namespaces yml enabled:
Code Block |
---|
mvn jetty:run -Dfcrepo.namespace.registry=/my/fedora/path/custom_namespaces.yml |
Retrieve the item and see how your custom namespace prefix is being used.
Code Block |
---|
curl -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/test
@prefix awesome: <http://example.com/awesome/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix fedora: <http://fedora.info/definitions/v4/repository#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
<http://localhost:8080/rest/test>
...
awesome:test "blah" ;
... |
...
More information on this feature can be found at the Best Practices - RDF Namespaces page.