@Description(value="Generates a resource by compiling a <template> expression (1st parameter of the converter).\nThe <template> is composed of placeholders that are replaced by values obtained from the other arguments passed to the converter, in the same order of presentation. The arguments are processed in different way, depending on the name of the placeholder.\nThis is the list of available placeholders:\n%s : string representation of the input. For IRIs = the string representation of the IRI, for literals it is the lexical form\n%n : local name in case of IRI\n%d : datatype IRI in case of literals\n%l : lang in case of language tagged literal\n!s : the value from the feature path or the previous converter in a converter chain") public interface FormatterConverter extends Converter
FormatterConverter
contract generates resource identifiers by replacing placeholder with values
passed as arguments
Its identifier is "http://art.uniroma2.it/coda/contracts/formatter".Modifier and Type | Field and Description |
---|---|
static String |
CONTRACT_URI |
OSGI_SERVICE_PROPERTY_CONTRACT, OSGI_SERVICE_PROPERTY_CONVERTER, STATIC_FIELD_CONTRACT_URI, STATIC_FIELD_CONVERTER_URI
Modifier and Type | Method and Description |
---|---|
org.eclipse.rdf4j.model.Literal |
produceLiteral(CODAContext ctx,
String datatype,
String lang,
String value,
String text,
org.eclipse.rdf4j.model.Value... args)
Produce a Literal (with the given language and/or datatype) by replacing che placeholders in the input text with the values coming from the feature path
and the input args
|
org.eclipse.rdf4j.model.IRI |
produceURI(CODAContext ctx,
String value,
String newString,
org.eclipse.rdf4j.model.Value... args)
Produce an IRI by replacing che placeholders in the input text with the values coming from the feature path
and the input args
|
static final String CONTRACT_URI
@FeaturePathArgument(requirementLevel=OPTIONAL) org.eclipse.rdf4j.model.IRI produceURI(CODAContext ctx, String value, @Parameter(name="template") String newString, @Parameter(name="args") org.eclipse.rdf4j.model.Value... args) throws ConverterConfigurationException
ctx
- value
- newString
- args
- ConverterConfigurationException
@FeaturePathArgument(requirementLevel=OPTIONAL) org.eclipse.rdf4j.model.Literal produceLiteral(CODAContext ctx, String datatype, String lang, String value, @Parameter(name="template") String text, @Parameter(name="args") org.eclipse.rdf4j.model.Value... args) throws ConverterConfigurationException
ctx
- datatype
- lang
- value
- text
- args
- ConverterConfigurationException
Copyright © 2022 ART Group, University of Rome, Tor Vergata. All rights reserved.