@Test public void createDataStoreFromDirectory() throws IOException { File file = temporaryFolder.newFolder("layers"); Map<String, Serializable> params = new HashMap<>(); params.put("flatgeobuf-file", file); FlatgeobufDataStoreFactory dataStoreFactory = new FlatgeobufDataStoreFactory(); DataStore dataStore = dataStoreFactory.createDataStore(params); assertTrue(dataStore instanceof FlatgeobufDirectoryDataStore); }
@Override public DataStore createDataStore(Map<String, Serializable> map) throws IOException { File file = (File) FILE_PARAM.lookUp(map); if (file.isDirectory()) { return new FlatgeobufDirectoryDataStore(file); } else { return new FlatgeobufDataStore(file); } }
FlatgeobufDataStoreFactory implements DataStoreFactorySpi { @Override public DataStore createDataStore(Map<String, Serializable> map) throws IOException { File file = (File) FILE_PARAM.lookUp(map); if (file.isDirectory()) { return new FlatgeobufDirectoryDataStore(file); } else { return new FlatgeobufDataStore(file); } } }
FlatgeobufDataStoreFactory implements DataStoreFactorySpi { @Override public DataStore createDataStore(Map<String, Serializable> map) throws IOException { File file = (File) FILE_PARAM.lookUp(map); if (file.isDirectory()) { return new FlatgeobufDirectoryDataStore(file); } else { return new FlatgeobufDataStore(file); } } FlatgeobufDataStoreFactory(); }
FlatgeobufDataStoreFactory implements DataStoreFactorySpi { @Override public DataStore createDataStore(Map<String, Serializable> map) throws IOException { File file = (File) FILE_PARAM.lookUp(map); if (file.isDirectory()) { return new FlatgeobufDirectoryDataStore(file); } else { return new FlatgeobufDataStore(file); } } 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 DataStore createDataStore(Map<String, Serializable> map) throws IOException { File file = (File) FILE_PARAM.lookUp(map); if (file.isDirectory()) { return new FlatgeobufDirectoryDataStore(file); } else { return new FlatgeobufDataStore(file); } } 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; }