Package org.teiid.query.mapping.xml

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


     * Method createXMLPlanNested.
     * @return MappingNode root of mapping doc
     */
    private static MappingNode createXMLPlanMultipleDocs() {

        MappingDocument doc = new MappingDocument(true);
       
        MappingElement root = doc.addChildElement(new MappingElement("Item")); //$NON-NLS-1$
        root.setSource("xmltest.group.items"); //$NON-NLS-1$
        root.setMaxOccurrs(-1);
        root.addAttribute(new MappingAttribute("ItemID", "xmltest.group.items.itemNum")); //$NON-NLS-1$ //$NON-NLS-2$
        
        MappingSequenceNode sequence1 = root.addSequenceNode(new MappingSequenceNode());
View Full Code Here


        sequence3.addChildElement(new MappingElement("Zip", "xmltest.suppliers.supplierZipCode")); //$NON-NLS-1$ //$NON-NLS-2$
        return doc; 
    }

    private static MappingNode createXMLPlanRecursive(boolean useRecursiveCriteria, int recursionLimit, boolean exceptionOnLimit) {
        MappingDocument doc = new MappingDocument(true);
        MappingElement root = doc.addChildElement(new MappingElement("OrgHierarchy")); //$NON-NLS-1$
       
        MappingElement ceo = root.addChildElement(new MappingElement("Employee")); //$NON-NLS-1$
        ceo.setSource("xmltest.employees"); //$NON-NLS-1$
        ceo.setMinOccurrs(0);
        ceo.setMaxOccurrs(-1);
View Full Code Here

    /*
     * Recursion root mapping class is anchored at sequence node instead of "Employee" node
     */
    private static MappingNode createXMLPlanRecursiveA(boolean useRecursiveCriteria, int recursionLimit, boolean exceptionOnLimit) {
        MappingDocument doc = new MappingDocument(true);
        MappingElement root = doc.addChildElement(new MappingElement("OrgHierarchy")); //$NON-NLS-1$

        MappingSequenceNode seq0 = root.addSequenceNode(new MappingSequenceNode());
        seq0.setSource("xmltest.employees"); //$NON-NLS-1$
        seq0.setMinOccurrs(0);
        seq0.setMaxOccurrs(-1);
View Full Code Here

    }
   
   
    private static MappingNode createXMLPlanRecursiveStaging(boolean useRecursiveCriteria, int recursionLimit, boolean exceptionOnLimit) {
       
        MappingDocument doc = new MappingDocument(true);
       
        MappingElement root = doc.addChildElement(new MappingElement("OrgHierarchy")); //$NON-NLS-1$
        root.setStagingTables(Arrays.asList(new String[] {"xmltest.doc19temp"})); //$NON-NLS-1$

        MappingElement ceo = root.addChildElement(new MappingElement("Employee")); //$NON-NLS-1$
        ceo.setSource("xmltest.employeesDoc19"); //$NON-NLS-1$
        ceo.setMinOccurrs(0);
View Full Code Here

        return doc; 
    }
   
    private static MappingNode createXMLPlanRecursive2(boolean useRecursiveCriteria, int recursionLimit, boolean exceptionOnLimit) {
        MappingDocument doc = new MappingDocument(true);
        MappingElement root = doc.addChildElement(new MappingElement("Employees")); //$NON-NLS-1$

        MappingElement ceo = root.addChildElement(new MappingElement("Employee")); //$NON-NLS-1$
        ceo.setSource("xmltest.employees2"); //$NON-NLS-1$
        ceo.setMinOccurrs(0);
        ceo.setMaxOccurrs(-1);
View Full Code Here

    //excluded from the result document
    private static MappingNode createXMLPlan_defect8917() {
       
        Namespace namespace1 = new Namespace("xsi", "http://www.w3.org/2001/XMLSchema-instance"); //$NON-NLS-1$ //$NON-NLS-2$
       
        MappingDocument doc = new MappingDocument(true);
        MappingElement root = doc.addChildElement(new MappingElement("Catalogs")); //$NON-NLS-1$

        root.addNamespace(namespace1);

        {      
        //FRAGMENT 1
View Full Code Here

    /*
     * Test of identically named nodes
     */
    private static MappingNode createXMLPlan_defect9446() {
        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

    private static MappingNode createXMLPlan_defect_9530() {       
        Namespace namespace = new Namespace("mm", "http://www.duh.org/duh"); //$NON-NLS-1$ //$NON-NLS-2$
        Namespace namespace2 = new Namespace("mm", "http://www.duh2.org/duh2"); //$NON-NLS-1$ //$NON-NLS-2$
        Namespace namespace3 = new Namespace("mm2", "http://www.duh3.org/duh3"); //$NON-NLS-1$ //$NON-NLS-2$
       
        MappingDocument doc = new MappingDocument(true);
        MappingElement root = doc.addChildElement(new MappingElement("Catalogs", namespace)); //$NON-NLS-1$
        root.addNamespace(namespace);

        MappingElement cat = root.addChildElement(new MappingElement("Catalog")); //$NON-NLS-1$       
        MappingElement items = cat.addChildElement(new MappingElement("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;                             
    }   
   
    private static MappingNode createGroupDoc() {
        MappingDocument doc = new MappingDocument(true);
       
        MappingElement root = doc.addChildElement(new MappingElement("group")); //$NON-NLS-1$
        root.setSource("xqttest.group"); //$NON-NLS-1$
        root.setMinOccurrs(0);
        root.setMaxOccurrs(-1);
       
        MappingAttribute attr = new MappingAttribute("pseudoID", "xqttest.group.ID"); //$NON-NLS-1$ //$NON-NLS-2$        
View Full Code Here

        return dataMgr;
    }  
   
    private static MappingNode createXMLPlanNormalization(String normMode) {

        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

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.