Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added the custom Namespace registry information (FCREPO-2886)

...

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.


Custom Namespace registry

This new feature allows an administrator to provide a list of custom namespace prefixes, which overrides the standard namespace registry used by Modeshape. The custom namespaces can be loaded on start-up via a YAML file with the path given to the application and the namespaces can be modified while Fedora is operational with the modifications only taking several minutes to propagate.

Let us assume somewhere on the same file system Fedora is installed upon, the following YAML file named custom_namespaces.yml exists

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#
iana: http://www.iana.org/assignments/relation/
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#
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/
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 switch, either on the command line or by adding it to the list of other switches that provide paths to other configuration files:

Code Block
mvn jetty:run -Dfcrepo.namespace.registry=/my/fedora/path/custom_namespaces.yml


Once Fedora is running, checking the available namespaces should return the list of custom namespaces and not the standard Modeshape namespaces:

Code Block
curl -ufedoraAdmin:fedoraAdmin  http://localhost:8080/rest/

# Status 200
# @prefix premis:  <http://www.loc.gov/premis/rdf/v1#> .
# @prefix test:  <info:fedora/test/> .
# @prefix memento:  <http://mementoweb.org/ns#> .
# @prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
# @prefix webac:  <http://fedora.info/definitions/v4/webac#> .
# @prefix acl:  <http://www.w3.org/ns/auth/acl#> .
# @prefix vcard:  <http://www.w3.org/2006/vcard/ns#> .
# @prefix xsi:  <http://www.w3.org/2001/XMLSchema-instance> .
# @prefix awesome:  <http://example.com/awesome/> .
# @prefix xmlns:  <http://www.w3.org/2000/xmlns/> .
# @prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
# @prefix fedora:  <http://fedora.info/definitions/v4/repository#> .
# @prefix xml:  <http://www.w3.org/XML/1998/namespace> .
# @prefix ebucore:  <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#> .
# @prefix ldp:  <http://www.w3.org/ns/ldp#> .
# @prefix dcterms:  <http://purl.org/dc/terms/> .
# @prefix iana:  <http://www.iana.org/assignments/relation/> .
# @prefix xs:  <http://www.w3.org/2001/XMLSchema> .
# @prefix fedoraconfig:  <http://fedora.info/definitions/v4/config#> .
# @prefix foaf:  <http://xmlns.com/foaf/0.1/> .
# @prefix dc:  <http://purl.org/dc/elements/1.1/> .
...


Now, lets say for example that the awesome namespace was not required. Edit the file /my/fedora/path/custom_namespaces.yml to remove the awesome namespace line, save the file and wait a moment or two, then check the namespace output again:

Code Block
curl -ufedoraAdmin:fedoraAdmin  http://localhost:8080/rest/

# Status 200
# @prefix premis:  <http://www.loc.gov/premis/rdf/v1#> .
# @prefix test:  <info:fedora/test/> .
# @prefix memento:  <http://mementoweb.org/ns#> .
# @prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
# @prefix webac:  <http://fedora.info/definitions/v4/webac#> .
# @prefix acl:  <http://www.w3.org/ns/auth/acl#> .
# @prefix vcard:  <http://www.w3.org/2006/vcard/ns#> .
# @prefix xsi:  <http://www.w3.org/2001/XMLSchema-instance> .
# @prefix xmlns:  <http://www.w3.org/2000/xmlns/> .
# @prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
# @prefix fedora:  <http://fedora.info/definitions/v4/repository#> .
# @prefix xml:  <http://www.w3.org/XML/1998/namespace> .
# @prefix ebucore:  <http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#> .
# @prefix ldp:  <http://www.w3.org/ns/ldp#> .
# @prefix dcterms:  <http://purl.org/dc/terms/> .
# @prefix iana:  <http://www.iana.org/assignments/relation/> .
# @prefix xs:  <http://www.w3.org/2001/XMLSchema> .
# @prefix fedoraconfig:  <http://fedora.info/definitions/v4/config#> .
# @prefix foaf:  <http://xmlns.com/foaf/0.1/> .
# @prefix dc:  <http://purl.org/dc/elements/1.1/> .
...