Code example for URI

Methods: getScheme

0
    @Override 
    public <T> DataModelSink create( 
            DataModelDefinition<T> definition,
            URI sink,
            TestContext context) throws IOException {
        String scheme = sink.getScheme();
        if (scheme == null || scheme.endsWith("file") == false) {
            return null; 
        } 
        File file = new File(sink);
        if (file.getName().endsWith(".xls") == false) {
            return null; 
        } 
        LOG.info("Excelシートをデータシンクに利用します: {}", sink);
        return new ExcelSheetSinkFactory(file).createSink(definition, context);
    } 
}