Package org.openrdf.model

Examples of org.openrdf.model.URI.stringValue()


       
        RdfValueFactory valueFactory = new RdfValueFactory(graph,vf);
        Representation r = valueFactory.createRepresentation(id.stringValue());
        Set<Double> expected = new HashSet<Double>(Arrays.asList(
            Double.NaN, Double.POSITIVE_INFINITY,Double.NEGATIVE_INFINITY));
        Iterator<Double> dit = r.get(doubleTestField.stringValue(), Double.class);
        while(dit.hasNext()){
            Double val = dit.next();
            Assert.assertNotNull(val);
            Assert.assertTrue(expected.remove(val));
        }
View Full Code Here


       
        RdfValueFactory valueFactory = new RdfValueFactory(graph,vf);
        Representation r = valueFactory.createRepresentation(id.stringValue());
        Set<Float> expected = new HashSet<Float>(Arrays.asList(
            Float.NaN, Float.POSITIVE_INFINITY,Float.NEGATIVE_INFINITY));
        Iterator<Float> dit = r.get(floatTestField.stringValue(), Float.class);
        while(dit.hasNext()){
            Float val = dit.next();
            Assert.assertNotNull(val);
            Assert.assertTrue(expected.remove(val));
        }
View Full Code Here

    if (predTermSet.isSingleUriString()) {
      URI predValUri = f.createURI(predTermSet
          .getR2rmlTemplateString(factory, columnNameFormatter));
     
      // Skip the class instance special meta property
      if (predValUri.stringValue().equals(Uris.CLASS_INSTANCE_LINK_URI))
        return false;
     
      con.add(pomUri, repoURIs.get(Uris.RR_PREDICATE_URI), predValUri);
    } else {
      Value predValLiteratl = f.createLiteral(predTermSet.
View Full Code Here

              if (label != null) {
                return label;
              }
          }
         
          return uri.stringValue();
        } else {
          return ((Literal) value).getLabel();
        }
    }
   
View Full Code Here

    private String literalString(final Literal literal) {
        final String language = literal.getLanguage();
        final URI datatype = literal.getDatatype();
        if (null != datatype) {
            return "\"" + literal.getLabel() + "\"^^<" + this.graph.prefixNamespace(datatype.stringValue()) + ">";
        } else if (null != language) {
            return "\"" + literal.getLabel() + "\"@" + language;
        } else {
            return "\"" + literal.getLabel() + "\"";
        }
View Full Code Here

                    URI vType = ((Literal) value).getDatatype();
                    String vLang = ((Literal) value).getLanguage();

                    return null == type && null == vType && null == lang && null == vLang
                            || null != type && null != vType && type.equals(vType.stringValue())
                            || null != lang && null != vLang && lang.equals(vLang);

                } else {
                    return false;
                }
View Full Code Here

            count = 0;
            while (results.hasNext()) {
                count++;
                BindingSet set = results.next();
                URI foaf = (URI) set.getValue("foaf");
                assertTrue(foaf.stringValue().startsWith("urn:com.tinkerpop.blueprints.pgm.oupls.sail.test/"));
            }
            results.close();
            assertEquals(4, count);
        } finally {
            sc.rollback();
View Full Code Here

  private SqlExpr valueOf(Value value) {
    if (value instanceof Literal) {
      URI datatype = ((Literal)value).getDatatype();
      if (datatype != null)
        return str(datatype.stringValue());
    }
    return sqlNull();
  }

  private SqlExpr type(ValueExpr expr)
View Full Code Here

    }
    else if (datatype == null) {
      table.insertLanguage(id, label, language);
    }
    else {
      String dt = datatype.stringValue();
      try {
        if (XMLDatatypeUtil.isNumericDatatype(datatype)) {
          table.insertNumeric(id, label, dt, literal.doubleValue());
        }
        else if (XMLDatatypeUtil.isCalendarDatatype(datatype)) {
View Full Code Here

        ps.print("\"datatype\" : ");
        final URI datatype = literal.getDatatype();
        if(datatype != null) {
        ps.print('"');
        ps.print(datatype.stringValue());
        ps.print('"');
        } else {
            ps.print("null");
        }
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.