Package org.apache.commons.configuration.tree

Examples of org.apache.commons.configuration.tree.DefaultConfigurationKey


            {
                return null;
            }

            Collection result = new ArrayList();
            DefaultConfigurationKey.KeyIterator it = new DefaultConfigurationKey(
                    AT_ENGINE, at).iterator();
            while (it.hasNext())
            {
                result.add(it.nextKey());
            }
View Full Code Here


            {
                return null;
            }

            Collection result = new ArrayList();
            DefaultConfigurationKey.KeyIterator it = new DefaultConfigurationKey(
                    AT_ENGINE, at).iterator();
            while (it.hasNext())
            {
                result.add(it.nextKey());
            }
View Full Code Here

            {
                return null;
            }

            Collection result = new ArrayList();
            DefaultConfigurationKey.KeyIterator it = new DefaultConfigurationKey(
                    AT_ENGINE, at).iterator();
            while (it.hasNext())
            {
                result.add(it.nextKey());
            }
View Full Code Here

            {
                return null;
            }

            Collection result = new ArrayList();
            DefaultConfigurationKey.KeyIterator it = new DefaultConfigurationKey(
                    AT_ENGINE, at).iterator();
            while (it.hasNext())
            {
                result.add(it.nextKey());
            }
View Full Code Here

    public void process(Configuration config)
    {
        if (config != null)
        {
            DefaultExpressionEngine exprEngine = DefaultExpressionEngine.INSTANCE;
            DefaultConfigurationKey keyEmpty =
                    new DefaultConfigurationKey(exprEngine);
            DefaultConfigurationKey keyLast = keyEmpty;
            Set<String> keySet = new HashSet<String>();

            for (Iterator<String> it = config.getKeys(); it.hasNext();)
            {
                String key = it.next();
                if (keySet.contains(key))
                {
                    // this key has already been processed by openElements
                    continue;
                }
                DefaultConfigurationKey keyAct =
                        new DefaultConfigurationKey(exprEngine, key);
                closeElements(keyLast, keyAct);
                String elem = openElements(keyLast, keyAct, config, keySet);
                fireValue(elem, config.getProperty(key));
                keyLast = keyAct;
            }
View Full Code Here

     * @param keyLast the last processed key
     * @param keyAct the actual key
     */
    protected void closeElements(DefaultConfigurationKey keyLast, DefaultConfigurationKey keyAct)
    {
        DefaultConfigurationKey keyDiff = keyAct.differenceKey(keyLast);
        Iterator<String> it = reverseIterator(keyDiff);
        if (it.hasNext())
        {
            // Skip first because it has already been closed by fireValue()
            it.next();
View Full Code Here

     */
    protected String openElements(DefaultConfigurationKey keyLast, DefaultConfigurationKey keyAct,
            Configuration config, Set<String> keySet)
    {
        DefaultConfigurationKey.KeyIterator it = keyLast.differenceKey(keyAct).iterator();
        DefaultConfigurationKey k = keyLast.commonKey(keyAct);
        for (it.nextKey(); it.hasNext(); it.nextKey())
        {
            k.append(it.currentKey(true));
            elementStart(it.currentKey(true), config.getProperty(k.toString()));
            keySet.add(k.toString());
        }
        return it.currentKey(true);
    }
View Full Code Here

            {
                return null;
            }

            Collection<String> result = new ArrayList<String>();
            DefaultConfigurationKey.KeyIterator it = new DefaultConfigurationKey(
                    AT_ENGINE, at).iterator();
            while (it.hasNext())
            {
                result.add(it.nextKey());
            }
View Full Code Here

            {
                return null;
            }

            Collection result = new ArrayList();
            DefaultConfigurationKey.KeyIterator it = new DefaultConfigurationKey(
                    AT_ENGINE, at).iterator();
            while (it.hasNext())
            {
                result.add(it.nextKey());
            }
View Full Code Here

        config.addProperty("connection.user", "scott");
        config.addProperty("connection.passwd", "tiger");
        assertEquals("tiger", config.getProperty("connection.passwd"));

        DefaultConfigurationKey key = createConfigurationKey();
        key.append("tables").append("table").appendIndex(0);
        key.appendAttribute("tableType");
        config.addProperty(key.toString(), "system");
        assertEquals("system", config.getProperty(key.toString()));
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.tree.DefaultConfigurationKey

Copyright © 2018 www.massapicom. 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.