@Test public void cantProcess() throws IOException { File file = temporaryFolder.newFile("points.shp"); Map<String, Serializable> params = new HashMap<>(); params.put("flatgeobuf-file", file); FlatgeobufDataStoreFactory dataStoreFactory = new FlatgeobufDataStoreFactory(); assertFalse(dataStoreFactory.canProcess(params)); }
@Override public boolean canProcess(Map<String, Serializable> map) { try { File file = (File) FILE_PARAM.lookUp(map); if (file != null) { return file.isDirectory() || file.getPath().toLowerCase().endsWith(".fgb"); } } catch (IOException e) { } return false; }
FlatgeobufDataStoreFactory implements DataStoreFactorySpi { @Override public boolean canProcess(Map<String, Serializable> map) { try { File file = (File) FILE_PARAM.lookUp(map); if (file != null) { return file.isDirectory() || file.getPath().toLowerCase().endsWith(".fgb"); } } catch (IOException e) { } return false; } }
FlatgeobufDataStoreFactory implements DataStoreFactorySpi { @Override public boolean canProcess(Map<String, Serializable> map) { try { File file = (File) FILE_PARAM.lookUp(map); if (file != null) { return file.isDirectory() || file.getPath().toLowerCase().endsWith(".fgb"); } } catch (IOException e) { } return false; } FlatgeobufDataStoreFactory(); }
FlatgeobufDataStoreFactory implements DataStoreFactorySpi { @Override public boolean canProcess(Map<String, Serializable> map) { try { File file = (File) FILE_PARAM.lookUp(map); if (file != null) { return file.isDirectory() || file.getPath().toLowerCase().endsWith(".fgb"); } } catch (IOException e) { } return false; } FlatgeobufDataStoreFactory(); @Override DataStore createDataStore(Map<String, Serializable> map); @Override DataStore createNewDataStore(Map<String, Serializable> map); @Override String getDisplayName(); @Override String getDescription(); @Override Param[] getParametersInfo(); @Override boolean canProcess(Map<String, Serializable> map); @Override boolean isAvailable(); @Override Map<RenderingHints.Key, ?> getImplementationHints(); }
FlatgeobufDataStoreFactory implements DataStoreFactorySpi { @Override public boolean canProcess(Map<String, Serializable> map) { try { File file = (File) FILE_PARAM.lookUp(map); if (file != null) { return file.isDirectory() || file.getPath().toLowerCase().endsWith(".fgb"); } } catch (IOException e) { } return false; } FlatgeobufDataStoreFactory(); @Override DataStore createDataStore(Map<String, Serializable> map); @Override DataStore createNewDataStore(Map<String, Serializable> map); @Override String getDisplayName(); @Override String getDescription(); @Override Param[] getParametersInfo(); @Override boolean canProcess(Map<String, Serializable> map); @Override boolean isAvailable(); @Override Map<RenderingHints.Key, ?> getImplementationHints(); static final Param FILE_PARAM; }