public BigdataSailGraphLoader(SailConnection cxn) { super(cxn); // Note: Needed for RDR. this.valueFactory = ((BigdataSailConnection) cxn).getBigdataSail() .getValueFactory(); }
public BigdataSailGraphLoader(SailConnection cxn) { super(cxn); // Note: Needed for RDR. this.valueFactory = ((BigdataSailConnection) cxn).getBigdataSail() .getValueFactory(); }
/** * @param astContainer * @param db * * @throws SailException */ public AST2BOpUpdateContext(final ASTContainer astContainer, final BigdataSailRepositoryConnection conn) throws SailException { super(astContainer, conn.getTripleStore()); this.conn = conn; this.sail = conn.getSailConnection().getBigdataSail(); this.f = (BigdataValueFactory) sail.getValueFactory(); }
/** * @param astContainer * @param db * * @throws SailException */ public AST2BOpUpdateContext(final ASTContainer astContainer, final BigdataSailRepositoryConnection conn) throws SailException { super(astContainer, conn.getTripleStore()); this.conn = conn; this.sail = conn.getSailConnection().getBigdataSail(); this.f = (BigdataValueFactory) sail.getValueFactory(); }
public void testNamedGraphNoGraphKeyword2 () throws Exception { final BigdataSail sail = getTheSail () ; final ValueFactory vf = sail.getValueFactory(); final RepositoryConnection cxn = getRepositoryConnection ( sail ) ; try { String ns = "http://xyz.com/test#" ; String kb = String.format ( "<%ss> <%sp> <%so> .", ns, ns, ns ) ; String qs = String.format ( "select ?s from named <%sg1> from named <%sg2> where { ?s ?p ?o .}", ns, ns ) ; Resource graphs [] = new Resource [] { vf.createURI ( String.format ( "%sg1", ns ) ), vf.createURI ( String.format ( "%sg2", ns ) ) } ; Collection<BindingSet> expected = getExpected () ; run ( sail, cxn, kb, graphs, qs, expected ) ; } finally { cxn.close(); } }
public void testNamedGraphNoGraphKeyword1 () throws Exception { final BigdataSail sail = getTheSail () ; final ValueFactory vf = sail.getValueFactory(); final RepositoryConnection cxn = getRepositoryConnection ( sail ) ; try { String ns = "http://xyz.com/test#" ; String kb = String.format ( "<%ss> <%sp> <%so> .", ns, ns, ns ) ; String qs = String.format ( "select ?s from named <%sg2> where { ?s ?p ?o .}", ns ) ; Resource graphs [] = new Resource [] { vf.createURI ( String.format ( "%sg1", ns ) ), vf.createURI ( String.format ( "%sg2", ns ) ) } ; Collection<BindingSet> expected = getExpected () ; run ( sail, cxn, kb, graphs, qs, expected ) ; } finally { cxn.close(); } }
public void testExplicitDefaultAndNamedGraphNoGraphKeyword () throws Exception { final BigdataSail sail = getTheSail () ; final ValueFactory vf = sail.getValueFactory(); final RepositoryConnection cxn = getRepositoryConnection ( sail ) ; try { String ns = "http://xyz.com/test#" ; String kb = String.format ( "<%ss> <%sp> <%so> .", ns, ns, ns ) ; String qs = String.format ( "select ?s from <%sg1> from named <%sg2> where { ?s ?p ?o .}", ns, ns ) ; Resource graphs [] = new Resource [] { vf.createURI ( String.format ( "%sg1", ns ) ), vf.createURI ( String.format ( "%sg2", ns ) ) } ; Collection<BindingSet> expected = getExpected ( createBindingSet ( new BindingImpl ( "s", new URIImpl ( String.format ( "%ss", ns ) ) ) ) ) ; run ( sail, cxn, kb, graphs, qs, expected ) ; } finally { cxn.close(); } }
public void testImplementationDefinedDefaultGraph () throws Exception { final BigdataSail sail = getTheSail () ; final ValueFactory vf = sail.getValueFactory(); final RepositoryConnection cxn = getRepositoryConnection ( sail ) ; try { final String ns = "http://xyz.com/test#" ; final String kb = String.format ( "<%ss> <%sp> <%so> .", ns, ns, ns ) ; final String qs = String.format ( "select ?p ?o where { <%ss> ?p ?o .}", ns ) ; final Resource graphs [] = new Resource [] { vf.createURI ( String.format ( "%sg1", ns ) ), vf.createURI ( String.format ( "%sg2", ns ) ) } ; final Collection<BindingSet> expected = getExpected ( createBindingSet ( new BindingImpl ( "p", new URIImpl ( String.format ( "%sp", ns ) ) ) , new BindingImpl ( "o", new URIImpl ( String.format ( "%so", ns ) ) ) ) ) ; run ( sail, cxn, kb, graphs, qs, expected ) ; } finally { cxn.close(); } }
public void testExplicitDefaultGraph () throws Exception { final BigdataSail sail = getTheSail () ; final ValueFactory vf = sail.getValueFactory(); final RepositoryConnection cxn = getRepositoryConnection ( sail ) ; try { String ns = "http://xyz.com/test#" ; String kb = String.format ( "<%ss> <%sp> <%so> .", ns, ns, ns ) ; String qs = String.format ( "select ?p ?o from <%sg1> from <%sg2> where { <%ss> ?p ?o .}", ns, ns, ns ) ; Resource graphs [] = new Resource [] { vf.createURI ( String.format ( "%sg1", ns ) ), vf.createURI ( String.format ( "%sg2", ns ) ) } ; Collection<BindingSet> expected = getExpected ( createBindingSet ( new BindingImpl ( "p", new URIImpl ( String.format ( "%sp", ns ) ) ) , new BindingImpl ( "o", new URIImpl ( String.format ( "%so", ns ) ) ) ) ) ; run ( sail, cxn, kb, graphs, qs, expected ) ; } finally { cxn.close(); } }
protected void setUp() throws Exception { // instantiate a sail and a Sesame repository m_sail = new BigdataSail(getProperties()); m_repo = new BigdataSailRepository(m_sail); m_repo.initialize(); m_vf = m_sail.getValueFactory(); // Note: This uses a mock endpoint URL. om = new ObjectManager("http://localhost" + BigdataStatics.getContextPath() + "/sparql", m_repo); }
protected void setUp() throws Exception { // instantiate a sail and a Sesame repository m_sail = new BigdataSail(getProperties()); m_repo = new BigdataSailRepository(m_sail); m_repo.initialize(); m_vf = m_sail.getValueFactory(); // Note: This uses a mock endpoint URL. om = new ObjectManager("http://localhost" + BigdataStatics.getContextPath() + "/sparql", m_repo); }
public void testNamedGraphNoGraphKeyword1 () throws Exception { final BigdataSail sail = getTheSail () ; final ValueFactory vf = sail.getValueFactory(); final RepositoryConnection cxn = getRepositoryConnection ( sail ) ; try { String ns = "http://xyz.com/test#" ; String kb = String.format ( "<%ss> <%sp> <%so> .", ns, ns, ns ) ; String qs = String.format ( "select ?s from named <%sg2> where { ?s ?p ?o .}", ns ) ; Resource graphs [] = new Resource [] { vf.createURI ( String.format ( "%sg1", ns ) ), vf.createURI ( String.format ( "%sg2", ns ) ) } ; Collection<BindingSet> expected = getExpected () ; run ( sail, cxn, kb, graphs, qs, expected ) ; } finally { cxn.close(); } }
public void testNamedGraphNoGraphKeyword2 () throws Exception { final BigdataSail sail = getTheSail () ; final ValueFactory vf = sail.getValueFactory(); final RepositoryConnection cxn = getRepositoryConnection ( sail ) ; try { String ns = "http://xyz.com/test#" ; String kb = String.format ( "<%ss> <%sp> <%so> .", ns, ns, ns ) ; String qs = String.format ( "select ?s from named <%sg1> from named <%sg2> where { ?s ?p ?o .}", ns, ns ) ; Resource graphs [] = new Resource [] { vf.createURI ( String.format ( "%sg1", ns ) ), vf.createURI ( String.format ( "%sg2", ns ) ) } ; Collection<BindingSet> expected = getExpected () ; run ( sail, cxn, kb, graphs, qs, expected ) ; } finally { cxn.close(); } }
public void testExplicitDefaultAndNamedGraphNoGraphKeyword () throws Exception { final BigdataSail sail = getTheSail () ; final ValueFactory vf = sail.getValueFactory(); final RepositoryConnection cxn = getRepositoryConnection ( sail ) ; try { String ns = "http://xyz.com/test#" ; String kb = String.format ( "<%ss> <%sp> <%so> .", ns, ns, ns ) ; String qs = String.format ( "select ?s from <%sg1> from named <%sg2> where { ?s ?p ?o .}", ns, ns ) ; Resource graphs [] = new Resource [] { vf.createURI ( String.format ( "%sg1", ns ) ), vf.createURI ( String.format ( "%sg2", ns ) ) } ; Collection<BindingSet> expected = getExpected ( createBindingSet ( new BindingImpl ( "s", new URIImpl ( String.format ( "%ss", ns ) ) ) ) ) ; run ( sail, cxn, kb, graphs, qs, expected ) ; } finally { cxn.close(); } }
final ValueFactory vf = sail.getValueFactory();
public void testImplementationDefinedDefaultGraph () throws Exception { final BigdataSail sail = getTheSail () ; final ValueFactory vf = sail.getValueFactory(); final RepositoryConnection cxn = getRepositoryConnection ( sail ) ; try { final String ns = "http://xyz.com/test#" ; final String kb = String.format ( "<%ss> <%sp> <%so> .", ns, ns, ns ) ; final String qs = String.format ( "select ?p ?o where { <%ss> ?p ?o .}", ns ) ; final Resource graphs [] = new Resource [] { vf.createURI ( String.format ( "%sg1", ns ) ), vf.createURI ( String.format ( "%sg2", ns ) ) } ; final Collection<BindingSet> expected = getExpected ( createBindingSet ( new BindingImpl ( "p", new URIImpl ( String.format ( "%sp", ns ) ) ) , new BindingImpl ( "o", new URIImpl ( String.format ( "%so", ns ) ) ) ) ) ; run ( sail, cxn, kb, graphs, qs, expected ) ; } finally { cxn.close(); } }
public void testExplicitDefaultGraph () throws Exception { final BigdataSail sail = getTheSail () ; final ValueFactory vf = sail.getValueFactory(); final RepositoryConnection cxn = getRepositoryConnection ( sail ) ; try { String ns = "http://xyz.com/test#" ; String kb = String.format ( "<%ss> <%sp> <%so> .", ns, ns, ns ) ; String qs = String.format ( "select ?p ?o from <%sg1> from <%sg2> where { <%ss> ?p ?o .}", ns, ns, ns ) ; Resource graphs [] = new Resource [] { vf.createURI ( String.format ( "%sg1", ns ) ), vf.createURI ( String.format ( "%sg2", ns ) ) } ; Collection<BindingSet> expected = getExpected ( createBindingSet ( new BindingImpl ( "p", new URIImpl ( String.format ( "%sp", ns ) ) ) , new BindingImpl ( "o", new URIImpl ( String.format ( "%so", ns ) ) ) ) ) ; run ( sail, cxn, kb, graphs, qs, expected ) ; } finally { cxn.close(); } }
final ValueFactory vf = conn.getBigdataSail().getValueFactory();
final ValueFactory vf = sail.getValueFactory();
final ValueFactory vf = conn.getBigdataSail().getValueFactory();