Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As noted above, as new namespaces are used for the first time, those namespaces will be bound permanently to particular prefixes.  Currently, if the first use of a particular namespace should occur in RDF that is POSTed or PUT to the repository, regardless of any specific prefix binding supplied in the submitted graph, Fedora will instead bind the new namespace to a system-generated namespace in the form "ns00x".  While this behavior is not incorrect, it is inconvenient, and not necessarily user friendly for human interaction with the repository.  In order to avoid this behavior, you can define a custom CND file which defines namespace prefixes.  Previously, it was possible to control the prefixes used by using SPARQL update or RDF with namespace prefixes, but this functionality does not currently work (see https://jira.duraspace.org/projects/FCREPO/issues/FCREPO-2376

Jira
serverDuraSpace JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdc815ca92-fd23-34c2-8fe3-956808caf8c5
keyFCREPO-2376
).

Defining a custom CND file

...

To ensure that specific namespaces are used (i.e., treated as sacred) by Fedora 4 when doing a SPARQL update, ensure that the namespace prefix URI includes a terminating character. Otherwise system-generated JCR namespaces (e.g., ns001, ns002), and not the user-supplied namespaces, will get registered. Therefore, the following statement could lead to unexpected namespaces. F4 will register a system-generated namespace and you would not find "http://myurl.org" namespace in the system.

Note

This functionality is currently not working; see

Jira
serverDuraSpace JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdc815ca92-fd23-34c2-8fe3-956808caf8c5
keyFCREPO-2376


Code Block
titleProblematic Usage
linenumberstrue
PREFIX esc: <http://myurl.org>
INSERT {
<>
esc:package "ppp";
}
WHERE { }

...

The inadvertent binding of namespaces to system-generated prefixes can be prevented by preemptively binding the namespaces that are likely to be used to standard prefixes.  This can be accomplished by creating a dummy node in the repository, adding desired namepace prefixes and RDF triples via a SPARQL update query, and then deleting the dummy node and the resulting tombstone to remove traces of this operation from the repository.  Even after all traces of the initialization node have been removed, the namespace bindings will persist in the repository and be available as RDF triples are added in the future.

Note

This functionality is currently not working; see

Jira
serverDuraSpace JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdc815ca92-fd23-34c2-8fe3-956808caf8c5
keyFCREPO-2376


Note

This workaround should be unnecessary after the completion of:

Jira
serverDuraSpace JIRA
serverIdc815ca92-fd23-34c2-8fe3-956808caf8c5
keyFCREPO-2184

...