Package org.openrdf.repository.sail

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


     */
    public void load(InputStream inStream, RDFFormat forFileName) throws RDFParseException, IOException {
        try {
            final SailRepositoryConnection con = repository.getConnection();
            try {
                con.begin();

                final Resource[] ctx;
                if (context != null) {
                    ctx = new Resource[] { con.getValueFactory().createURI(context) };
                } else {
View Full Code Here


    public void loadData() throws RepositoryException, RDFParseException, IOException {
        super.loadData("data.n3", RDFFormat.N3);
        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();
      
    }
View Full Code Here

    public void testStrJoin() throws ParseException, RepositoryException {
        /* unique test, sets up it's own data */
        String[] lits = new String[] {UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString()};
       
        SailRepositoryConnection con = repository.getConnection();
        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();
View Full Code Here

    @Before
    public void setUp() {
        try {
            final SailRepositoryConnection conn = repository.getConnection();
            try {
                conn.begin();
                resource = createURI("foo", "Start");
                prop = createURI("ex", "text");
               
                conn.add(resource, prop, conn.getValueFactory().createLiteral(XML_TEXT));
               
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.