Package cz.cvut.kbss.jopa.model
Interface AttributeConverter<X,Y>
- Type Parameters:
X
- the type of the entity attributeY
- the type of the axiom/triple value
- All Known Subinterfaces:
ConverterWrapper<X,
Y>
- All Known Implementing Classes:
CustomConverterWrapper
,DateConverter
,DefaultConverterWrapper
,InstantConverter
,LocalDateTimeConverter
,LocalTimeConverter
,ObjectConverter
,ObjectOneOfEnumConverter
,OrdinalEnumConverter
,StringEnumConverter
,ToDoubleConverter
,ToFloatConverter
,ToIntegerConverter
,ToLangStringConverter
,ToLexicalFormConverter
,ToLongConverter
,ToMultilingualStringConverter
,ToRdfLiteralConverter
,ToShortConverter
,ToStringConverter
,ToURIConverter
,ToURLConverter
,ZonedDateTimeConverter
public interface AttributeConverter<X,Y>
A class that implements this interface can be used to convert entity attribute state into axiom/triple value
representation and back again.
Note that the X and Y types may be the same Java type.
-
Method Summary
Modifier and TypeMethodDescriptionconvertToAttribute
(Y value) Converts the data stored in the repository into the value to be stored in the entity attribute.convertToAxiomValue
(X value) Converts the value stored in the entity attribute into the data representation to be stored in the repository and supported by the OntoDriver API.
-
Method Details
-
convertToAxiomValue
Converts the value stored in the entity attribute into the data representation to be stored in the repository and supported by the OntoDriver API.- Parameters:
value
- Value to convert- Returns:
- Converted data
-
convertToAttribute
Converts the data stored in the repository into the value to be stored in the entity attribute.Note that it is the responsibility of the converter writer to specify the correct
value
type for the corresponding value for use by the OntoDriver: i.e., persistence providers are not expected to do such type conversion.- Parameters:
value
- Value to convert- Returns:
- Converted data
-