Package org.teiid.query.mapping.xml

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


        node.addCommentNode(new MappingCommentNode("Comment2")); //$NON-NLS-1$
        return doc;
    }

    public static MappingDocument createXMLMappingBoundingNode() {
        MappingDocument doc = new MappingDocument(true);
        MappingElement root = doc.addChildElement(new MappingElement("Catalogs"));//$NON-NLS-1$
        MappingElement cat = root.addChildElement(new MappingElement("Catalog")); //$NON-NLS-1$
        MappingElement items = cat.addChildElement(new MappingElement("Items")); //$NON-NLS-1$
      
        MappingElement item = items.addChildElement(new MappingElement("Item")); //$NON-NLS-1$
        item.setSource("xmltest.group.items"); //$NON-NLS-1$
View Full Code Here


        item.addChildElement(new MappingElement("Quantity", "xmltest.group.items.itemQuantity")); //$NON-NLS-1$ //$NON-NLS-2$       
        return doc;
    }
   
    public static MappingDocument createXMLMappingNode(boolean format) {
        MappingDocument doc = new MappingDocument(format);
        doc.addChildElement(createXMLPlan1Unformatted(false, 1));
        return doc;
    }
View Full Code Here

        doc.addChildElement(createXMLPlan1Unformatted(false, 1));
        return doc;
    }
   
    private static MappingNode createXMLPlan2(boolean format, boolean testNillable, int cardinality ) {
        MappingDocument doc = new MappingDocument(format);
        doc.addChildElement(createXMLPlan1Unformatted(testNillable, cardinality));
        return doc;
    }   
View Full Code Here

   
    private static MappingNode createXMLPlanSOAP() {

        Namespace namespace = new Namespace("ORG", "http://www.mm.org/dummy"); //$NON-NLS-1$ //$NON-NLS-2$

        MappingDocument doc = new MappingDocument(true);
        MappingElement root = doc.addChildElement(new MappingElement("TaxReports", namespace)); //$NON-NLS-1$
       
        root.setNamespaces(new Namespace[] {namespace});
       
        MappingElement report = root.addChildElement(new MappingElement("TaxReport", namespace)); //$NON-NLS-1$
        report.setNamespaces(new Namespace[] {namespace});
View Full Code Here

        return root;                               
    }

    private static MappingNode createXMLPlanDefect13617() {

        MappingDocument doc = new MappingDocument(true);
        MappingElement root = doc.addChildElement(new MappingElement("Catalogs")); //$NON-NLS-1$
       
        MappingElement cat = root.addChildElement(new MappingElement("Catalog")); //$NON-NLS-1$
        MappingElement items = cat.addChildElement(new MappingElement("Items")); //$NON-NLS-1$
      
        MappingElement item = items.addChildElement(new MappingElement("Item")); //$NON-NLS-1$
View Full Code Here

        return doc;                               
    }    
   

    private static MappingNode createXMLPlan2(int numChoices, int numDefaultChoice, boolean exception_on_Default) {
        MappingDocument doc = new MappingDocument(true);
        MappingElement root = doc.addChildElement(new MappingElement("Catalogs")); //$NON-NLS-1$
        MappingElement cat = root.addChildElement(new MappingElement("Catalog")); //$NON-NLS-1$
        MappingElement items = cat.addChildElement(new MappingElement("Items")); //$NON-NLS-1$

        // ======================================================================
        // CHOICE NODE STUFF
View Full Code Here

        item.addChildElement(new MappingElement("Quantity", "xmltest.group.items.itemQuantity")); //$NON-NLS-1$ //$NON-NLS-2$
        return crit;
    }   

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

        MappingElement cat = root.addChildElement(new MappingElement("Catalog")); //$NON-NLS-1$
        MappingElement items = cat.addChildElement(new MappingElement("Items")); //$NON-NLS-1$

        MappingElement item = items.addChildElement(new MappingElement("Item")); //$NON-NLS-1$
View Full Code Here

        return doc;                               
    }

    private static MappingNode createXMLPlanUltraAdvanced() {

        MappingDocument doc = new MappingDocument(true);
        MappingElement root = doc.addChildElement(new MappingElement("Catalogs")); //$NON-NLS-1$

        MappingElement cat = root.addChildElement(new MappingElement("Catalog")); //$NON-NLS-1$
        MappingElement items = cat.addChildElement(new MappingElement("Items")); //$NON-NLS-1$

        //choice node, non-visual, so it has no name
View Full Code Here

   
 

    private static MappingNode createXMLPlanUltraAdvancedExceptionOnDefault() {

        MappingDocument doc = new MappingDocument(true);
        MappingElement root = doc.addChildElement(new MappingElement("Catalogs")); //$NON-NLS-1$

        MappingElement cat = root.addChildElement(new MappingElement("Catalog")); //$NON-NLS-1$
        MappingElement items = cat.addChildElement(new MappingElement("Items")); //$NON-NLS-1$

        //choice node, non-visual, so it has no name
View Full Code Here

    }

    //advanced tests of namespace declarations, use and scope; also fixed values
    private static MappingNode createXMLPlanAdvanced() {
        //add to previous example
        MappingDocument doc = createXMLPlanWithDefaults();
        MappingElement root = (MappingElement)doc.getRootNode();

        Namespace nameSpaceOne = new Namespace("duh", "http://www.duh.org/duh"); //$NON-NLS-1$ //$NON-NLS-2$
        Namespace nameSpaceTwo = new Namespace("duh2", "http://www.duh2.org/duh2"); //$NON-NLS-1$ //$NON-NLS-2$
        Namespace nameSpaceThree = new Namespace("duh", "http://www.duh.org/duh/duh"); //$NON-NLS-1$ //$NON-NLS-2$
        Namespace nameSpaceFour = new Namespace(MappingNodeConstants.DEFAULT_NAMESPACE_PREFIX, ""); //$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.