Package org.teiid.query.mapping.xml

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


            "            <fixed>http://some.uri/</fixed>\r\n" //$NON-NLS-1$
            "        </mappingNode>\r\n" //$NON-NLS-1$
            "    </mappingNode>\r\n" //$NON-NLS-1$
            "</xmlMapping>\r\n\r\n"; //$NON-NLS-1$
       
        MappingDocument doc = loadMappingDocument(xml);
       
        Properties namespaceDeclarations = ((MappingElement)doc.getRootNode()).getNamespacesAsProperties();
       
        assertNotNull(namespaceDeclarations);
       
        String uri = namespaceDeclarations.getProperty("xsi"); //$NON-NLS-1$
        assertEquals("http://some.uri/", uri); //$NON-NLS-1$
View Full Code Here


            "            <fixed>http://some.uri/</fixed>\r\n" //$NON-NLS-1$
            "        </mappingNode>\r\n" //$NON-NLS-1$
            "    </mappingNode>\r\n" //$NON-NLS-1$
            "</xmlMapping>\r\n\r\n"; //$NON-NLS-1$
 
            MappingDocument doc = loadMappingDocument(xml);
           
            Properties namespaceDeclarations = ((MappingElement)doc.getRootNode()).getNamespacesAsProperties();           
            assertNotNull(namespaceDeclarations);
           
            String uri = namespaceDeclarations.getProperty(MappingNodeConstants.DEFAULT_NAMESPACE_PREFIX);
            assertEquals("http://some.uri/", uri); //$NON-NLS-1$
    }
View Full Code Here

            "            <fixed>http://some.uri2/</fixed>\r\n" //$NON-NLS-1$
            "        </mappingNode>\r\n" //$NON-NLS-1$
            "    </mappingNode>\r\n" //$NON-NLS-1$
            "</xmlMapping>\r\n\r\n"; //$NON-NLS-1$
       
        MappingDocument doc = loadMappingDocument(xml);
        Properties namespaceDeclarations = ((MappingElement)doc.getRootNode()).getNamespacesAsProperties();           
       
        assertNotNull(namespaceDeclarations);
       
        String uri = namespaceDeclarations.getProperty("xsi"); //$NON-NLS-1$
        assertEquals("http://some.uri/", uri); //$NON-NLS-1$
View Full Code Here

            "            <fixed>http://some.uri2/</fixed>\r\n" //$NON-NLS-1$
            "        </mappingNode>\r\n" //$NON-NLS-1$
            "    </mappingNode>\r\n" //$NON-NLS-1$
            "</xmlMapping>\r\n\r\n"; //$NON-NLS-1$
       
        MappingDocument doc = loadMappingDocument(xml);
       
        assertEquals("license", doc.getRootNode().getName()); //$NON-NLS-1$
       
        MappingElement license = (MappingElement)doc.getRootNode();
        MappingAttribute usenamespace = (MappingAttribute)license.getAttributes().get(0);
       
        assertEquals("usenamespace", usenamespace.getName()); //$NON-NLS-1$
       
        // by the time the document is loaded the namspace must have been resolved.
View Full Code Here

            "           <recursionCriteria>foo</recursionCriteria>" + //$NON-NLS-1$
            "       </mappingNode>"+ //$NON-NLS-1$               
            "   </mappingNode>\r\n" //$NON-NLS-1$               
            "</xmlMapping>\r\n\r\n"; //$NON-NLS-1$
    
        MappingDocument doc = loadMappingDocument(xml);  
       
        MappingNode node = doc.getRootNode();
       
        // parent element
        assertTrue(node instanceof MappingElement);       
        MappingElement element = (MappingElement)node;
        assertEquals("parentNode", element.getName()); //$NON-NLS-1$
View Full Code Here

            "       <name>parentNode</name>\r\n" //$NON-NLS-1$
            "       <source>parentSource</source>\r\n" //$NON-NLS-1$
            "    </mappingNode>\r\n" //$NON-NLS-1$
            "</xmlMapping>\r\n\r\n"; //$NON-NLS-1$
 
        MappingDocument doc = loadMappingDocument(xml);
        assertEquals("windows-1252", doc.getDocumentEncoding()); //$NON-NLS-1$
    }
View Full Code Here

            "       <name>parentNode</name>\r\n" //$NON-NLS-1$
            "       <source>parentSource</source>\r\n" //$NON-NLS-1$
            "    </mappingNode>\r\n" //$NON-NLS-1$
            "</xmlMapping>\r\n\r\n"; //$NON-NLS-1$
 
        MappingDocument doc = loadMappingDocument(xml);
        assertEquals("foo", doc.getDocumentEncoding()); //$NON-NLS-1$
    }
View Full Code Here

            "       <name>parentNode</name>\r\n" //$NON-NLS-1$
            "       <source>parentSource</source>\r\n" //$NON-NLS-1$
            "    </mappingNode>\r\n" //$NON-NLS-1$
            "</xmlMapping>\r\n\r\n"; //$NON-NLS-1$
 
        MappingDocument doc = loadMappingDocument(xml);
        assertTrue(doc.isFormatted());
    }
View Full Code Here

            "       <name>parentNode</name>\r\n" //$NON-NLS-1$
            "       <source>parentSource</source>\r\n" //$NON-NLS-1$
            "    </mappingNode>\r\n" //$NON-NLS-1$
            "</xmlMapping>\r\n\r\n"; //$NON-NLS-1$
 
        MappingDocument doc = loadMappingDocument(xml);
        assertFalse(doc.isFormatted());
    }
View Full Code Here

            "       <name>parentNode</name>\r\n" //$NON-NLS-1$
            "       <source>parentSource</source>\r\n" //$NON-NLS-1$
            "    </mappingNode>\r\n" //$NON-NLS-1$
            "</xmlMapping>\r\n\r\n"; //$NON-NLS-1$
 
        MappingDocument doc = loadMappingDocument(xml);
        assertTrue(doc.isFormatted());
    }
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.