@Test public void testCheckPciObj() { assertEquals("BORNE_id should be an existing Edigeo Object", "BORNE_id", EdigeoDataStore.checkPciObj("BORNE_id")); try { assertEquals("FOO_id", EdigeoDataStore.checkPciObj("FOO_id")); } catch (Exception e) { assertTrue("FOO_id is not an existing Edigeo object", e instanceof IllegalArgumentException); } }
protected static String checkPciObj(String aObj) { if (scdObj.containsKey(aObj)) { aObj = scdObj.get(aObj).get("id"); } else { LOGGER.severe("Unsupported Edigeo object : " + aObj); throw new IllegalArgumentException("Unsupported Edigeo object : " + aObj); } return aObj; }
EdigeoDataStore extends AbstractDataStore { protected static String checkPciObj(String aObj) { if (scdObj.containsKey(aObj)) { aObj = scdObj.get(aObj).get("id"); } else { LOGGER.severe("Unsupported Edigeo object : " + aObj); throw new IllegalArgumentException("Unsupported Edigeo object : " + aObj); } return aObj; } }
EdigeoDataStore extends AbstractDataStore { protected static String checkPciObj(String aObj) { if (scdObj.containsKey(aObj)) { aObj = scdObj.get(aObj).get("id"); } else { LOGGER.severe("Unsupported Edigeo object : " + aObj); throw new IllegalArgumentException("Unsupported Edigeo object : " + aObj); } return aObj; } EdigeoDataStore(String path, String obj); }
EdigeoDataStore extends AbstractDataStore { protected static String checkPciObj(String aObj) { if (scdObj.containsKey(aObj)) { aObj = scdObj.get(aObj).get("id"); } else { LOGGER.severe("Unsupported Edigeo object : " + aObj); throw new IllegalArgumentException("Unsupported Edigeo object : " + aObj); } return aObj; } EdigeoDataStore(String path, String obj); SimpleFeatureType getSchema(String typeName); String[] getTypeNames(); static void main(String[] args); }
EdigeoDataStore extends AbstractDataStore { protected static String checkPciObj(String aObj) { if (scdObj.containsKey(aObj)) { aObj = scdObj.get(aObj).get("id"); } else { LOGGER.severe("Unsupported Edigeo object : " + aObj); throw new IllegalArgumentException("Unsupported Edigeo object : " + aObj); } return aObj; } EdigeoDataStore(String path, String obj); SimpleFeatureType getSchema(String typeName); String[] getTypeNames(); static void main(String[] args); static HashMap<String, HashMap<String, String>> scdObj; static HashMap<String, HashMap<String, String>> ftAtt; }