@Override final public IV o() { return o.getIV(); }
@SuppressWarnings("rawtypes") final public IV get(final Value value) { if (val2iv == null) throw new IllegalStateException(); if (value == null) throw new IllegalArgumentException(); final BigdataValue tmp = val2iv.get(value); if (tmp == null) return null; return tmp.getIV(); }
@SuppressWarnings("rawtypes") final public IV get(final Value value) { if (val2iv == null) throw new IllegalStateException(); if (value == null) throw new IllegalArgumentException(); final BigdataValue tmp = val2iv.get(value); if (tmp == null) return null; return tmp.getIV(); }
private IV<?,?> getIV(final Value u) { if (u == null) return null; if (u instanceof IV) return (IV<?, ?>) u; if (u instanceof BigdataValue) { final IV<?,?> iv = ((BigdataValue) u).getIV(); if(iv == null) throw new NotMaterializedException(u.toString()); return iv; } throw new RuntimeException("No IV: " + u); }
private IV<?,?> getIV(final Value u) { if (u == null) return null; if (u instanceof IV) return (IV<?, ?>) u; if (u instanceof BigdataValue) { final IV<?,?> iv = ((BigdataValue) u).getIV(); if(iv == null) throw new NotMaterializedException(u.toString()); return iv; } throw new RuntimeException("No IV: " + u); }
private void updateCache() { for (Map.Entry<BigdataValue, Graph> e : graphs.entrySet()) { final BigdataValue describedResource = e.getKey(); final IV<?, ?> iv = describedResource.getIV(); if (iv == null) throw new AssertionError("IV not set: " + describedResource); final Graph graph = e.getValue(); cache.insert(iv, graph); if (log.isInfoEnabled()) log.info("DESCRIBE UPDARTE: describedResource=" + describedResource + ", graph=" + graph); } }
private void updateCache() { for (Map.Entry<BigdataValue, Graph> e : graphs.entrySet()) { final BigdataValue describedResource = e.getKey(); final IV<?, ?> iv = describedResource.getIV(); if (iv == null) throw new AssertionError("IV not set: " + describedResource); final Graph graph = e.getValue(); cache.insert(iv, graph); if (log.isInfoEnabled()) log.info("DESCRIBE UPDARTE: describedResource=" + describedResource + ", graph=" + graph); } }
private void printBindingSet(StringBuilder message, BindingSet bs) { // message.append(bs); for (String bn: bs.getBindingNames()) { Value v = bs.getBinding(bn).getValue(); message.append(bn).append('=').append(v); if (v instanceof BigdataValue) { message.append(' ').append(((BigdataValue)v).getIV()).append(' '); } } }
/** * Return a constant for a pre-defined vocabulary item. * * @throws VisitorException */ protected ConstantNode createConstVar(final Value value) throws VisitorException { final BigdataValue v = vocab.get(value); if (v == null) throw new VisitorException("Undefined vocabulary: " + value); return new ConstantNode(v.getIV()); }
/** * Return a constant for a pre-defined vocabulary item. * * @throws VisitorException */ protected ConstantNode createConstVar(final Value value) throws VisitorException { final BigdataValue v = vocab.get(value); if (v == null) throw new VisitorException("Undefined vocabulary: " + value); return new ConstantNode(v.getIV()); }
/** * Construct a triple from {@link BigdataValue}s and the specified statement * type. * * @param s * @param p * @param o * @param type */ public SPO(final BigdataResource s, final BigdataURI p, final BigdataValue o, final StatementEnum type) { this(s.getIV(), p.getIV(), o.getIV(), type); }
/** * Construct a triple from {@link BigdataValue}s and the specified statement * type. * * @param s * @param p * @param o * @param type */ public SPO(final BigdataResource s, final BigdataURI p, final BigdataValue o, final StatementEnum type) { this(s.getIV(), p.getIV(), o.getIV(), type); }
final public boolean equals(final URI o) { if (this == o) return true; if (o == null) return false; if ((o instanceof BigdataValue) // && isRealIV() && ((BigdataValue)o).isRealIV() && ((BigdataValue) o).getValueFactory() == getValueFactory()) { final boolean equals = getIV().equals(((BigdataValue) o).getIV()); return equals; } return uriString.equals(o.stringValue()); }
public IV addTerm(final Value value) { final BigdataValue[] terms = new BigdataValue[] {// getValueFactory().asValue(value) // }; getLexiconRelation().addTerms(terms, 1, false/* readOnly */); return terms[0].getIV(); }
private void printBindingSet(StringBuilder message, BindingSet bs) { // message.append(bs); for (String bn: bs.getBindingNames()) { Value v = bs.getBinding(bn).getValue(); message.append(bn).append('=').append(v); if (v instanceof BigdataValue) { message.append(' ').append(((BigdataValue)v).getIV()).append(' '); } } }
public IV addTerm(final Value value) { final BigdataValue[] terms = new BigdataValue[] {// getValueFactory().asValue(value) // }; getLexiconRelation().addTerms(terms, 1, false/* readOnly */); return terms[0].getIV(); }