Package com.hp.hpl.jena.rdf.model

Examples of com.hp.hpl.jena.rdf.model.Resource.asNode()


    map.add("s", r);
    Literal l = ResourceFactory.createPlainLiteral("example");
    map.add("o", l);
    ParameterizedSparqlString query = new ParameterizedSparqlString(map);
   
    Assert.assertEquals(r.asNode(), query.getParam("s"));
    Assert.assertEquals(l.asNode(), query.getParam("o"));
  }
 
  @Test
  public void test_param_string_constructor_8()
View Full Code Here


    QuerySolutionMap map = new QuerySolutionMap();
    Resource r = ResourceFactory.createResource("http://example.org");
    map.add("s", r);
    ParameterizedSparqlString query = new ParameterizedSparqlString("", map);
   
    Assert.assertEquals(r.asNode(), query.getParam("s"));
  }
 
  @Test
  public void test_param_string_constructor_5()
  {
View Full Code Here

    QuerySolutionMap map = new QuerySolutionMap();
    Resource r = ResourceFactory.createResource("http://example.org");
    map.add("s", r);
    ParameterizedSparqlString query = new ParameterizedSparqlString(map);
   
    Assert.assertEquals(r.asNode(), query.getParam("s"));
  }
 
  @Test
  public void test_param_string_constructor_6()
  {
View Full Code Here

       
        Graph safeGraph = deductions.getGraph();
        assertTrue(safeGraph instanceof SafeGraph);
       
        Graph rawGraph = ((SafeGraph)safeGraph).getRawGraph();
        Triple deduction = new Triple(l.asNode(), q.asNode(), r.asNode());
        TestUtil.assertIteratorValues(this,
                rawGraph.find(Node.ANY, Node.ANY, Node.ANY),
                new Triple[]{deduction});
    }
View Full Code Here

       
        MultiMap<String, Node> mapDefs = MultiMap.createMapList() ;
        for ( QuerySolution qsol : mapEntries ) {
            String field =  qsol.getLiteral("field").getLexicalForm() ;
            Resource p = qsol.getResource("predicate") ;
            mapDefs.put(field, p.asNode()) ;
        }
       
        // Primary field/predicate
        if ( defaultField != null ) {
            Collection<Node> c = mapDefs.get(defaultField) ;
View Full Code Here

  @Override
  public SecuredResource createResource( final String uri, final Resource type )
  {
    final Resource r = ResourceFactory.createResource(uri);
    final SecurityEvaluator.SecTriple t = new SecurityEvaluator.SecTriple(
        SecuredItemImpl.convert(r.asNode()),
        SecuredItemImpl.convert(RDF.type.asNode()),
        SecuredItemImpl.convert(type.asNode()));
    if (holder.getBaseItem().contains(r, RDF.type, type))
    {
      checkRead();
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.