Package com.hp.hpl.jena.sparql.pfunction

Examples of com.hp.hpl.jena.sparql.pfunction.PropFuncArg


    } ;
   
    static final private PropFuncArg readPropFuncArg(Item item)
    {
        if ( item.isNode() )
            return new PropFuncArg(BuilderNode.buildNode(item)) ;
        if ( item.isList() )
            return new PropFuncArg(BuilderNode.buildNodeList(item)) ;
        BuilderLib.broken(item, "Expected a property function argument (node or list of nodes") ;
        return null ;
    }
View Full Code Here


        if ( propFuncArg.isNode() ) {
            Node n = propFuncArg.getArg() ;
            if ( ! Var.isVar(n) )
                // Not a Var, no substitute needed.
                return propFuncArg ;
            return new PropFuncArg(substitute(propFuncArg.getArg(), binding)) ;
        }
       
        List<Node> newArgList = new ArrayList<Node>() ;
        for ( Node n : propFuncArg.getArgList() )
            newArgList.add(substitute(n, binding)) ;
        return new PropFuncArg(newArgList) ;
    }
View Full Code Here

        }

        @Override
        public Op transform(OpPropFunc opPropFunc, Op subOp)
        {
            PropFuncArg sArgs = opPropFunc.getSubjectArgs() ;
            PropFuncArg oArgs = opPropFunc.getObjectArgs() ;
           
            PropFuncArg sArgs2 = substitute(sArgs, binding) ;
            PropFuncArg oArgs2 = substitute(oArgs, binding) ;
           
            if ( sArgs2 == sArgs && oArgs2 == oArgs && opPropFunc.getSubOp() == subOp)
                return super.transform(opPropFunc, subOp) ;
            return new OpPropFunc(opPropFunc.getProperty(), sArgs2, oArgs2, subOp) ;
        }
View Full Code Here

    } ;
   
    static final private PropFuncArg readPropFuncArg(Item item)
    {
        if ( item.isNode() )
            return new PropFuncArg(BuilderNode.buildNode(item)) ;
        if ( item.isList() )
            return new PropFuncArg(BuilderNode.buildNodeList(item)) ;
        BuilderLib.broken(item, "Expected a property function argument (node or list of nodes") ;
        return null ;
    }
View Full Code Here

    } ;
   
    static final private PropFuncArg readPropFuncArg(Item item)
    {
        if ( item.isNode() )
            return new PropFuncArg(BuilderNode.buildNode(item)) ;
        if ( item.isList() )
            return new PropFuncArg(BuilderNode.buildNodeList(item)) ;
        BuilderLib.broken(item, "Expected a property function argument (node or list of nodes") ;
        return null ;
    }
View Full Code Here

            // If memberNode is defined, find lists containing it.
            x = GraphList.listFromMember(new GNode(execCxt.getActiveGraph(), memberNode)) ;
        else   
            // Hard. Subject unbound, no fixed member. Find every list and use BFI.
            x = GraphList.findAllLists(execCxt.getActiveGraph()) ;
        return super.allLists(binding, x, listVar, predicate, new PropFuncArg(objectArgs, null), execCxt) ;
    }
View Full Code Here

        {
            oList = GraphList.members(oGNode) ;
            GraphList.allTriples(oGNode, listTriples) ;
        }
       
        PropFuncArg subjArgs = new PropFuncArg(sList, pfTriple.getSubject()) ;
        PropFuncArg objArgs =  new PropFuncArg(oList, pfTriple.getObject()) ;
       
        // Confuses single arg with a list of one.
        PropertyFunctionInstance pfi = new PropertyFunctionInstance(subjArgs, pfTriple.getPredicate(), objArgs) ;
       
        triples.getList().removeAll(listTriples) ;
View Full Code Here

    } ;
   
    static final private PropFuncArg readPropFuncArg(Item item)
    {
        if ( item.isNode() )
            return new PropFuncArg(BuilderNode.buildNode(item)) ;
        if ( item.isList() )
            return new PropFuncArg(BuilderNode.buildNodeList(item)) ;
        BuilderLib.broken(item, "Expected a property function argument (node or list of nodes") ;
        return null ;
    }
View Full Code Here

        if ( propFuncArg.isNode() ) {
            Node n = propFuncArg.getArg() ;
            if ( ! Var.isVar(n) )
                // Not a Var, no substitute needed.
                return propFuncArg ;
            return new PropFuncArg(substitute(propFuncArg.getArg(), binding)) ;
        }
       
        List<Node> newArgList = new ArrayList<>() ;
        for ( Node n : propFuncArg.getArgList() )
            newArgList.add(substitute(n, binding)) ;
        return new PropFuncArg(newArgList) ;
    }
View Full Code Here

        }

        @Override
        public Op transform(OpPropFunc opPropFunc, Op subOp)
        {
            PropFuncArg sArgs = opPropFunc.getSubjectArgs() ;
            PropFuncArg oArgs = opPropFunc.getObjectArgs() ;
           
            PropFuncArg sArgs2 = substitute(sArgs, binding) ;
            PropFuncArg oArgs2 = substitute(oArgs, binding) ;
           
            if ( sArgs2 == sArgs && oArgs2 == oArgs && opPropFunc.getSubOp() == subOp)
                return super.transform(opPropFunc, subOp) ;
            return new OpPropFunc(opPropFunc.getProperty(), sArgs2, oArgs2, subOp) ;
        }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.pfunction.PropFuncArg

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.