/** * Variant used *except* for {@link BlobIV}s. * @param lex * @param iv */ private void doTest(final LexiconRelation lex, final IV iv) { doTest(lex,iv,null/*given*/); }
final AbstractTripleStore store = getStore(getProperties()); doTest(lex,uri.getIV(), uri); doTest(lex,bnd.getIV(), bnd); doTest(lex,lit.getIV(), lit); doTest(lex, new XSDBooleanIV<BigdataLiteral>(true)); doTest(lex, new XSDNumericIV<BigdataLiteral>((byte)1)); doTest(lex, new XSDNumericIV<BigdataLiteral>((short)1)); doTest(lex, new XSDNumericIV<BigdataLiteral>(1)); doTest(lex, new XSDNumericIV<BigdataLiteral>(1L)); doTest(lex, new XSDNumericIV<BigdataLiteral>(1f)); doTest(lex, new XSDNumericIV<BigdataLiteral>(1d)); doTest(lex, new XSDIntegerIV<BigdataLiteral>(BigInteger.valueOf(1L))); doTest(lex, new XSDDecimalIV<BigdataLiteral>(BigDecimal.valueOf(1d))); doTest(lex, new UUIDBNodeIV<BigdataBNode>(UUID.randomUUID())); doTest(lex, new NumericBNodeIV<BigdataBNode>(1)); doTest(lex, new UUIDLiteralIV<BigdataLiteral>(UUID.randomUUID()));
fail("Expecting: " + NotMaterializedException.class); } catch (NotMaterializedException e) { assertTrue(val == iv.getValue()); assertTrue(iv != iv2); assertNotNull(val2); assertTrue(val != val2); assertTrue(val.getValueFactory() == val2.getValueFactory()); assertTrue(val.equals(val2)); assertTrue(val == iv.asValue(lex)); assertTrue(val == iv.getValue());
final AbstractTripleStore store = getStore(getProperties()); doTest(lex,uri.getIV(), uri); doTest(lex,bnd.getIV(), bnd); doTest(lex,lit.getIV(), lit); doTest(lex, new XSDBooleanIV<BigdataLiteral>(true)); doTest(lex, new XSDNumericIV<BigdataLiteral>((byte)1)); doTest(lex, new XSDNumericIV<BigdataLiteral>((short)1)); doTest(lex, new XSDNumericIV<BigdataLiteral>(1)); doTest(lex, new XSDNumericIV<BigdataLiteral>(1L)); doTest(lex, new XSDNumericIV<BigdataLiteral>(1f)); doTest(lex, new XSDNumericIV<BigdataLiteral>(1d)); doTest(lex, new XSDIntegerIV<BigdataLiteral>(BigInteger.valueOf(1L))); doTest(lex, new XSDDecimalIV<BigdataLiteral>(BigDecimal.valueOf(1d))); doTest(lex, new UUIDBNodeIV<BigdataBNode>(UUID.randomUUID())); doTest(lex, new NumericBNodeIV<BigdataBNode>(1)); doTest(lex, new UUIDLiteralIV<BigdataLiteral>(UUID.randomUUID()));
fail("Expecting: " + NotMaterializedException.class); } catch (NotMaterializedException e) { assertTrue(val == iv.getValue()); assertTrue(iv != iv2); assertNotNull(val2); assertTrue(val != val2); assertTrue(val.getValueFactory() == val2.getValueFactory()); assertTrue(val.equals(val2)); assertTrue(val == iv.asValue(lex)); assertTrue(val == iv.getValue());
final AbstractTripleStore store = getStore(getProperties()); doTest(lex,uri.getIV(), uri); doTest(lex,bnd.getIV(), bnd); doTest(lex,lit.getIV(), lit); doTest(lex, new XSDBooleanIV<BigdataLiteral>(true)); doTest(lex, new XSDNumericIV<BigdataLiteral>((byte)1)); doTest(lex, new XSDNumericIV<BigdataLiteral>((short)1)); doTest(lex, new XSDNumericIV<BigdataLiteral>(1)); doTest(lex, new XSDNumericIV<BigdataLiteral>(1L)); doTest(lex, new XSDNumericIV<BigdataLiteral>(1f)); doTest(lex, new XSDNumericIV<BigdataLiteral>(1d)); doTest(lex, new XSDIntegerIV<BigdataLiteral>(BigInteger.valueOf(1L))); doTest(lex, new XSDDecimalIV<BigdataLiteral>(BigDecimal.valueOf(1d))); doTest(lex, new UUIDBNodeIV<BigdataBNode>(UUID.randomUUID())); doTest(lex, new NumericBNodeIV<BigdataBNode>(1)); doTest(lex, new UUIDLiteralIV<BigdataLiteral>(UUID.randomUUID()));
fail("Expecting: " + NotMaterializedException.class); } catch (NotMaterializedException e) { assertTrue(val == iv.getValue()); assertTrue(iv != iv2); assertNotNull(val2); assertTrue(val != val2); assertTrue(val.getValueFactory() == val2.getValueFactory()); assertTrue(val.equals(val2)); assertTrue(val == iv.asValue(lex)); assertTrue(val == iv.getValue());
/** * Variant used *except* for {@link BlobIV}s. * @param lex * @param iv */ private void doTest(final LexiconRelation lex, final IV iv) { doTest(lex,iv,null/*given*/); }
/** * Variant used *except* for {@link BlobIV}s. * @param lex * @param iv */ private void doTest(final LexiconRelation lex, final IV iv) { doTest(lex,iv,null/*given*/); }