Examples of addTriplePattern()


Examples of com.hp.hpl.jena.sparql.syntax.ElementGroup.addTriplePattern()

       
        Var varTitle = Var.alloc("title") ;
        Var varX = Var.alloc("x") ;
       
        Triple t1 = new Triple(varX, DC.title.asNode(),  varTitle) ;
        elg.addTriplePattern(t1) ;
       
        // Adds a filter.  Need to wrap variable in a NodeVar.
        Expr expr = new E_Regex(new ExprVar(varTitle), "sparql", "i") ;
        ElementFilter filter = new  ElementFilter(expr) ;
        elg.addElementFilter(filter) ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.syntax.ElementGroup.addTriplePattern()

       
        Var varTitle = Var.alloc("title") ;
        Var varX = Var.alloc("x") ;
       
        Triple t1 = new Triple(varX, DC.title.asNode(),  varTitle) ;
        elg.addTriplePattern(t1) ;
       
        // Don't use bNodes for anon variables.  The conversion is done in parsing.
        // BNodes here are assumed to be values from the target graph.
        Triple t2 = new Triple(varX, DC.description.asNode(), Var.alloc("desc")) ;
        elg.addTriplePattern(t2) ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.syntax.ElementGroup.addTriplePattern()

        elg.addTriplePattern(t1) ;
       
        // Don't use bNodes for anon variables.  The conversion is done in parsing.
        // BNodes here are assumed to be values from the target graph.
        Triple t2 = new Triple(varX, DC.description.asNode(), Var.alloc("desc")) ;
        elg.addTriplePattern(t2) ;
       
        // Attach the group to query. 
        query.setQueryPattern(elg) ;

        // Choose what we want - SELECT *
 
View Full Code Here

Examples of com.hp.hpl.jena.sparql.syntax.ElementGroup.addTriplePattern()

       
        Var varTitle = Var.alloc("title") ;
        Var varX = Var.alloc("x") ;
       
        Triple t1 = new Triple(varX, DC.title.asNode(),  varTitle) ;
        elg.addTriplePattern(t1) ;
       
        // Don't use bNodes for anon variables.  The conversion is done in parsing.
        // BNodes here are assumed to be values from the target graph.
        Triple t2 = new Triple(varX, DC.description.asNode(), Var.alloc("desc")) ;
        elg.addTriplePattern(t2) ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.syntax.ElementGroup.addTriplePattern()

        elg.addTriplePattern(t1) ;
       
        // Don't use bNodes for anon variables.  The conversion is done in parsing.
        // BNodes here are assumed to be values from the target graph.
        Triple t2 = new Triple(varX, DC.description.asNode(), Var.alloc("desc")) ;
        elg.addTriplePattern(t2) ;
       
        // Attach the group to query. 
        query.setQueryPattern(elg) ;

        // Choose what we want - SELECT *
 
View Full Code Here

Examples of com.hp.hpl.jena.sparql.syntax.ElementGroup.addTriplePattern()

       
        Var varTitle = Var.alloc("title") ;
        Var varX = Var.alloc("x") ;
       
        Triple t1 = new Triple(varX, DC.title.asNode(),  varTitle) ;
        elg.addTriplePattern(t1) ;
       
        // Adds a filter.  Need to wrap variable in a NodeVar.
        Expr expr = new E_Regex(new ExprVar(varTitle), "sparql", "i") ;
        ElementFilter filter = new  ElementFilter(expr) ;
        elg.addElementFilter(filter) ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.syntax.ElementGroup.addTriplePattern()

       
        Var varTitle = Var.alloc("title") ;
        Var varX = Var.alloc("x") ;
       
        Triple t1 = new Triple(varX, DC.title.asNode(),  varTitle) ;
        elg.addTriplePattern(t1) ;
       
        // Adds a filter.  Need to wrap variable in a NodeVar.
        Expr expr = new E_Regex(new ExprVar(varTitle), "sparql", "i") ;
        ElementFilter filter = new  ElementFilter(expr) ;
        elg.addElementFilter(filter) ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.syntax.ElementGroup.addTriplePattern()

       
        Var varTitle = Var.alloc("title") ;
        Var varX = Var.alloc("x") ;
       
        Triple t1 = new Triple(varX, DC.title.asNode(),  varTitle) ;
        elg.addTriplePattern(t1) ;
       
        // Don't use bNodes for anon variables.  The conversion is done in parsing.
        // BNodes here are assumed to be values from the target graph.
        Triple t2 = new Triple(varX, DC.description.asNode(), Var.alloc("desc")) ;
        elg.addTriplePattern(t2) ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.syntax.ElementGroup.addTriplePattern()

        elg.addTriplePattern(t1) ;
       
        // Don't use bNodes for anon variables.  The conversion is done in parsing.
        // BNodes here are assumed to be values from the target graph.
        Triple t2 = new Triple(varX, DC.description.asNode(), Var.alloc("desc")) ;
        elg.addTriplePattern(t2) ;
       
        // Attach the group to query. 
        query.setQueryPattern(elg) ;

        // Choose what we want - SELECT *
 
View Full Code Here

Examples of com.hp.hpl.jena.sparql.syntax.ElementGroup.addTriplePattern()

        public ComponentQuery addMigrationPath(String sourceMimetype, String targetMimetype) {
            if ((sourceMimetype != null && !sourceMimetype.isEmpty())
                || (targetMimetype != null && !targetMimetype.isEmpty())) {
                Node node = NodeFactory.createAnon();
                ElementGroup group = new ElementGroup();
                group.addTriplePattern(new Triple(wfNode, NodeFactory.createURI(ONTOLOGY_IRI + "migrates"), node));
                group.addTriplePattern(new Triple(node, NodeFactory.createURI(TYPE_IRI), NodeFactory
                    .createURI(ONTOLOGY_IRI + "MigrationPath")));
                if (sourceMimetype != null && !sourceMimetype.isEmpty()) {
                    group.addTriplePattern(new Triple(node, NodeFactory.createURI(ONTOLOGY_IRI + "sourceMimetype"),
                        NodeFactory.createLiteral(sourceMimetype)));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.