public class FormatterConverterImpl extends Object implements FormatterConverter
FormatterConverter
contract. Its identifier is
"http://art.uniroma2.it/coda/converters/formatter".Modifier and Type | Field and Description |
---|---|
static String |
CONVERTER_URI |
static String |
FEAT_STRING |
static String |
PARAM_DATATYPE |
static String |
PARAM_LANG |
static String |
PARAM_LOCAL |
static String |
PARAM_STRING |
private List<String> |
placeholderList |
CONTRACT_URI
OSGI_SERVICE_PROPERTY_CONTRACT, OSGI_SERVICE_PROPERTY_CONVERTER, STATIC_FIELD_CONTRACT_URI, STATIC_FIELD_CONVERTER_URI
Constructor and Description |
---|
FormatterConverterImpl() |
Modifier and Type | Method and Description |
---|---|
private String |
getValueFromIriOrLiteral(PlaceholderTemplate placeholderTemplate,
org.eclipse.rdf4j.model.Value iriOrLiteral,
int cont) |
private void |
initializePlchldList() |
private boolean |
isValidPlchd(String plchld) |
private boolean |
isValidValuePlchd(String plchld) |
private List<TemplateInterface> |
parseTemplate(String template) |
private void |
processValueTemplateAndStaticValueTemplate(List<TemplateInterface> templateInterfaceList,
String textPart) |
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 text,
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
|
private String |
replaceTextInTemplate(List<TemplateInterface> templateInterfaceList,
String value,
org.eclipse.rdf4j.model.Value... args) |
private List<TemplateInterface> |
splitForValue(String text,
boolean firstIsPlch) |
public static final String CONVERTER_URI
public static final String PARAM_STRING
public static final String FEAT_STRING
public static final String PARAM_LOCAL
public static final String PARAM_DATATYPE
public static final String PARAM_LANG
public org.eclipse.rdf4j.model.IRI produceURI(CODAContext ctx, String value, String text, org.eclipse.rdf4j.model.Value... args) throws ConverterConfigurationException
FormatterConverter
produceURI
in interface FormatterConverter
ConverterConfigurationException
public org.eclipse.rdf4j.model.Literal produceLiteral(CODAContext ctx, String datatype, String lang, String value, String text, org.eclipse.rdf4j.model.Value... args) throws ConverterConfigurationException
FormatterConverter
produceLiteral
in interface FormatterConverter
ConverterConfigurationException
private void initializePlchldList()
private boolean isValidPlchd(String plchld)
private boolean isValidValuePlchd(String plchld)
private List<TemplateInterface> parseTemplate(String template) throws ConverterConfigurationException
ConverterConfigurationException
private List<TemplateInterface> splitForValue(String text, boolean firstIsPlch) throws ConverterConfigurationException
ConverterConfigurationException
private void processValueTemplateAndStaticValueTemplate(List<TemplateInterface> templateInterfaceList, String textPart)
private String replaceTextInTemplate(List<TemplateInterface> templateInterfaceList, String value, org.eclipse.rdf4j.model.Value... args) throws ConverterConfigurationException
ConverterConfigurationException
private String getValueFromIriOrLiteral(PlaceholderTemplate placeholderTemplate, org.eclipse.rdf4j.model.Value iriOrLiteral, int cont) throws ConverterConfigurationException
ConverterConfigurationException
Copyright © 2022 ART Group, University of Rome, Tor Vergata. All rights reserved.