Package org.openrdf.repository.sail

Examples of org.openrdf.repository.sail.SailRepositoryConnection.commit()


                    ctx = new Resource[] {};
                }

                con.add(inStream, baseUri, forFileName, ctx);

                con.commit();
            } finally {
                if (con.isActive()) {
                    con.rollback();
                }
                con.close();
View Full Code Here


        try {
            final ValueFactory vf = con.getValueFactory();

            con.add(vf.createStatement(subject, predicate, vf.createLiteral(text)));

            con.commit();
        } finally {
            con.close();
        }
    }
View Full Code Here

        resource = repository.getValueFactory().createURI(NSS.get("ex") + "Simple");
        prop2 = createURI("foo", "simple");
        final SailRepositoryConnection con = repository.getConnection();
        con.begin();
        con.add(resource, prop2, con.getValueFactory().createLiteral("Und sein Name war <strong>&quot;K&ouml;nig Ruprecht&quot;</stron>"));
        con.commit();
        con.close();
      
    }

    @Test
View Full Code Here

        try {
            final ValueFactory vf = con.getValueFactory();

            con.add(vf.createStatement(subject, predicate, vf.createLiteral(text)));

            con.commit();
        } finally {
            con.close();
        }
    }
View Full Code Here

        final SailRepositoryConnection con = repository.getConnection();
        try {

            con.add(data, baseURI, format);

            con.commit();
        } finally {
            con.close();
        }
    }
View Full Code Here

        try {
            final ValueFactory vf = con.getValueFactory();

            con.add(vf.createStatement(subject, predicate, vf.createLiteral(text)));

            con.commit();
        } finally {
            con.close();
        }
    }
View Full Code Here

        con.begin();
        con.remove(subject, predicate, null);
        for (int i = 0; i < lits.length; i++) {
            con.add(con.getValueFactory().createStatement(subject, predicate, con.getValueFactory().createLiteral(lits[i])));
        }
        con.commit();
        con.close();
       
        String[] seps = {"###", ", "};
        String[] pres = {"", ":start:"};
        String[] sufs = {"", ":eol:"};
View Full Code Here

                con.add(vF.createStatement(subject, lProp, vF.createLiteral(lData[i])));
                con.add(vF.createStatement(subject, fProp, vF.createLiteral(fData[i])));
                con.add(vF.createStatement(subject, dProp, vF.createLiteral(dData[i])));
            }

            con.commit();
        } finally {
            con.close();
        }
    }
View Full Code Here

            for (int i = 0; i < 20; i++) {
                Date d = new Date(first.getTime() + rnd.nextInt(delta) * 1000l);
                con.add(vF.createStatement(uri, prop, vF.createLiteral(DateUtils.getXMLCalendar(d))));
            }

            con.commit();
        } finally {
            con.close();
        }
    }

View Full Code Here

                resource = createURI("foo", "Start");
                prop = createURI("ex", "text");
               
                conn.add(resource, prop, conn.getValueFactory().createLiteral(XML_TEXT));
               
                conn.commit();
            } catch (final Throwable t) {
                conn.rollback();
                fail(t.getMessage());
            } finally {
                conn.close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.