Examples of asNode()


Examples of com.hp.hpl.jena.enhanced.EnhNode.asNode()

            {
            gets += 1;
            Node n = (Node) key;
            int i = hashNode( n );
            EnhNode result = elements[i];
            if (result != null && result.asNode().equals( key ))
                {
                hits += 1;
                return result;
                }
            }
View Full Code Here

Examples of com.hp.hpl.jena.ontology.DatatypeProperty.asNode()

       
        // Check culprit reporting
        ValidityReport.Report report = (validity.getReports().next());
        Triple culprit = (Triple)report.getExtension();
        assertEquals(culprit.getSubject().getURI(), NS + "c");
        assertEquals(culprit.getPredicate(), hasValue.asNode());
    }

    /**
     * Test reported problem with OWL property axioms.
     */
 
View Full Code Here

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

  public SecuredAlt getAlt( final int index )
  {
    checkRead();
    final Alt a = holder.getBaseItem().getAlt(index);
    checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index)
        .asNode(), a.asNode()));
    return SecuredAltImpl.getInstance(getModel(), a);
  }

  @Override
  public SecuredBag getBag( final int index )
View Full Code Here

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

  public SecuredBag getBag( final int index )
  {
    checkRead();
    final Bag b = holder.getBaseItem().getBag(index);
    checkRead(new Triple(holder.getBaseItem().asNode(), RDF.li(index)
        .asNode(), b.asNode()));
    return SecuredBagImpl.getInstance(getModel(), b);
  }

  @Override
  public boolean getBoolean( final int index )
View Full Code Here

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

      Literal l = model.createTypedLiteral(((DatatypeLiteral)o).getValue(),
              ((DatatypeLiteral)o).getDatatype().toString());
     
      JenaParameters.enableSilentAcceptanceOfUnknownDatatypes = originalFlag;
     
      return l.asNode();
     
    }
   
    if(o instanceof LanguageTagLiteral) {
      // langtag
View Full Code Here

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

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

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

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

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

       
        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

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

        cell = iter.next();

        if (val.equals(cell.getRequiredProperty(listFirst())
            .getObject()))
        {
          if (canDelete(new Triple(cell.asNode(), listFirst()
              .asNode(), val.asNode())))
          {
            return SecuredRDFListImpl.getInstance(getModel(),
                baseRemove(cell));
View Full Code Here

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

    for(String v : this.table.getVariables()) {
      RDFNode node = qs.get(v);
      assert node != null : "null node for varname " + v
              + ". Do you have unbound variables in the query?";
      try {
        row.put(v, TypeConversion.toRDF2Go((node == null ? null : node.asNode())));
      } catch(ModelRuntimeException e) {
        throw new ModelRuntimeException(e);
      }
    }
    return row;
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.