Package org.teiid.query.mapping.xml

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


     * Note: this should fail when validator starts verifying that vm1.g1 cannot
     * be executed before the temp group tm1.g1 is, since it selects from that
     * group but is not in it's scope
     */
    private static MappingDocument doc3() {
        MappingDocument doc = new MappingDocument(false);
       
        MappingElement root = doc.addChildElement(new MappingElement("root")); //$NON-NLS-1$

        MappingElement n1 = root.addChildElement(new MappingElement("n1")); //$NON-NLS-1$
        n1.setSource("vm1.g1"); //$NON-NLS-1$
       
        MappingElement m1 = n1.addChildElement(new MappingElement("m1")); //$NON-NLS-1$
View Full Code Here


        return doc;
    }

    private static MappingDocument doc4() {
       
        MappingDocument doc = new MappingDocument(false);
       
        MappingElement root = doc.addChildElement(new MappingElement("root")); //$NON-NLS-1$

        MappingElement n4a = root.addChildElement(new MappingElement("n4a")); //$NON-NLS-1$
        n4a.setMaxOccurrs(-1);
        n4a.setSource("vm1.g1"); //$NON-NLS-1$
        n4a.addStagingTable("tm1.g1"); //$NON-NLS-1$
View Full Code Here

        return doc;
    }

    private static MappingDocument doc5() {
       
        MappingDocument doc = new MappingDocument(false);
       
        MappingElement root = doc.addChildElement(new MappingElement("root")); //$NON-NLS-1$
       
        MappingElement nodea = root.addChildElement(new MappingElement("nodea")); //$NON-NLS-1$
        nodea.setSource("vm1.g1"); //$NON-NLS-1$
        nodea.addStagingTable("tm1.g1"); //$NON-NLS-1$
        nodea.setMaxOccurrs(-1);
View Full Code Here

       
        return doc;
    }

    private static MappingDocument doc6() {
        MappingDocument doc = new MappingDocument(false);
       
        MappingElement simpleRoot = doc.addChildElement(new MappingElement("tempGroupTest")); //$NON-NLS-1$
        simpleRoot.setSource("vm1.g1"); //$NON-NLS-1$
        simpleRoot.addStagingTable("tm1.g1"); //$NON-NLS-1$
        return doc;
    }
View Full Code Here

        return doc;
    }

    private static MappingDocument docWithExcluded() {
       
        MappingDocument doc = new MappingDocument(false);
        MappingElement root = doc.addChildElement(new MappingElement("root")); //$NON-NLS-1$

        MappingElement n1 = root.addChildElement(new MappingElement("n1")); //$NON-NLS-1$
        n1.setSource("vm1.g1"); //$NON-NLS-1$

        MappingElement m1 = n1.addChildElement(new MappingElement("m1", "vm1.g1.e1")); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

        return doc;
    }

    private static MappingDocument docWithExcluded2() {
       
        MappingDocument doc = new MappingDocument(false);
        MappingElement root = doc.addChildElement(new MappingElement("root")); //$NON-NLS-1$

        MappingElement n1 = root.addChildElement(new MappingElement("n1")); //$NON-NLS-1$
        n1.setSource("vm1.g1"); //$NON-NLS-1$
       
        n1.addChildElement(new MappingElement("m1", "vm1.g1.e1")); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

        return doc;
    }
       
    private static MappingDocument docTestCriteriaWithAttribute() {
       
        MappingDocument doc = new MappingDocument(false);
       
        MappingElement root = doc.addChildElement(new MappingElement("root")); //$NON-NLS-1$
        root.setSource("vm1.g1"); //$NON-NLS-1$
        root.addAttribute(new MappingAttribute("type", new Namespace("xsi", ""))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        root.addAttribute(new MappingAttribute("type", "vm1.g1.e1")); //$NON-NLS-1$ //$NON-NLS-2$
        root.addChildElement(new MappingElement("myElement", "vm1.g1.e2")); //$NON-NLS-1$ //$NON-NLS-2$       
        return doc;
View Full Code Here

                    DataTypeManager.DefaultDataTypes.STRING,
                    DataTypeManager.DefaultDataTypes.INTEGER,
                    DataTypeManager.DefaultDataTypes.BOOLEAN,
                    DataTypeManager.DefaultDataTypes.DOUBLE });

        MappingDocument doc = new MappingDocument(false);
       
        MappingElement root = doc.addChildElement(new MappingElement("root")); //$NON-NLS-1$
       
        List stagingTables = new ArrayList(1);
        stagingTables.add("tm1.stagingTable2"); //$NON-NLS-1$
        root.setStagingTables(stagingTables);
View Full Code Here

*
*/
public class TestHandleNillableNode extends TestCase {
   
    public void testNillableNode() {
        MappingDocument doc = FakeXMLMetadata.docWithExcluded();
        MappingElement root = (MappingElement)doc.getRootNode();
       
        Properties names = root.getNamespacesAsProperties();
        assertFalse(names.containsKey("xsi"));//$NON-NLS-1$
       
        HandleNillableVisitor.execute(doc);
View Full Code Here

        store.addObjects(doc_SOAPE1);
        return facade;
    }
 
    private static MappingNode createXQTPlanChoice_6796() {
        MappingDocument doc = new MappingDocument(true);
        MappingElement root = doc.addChildElement(new MappingElement("root")); //$NON-NLS-1$

        MappingChoiceNode choice = root.addChoiceNode(new MappingChoiceNode(false));
        choice.setSource("xqttest.data7"); //$NON-NLS-1$
        choice.setMaxOccurrs(-1);
        MappingCriteriaNode crit = choice.addCriteriaNode(new MappingCriteriaNode("xqttest.data7.intKey < 10", false)); //$NON-NLS-1$
View Full Code Here

TOP

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

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.