@Override public BigdataResource asValue(Resource v) { return valueFactory.asValue(v); }
@Override public Void visit(final ASTFalse node, final Object data) throws VisitorException { nodes.put(node, valueFactory.createLiteral(false)); return null; }
@Override public BigdataStatement createStatement(Resource s, URI p, Value o, Resource c) { return valueFactory.createStatement(s, p, o, c); }
assertEquals(store.getAxioms().getNamespace(), f.getNamespace()); final BigdataURI rdfType = f.asValue(RDF.TYPE); final BigdataURI rdfProperty = f.asValue(RDF.PROPERTY); final BigdataURI unknownURI = f.createURI("http://www.bigdata.com/unknown");
@Override public Void visit(final ASTIRI node, final Object data) throws VisitorException { try { nodes.put(node, valueFactory.createURI(node.getValue())); return null; } catch (final IllegalArgumentException e) { // invalid URI throw new VisitorException(e.getMessage()); } }
final public IV get(final IBindingSet bs) { final BigdataValueFactory vf = super.getValueFactory(); final UUID uuid = UUID.randomUUID(); if (str()) { final BigdataLiteral l = vf.createLiteral(uuid.toString()); return DummyConstantNode.toDummyIV(l); } else { final BigdataURI uri = vf.createURI("urn:uuid:" + uuid.toString()); return DummyConstantNode.toDummyIV(uri); } }
@Override public BigdataBNode createBNode(String id) { return valueFactory.createBNode(id); }
final BigdataLiteral plain_text = vf.createLiteral("plain text"); final IV _0 = DummyConstantNode.toDummyIV(vf.createLiteral(0)); final IV _1 = DummyConstantNode.toDummyIV(vf.createLiteral(1)); final IV _3 = DummyConstantNode.toDummyIV(vf.createLiteral(3)); final IV _9999 = DummyConstantNode.toDummyIV(vf.createLiteral(9999)); .createLiteral("pla")); new Constant<IV>(_1), // new Constant<IV>(_3),// new GlobalAnnotations(vf.getNamespace(), ITx.READ_COMMITTED)// ).get(emptyBindingSet); .createLiteral("plain text")); new Constant<IV>(_1), // new Constant<IV>(_9999),// new GlobalAnnotations(vf.getNamespace(), ITx.READ_COMMITTED)// ).get(emptyBindingSet); .createLiteral("pla")); new Constant<IV>(_0), // new Constant<IV>(_3),// new GlobalAnnotations(vf.getNamespace(), ITx.READ_COMMITTED)// ).get(emptyBindingSet);
/** * Returns the bnode representation of this IV, useful for serialization * formats such as RDF/XML. See {@link #bnodeId()}. */ @SuppressWarnings("unchecked") @Override public V asValue(final LexiconRelation lex) { if (bnode == null) { bnode = (V) lex.getValueFactory().createBNode(getID()); bnode.setIV(this); bnode.setStatementIdentifier(true); final BigdataResource c = spo.c() != null ? (BigdataResource) spo.c().asValue(lex) : null; bnode.setStatement(lex.getValueFactory().createStatement( (BigdataResource) spo.s().asValue(lex), (BigdataURI) spo.p().asValue(lex), (BigdataValue) spo.o().asValue(lex), c)); } return bnode; }
public GPO(final IObjectManager om, final BNode id, final Statement stmt) { if (om == null) throw new IllegalArgumentException(); if (id == null) throw new IllegalArgumentException(); m_om = (ObjectMgrModel) om; m_id = om.getValueFactory().asValue(id); final BigdataStatement stmt2 = om.getValueFactory().createStatement( ((ObjectMgrModel)om).bestEffortIntern(stmt.getSubject()),// ((ObjectMgrModel)om).internKey(stmt.getPredicate()), // ((ObjectMgrModel)om).bestEffortIntern(stmt.getObject()) // ); this.m_stmt = stmt2; }
protected void tearDown() throws Exception { if(f != null) { f.remove(); f = null; } namespace = null; super.tearDown(); }
@Override public BigdataValueSerializer<BigdataValue> getValueSerializer() { return valueFactory.getValueSerializer(); }
final public String getNamespace() { return valueFactory.getNamespace(); }
assertEquals(store.getAxioms().getNamespace(), f.getNamespace()); final BigdataURI rdfType = f.asValue(RDF.TYPE); final BigdataURI rdfProperty = f.asValue(RDF.PROPERTY); final BigdataURI unknownURI = f.createURI("http://www.bigdata.com/unknown");
/** * 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 BigdataBNode createBNode(BigdataStatement stmt) { return valueFactory.createBNode(stmt); }
final BigdataLiteral plain_text = vf.createLiteral("plain text"); final IV _0 = DummyConstantNode.toDummyIV(vf.createLiteral(0)); final IV _1 = DummyConstantNode.toDummyIV(vf.createLiteral(1)); final IV _3 = DummyConstantNode.toDummyIV(vf.createLiteral(3)); final IV _9999 = DummyConstantNode.toDummyIV(vf.createLiteral(9999)); .createLiteral("pla")); new Constant<IV>(_1), // new Constant<IV>(_3),// new GlobalAnnotations(vf.getNamespace(), ITx.READ_COMMITTED)// ).get(emptyBindingSet); .createLiteral("plain text")); new Constant<IV>(_1), // new Constant<IV>(_9999),// new GlobalAnnotations(vf.getNamespace(), ITx.READ_COMMITTED)// ).get(emptyBindingSet); .createLiteral("pla")); new Constant<IV>(_0), // new Constant<IV>(_3),// new GlobalAnnotations(vf.getNamespace(), ITx.READ_COMMITTED)// ).get(emptyBindingSet);
/** * Returns the bnode representation of this IV, useful for serialization * formats such as RDF/XML. See {@link #bnodeId()}. */ @SuppressWarnings("unchecked") @Override public V asValue(final LexiconRelation lex) { if (bnode == null) { bnode = (V) lex.getValueFactory().createBNode(getID()); bnode.setIV(this); bnode.setStatementIdentifier(true); final BigdataResource c = spo.c() != null ? (BigdataResource) spo.c().asValue(lex) : null; bnode.setStatement(lex.getValueFactory().createStatement( (BigdataResource) spo.s().asValue(lex), (BigdataURI) spo.p().asValue(lex), (BigdataValue) spo.o().asValue(lex), c)); } return bnode; }
protected void tearDown() throws Exception { if (valueFactory != null) { valueFactory.remove(); valueFactory = null; } super.tearDown(); }
@Override public BigdataValueSerializer<BigdataValue> getValueSerializer() { return valueFactory.getValueSerializer(); }