List of usage examples for java.util LinkedHashMap get
public V get(Object key)
From source file:com.amalto.workbench.utils.XSDAnnotationsStructure.java
public TreeMap<String, String> getTargetSystems() { TreeMap<String, String> targetSystems = new TreeMap<String, String>(); LinkedHashMap<String, String> appInfos = getAppInfos("X_TargetSystem");//$NON-NLS-1$ Set<String> keys = appInfos.keySet(); for (Iterator<String> iter = keys.iterator(); iter.hasNext();) { String key = iter.next(); targetSystems.put(key, appInfos.get(key)); }//from w ww.j a v a 2 s . com return targetSystems; }
From source file:com.amalto.workbench.utils.XSDAnnotationsStructure.java
public TreeMap<String, String> getPrimaryKeyInfos() { TreeMap<String, String> writeAccesses = new TreeMap<String, String>(); LinkedHashMap<String, String> appInfos = getAppInfos("X_PrimaryKeyInfo");//$NON-NLS-1$ Set<String> keys = appInfos.keySet(); for (Iterator<String> iter = keys.iterator(); iter.hasNext();) { String key = iter.next(); writeAccesses.put(key, appInfos.get(key)); }/*from w ww . j a va 2s. c om*/ return writeAccesses; }
From source file:de.ingrid.importer.udk.strategy.v2.IDCStrategy2_3_0.java
/** * @param defaultEntry pass key of default entry or < 0 if no default entry ! * @throws Exception//from www .j a v a 2 s . c o m */ private void writeNewSyslist(int listId, LinkedHashMap<Integer, String> syslistMap_de, LinkedHashMap<Integer, String> syslistMap_en, int defaultEntry) throws Exception { // clean up, to guarantee no old values ! sqlStr = "DELETE FROM sys_list where lst_id = " + listId; jdbc.executeUpdate(sqlStr); Iterator<Integer> itr = syslistMap_de.keySet().iterator(); while (itr.hasNext()) { int key = itr.next(); String isDefault = "N"; if (key == defaultEntry) { isDefault = "Y"; } // german version jdbc.executeUpdate( "INSERT INTO sys_list (id, lst_id, entry_id, lang_id, name, maintainable, is_default) VALUES (" + getNextId() + ", " + listId + ", " + key + ", 'de', '" + syslistMap_de.get(key) + "', 0, '" + isDefault + "')"); // english version jdbc.executeUpdate( "INSERT INTO sys_list (id, lst_id, entry_id, lang_id, name, maintainable, is_default) VALUES (" + getNextId() + ", " + listId + ", " + key + ", 'en', '" + syslistMap_en.get(key) + "', 0, '" + isDefault + "')"); } }
From source file:com.amalto.workbench.utils.XSDAnnotationsStructure.java
public TreeMap<String, String> getForeignKeyInfos() { TreeMap<String, String> foreignKeyInfos = new TreeMap<String, String>(); LinkedHashMap<String, String> appInfos = getAppInfos("X_ForeignKeyInfo");//$NON-NLS-1$ Set<String> keys = appInfos.keySet(); for (Iterator<String> iter = keys.iterator(); iter.hasNext();) { String key = iter.next(); foreignKeyInfos.put(key, appInfos.get(key)); }/*from w w w. j a v a 2s . c o m*/ return foreignKeyInfos; }
From source file:geogebra.io.MyI2GHandler.java
private void startDisplay(String eName, LinkedHashMap attrs) { debug("startDisplay", eName); switch (subMode) { case MODE_INVALID: // TODO -> extend to further objects if (!eName.equals("point") && !eName.equals("line")) { Application.debug("unknown tag in <elements>: " + eName); break; }/* w ww . j av a 2 s . c om*/ String label = (String) attrs.get("id"); if (label == null) { Application.debug("attribute id missing in <" + eName + ">"); break; } // does a geo element with this label exist? geo = kernel.lookupLabel(label); if (geo == null) { Application.debug("an element with id \"" + label + "\" does not exist"); break; } subMode = MODE_DISPLAY; cmdName = eName; break; case MODE_DISPLAY: if (eName.equals("label")) { label = null; subMode = MODE_LABEL; } else { Application.debug("unknown tag in <" + cmdName + ">: " + eName); } break; case MODE_LABEL: Application.debug("unknown tag in <label>: " + eName); break; } }
From source file:com.amalto.workbench.utils.XSDAnnotationsStructure.java
public boolean getRetrieveFKinfos() { LinkedHashMap<String, String> appInfos = getAppInfos("X_Retrieve_FKinfos");//$NON-NLS-1$ Set<String> keys = appInfos.keySet(); for (Iterator<String> iter = keys.iterator(); iter.hasNext();) { String key = iter.next(); return "true".equals(appInfos.get(key));//$NON-NLS-1$ }/*from w w w . j ava 2 s. c o m*/ //Starting from 5.0 onwards, always resolve FKInfos by default if (log.isDebugEnabled()) { log.debug(Messages.XSDAnnotationsStructure_DebugInfo); } return true; }
From source file:com.amalto.workbench.utils.XSDAnnotationsStructure.java
/**************************************************************************** * X_Deny_LogicalDelete/*from ww w . j a v a 2s. c om*/ ****************************************************************************/ public TreeMap<String, String> getDenyLogicalDelete() { TreeMap<String, String> writeAccesses = new TreeMap<String, String>(); LinkedHashMap<String, String> appInfos = getAppInfos("X_Deny_LogicalDelete");//$NON-NLS-1$ Set<String> keys = appInfos.keySet(); for (Iterator<String> iter = keys.iterator(); iter.hasNext();) { String key = iter.next(); writeAccesses.put(key, appInfos.get(key)); } return writeAccesses; }
From source file:com.amalto.workbench.utils.XSDAnnotationsStructure.java
/**************************************************************************** * X_Deny_PhysicalDelete/*from ww w .jav a 2 s . c o m*/ ****************************************************************************/ public TreeMap<String, String> getDenyPhysicalDelete() { TreeMap<String, String> writeAccesses = new TreeMap<String, String>(); LinkedHashMap<String, String> appInfos = getAppInfos("X_Deny_PhysicalDelete");//$NON-NLS-1$ Set<String> keys = appInfos.keySet(); for (Iterator<String> iter = keys.iterator(); iter.hasNext();) { String key = iter.next(); writeAccesses.put(key, appInfos.get(key)); } return writeAccesses; }
From source file:com.amalto.workbench.utils.XSDAnnotationsStructure.java
public boolean setDescriptions(LinkedHashMap<String, String> descriptions) { boolean somethingChanged = false; Set<String> isoCodes = descriptions.keySet(); for (Iterator<String> iter = isoCodes.iterator(); iter.hasNext();) { String code = iter.next(); String description = descriptions.get(code); somethingChanged = somethingChanged | setDescription(code, description); }/*from w w w . j ava 2s. c om*/ hasChanged = hasChanged | somethingChanged; return somethingChanged; }
From source file:com.amalto.workbench.utils.XSDAnnotationsStructure.java
public LinkedHashMap<String, String> getLabels() { LinkedHashMap<String, String> labels = new LinkedHashMap<String, String>(); LinkedHashMap<String, String> appInfos = getAppInfos("X_Label_.*");//$NON-NLS-1$ Set<String> keys = appInfos.keySet(); for (Iterator<String> iter = keys.iterator(); iter.hasNext();) { String key = iter.next(); labels.put(key.substring(8).toLowerCase(), appInfos.get(key)); }/*from w ww. j ava 2s .c o m*/ return labels; }