public void test_create_literal_xsdInt() { final BigdataLiteral l1 = vf.createLiteral("12", XSD.INT); assertEquals(XSD.INT, l1.getDatatype()); assertEquals(12, l1.intValue()); }
@Override public BigdataStatementImpl createStatement(Resource s, URI p, Value o, Resource c, StatementEnum type, final boolean userFlag) { return new BigdataStatementImpl(// (BigdataResource) asValue(s),// (BigdataURI) asValue(p),// (BigdataValue) asValue(o),// (BigdataResource) asValue(c),// optional type, // the statement type (optional). userFlag // the user flag (optional) ); }
/** * Unit test verifies that the created URIs are canonical for well-known * XSD URIs. */ public void test_create_xsdInt_canonical() { final BigdataURI v1 = vf.createURI(XSD.INT.stringValue()); final BigdataURI v2 = vf.createURI(XSD.INT.stringValue()); // verify the URI. assertEquals(v1.stringValue(),XSD.INT.stringValue()); // verify the same reference (canonical). assertTrue(v1 == v2); }
public BigdataBNode createBNode() { return valueFactory.createBNode(nextID()); }
@Override public BigdataStatement createStatement(Resource s, URI p, Value o, Resource c) { return valueFactory.createStatement(s, p, o, c); }
/** * Standalone variant of the parser, should be used only * when connection is not available. */ public BigdataTurtleParser() { super(BigdataValueFactoryImpl.getInstance("")); }
@Override public void handle(final IV newIV) { bValue.setIV(newIV); } });
private boolean isInvalidBlankNode(Value v) { if (v instanceof BigdataBNode && ((BigdataBNode)v).isStatementIdentifier()) { return false; } else { return v instanceof BNode; } }
/** * Unit test for {@link ValueFactory#createLiteral(String, URI)} when the * datatype URI is <code>null</code>. * * @see https://sourceforge.net/apps/trac/bigdata/ticket/226 */ public void test_create_literal_datatypeIsNull() { final BigdataLiteral l1 = vf.createLiteral("12", (URI) null); assertEquals(null, l1.getDatatype()); assertEquals(12, l1.intValue()); }
/** * Unit test verifies that the created URIs are canonical for well-known * XSD URIs. */ public void test_create_xsdInt_canonical() { final BigdataURI v1 = vf.createURI(XSD.INT.stringValue()); final BigdataURI v2 = vf.createURI(XSD.INT.stringValue()); // verify the URI. assertEquals(v1.stringValue(),XSD.INT.stringValue()); // verify the same reference (canonical). assertTrue(v1 == v2); }
@Override public BigdataStatementImpl createStatement(Resource s, URI p, Value o, Resource c, StatementEnum type, final boolean userFlag) { return new BigdataStatementImpl(// (BigdataResource) asValue(s),// (BigdataURI) asValue(p),// (BigdataValue) asValue(o),// (BigdataResource) asValue(c),// optional type, // the statement type (optional). userFlag // the user flag (optional) ); }
/** * Creates a new NTriplesParser that will use a {@link ValueFactoryImpl} to * create object for resources, bNodes and literals. */ public BigdataNTriplesParser() { // We are providing Bigdata-specific value factory to support parsing of RDR, // which require BigdataValueFactory instead of default Sesame implementation // See https://jira.blazegraph.com/browse/BLZG-1322 super(BigdataValueFactoryImpl.getInstance("")); }
@Override public void handle(final IV newIV) { bValue.setIV(newIV); } });
public void test_create_literal_xsdInt() { final BigdataLiteral l1 = vf.createLiteral("12", XSD.INT); assertEquals(XSD.INT, l1.getDatatype()); assertEquals(12, l1.intValue()); }
/** * Unit test verifies that the created URIs are canonical for well-known * XSD URIs. */ public void test_create_xsdInt_canonical() { final BigdataURI v1 = vf.createURI(XSD.INT.stringValue()); final BigdataURI v2 = vf.createURI(XSD.INT.stringValue()); // verify the URI. assertEquals(v1.stringValue(),XSD.INT.stringValue()); // verify the same reference (canonical). assertTrue(v1 == v2); }
/** * Unit test for {@link ValueFactory#createLiteral(String, URI)} when the * datatype URI is <code>null</code>. * * @see https://sourceforge.net/apps/trac/bigdata/ticket/226 */ public void test_create_literal_datatypeIsNull() { final BigdataLiteral l1 = vf.createLiteral("12", (URI) null); assertEquals(null, l1.getDatatype()); assertEquals(12, l1.intValue()); }
/** * Unit test for {@link ValueFactory#createLiteral(String, URI)} when the * datatype URI is <code>null</code>. * * @see https://sourceforge.net/apps/trac/bigdata/ticket/226 */ public void test_create_literal_datatypeIsNull() { final BigdataLiteral l1 = vf.createLiteral("12", (URI) null); assertEquals(null, l1.getDatatype()); assertEquals(12, l1.intValue()); }
public void test_create_literal_xsdInt() { final BigdataLiteral l1 = vf.createLiteral("12", XSD.INT); assertEquals(XSD.INT, l1.getDatatype()); assertEquals(12, l1.intValue()); }