Package org.apache.commons.configuration.tree

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


     */
    private ConfigurationNode constructCombinedNode()
    {
        if (getNumberOfConfigurations() < 1)
        {
            return new ViewNode();
        }

        else
        {
            Iterator it = configurations.iterator();
View Full Code Here


         *
         * @return the transformed root node
         */
        public ConfigurationNode getTransformedRoot()
        {
            ViewNode result = new ViewNode();
            ViewNode atParent = result;

            if (atPath != null)
            {
                // Build the complete path
                for (Iterator it = atPath.iterator(); it.hasNext();)
                {
                    ViewNode node = new ViewNode();
                    node.setName((String) it.next());
                    atParent.addChild(node);
                    atParent = node;
                }
            }

View Full Code Here

     *
     * @return the sub configuration for the global section
     */
    private SubnodeConfiguration getGlobalSection()
    {
        ViewNode parent = new ViewNode();

        for (Iterator it = getRootNode().getChildren().iterator(); it.hasNext();)
        {
            ConfigurationNode node = (ConfigurationNode) it.next();
            if (!isSectionNode(node))
            {
                parent.addChild(node);
            }
        }

        return createSubnodeConfiguration(parent);
    }
View Full Code Here

     */
    private ConfigurationNode constructCombinedNode()
    {
        if (getNumberOfConfigurations() < 1)
        {
            return new ViewNode();
        }

        else
        {
            Iterator it = configurations.iterator();
View Full Code Here

         *
         * @return the transformed root node
         */
        public ConfigurationNode getTransformedRoot()
        {
            ViewNode result = new ViewNode();
            ViewNode atParent = result;

            if (atPath != null)
            {
                // Build the complete path
                for (Iterator it = atPath.iterator(); it.hasNext();)
                {
                    ViewNode node = new ViewNode();
                    node.setName((String) it.next());
                    atParent.addChild(node);
                    atParent = node;
                }
            }

View Full Code Here

     */
    private ConfigurationNode constructCombinedNode()
    {
        if (getNumberOfConfigurations() < 1)
        {
            return new ViewNode();
        }

        else
        {
            Iterator it = configurations.iterator();
View Full Code Here

         *
         * @return the transformed root node
         */
        public ConfigurationNode getTransformedRoot()
        {
            ViewNode result = new ViewNode();
            ViewNode atParent = result;

            if (atPath != null)
            {
                // Build the complete path
                for (Iterator it = atPath.iterator(); it.hasNext();)
                {
                    ViewNode node = new ViewNode();
                    node.setName((String) it.next());
                    atParent.addChild(node);
                    atParent = node;
                }
            }

View Full Code Here

     *
     * @return the sub configuration for the global section
     */
    private SubnodeConfiguration getGlobalSection()
    {
        ViewNode parent = new ViewNode();

        for (Iterator it = getRootNode().getChildren().iterator(); it.hasNext();)
        {
            ConfigurationNode node = (ConfigurationNode) it.next();
            if (!isSectionNode(node))
            {
                synchronized (node)
                {
                    parent.addChild(node);
                }
            }
        }

        return createSubnodeConfiguration(parent);
View Full Code Here

         *
         * @return the transformed root node
         */
        public ConfigurationNode getTransformedRoot()
        {
            ViewNode result = new ViewNode();
            ViewNode atParent = result;

            if (atPath != null)
            {
                // Build the complete path
                for (Iterator it = atPath.iterator(); it.hasNext();)
                {
                    ViewNode node = new ViewNode();
                    node.setName((String) it.next());
                    atParent.addChild(node);
                    atParent = node;
                }
            }

View Full Code Here

    private static Node getNodeFor(Object obj)
    {
        Node nd;
        if (obj instanceof ViewNode)
        {
            final ViewNode viewNode = (ViewNode) obj;
            nd = new Node(viewNode)
            {
                public void setReference(Object reference)
                {
                    super.setReference(reference);
                    // also set the reference at the original node
                    viewNode.setReference(reference);
                }
            };
        }
        else
        {
View Full Code Here

TOP

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

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.