Package cz.cvut.kbss.jopa.oom.converter
Class ToURIConverter
java.lang.Object
cz.cvut.kbss.jopa.oom.converter.ToURIConverter
- All Implemented Interfaces:
AttributeConverter<URI,,Object> ConverterWrapper<URI,Object>
Converter to
URI.
Only String values are supported.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToAttribute(Object value) Converts the data stored in the repository into the value to be stored in the entity attribute.convertToAxiomValue(URI 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.booleansupportsAxiomValueType(Class<?> type) Checks whether the wrapped converter supports converting the specified axiom value type.
-
Constructor Details
-
ToURIConverter
public ToURIConverter()
-
-
Method Details
-
supportsAxiomValueType
Description copied from interface:ConverterWrapperChecks whether the wrapped converter supports converting the specified axiom value type.- Specified by:
supportsAxiomValueTypein interfaceConverterWrapper<URI,Object> - Parameters:
type- Axiom value type- Returns:
- Whether the type is supported by this wrapper
-
convertToAxiomValue
Description copied from interface:AttributeConverterConverts the value stored in the entity attribute into the data representation to be stored in the repository and supported by the OntoDriver API.- Specified by:
convertToAxiomValuein interfaceAttributeConverter<URI,Object> - Parameters:
value- Value to convert- Returns:
- Converted data
-
convertToAttribute
Description copied from interface:AttributeConverterConverts 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
valuetype for the corresponding value for use by the OntoDriver: i.e., persistence providers are not expected to do such type conversion.- Specified by:
convertToAttributein interfaceAttributeConverter<URI,Object> - Parameters:
value- Value to convert- Returns:
- Converted data
-