Package org.teiid.query.mapping.xml

Examples of org.teiid.query.mapping.xml.MappingElement.addAttribute()


        MappingDocument doc = new MappingDocument(false);
        MappingElement parentNode = doc.addChildElement(new MappingElement("parentNode")); //$NON-NLS-1$
        parentNode.setSource("parentNodeSource"); //$NON-NLS-1$
        MappingElement childNode = parentNode.addChildElement(new MappingElement("childNode"));//$NON-NLS-1$
        MappingAttribute attribute = new MappingAttribute("attributename"); //$NON-NLS-1$
        childNode.addAttribute(attribute);
        attribute.setDefaultValue("ddd"); //$NON-NLS-1$
        attribute.setValue("fff"); //$NON-NLS-1$
        MappingRecursiveElement recursiveElement = (MappingRecursiveElement)childNode.addChildElement(new MappingRecursiveElement("recursivenodename", "parentNodeSource"));//$NON-NLS-1$ //$NON-NLS-2$
        recursiveElement.setRecursionLimit(8, false);
        recursiveElement.setCriteria("rrr"); //$NON-NLS-1$
View Full Code Here


       
        MappingElement employeesWrapper = supplier.addChildElement(new MappingElement("Employees")); //$NON-NLS-1$
        MappingElement employee = employeesWrapper.addChildElement(new MappingElement("Employee")); //$NON-NLS-1$
        employee.setSource("xmltest.employees"); //$NON-NLS-1$
        employee.setMaxOccurrs(-1);
        employee.addAttribute(new MappingAttribute("EmployeeID", "xmltest.employees.employeeNum")); //$NON-NLS-1$ //$NON-NLS-2$
        employee.addChildElement(new MappingElement("FirstName", "xmltest.employees.firstName")); //$NON-NLS-1$ //$NON-NLS-2$
        employee.addChildElement(new MappingElement("LastName", "xmltest.employees.lastName")); //$NON-NLS-1$ //$NON-NLS-2$
        employee.addAttribute(new MappingAttribute("SupervisorID", "xmltest.employees.supervisorNum")); //$NON-NLS-1$ //$NON-NLS-2$
       
        // END MAPPING DOC ======================================================================
View Full Code Here

        employee.setSource("xmltest.employees"); //$NON-NLS-1$
        employee.setMaxOccurrs(-1);
        employee.addAttribute(new MappingAttribute("EmployeeID", "xmltest.employees.employeeNum")); //$NON-NLS-1$ //$NON-NLS-2$
        employee.addChildElement(new MappingElement("FirstName", "xmltest.employees.firstName")); //$NON-NLS-1$ //$NON-NLS-2$
        employee.addChildElement(new MappingElement("LastName", "xmltest.employees.lastName")); //$NON-NLS-1$ //$NON-NLS-2$
        employee.addAttribute(new MappingAttribute("SupervisorID", "xmltest.employees.supervisorNum")); //$NON-NLS-1$ //$NON-NLS-2$
       
        // END MAPPING DOC ======================================================================
       
        // Create virtual docs and doc elements
        FakeMetadataObject itemsDoc = FakeMetadataFactory.createVirtualGroup("xmltest.itemsDoc", xmltest, doc); //$NON-NLS-1$
View Full Code Here

        MappingElement root2 = doc2.addChildElement(new MappingElement("BaseballPlayers")); //$NON-NLS-1$
       
        MappingElement player = root2.addChildElement(new MappingElement("Player")); //$NON-NLS-1$
        player.setSource("xmltest.players"); //$NON-NLS-1$
        player.setMaxOccurrs(-1);
        player.addAttribute(new MappingAttribute("PlayerID", "xmltest.players.employeeNum")); //$NON-NLS-1$ //$NON-NLS-2$
        player.addChildElement(new MappingElement("FirstName", "xmltest.players.firstName")); //$NON-NLS-1$ //$NON-NLS-2$
        player.addChildElement(new MappingElement("LastName", "xmltest.players.lastName")); //$NON-NLS-1$ //$NON-NLS-2$

        MappingElement manager = player.addChildElement(new MappingElement("Manager")); //$NON-NLS-1$
        manager.setSource("xmltest.managers");//$NON-NLS-1$
View Full Code Here

        player.addChildElement(new MappingElement("LastName", "xmltest.players.lastName")); //$NON-NLS-1$ //$NON-NLS-2$

        MappingElement manager = player.addChildElement(new MappingElement("Manager")); //$NON-NLS-1$
        manager.setSource("xmltest.managers");//$NON-NLS-1$
        manager.setMaxOccurrs(-1);
        manager.addAttribute(new MappingAttribute("ManagerID", "xmltest.managers.employeeNum")); //$NON-NLS-1$ //$NON-NLS-2$
        manager.addChildElement(new MappingElement("FirstName", "xmltest.managers.firstName")); //$NON-NLS-1$ //$NON-NLS-2$
        manager.addChildElement(new MappingElement("LastName", "xmltest.managers.lastName")); //$NON-NLS-1$ //$NON-NLS-2$
               
        MappingElement owner = manager.addChildElement(new MappingElement("Owner")); //$NON-NLS-1$
        owner.setSource("xmltest.owners"); //$NON-NLS-1$
View Full Code Here

        manager.addChildElement(new MappingElement("LastName", "xmltest.managers.lastName")); //$NON-NLS-1$ //$NON-NLS-2$
               
        MappingElement owner = manager.addChildElement(new MappingElement("Owner")); //$NON-NLS-1$
        owner.setSource("xmltest.owners"); //$NON-NLS-1$
        owner.setMaxOccurrs(-1);
        owner.addAttribute(new MappingAttribute("OwnerID", "xmltest.owners.employeeNum")); //$NON-NLS-1$ //$NON-NLS-2$
        owner.addChildElement(new MappingElement("FirstName", "xmltest.owners.firstName")); //$NON-NLS-1$ //$NON-NLS-2$
        owner.addChildElement(new MappingElement("LastName", "xmltest.owners.lastName")); //$NON-NLS-1$ //$NON-NLS-2$      
        // END MAPPING DOC ======================================================================
       
        // Create virtual docs and doc elements
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.