@Test public void testCanProcess() { assertFalse(dsf.canProcess(params)); params.put(ArcGISRestDataStoreFactory.NAMESPACE_PARAM.key, NAMESPACE); assertFalse(dsf.canProcess(params)); params.put(ArcGISRestDataStoreFactory.URL_PARAM.key, "ftp: assertTrue(dsf.canProcess(params)); params.put(ArcGISRestDataStoreFactory.URL_PARAM.key, URL); assertTrue(dsf.canProcess(params)); params.put(ArcGISRestDataStoreFactory.ISOPENDATA_PARAM.key, true); assertTrue(dsf.canProcess(params)); params.put(ArcGISRestDataStoreFactory.USER_PARAM.key, USER); assertTrue(dsf.canProcess(params)); params.put(ArcGISRestDataStoreFactory.PASSWORD_PARAM.key, PASSWORD); assertTrue(dsf.canProcess(params)); }
@Override public boolean canProcess(Map<String, Serializable> params) { try { new URL((String) params.get(ArcGISRestDataStoreFactory.NAMESPACE_PARAM.key)); new URL((String) params.get(ArcGISRestDataStoreFactory.URL_PARAM.key)); } catch (MalformedURLException e) { return false; } return true; }
ArcGISRestDataStoreFactory implements DataStoreFactorySpi { @Override public boolean canProcess(Map<String, Serializable> params) { try { new URL((String) params.get(ArcGISRestDataStoreFactory.NAMESPACE_PARAM.key)); new URL((String) params.get(ArcGISRestDataStoreFactory.URL_PARAM.key)); } catch (MalformedURLException e) { return false; } return true; } }
ArcGISRestDataStoreFactory implements DataStoreFactorySpi { @Override public boolean canProcess(Map<String, Serializable> params) { try { new URL((String) params.get(ArcGISRestDataStoreFactory.NAMESPACE_PARAM.key)); new URL((String) params.get(ArcGISRestDataStoreFactory.URL_PARAM.key)); } catch (MalformedURLException e) { return false; } return true; }  }
ArcGISRestDataStoreFactory implements DataStoreFactorySpi { @Override public boolean canProcess(Map<String, Serializable> params) { try { new URL((String) params.get(ArcGISRestDataStoreFactory.NAMESPACE_PARAM.key)); new URL((String) params.get(ArcGISRestDataStoreFactory.URL_PARAM.key)); } catch (MalformedURLException e) { return false; } return true; }  @Override DataStore createNewDataStore(Map<String, Serializable> params); @Override DataStore createDataStore(Map<String, Serializable> params); @Override String getDisplayName(); @Override String getDescription(); @Override Param[] getParametersInfo(); @Override boolean canProcess(Map<String, Serializable> params); @Override boolean isAvailable(); @Override Map<Key, ?> getImplementationHints(); }
ArcGISRestDataStoreFactory implements DataStoreFactorySpi { @Override public boolean canProcess(Map<String, Serializable> params) { try { new URL((String) params.get(ArcGISRestDataStoreFactory.NAMESPACE_PARAM.key)); new URL((String) params.get(ArcGISRestDataStoreFactory.URL_PARAM.key)); } catch (MalformedURLException e) { return false; } return true; }  @Override DataStore createNewDataStore(Map<String, Serializable> params); @Override DataStore createDataStore(Map<String, Serializable> params); @Override String getDisplayName(); @Override String getDescription(); @Override Param[] getParametersInfo(); @Override boolean canProcess(Map<String, Serializable> params); @Override boolean isAvailable(); @Override Map<Key, ?> getImplementationHints(); static final String FACTORY_NAME; static final String FACTORY_DESCRIPTION; static final Param NAMESPACE_PARAM; static final Param URL_PARAM; static final Param USER_PARAM; static final Param PASSWORD_PARAM; static final Param ISOPENDATA_PARAM; }