@Test(expected = IllegalArgumentException.class) public void throwsExceptionWhenDataSourceHasNotTypeFile() throws Exception { DataSourceConfig dataSourceConfig = new DataSourceConfigImpl(EnumDataSourceType.SPARQL, ""); RdfFileLoader loader = new RdfFileLoader(dataSourceConfig, LDFTConfigConstants.DEFAULT_FILE_PARSER_CONFIG); loader.read(new StatementCollector()); }
public void read(RDFHandler rdfHandler) throws LDFusionToolException, RDFHandlerException { String label = dataSourceConfig.getName() != null ? dataSourceConfig.getName() : dataSourceConfig.getType().toString(); String displayPath = paramReader.getStringValue(ConfigParameters.DATA_SOURCE_FILE_PATH, ""); try { loadFile(label, rdfHandler); } catch (IOException e) { throw new LDFusionToolApplicationException(LDFusionToolErrorCodes.RDF_FILE_LOADER_READ, "I/O Error while reading input file " + displayPath, e); } catch (RDFParseException e) { throw new LDFusionToolApplicationException(LDFusionToolErrorCodes.RDF_FILE_LOADER_PARSE, "Error parsing input file " + displayPath, e); } }
RdfFileLoader { public void read(RDFHandler rdfHandler) throws LDFusionToolException, RDFHandlerException { String label = dataSourceConfig.getName() != null ? dataSourceConfig.getName() : dataSourceConfig.getType().toString(); String displayPath = paramReader.getStringValue(ConfigParameters.DATA_SOURCE_FILE_PATH, ""); try { loadFile(label, rdfHandler); } catch (IOException e) { throw new LDFusionToolApplicationException(LDFusionToolErrorCodes.RDF_FILE_LOADER_READ, "I/O Error while reading input file " + displayPath, e); } catch (RDFParseException e) { throw new LDFusionToolApplicationException(LDFusionToolErrorCodes.RDF_FILE_LOADER_PARSE, "Error parsing input file " + displayPath, e); } } }
RdfFileLoader { public void read(RDFHandler rdfHandler) throws LDFusionToolException, RDFHandlerException { String label = dataSourceConfig.getName() != null ? dataSourceConfig.getName() : dataSourceConfig.getType().toString(); String displayPath = paramReader.getStringValue(ConfigParameters.DATA_SOURCE_FILE_PATH, ""); try { loadFile(label, rdfHandler); } catch (IOException e) { throw new LDFusionToolApplicationException(LDFusionToolErrorCodes.RDF_FILE_LOADER_READ, "I/O Error while reading input file " + displayPath, e); } catch (RDFParseException e) { throw new LDFusionToolApplicationException(LDFusionToolErrorCodes.RDF_FILE_LOADER_PARSE, "Error parsing input file " + displayPath, e); } } RdfFileLoader(SourceConfig sourceConfig, ParserConfig parserConfig); }
RdfFileLoader { public void read(RDFHandler rdfHandler) throws LDFusionToolException, RDFHandlerException { String label = dataSourceConfig.getName() != null ? dataSourceConfig.getName() : dataSourceConfig.getType().toString(); String displayPath = paramReader.getStringValue(ConfigParameters.DATA_SOURCE_FILE_PATH, ""); try { loadFile(label, rdfHandler); } catch (IOException e) { throw new LDFusionToolApplicationException(LDFusionToolErrorCodes.RDF_FILE_LOADER_READ, "I/O Error while reading input file " + displayPath, e); } catch (RDFParseException e) { throw new LDFusionToolApplicationException(LDFusionToolErrorCodes.RDF_FILE_LOADER_PARSE, "Error parsing input file " + displayPath, e); } } RdfFileLoader(SourceConfig sourceConfig, ParserConfig parserConfig); void read(RDFHandler rdfHandler); }
RdfFileLoader { public void read(RDFHandler rdfHandler) throws LDFusionToolException, RDFHandlerException { String label = dataSourceConfig.getName() != null ? dataSourceConfig.getName() : dataSourceConfig.getType().toString(); String displayPath = paramReader.getStringValue(ConfigParameters.DATA_SOURCE_FILE_PATH, ""); try { loadFile(label, rdfHandler); } catch (IOException e) { throw new LDFusionToolApplicationException(LDFusionToolErrorCodes.RDF_FILE_LOADER_READ, "I/O Error while reading input file " + displayPath, e); } catch (RDFParseException e) { throw new LDFusionToolApplicationException(LDFusionToolErrorCodes.RDF_FILE_LOADER_PARSE, "Error parsing input file " + displayPath, e); } } RdfFileLoader(SourceConfig sourceConfig, ParserConfig parserConfig); void read(RDFHandler rdfHandler);  }