Examples of TypedLiteralImpl


Examples of spark.spi.rdf.TypedLiteralImpl

    if (c != null) return c.literal(value);
    // The object has an unrecognized type that doesn't translate directly to XSD.
    // Omitting the datatype would imply a type of xsd:string, so use xsd:anySimpleType instead.
    // The use of xsd:anySimpleType prevents round-tripping; in the future we could possibly
    // serialize this as a byte array and use xsd:hexBinary or xsd:base64Binary.
    return new TypedLiteralImpl(value.toString(), XsdTypes.ANY_SIMPLE_TYPE);
  }
View Full Code Here

Examples of spark.spi.rdf.TypedLiteralImpl

      uriConversions.put(dt, this);
      classConversions.put(c, this);
    }
    /** @return an RDF literal with the appropriate datatype URI and lexical form computed from the given object. */
    final TypedLiteral literal(Object data) {
      return new TypedLiteralImpl(lexical(clazz.cast(data)), typeUri);
    }
View Full Code Here

Examples of spark.spi.rdf.TypedLiteralImpl

      TestCursor.assertCursor(s, NONE);
      assertEquals(new PlainLiteralImpl("xyz"), s.getBinding(var));
     
      assertTrue(s.next());
      TestCursor.assertCursor(s, NONE);
      assertEquals(new TypedLiteralImpl("100", XsdTypes.INT), s.getBinding(var));
      assertEquals(100, s.getInt(var));
     
      assertTrue(s.next());
      TestCursor.assertCursor(s, LAST);
      assertEquals(new PlainLiteralImpl("chat", "fr"), s.getBinding(var));
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.