Package org.teiid.query.mapping.xml

Examples of org.teiid.query.mapping.xml.MappingDocument.addChildElement()


*/
public class FakeXMLMetadata {
   
    public static MappingDocument docWithExcluded() {
        MappingDocument doc = new MappingDocument(true);
        MappingElement root = doc.addChildElement(new MappingElement("root")); //$NON-NLS-1$

        MappingElement n1 = root.addChildElement(new MappingElement("element1", "nis_element1")); //$NON-NLS-1$ //$NON-NLS-2$
        n1.setSource("mappingclass1"); //$NON-NLS-1$
       
        MappingElement n1r = n1.addChildElement(new MappingRecursiveElement("element1", "mappingclass1")); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here


    private static MappingDocument doc1() {
        // DOC 1
        MappingDocument doc = new MappingDocument(false);
       
        MappingElement node= doc.addChildElement(new MappingElement("a0")); //$NON-NLS-1$
       
        MappingElement sourceNode = node.addChildElement(new MappingElement("a1")); //$NON-NLS-1$
        sourceNode.setSource("vm1.g1"); //$NON-NLS-1$
       
        sourceNode.addStagingTable("tm1.g1"); //$NON-NLS-1$
View Full Code Here

        return doc;
    }

    private static MappingDocument doc2() {
        MappingDocument doc = new MappingDocument(false);
        MappingElement A1 = doc.addChildElement(new MappingElement("a1", "vm1.g1.e1")); //$NON-NLS-1$ //$NON-NLS-2$
        A1.setSource("vm1.g1"); //$NON-NLS-1$
        return doc;
    }

    private static MappingDocument docTestConvertCriteriaWithAttribute() {
View Full Code Here

    }

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

        root.addChildElement(new MappingElement("myElement", "vm1.g1.e2")); //$NON-NLS-1$ //$NON-NLS-2$
        root.addAttribute(new MappingAttribute("myAttribute", "vm1.g1.e1")); //$NON-NLS-1$ //$NON-NLS-2$
        return doc;
View Full Code Here

    }

    private static MappingDocument docTestConvertCriteriaWithAttribute2() {
        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("myAttribute", "vm1.g1.e1")); //$NON-NLS-1$ //$NON-NLS-2$

        MappingSequenceNode seq = root.addSequenceNode(new MappingSequenceNode());
        seq.addChildElement(new MappingElement("myElement", "vm1.g1.e2")); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

     * 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

    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

    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

    }

    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

    }

    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

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.