Examples of asNode()


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

        Node resAsNode = old.asNode() ;
        Model model = old.getModel() ;
        Graph graph = model.getGraph() ;
        Graph rawGraph = graph instanceof InfGraph ? ((InfGraph) graph).getRawGraph() : graph ;
        Resource newRes = model.createResource(uri) ;
        Node newResAsNode = newRes.asNode() ;
        
       
        boolean changeOccured = false ;
        List<Triple> triples = new ArrayList<Triple>(WINDOW_SIZE) ;
       
View Full Code Here

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

        while ( wordIt.hasNext() )
          {
          Resource currWord = wordIt.nextResource();
          if ( currWord.isURIResource() )
            {
            fullwords += currWord.asNode().getURI() + '\n';
           
            loosewords += currWord.getLocalName() + '\n';
            looseMappingArr[i] = currWord.getLocalName();
            fullMappingArr[i] = currWord.asNode().getURI();
            i++;
View Full Code Here

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

            {
            fullwords += currWord.asNode().getURI() + '\n';
           
            loosewords += currWord.getLocalName() + '\n';
            looseMappingArr[i] = currWord.getLocalName();
            fullMappingArr[i] = currWord.asNode().getURI();
            i++;
            }
          }
       
        GenericWordChecker full = new WordChecker( fullwords );
View Full Code Here

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

        Node resAsNode = old.asNode() ;
        Model model = old.getModel() ;
        Graph graph = model.getGraph() ;
        Graph rawGraph = graph instanceof InfGraph ? ((InfGraph) graph).getRawGraph() : graph ;
        Resource newRes = model.createResource(uri) ;
        Node newResAsNode = newRes.asNode() ;
        
       
        boolean changeOccured = false ;
        List<Triple> triples = new ArrayList<Triple>(WINDOW_SIZE) ;
       
View Full Code Here

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

  public void testURINodeAsResource()
  {
    final Node n = GraphTestBase.node("a");
    final Resource r = model.wrapAsResource(n);
    Assert.assertSame(n, r.asNode());
  }
}
View Full Code Here

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

        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() {
        // Test constructor with predefined parameters - variant of constructor
View Full Code Here

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

        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() {
        // Test constructor with predefined parameters
View Full Code Here

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_7() {
View Full Code Here

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

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

  public SecuredSeq getSeq( final int index )
  {
    checkRead();
    final Seq retval = holder.getBaseItem().getSeq(index);
    checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index)
        .asNode(), retval.asNode()));
    return SecuredSeqImpl.getInstance(getModel(), retval);
  }

  @Override
  public short getShort( final int index )
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.