Class SPARQLResultsXSVMappingStrategy
- java.lang.Object
-
- org.eclipse.rdf4j.query.resultio.text.SPARQLResultsXSVMappingStrategy
-
- All Implemented Interfaces:
com.opencsv.bean.MappingStrategy<BindingSet>
- Direct Known Subclasses:
SPARQLResultsCSVMappingStrategy
,SPARQLResultsTSVMappingStrategy
public abstract class SPARQLResultsXSVMappingStrategy extends Object implements com.opencsv.bean.MappingStrategy<BindingSet>
This serves as a base class for mapping strategies for character separated inputs. Specifically, it is meant forSPARQLResultsCSVMappingStrategy
andSPARQLResultsTSVMappingStrategy
.- Author:
- Andrew Rucker Jones
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>
bindingNames
protected static Pattern
numberPattern
protected ValueFactory
valueFactory
-
Constructor Summary
Constructors Constructor Description SPARQLResultsXSVMappingStrategy(ValueFactory valueFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
generateHeader(BindingSet bean)
List<String>
getBindingNames()
boolean
isAnnotationDriven()
protected Value
parseNumberPatternMatch(String valueString)
This method parses a number as matched bynumberPattern
into aValue
.void
setErrorLocale(Locale errorLocale)
void
setType(Class<? extends BindingSet> type)
String[]
transmuteBean(BindingSet bean)
-
-
-
Field Detail
-
valueFactory
protected final ValueFactory valueFactory
-
numberPattern
protected static final Pattern numberPattern
-
-
Constructor Detail
-
SPARQLResultsXSVMappingStrategy
public SPARQLResultsXSVMappingStrategy(ValueFactory valueFactory)
-
-
Method Detail
-
generateHeader
public String[] generateHeader(BindingSet bean)
- Specified by:
generateHeader
in interfacecom.opencsv.bean.MappingStrategy<BindingSet>
-
isAnnotationDriven
public boolean isAnnotationDriven()
- Specified by:
isAnnotationDriven
in interfacecom.opencsv.bean.MappingStrategy<BindingSet>
-
parseNumberPatternMatch
protected Value parseNumberPatternMatch(String valueString)
This method parses a number as matched bynumberPattern
into aValue
.- Parameters:
valueString
- The string to be parsed into a number- Returns:
- The parsed value
-
setErrorLocale
public void setErrorLocale(Locale errorLocale)
- Specified by:
setErrorLocale
in interfacecom.opencsv.bean.MappingStrategy<BindingSet>
-
setType
public void setType(Class<? extends BindingSet> type)
- Specified by:
setType
in interfacecom.opencsv.bean.MappingStrategy<BindingSet>
-
transmuteBean
public String[] transmuteBean(BindingSet bean)
- Specified by:
transmuteBean
in interfacecom.opencsv.bean.MappingStrategy<BindingSet>
-
-