Package org.incenp.linkml.core
Class StringConverter
- java.lang.Object
-
- org.incenp.linkml.core.ScalarConverterBase
-
- org.incenp.linkml.core.StringConverter
-
- All Implemented Interfaces:
IConverter
- Direct Known Subclasses:
CurieConverter
public class StringConverter extends ScalarConverterBase
Converts raw objects into string values.
-
-
Constructor Summary
Constructors Constructor Description StringConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectconvertImpl(Object raw, ConverterContext ctx)Performs the actual type conversion.Class<?>getType()Gets the type of object that this converter can convert a raw object into.-
Methods inherited from class org.incenp.linkml.core.ScalarConverterBase
convert, convertForSlot, serialise, serialiseForSlot, toList
-
-
-
-
Method Detail
-
getType
public Class<?> getType()
Description copied from interface:IConverterGets the type of object that this converter can convert a raw object into.
-
convertImpl
protected Object convertImpl(Object raw, ConverterContext ctx) throws LinkMLRuntimeException
Description copied from class:ScalarConverterBasePerforms the actual type conversion.- Specified by:
convertImplin classScalarConverterBase- Parameters:
raw- The raw object to convert. This is guaranteed to be a non-null, non-list, non-dictionary object.- Returns:
- The converted value.
- Throws:
LinkMLRuntimeException- If the converter cannot convert the given value.
-
-