CSVDataStoreFactory implements FileDataStoreFactorySpi { @Override public boolean canProcess(Map<String, Serializable> params) { try { File file = fileFromParams(params); if (file != null) { return canProcessExtension(file.getPath()); } } catch (IOException e) { } return false; }  @Override String getDisplayName(); @Override String getDescription(); @Override Param[] getParametersInfo(); @Override boolean canProcess(Map<String, Serializable> params); @Override boolean isAvailable(); @Override Map<Key, ?> getImplementationHints(); FileDataStore createDataStoreFromFile(File file); FileDataStore createDataStoreFromFile(File file, URI namespace); @Override FileDataStore createDataStore(Map<String, Serializable> params); @Override DataStore createNewDataStore(Map<String, Serializable> params); @Override FileDataStore createDataStore(URL url); @Override String[] getFileExtensions(); @Override boolean canProcess(URL url); @Override String getTypeName(URL url); static final String[] EXTENSIONS; static final Param FILE_PARAM; static final Param URL_PARAM; static final Param NAMESPACEP; static final Param STRATEGYP; static final Param LATFIELDP; static final Param LnGFIELDP; static final Param WKTP; static final Param[] parametersInfo; }
@Test public void testCanProcessFileParams() { Map<String, Serializable> fileParams = new HashMap<String, Serializable>(1); fileParams.put("file", file); assertTrue("Did not process file params", csvDataStoreFactory.canProcess(fileParams)); }
@Test public void testCanProcessURLParams() { Map<String, Serializable> urlParams = new HashMap<String, Serializable>(1); urlParams.put("url", locationsResource); assertTrue("Did not process url params", csvDataStoreFactory.canProcess(urlParams)); }