Package org.teiid.query.mapping.xml

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


    final String groupName = tableRecord.getFullName();
        if(tableRecord.isVirtual()) {
            // get mappin transform
            String document = tableRecord.getSelectTransformation();           
            InputStream inputStream = new ByteArrayInputStream(document.getBytes());
            MappingLoader reader = new MappingLoader();
            MappingDocument mappingDoc = null;
            try{
                mappingDoc = reader.loadDocument(inputStream);
                mappingDoc.setName(groupName);
            } catch (Exception e){
                throw new TeiidComponentException(e, QueryPlugin.Util.getString("TransformationMetadata.Error_trying_to_read_virtual_document_{0},_with_body__n{1}_1", groupName, mappingDoc)); //$NON-NLS-1$
            } finally {
              try {
View Full Code Here


*
*/
public class TestSourceNodeGenaratorVisitor extends TestCase {
   
    private MappingDocument loadMappingDocument(String xml) throws MappingException {
        MappingLoader reader = new MappingLoader();

        byte[] bytes = xml.getBytes();

        InputStream istream = new ByteArrayInputStream (bytes);
       
        return reader.loadDocument(istream);
    }   
View Full Code Here

    /** Load a mapping definition from a file. */
    private static MappingNode loadFromFile( String filename )
        throws Exception {
        String fileAbsolutePath = getFilePathInDataDir(filename);
        MappingLoader loader = new MappingLoader();
        return loader.loadDocument(fileAbsolutePath);
    }
View Full Code Here

        InputStream istream = getResourceStream( MappingLoader.class, filename );
        if ( istream == null ) {
            throw new IllegalStateException( "File " + filename //$NON-NLS-1$
                + " is not in the application's classpath." ); //$NON-NLS-1$
        }
        MappingLoader loader= new MappingLoader();
        return loader.loadDocument(istream);
    }
View Full Code Here

        //MappingNode.printMappingNodeTree(m, System.out);
    }

   
    private MappingDocument loadMappingDocument(String xml) throws MappingException {
            MappingLoader reader = new MappingLoader();
   
            byte[] bytes = xml.getBytes();
   
            InputStream istream = new ByteArrayInputStream (bytes);
           
            return reader.loadDocument(istream);
    }
View Full Code Here

*/
public class TestMappingOutputter extends TestCase {
   
    private MappingDocument loadMappingDocument(String xml)
        throws MappingException {
        MappingLoader reader = new MappingLoader();
        byte[] bytes = xml.getBytes();
        InputStream istream = new ByteArrayInputStream(bytes);
        return reader.loadDocument(istream);
    }   
View Full Code Here

TOP

Related Classes of org.teiid.query.mapping.xml.MappingLoader

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.