public class CsvMapperCliMain extends Object
| Constructor and Description |
|---|
CsvMapperCliMain() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
containsNullOrVar(com.hp.hpl.jena.graph.Triple triple) |
static void |
countVariable(com.hp.hpl.jena.graph.Node node,
Map<com.hp.hpl.jena.sparql.core.Var,Integer> countMap) |
static ResultSet |
createResultSetFromCsv(com.google.common.io.InputSupplier<? extends au.com.bytecode.opencsv.CSVReader> csvReaderSupplier,
boolean useHeaders,
Integer sampleSize) |
static TripleIteratorTracking |
createTripleIterator(ResultSet rs,
ViewTemplateDefinition view) |
static File |
extractFile(org.apache.commons.cli.CommandLine commandLine,
String optionName) |
static Character |
getChar(org.slf4j.Logger logger,
org.apache.commons.cli.CommandLine commandLine,
String opt) |
static Iterator<List<String>> |
getCsvIterator(File file,
String columnSeparator) |
static Iterator<List<String>> |
getXlsCsvIterator(File file,
int sheetIndex) |
static Map<String,NamedViewTemplateDefinition> |
indexViews(List<NamedViewTemplateDefinition> views,
org.slf4j.Logger loggerCount) |
static boolean |
isNullOrVar(com.hp.hpl.jena.graph.Node node) |
static void |
main(String[] args) |
static Character |
parseChar(String str) |
static ViewTemplateDefinition |
pickView(Map<String,NamedViewTemplateDefinition> index,
String viewName) |
static void |
printHelpAndExit(int exitCode) |
static TemplateConfig |
readTemplateConfig(InputStream in,
org.slf4j.Logger loggerCount) |
static void |
show(Reader reader) |
static void |
writeSummary(PrintStream out,
TripleIteratorState state) |
public static void printHelpAndExit(int exitCode)
exitCode - public static File extractFile(org.apache.commons.cli.CommandLine commandLine, String optionName)
public static boolean isNullOrVar(com.hp.hpl.jena.graph.Node node)
public static boolean containsNullOrVar(com.hp.hpl.jena.graph.Triple triple)
public static void countVariable(com.hp.hpl.jena.graph.Node node,
Map<com.hp.hpl.jena.sparql.core.Var,Integer> countMap)
public static void show(Reader reader)
public static TemplateConfig readTemplateConfig(InputStream in, org.slf4j.Logger loggerCount) throws IOException, org.antlr.runtime.RecognitionException
IOExceptionorg.antlr.runtime.RecognitionExceptionpublic static Character getChar(org.slf4j.Logger logger, org.apache.commons.cli.CommandLine commandLine, String opt)
public static Map<String,NamedViewTemplateDefinition> indexViews(List<NamedViewTemplateDefinition> views, org.slf4j.Logger loggerCount)
public static ViewTemplateDefinition pickView(Map<String,NamedViewTemplateDefinition> index, String viewName)
public static ResultSet createResultSetFromCsv(com.google.common.io.InputSupplier<? extends au.com.bytecode.opencsv.CSVReader> csvReaderSupplier, boolean useHeaders, Integer sampleSize) throws IOException
readerSupplier - We need to read the file twice: Once for figuring out the column headers - and if there are none, again for the datafieldSeparator - quoteCharacter - IOExceptionpublic static TripleIteratorTracking createTripleIterator(ResultSet rs, ViewTemplateDefinition view)
public static void writeSummary(PrintStream out, TripleIteratorState state)
public static Iterator<List<String>> getCsvIterator(File file, String columnSeparator) throws FileNotFoundException
FileNotFoundExceptionpublic static Iterator<List<String>> getXlsCsvIterator(File file, int sheetIndex) throws jxl.read.biff.BiffException, IOException
jxl.read.biff.BiffExceptionIOExceptionCopyright © 2014. All rights reserved.