@Override public boolean isLiteral(final byte[] id) { return id != null && id[0] != MARKER && _bNodesAndLiterals.isLiteral(id); }
@Override public boolean isLiteral(final byte[] id) { return id != null && id[0] != MARKER && _bNodesAndLiterals.isLiteral(id); }
@Override public boolean isLiteral(final byte[] id) { return id != null && id[0] != KNOWN_URI_MARKER && _decoratee.isLiteral(id); }
@Override public boolean isLiteral(final byte[] id) { return _decoratee.isLiteral(id); }
@Override public boolean isLiteral(final byte[] id) { return _decoratee.isLiteral(id); }
@Override public boolean isLiteral(final byte[] id) { return id != null && id[0] != KNOWN_URI_MARKER && _decoratee.isLiteral(id); }
Value createValue(final byte[] id, final boolean isPredicate) { if (dictionary.isBNode(id)) { return new NativeCumulusBNode(id, dictionary); } else if (dictionary.isLiteral(id)) { return new NativeCumulusLiteral(id, dictionary); } else if (dictionary.isResource(id)) { return new NativeCumulusURI(id, dictionary, isPredicate); } else { throw new IllegalArgumentException("Could not create sesame value from node ID " + Arrays.toString(id)); } } }
Value createValue(final byte[] id, final boolean isPredicate) { if (dictionary.isBNode(id)) { return new NativeCumulusBNode(id, dictionary); } else if (dictionary.isLiteral(id)) { return new NativeCumulusLiteral(id, dictionary); } else if (dictionary.isResource(id)) { return new NativeCumulusURI(id, dictionary, isPredicate); } else { throw new IllegalArgumentException("Could not create sesame value from node ID " + Arrays.toString(id)); } } }
/** * The isLiteral request must be forwarded to the decoratee. */ @Test public void isLiteral() { _cut.isLiteral(_id); verify(_decoratee).isLiteral(_id); }
/** * Tests if an identifier is a literal or not. */ @Test public void isLiteral() { final byte[] id = new byte[9]; RANDOMIZER.nextBytes(id); assertFalse(_cut.isLiteral(null)); id[0] = ThreeTieredValueDictionary.MARKER; assertFalse(_cut.isLiteral(id)); verify(_bnodesAndLiteralsDictionary, times(0)).isLiteral(id); id[0] = ThreeTieredValueDictionary.MARKER + 1; _cut.isLiteral(id); verify(_bnodesAndLiteralsDictionary).isLiteral(id); }
/** * Tests if an identifier is a literal or not. */ @Test public void isLiteral() { final byte[] id = new byte[KnownURIsDictionary.ID_LENGTH]; RANDOMIZER.nextBytes(id); assertFalse(_cut.isLiteral(null)); id[0] = KnownURIsDictionary.KNOWN_URI_MARKER; assertFalse(_cut.isLiteral(id)); id[0] = KnownURIsDictionary.KNOWN_URI_MARKER + 1; _cut.isLiteral(id); verify(_decoratee).isLiteral(id); }
deleteInOSPC(ids[2], ids); if (rangesEnabled && _dictionary.isLiteral(ids[2])) { final Literal lit = (Literal) _dictionary.getValue(ids[2], false); final URI dt = lit.getDatatype();
deleteInOSPC(ids[2], ids); if (rangesEnabled && _dictionary.isLiteral(ids[2])) { final Literal lit = (Literal) _dictionary.getValue(ids[2], false); final URI dt = lit.getDatatype();
if (rangesEnabled && _dictionary.isLiteral(ids[2])) { final Literal lit = (Literal) _dictionary.getValue(ids[2], false); final URI dt = lit.getDatatype();
if (rangesEnabled && _dictionary.isLiteral(ids[2])) { final Literal lit = (Literal) _dictionary.getValue(ids[2], false); final URI dt = lit.getDatatype();