Package org.teiid.query.sql

Examples of org.teiid.query.sql.LanguageObject$Util


    //
    resourceSet
        .getResourceFactoryRegistry()
        .getExtensionToFactoryMap()
        .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
            new _40ResourceFactoryImpl());

    // Register the package to ensure it is available during loading.
    //
    resourceSet.getPackageRegistry().put(_40Package.eNS_URI,
        _40Package.eINSTANCE);
View Full Code Here


    // Register the appropriate resource factory to handle all file
    // extensions.
    //
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
        .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
            new _40ResourceFactoryImpl());
   
   
    // Register the package to ensure it is available during loading.
    //
    resourceSet.getPackageRegistry().put(_40Package.eNS_URI,
View Full Code Here

    // Register the appropriate resource factory to handle all file
    // extensions.
    //
    resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
        .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
            new _40ResourceFactoryImpl());
   
   
    // Register the package to ensure it is available during loading.
    //
    resourceSet.getPackageRegistry().put(_40Package.eNS_URI,
View Full Code Here

        return (Criteria)convertObject(simpleCrit, rootNode, metadata);
    }

    public static LanguageObject convertObject(LanguageObject object, MappingDocument rootNode, QueryMetadataInterface metadata)
    throws QueryPlannerException, TeiidComponentException{
        LanguageObject copy = (LanguageObject)object.clone();

        //Don't want to do deep visiting
        XMLNodeMappingVisitor mappingVisitor = new XMLNodeMappingVisitor(rootNode, metadata);
        try {
            PreOrderNavigator.doVisit(copy, mappingVisitor);
View Full Code Here

    public TestDeepGroupCollectorVisitor(String name) {
        super(name);
    }

    public void helpTestVisitor(String sql, String[] expectedGroups) {
        LanguageObject obj = null;
        try {
            QueryParser parser = new QueryParser();
            obj = parser.parseCommand(sql);
        } catch(TeiidException e) {
            fail("Unexpected exception while parsing: " + e.getFullMessage()); //$NON-NLS-1$
View Full Code Here

        ElementSymbol y = new ElementSymbol("z.X"); //$NON-NLS-1$
       
        HashMap map = new HashMap();
        map.put(x, y);
       
        LanguageObject toMap = new Select(Arrays.asList(x));
       
        ExpressionMappingVisitor.mapExpressions(toMap, map);
       
        assertEquals("Did not get expected mapped expression", "SELECT z.X", toMap.toString());     //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here

    // Compare expected and actual objects
    Set<String> expectedStrings = new HashSet(Arrays.asList(expectedStringArray));
    Set<String> actualStrings = new HashSet<String>();
    Iterator objIter = actualObjs.iterator();
    while(objIter.hasNext()) {
        LanguageObject obj = (LanguageObject) objIter.next();
        actualStrings.add(SQLStringVisitor.getSQLString(obj));
    }

    if(expectedStrings.size() == 0 && actualStrings.size() > 0) {
        fail("Expected no failures but got some: " + report.getFailureMessage()); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.LanguageObject$Util

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.