@RDFCapability(value=literal) @DatatypeCapability(value="http://www.w3.org/2001/XMLSchema#time") @Description(value="Generates a literal with datatype xsd:time. The input value is parsed (compatibly with a set of recognized patterns) and is formatted according to the standard format (ISO 8601) hh:mm:ss. If no input value is provided, the converter generates the current time. If the input value cannot be parsed, the converter throws a ConverterConfigurationException.\nThe converter takes optional parameters:\n\t- an offset, which admitted values are:\n\t\t- undefined: the output time will not contain any offset, if the input value has offset it will be ignored.\n\t\t- Z: Zulu timezone. The \"Z\" timezone is simply added at the end of the output time.\n\t\t- <hh>:<mm>: an offset, specified in hours and minutes, that is applied to the input value, or replaced if the latter already contains an offset.\n\t\t- reuse: is applied the same offset of the input.\n\t- an additionalOffset: an offset specified in hours and minutes (hh:mm). In case the offset parameter is <hh>:<mm> the additionalOffset is added, in case the offset is reuse, it adds the additionalOffset to the offset of the input (in case is missing, is considered as +00:00). In every other cases a ConverterConfigurationException is thrown.\nIf invalid parameters are passed, the converter throws a ConverterConfigurationException.") public interface TimeConverter extends Converter
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)
Gets a value and returns it as typed literal (xsd:time) formatted according to the time pattern
(HH:mm:ss).
|
org.eclipse.rdf4j.model.Literal |
produceLiteral(CODAContext ctx,
String datatype,
String lang,
String value,
String offset)
Gets a value and returns it as typed literal (xsd:time) formatted according to the time pattern
(HH:mm:ss) and with the given offset.
|
org.eclipse.rdf4j.model.Literal |
produceLiteral(CODAContext ctx,
String datatype,
String lang,
String value,
String offset,
String additionalOffset)
Gets a value and returns it as typed literal (xsd:time) formatted according to the time pattern
(HH:mm:ss) with the given offset added to the offset of the input.
|
static final String CONTRACT_URI
@FeaturePathArgument(requirementLevel=OPTIONAL) org.eclipse.rdf4j.model.Literal produceLiteral(CODAContext ctx, String datatype, String lang, String value) throws ConverterConfigurationException, ConversionException
ctx
- datatype
- lang
- value
- ConversionException
ConverterConfigurationException
@FeaturePathArgument(requirementLevel=OPTIONAL) org.eclipse.rdf4j.model.Literal produceLiteral(CODAContext ctx, String datatype, String lang, String value, @Parameter(name="offset") String offset) throws ConverterConfigurationException, ConversionException
ctx
- offset
- admitted values:
ConverterConfigurationException
ConversionException
- e@FeaturePathArgument(requirementLevel=REQUIRED) org.eclipse.rdf4j.model.Literal produceLiteral(CODAContext ctx, String datatype, String lang, String value, @Parameter(name="offset") String offset, @Parameter(name="additionalOffset") String additionalOffset) throws ConverterConfigurationException, ConversionException
ctx
- datatype
- lang
- value
- value of the featurePath to convertoffset
- admitted value:
additionalOffset
- offset expressed in format +/-HH:mm that is added to the original offset.
This parameter is compatible only when offset parameter is REUSEConverterConfigurationException
ConversionException
Copyright © 2022 ART Group, University of Rome, Tor Vergata. All rights reserved.