Package com.hp.hpl.jena.sdb.exprmatch

Examples of com.hp.hpl.jena.sdb.exprmatch.MapResult



    @Override
    public SDBConstraint recognize(Expr expr)
    {
        MapResult rMap = null ;
       
        if ( ( rMap = equalsString1.match(expr) ) != null )
        {
            Var var = rMap.get("a1").getExprVar().asVar() ;
            String str = rMap.get("a2").getConstant().getString() ;
            return new StringEqualsSqlGen(expr, equalsString1, true) ;
        }
        return null ;
    }
View Full Code Here


    }

    @Override
    public SqlExpr compile(Scope scope)
    {
        MapResult rMap = exprPattern.match(getExpr()) ;
       
        if ( rMap == null )
            throw new SDBException("Couldn't compile after all: "+getExpr()) ;
          //log.info("equalsString - Matched: ?a1 = "+rMap.get("a1")+" : ?a2 = "+rMap.get("a2")) ;
        Var var = rMap.get("a1").getExprVar().asVar() ;
        String str = rMap.get("a2").getConstant().getString() ;
       
        if ( ! scope.hasColumnForVar(var) )
        {
            LoggerFactory.getLogger(this.getClass()).error("Variable '"+var+"' not in scope") ;
            return null ;
View Full Code Here

   
    @Override
    public SDBConstraint recognize(Expr expr)
    {
        MapResult rMap = null ;
       
        if ( ( rMap = regex1.match(expr) ) != null )
        {
            Var var = rMap.get("a1").getExprVar().asVar() ;
            String pattern = rMap.get("a2").getConstant().getString() ;
            return new RegexSqlGen(expr, regex1, pattern, null, true) ;
        }
        if ( ( rMap = regex1_i.match(expr) ) != null )
        {
            Var var = rMap.get(Var.alloc("a1")).getExprVar().asVar() ;
            String pattern = rMap.get(Var.alloc("a2")).getConstant().getString() ;
            return new RegexSqlGen(expr, regex1_i, pattern, "i", true) ;
        }
        return null ;
    }
View Full Code Here

    @Override
    public SqlExpr compile(Scope scope)
    {
        // TODO Convert regex to using a string value table?
        MapResult rMap = exprPattern.match(getExpr()) ;
        if ( rMap == null )
            throw new SDBException("Couldn't compile after all: "+getExpr()) ;
       
        Var var = rMap.get(Var.alloc("a1")).getExprVar().asVar() ;
        String pattern = rMap.get(Var.alloc("a2")).getConstant().getString() ;
       
        if ( ! scope.hasColumnForVar(var) )
        {
            LoggerFactory.getLogger(this.getClass()).error("Variable '"+var+"' not in scope") ;
            return null ;
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sdb.exprmatch.MapResult

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.