public void testSimpleJSON() throws RepositoryException, IOException { final NanoSparqlObjectManager om = new NanoSparqlObjectManager(m_repo.getRepositoryForDefaultNamespace(), m_namespace); final ValueFactory vf = om.getValueFactory();
public void testSimpleJSON() throws RepositoryException, IOException { final NanoSparqlObjectManager om = new NanoSparqlObjectManager(m_repo.getRepositoryForDefaultNamespace(), m_namespace); final ValueFactory vf = om.getValueFactory();
om = new NanoSparqlObjectManager(m_repo.getRepositoryForDefaultNamespace(), m_namespace);
om = new NanoSparqlObjectManager(m_repo.getRepositoryForDefaultNamespace(), m_namespace);
serviceURL, client, executor); final IObjectManager om = new NanoSparqlObjectManager(repo.getRepositoryForDefaultNamespace(), namespace);
serviceURL, client, executor); final IObjectManager om = new NanoSparqlObjectManager(repo.getRepositoryForDefaultNamespace(), namespace);
public void testSimpleDirectData() throws Exception { final IObjectManager om = new NanoSparqlObjectManager(m_repo.getRepositoryForDefaultNamespace(), m_namespace); try {
public void testSimpleDirectData() throws Exception { final IObjectManager om = new NanoSparqlObjectManager(m_repo.getRepositoryForDefaultNamespace(), m_namespace); try {
final IObjectManager om = new NanoSparqlObjectManager(m_repo.getRepositoryForDefaultNamespace(), m_namespace); final ValueFactory vf = om.getValueFactory();
public void testSimpleCreate() throws RepositoryException, IOException { final NanoSparqlObjectManager om = new NanoSparqlObjectManager(m_repo.getRepositoryForDefaultNamespace(), m_namespace); final ValueFactory vf = om.getValueFactory(); final URI keyname = vf.createURI("attr:/test#name"); final Resource id = vf.createURI("gpo:test#1"); // om.checkValue(id); final int transCounter = om.beginNativeTransaction(); try { IGPO gpo = om.getGPO(id); gpo.setValue(keyname, vf.createLiteral("Martyn")); om.commitNativeTransaction(transCounter); } catch (Throwable t) { om.rollbackNativeTransaction(); throw new RuntimeException(t); } // clear cached data ((ObjectMgrModel) om).clearCache(); IGPO gpo = om.getGPO(id); // reads from backing journal assertTrue("Martyn".equals(gpo.getValue(keyname).stringValue())); }
public void testSimpleCreate() throws RepositoryException, IOException { final NanoSparqlObjectManager om = new NanoSparqlObjectManager(m_repo.getRepositoryForDefaultNamespace(), m_namespace); final ValueFactory vf = om.getValueFactory(); final URI keyname = vf.createURI("attr:/test#name"); final Resource id = vf.createURI("gpo:test#1"); // om.checkValue(id); final int transCounter = om.beginNativeTransaction(); try { IGPO gpo = om.getGPO(id); gpo.setValue(keyname, vf.createLiteral("Martyn")); om.commitNativeTransaction(transCounter); } catch (Throwable t) { om.rollbackNativeTransaction(); throw new RuntimeException(t); } // clear cached data ((ObjectMgrModel) om).clearCache(); IGPO gpo = om.getGPO(id); // reads from backing journal assertTrue("Martyn".equals(gpo.getValue(keyname).stringValue())); }
final IObjectManager om = new NanoSparqlObjectManager(m_repo.getRepositoryForDefaultNamespace(), m_namespace); final ValueFactory vf = om.getValueFactory();