Interface URIGenerator
- All Superinterfaces:
Extension
Extension point for the generation of URIs. Such a generation is performed, when it is not possible or
desired to generate a URI based on a provided local name.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
static final class
-
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.rdf4j.model.IRI
generateIRI
(STServiceContext stServiceContext, String xRole, Map<String, org.eclipse.rdf4j.model.Value> args) Returns a resource identifier produced randomly from the given inputs.
-
Method Details
-
generateIRI
org.eclipse.rdf4j.model.IRI generateIRI(STServiceContext stServiceContext, String xRole, Map<String, org.eclipse.rdf4j.model.Value> args) throws URIGenerationExceptionReturns a resource identifier produced randomly from the given inputs. The parameterxRole
holds the nature of the resource that will be identified with the given URI. Depending on the value of the parameterxRole
, a conforming converter may generate differently shaped URIs, possibly using specific arguments passed via the mapargs
. For each specificxRole
, the client should provide some agreed-upon parameters to the converters. This contract defines the following parameters:concept
(forskos:Concept
s)label
(optional): the accompanying preferred label of the skos:Concept (or literal form of the accompanying xLabel) skos:Concept
schemes
(optional): the concept schemes to which the concept is being attached at the moment of its creation (serialized as a Turtle collection)
conceptScheme
(forskos:ConceptScheme
s)label
(optional): the accompanying preferred label of the skos:Concept (or literal form of the accompanying xLabel) skos:Concept
skosCollection
(forskos:Collection
s)label
(optional): the accompanying preferred label of the skos:Collection (or literal form of the accompanying xLabel)
xLabel
(forskosxl:Labels
s)lexicalForm
: the lexical form of the skosxl:LabellexicalizedResource
: the resource to which the skosxl:Label will be attached tolexicalizationProperty
: the property used for attaching the label
(for reifiedxNote
skos:note
s)value
: the content of the noteannotatedResource
: the resource being annotatednoteProperty
: the property used for annotation
xRole
s are defined elsewhere by the party defining thatxRole
. Users of this extension point should always supply values for the required parameters associated with anxRole
; therefore, they should not attempt to generate a URI for anxRole
unless they known what arguments are requested. Conversely, it is a duty of the specific implementation of this extension point to verify that all relevant information has been provided by the client. In fact, it is suggested that extension points are implemented defensively, that is to say they should:- complain only about the absence of absolutely required parameters
- handle unknown
xRole
s gracefully, by means some fallback strategy
- Parameters:
stServiceContext
-xRole
-args
-- Returns:
- Throws:
URIGenerationException
-