public class CODAURIGenerator extends Object implements URIGenerator
URIGenerator
extension point that delegates to a CODA converter.URIGenerator.Parameters, URIGenerator.Roles
Modifier and Type | Field and Description |
---|---|
static String |
CODA_RANDOM_ID_GENERATOR_CONTRACT
Contract URL for random ID generation.
|
Constructor and Description |
---|
CODAURIGenerator(CODAURIGeneratorConfiguration config,
org.springframework.beans.factory.ObjectFactory<CODACoreProvider> codaCoreProviderFactory) |
Modifier and Type | Method and Description |
---|---|
ARTURIResource |
generateURI(STServiceContext stServiceContext,
String xRole,
Map<String,ARTNode> args)
Generates a new URI for the identification of a resource.
|
public static final String CODA_RANDOM_ID_GENERATOR_CONTRACT
public CODAURIGenerator(CODAURIGeneratorConfiguration config, org.springframework.beans.factory.ObjectFactory<CODACoreProvider> codaCoreProviderFactory)
public ARTURIResource generateURI(STServiceContext stServiceContext, String xRole, Map<String,ARTNode> args) throws URIGenerationException
URIGenerator
xRole
holds the nature
of the resource that will be identified with the given URI. Depending on the value of the parameter
xRole
, a conforming converter may generate differently shaped URIs, possibly using specific
arguments passed via the map args
.
For each specific xRole
, the client should provide some agreed-upon parameters to the
converters. This contract defines the following parameters:
concept
(for skos:Concept
s)
label
(optional): the accompanying preferred label of the skos:Conceptscheme
(optional): the concept scheme to which the concept is being attached at the moment of
its creationconceptScheme
(for skos:ConceptScheme
s)
label
(optional): the accompaying preferred label of the skos:ConceptxLabel
(for skosxl:Labels
s)
lexicalForm
: the lexical form of the skosxl:Label without its language taglexicalizedResource
: the resource to which the skosxl:Label will be attached to
type
: the property used for attaching the labelxNote
skos:note
s)
value
: the content of the noteannotatedResource
: the resource being annotatedtype
: the property used for annotationxRole
s are defined elsewhere by the party defining
that xRole
.
Users of this extension point should always supply values for the required parameters associated with
an xRole
; therefore, they should not attempt to generate a URI for an xRole
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 implementations act
defensively, that is to say they should:
xRole
s gracefully, by means some fallback strategygenerateURI
in interface URIGenerator
URIGenerationException
Copyright © 2016 ART Group, University of Rome, Tor Vergata. All rights reserved.