Examples of CaseInsensitiveMap


Examples of org.apache.commons.collections.map.CaseInsensitiveMap

{

    @Override
    public Map toMap(ResultSet rs) throws SQLException
    {
        Map result = new CaseInsensitiveMap();
        ResultSetMetaData rsmd = rs.getMetaData();
        int cols = rsmd.getColumnCount();

        for (int i = 1; i <= cols; i++)
        {
            result.put(rsmd.getColumnLabel(i), rs.getObject(i));
        }

        return result;
    }
View Full Code Here

Examples of org.apache.commons.collections.map.CaseInsensitiveMap

     */
    @SuppressWarnings("unchecked")
    public static Map<String, String> selectedStringsFromMap(Map<String, ?> map, String encoding,
            String[] keys) {

        map = new CaseInsensitiveMap(map);
        Map<String, String> selected = new CaseInsensitiveMap();
        for (String key : keys) {
            Object value = map.get(key);
            if (value != null) {
                String sValue = value instanceof String[] ? ((String[]) value)[0] : String
                        .valueOf(value);
                selected.put(key.toUpperCase(), URLDecode(sValue, encoding));
            }
        }
        return selected;
    }
View Full Code Here

Examples of org.apache.commons.collections.map.CaseInsensitiveMap

        // Create a case insensitive version of issueLinkTemplatePerSystem
        // We need something case insensitive to maintain backward compatibility
        if ( issueLinkTemplatePerSystem == null )
        {
            caseInsensitiveIssueLinkTemplatePerSystem = new CaseInsensitiveMap();
        }
        else
        {
            caseInsensitiveIssueLinkTemplatePerSystem = new CaseInsensitiveMap( issueLinkTemplatePerSystem );
        }

        // Set good default values for issue management systems here, but only
        // if they have not been configured already by the user
        addIssueLinkTemplate( ChangesReportGenerator.DEFAULT_ISSUE_SYSTEM_KEY, issueLinkTemplate );
View Full Code Here

Examples of org.apache.commons.collections.map.CaseInsensitiveMap

     */
    private void addIssueLinkTemplate( String system, String issueLinkTemplate )
    {
        if ( caseInsensitiveIssueLinkTemplatePerSystem == null )
        {
            caseInsensitiveIssueLinkTemplatePerSystem = new CaseInsensitiveMap();
        }
        if ( !caseInsensitiveIssueLinkTemplatePerSystem.containsKey( system ) )
        {
            caseInsensitiveIssueLinkTemplatePerSystem.put( system, issueLinkTemplate );
        }
View Full Code Here

Examples of org.apache.commons.collections.map.CaseInsensitiveMap

   */
  private static abstract class CommonsCollectionFactory {

    private static Map createListOrderedCaseInsensitiveMap(int initialCapacity) {
      // Commons Collections does not support initial capacity of 0.
      return ListOrderedMap.decorate(new CaseInsensitiveMap(initialCapacity == 0 ? 1 : initialCapacity));
    }
View Full Code Here

Examples of org.apache.commons.collections.map.CaseInsensitiveMap

   */
  private static abstract class CommonsCollectionFactory {

    private static Map createListOrderedCaseInsensitiveMap(int initialCapacity) {
      // Commons Collections does not support initial capacity of 0.
      return ListOrderedMap.decorate(new CaseInsensitiveMap(initialCapacity == 0 ? 1 : initialCapacity));
    }
View Full Code Here

Examples of org.apache.commons.collections.map.CaseInsensitiveMap

      return new LinkedMap(initialCapacity == 0 ? 1 : initialCapacity);
    }

    private static Map createListOrderedCaseInsensitiveMap(int initialCapacity) {
      // Commons Collections does not support initial capacity of 0.
      return ListOrderedMap.decorate(new CaseInsensitiveMap(initialCapacity == 0 ? 1 : initialCapacity));
    }
View Full Code Here

Examples of org.apache.commons.collections.map.CaseInsensitiveMap

        // Create a case insensitive version of issueLinkTemplatePerSystem
        // We need something case insensitive to maintain backward compatibility
        if ( issueLinkTemplatePerSystem == null )
        {
            caseInsensitiveIssueLinkTemplatePerSystem = new CaseInsensitiveMap();
        }
        else
        {
            caseInsensitiveIssueLinkTemplatePerSystem = new CaseInsensitiveMap( issueLinkTemplatePerSystem );
        }

        // Set good default values for issue management systems here, but only
        // if they have not been configured already by the user
        addIssueLinkTemplate( ChangesReportGenerator.DEFAULT_ISSUE_SYSTEM_KEY, issueLinkTemplate );
View Full Code Here

Examples of org.apache.commons.collections.map.CaseInsensitiveMap

     */
    private void addIssueLinkTemplate( String system, String issueLinkTemplate )
    {
        if ( caseInsensitiveIssueLinkTemplatePerSystem == null )
        {
            caseInsensitiveIssueLinkTemplatePerSystem = new CaseInsensitiveMap();
        }
        if ( !caseInsensitiveIssueLinkTemplatePerSystem.containsKey( system ) )
        {
            caseInsensitiveIssueLinkTemplatePerSystem.put( system, issueLinkTemplate );
        }
View Full Code Here

Examples of org.drools.decisiontable.parser.xls.PropertiesSheetListener.CaseInsensitiveMap

        final InputStream stream = RuleWorksheetParseTest.class.getResourceAsStream( "/data/BasicWorkbook.xls" );

        final RuleSheetListener listener = getRuleSheetListener( stream );

        final CaseInsensitiveMap props = listener.getProperties();
        assertNotNull( props );
        assertEquals( "myruleset", props.getSingleProperty( "RuleSet" ) );
        assertEquals( "someMisc",  props.getSingleProperty( "misc" ) );
        /*
         * System.out.println("Here are the global properties...");
         * listener.getProperties().list(System.out);
         */
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.