Package com.hp.hpl.jena.sparql.core

Examples of com.hp.hpl.jena.sparql.core.TriplePath


    {
        if ( triplePath.isTriple() )
        {
            // Fake it.  This happens only for API constructed situations.
            Path path = new P_Link(triplePath.getPredicate()) ;
            triplePath = new TriplePath(triplePath.getSubject(),
                                        path,
                                        triplePath.getObject()) ;
        }
       
        return execTriplePath(binding,
View Full Code Here


        return new OpBGP(bgp2) ;
    }
   
    @Override public Op transform(OpPath opPath)
    {
        TriplePath tp = opPath.getTriplePath() ;
        Node s = tp.getSubject() ;
        Node s1 = transform.convert(s) ;
        Node o = tp.getObject() ;
        Node o1 = transform.convert(o) ;
       
        if ( s1 == s && o1 == o )
            // No change.
            return super.transform(opPath) ;
       
        Path path = tp.getPath() ;
        TriplePath tp2 ;

        if ( path != null )
            tp2 = new TriplePath(s1, path, o1) ;
        else
        {
            Triple t = new Triple(s1, tp.getPredicate(), o1) ;
            tp2 = new TriplePath(t) ;
        }
        return new OpPath(tp2) ;
    }
View Full Code Here

        }
       
        Node s = BuilderNode.buildNode(list.get(0)) ;
        Path p = BuilderPath.buildPath(list.get(1)) ;
        Node o = BuilderNode.buildNode(list.get(2)) ;
        return new TriplePath(s, p, o) ;
    }
View Full Code Here

    @Override
    public int mark() { return pattern.size() ; }
   
    @Override
    public void addTriple(Triple t)
    { addTriplePath(new TriplePath(t)) ; }
View Full Code Here

    public void addTriple(Triple t)
    { addTriplePath(new TriplePath(t)) ; }

    @Override
    public void addTriple(int index, Triple t)
    { addTriplePath(index, new TriplePath(t)) ; }
View Full Code Here

    }
   
    protected void insert(TripleCollector acc, Node s, Node p, Path path, Node o)
    {
        if ( p == null )
            acc.addTriplePath(new TriplePath(s, path, o)) ;
        else
            acc.addTriple(new Triple(s, p, o)) ;
    }
View Full Code Here

    }
   
    protected void insert(TripleCollectorMark acc, int index, Node s, Node p, Path path, Node o)
    {
        if ( p == null )
            acc.addTriplePath(index, new TriplePath(s, path, o)) ;
        else
            acc.addTriple(index, new Triple(s, p, o)) ;
    }
View Full Code Here

    {
        if ( triplePath.isTriple() )
        {
            // Fake it.  This happens only for API constructed situations.
            Path path = new P_Link(triplePath.getPredicate()) ;
            triplePath = new TriplePath(triplePath.getSubject(),
                                        path,
                                        triplePath.getObject()) ;
        }
       
        return execTriplePath(binding,
View Full Code Here

        return new OpBGP(bgp2) ;
    }
   
    @Override public Op transform(OpPath opPath)
    {
        TriplePath tp = opPath.getTriplePath() ;
        Node s = tp.getSubject() ;
        Node s1 = transform.convert(s) ;
        Node o = tp.getObject() ;
        Node o1 = transform.convert(o) ;
       
        if ( s1 == s && o1 == o )
            // No change.
            return super.transform(opPath) ;
       
        Path path = tp.getPath() ;
        TriplePath tp2 ;

        if ( path != null )
            tp2 = new TriplePath(s1, path, o1) ;
        else
        {
            Triple t = new Triple(s1, tp.getPredicate(), o1) ;
            tp2 = new TriplePath(t) ;
        }
        return new OpPath(tp2) ;
    }
View Full Code Here

    public TransformPathFlatternStd() { }
   
    @Override
    public Op transform(OpPath opPath)
    {
        TriplePath tp = opPath.getTriplePath() ;
        Op op = transformPath(opPath, tp.getSubject(), tp.getPath(), tp.getObject() ) ;
        // And combine adjacent triple patterns.
        return op ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.core.TriplePath

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.