Package org.teiid.query.mapping.xml

Examples of org.teiid.query.mapping.xml.MappingBaseNode


            if (baseNode instanceof MappingRecursiveElement) {
                sourceNode.setAliasResultName(((MappingRecursiveElement)baseNode).getMappingClass());
            }
           
            // Get the parent of current node
            MappingBaseNode parent = baseNode.getParentNode();
           
            // remove the current node from its parent
            parent.removeChildNode(baseNode);
           
            // make source is child of current nodes parent
            parent.addSourceNode(sourceNode);
           
            // now make the current node, child of the source.
            sourceNode.addChild(baseNode);
            sourceNode.setExclude(baseNode.isExcluded());
            sourceNode.setMinOccurrs(baseNode.getMinOccurence());
View Full Code Here


            }
        }
    }
   
    void includeAncestors(MappingBaseNode element) {
        MappingBaseNode parent = element.getParentNode();
        if (parent != null) {
            includeSelf(parent);
            includeAncestors(parent);
        }
    }
View Full Code Here

        // now extract the source nodes
        doc = SourceNodeGenaratorVisitor.extractSourceNodes(doc);
       
        // check the staging tables       
        MappingBaseNode root = doc.getRootNode();
        assertTrue(root instanceof MappingSourceNode);
        MappingSourceNode source = (MappingSourceNode)root;
        assertEquals("licenseSource", source.getResultName()); //$NON-NLS-1$
       
        List list = source.getStagingTables();
        assertEquals(2, list.size());

        assertEquals("testTempGroup1", list.get(0)); //$NON-NLS-1$
        assertEquals("testTempGroup2", list.get(1)); //$NON-NLS-1$
       

        MappingBaseNode node = (MappingBaseNode)source.getNodeChildren().get(0);
        assertTrue(node instanceof MappingElement);
        MappingElement element = (MappingElement)node;
       
        // make sure name matches and caridinality of root is reset; as there can be only one root
        assertEquals("license", element.getName()); //$NON-NLS-1$
View Full Code Here

        // now extract the source nodes
        doc = SourceNodeGenaratorVisitor.extractSourceNodes(doc);
       
        // check source node
        MappingBaseNode node = doc.getRootNode();
        assertTrue(node instanceof MappingElement);
        MappingElement element = (MappingElement)node;

        List list = element.getStagingTables();
        assertEquals(1, list.size());
View Full Code Here

       
        MappingDocument doc = loadMappingDocument(xml);

       
        // check source node
        MappingBaseNode root = doc.getRootNode();
        assertTrue(root instanceof MappingElement);
        MappingElement element = (MappingElement)root;
       
        // check the staging tables
        List list = element.getStagingTables();
View Full Code Here

            "</xmlMapping>\r\n\r\n"; //$NON-NLS-1$
       
        MappingDocument doc = loadMappingDocument(xml);   
               
        // check source node
        MappingBaseNode node = doc.getRootNode();
        assertTrue(node instanceof MappingElement);
        MappingElement element = (MappingElement)node;
       
        List list = element.getStagingTables();
        assertEquals(1, list.size());
View Full Code Here

TOP

Related Classes of org.teiid.query.mapping.xml.MappingBaseNode

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.