All Superinterfaces:
Extension

public interface URIGenerator extends 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 Classes
    Modifier and Type
    Interface
    Description
    static final class 
     
    static final class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.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 URIGenerationException
      Returns a resource identifier produced randomly from the given inputs. The parameter 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:Concepts)
        • 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 (for skos:ConceptSchemes)
        • label (optional): the accompanying preferred label of the skos:Concept (or literal form of the accompanying xLabel)
        • skos:Concept
      • skosCollection (for skos:Collections)
        • label (optional): the accompanying preferred label of the skos:Collection (or literal form of the accompanying xLabel)
      • xLabel (for skosxl:Labelss)
        • lexicalForm: the lexical form of the skosxl:Label
        • lexicalizedResource: the resource to which the skosxl:Label will be attached to
        • lexicalizationProperty: the property used for attaching the label
      • xNote
      • (for reified skos:notes)
        • value: the content of the note
        • annotatedResource: the resource being annotated
        • noteProperty: the property used for annotation
      The parameters requested by additional xRoles 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 extension points are implemented defensively, that is to say they should:
      • complain only about the absence of absolutely required parameters
      • handle unknown xRoles gracefully, by means some fallback strategy
      *
      Parameters:
      stServiceContext -
      xRole -
      args -
      Returns:
      Throws:
      URIGenerationException