Examples of storeProgram()


Examples of org.apache.marmotta.kiwi.reasoner.persistence.KiWiReasoningConnection.storeProgram()

        p.setName("test-001");

        KiWiReasoningConnection connection = rpersistence.getConnection();
        try {
            // should not throw an exception and the program should have a database ID afterwards
            connection.storeProgram(p);
            connection.commit();

            Assert.assertNotNull("program did not get a database ID",p.getId());

            // load the program by name and check if it is equal to the original program
View Full Code Here

Examples of org.apache.marmotta.kiwi.reasoner.persistence.KiWiReasoningConnection.storeProgram()

        p.setName("test-001");

        KiWiReasoningConnection connection = rpersistence.getConnection();
        try {
            // should not throw an exception and the program should have a database ID afterwards
            connection.storeProgram(p);
            connection.commit();

            Assert.assertNotNull("program did not get a database ID",p.getId());

View Full Code Here

Examples of org.apache.marmotta.kiwi.reasoner.persistence.KiWiReasoningConnection.storeProgram()

            List<Program> programs = new ArrayList<Program>();
            for(String name : new String[] {"test-001", "test-002", "test-003", "test-004"}) {
                KWRLProgramParserBase parser = new KWRLProgramParser(repository.getValueFactory(), this.getClass().getResourceAsStream(name+".kwrl"));
                Program p = parser.parseProgram();
                p.setName(name);
                connection.storeProgram(p);
                connection.commit();

                programs.add(p);
            }
View Full Code Here

Examples of org.apache.marmotta.kiwi.reasoner.persistence.KiWiReasoningConnection.storeProgram()

        p.setName("simple");

        KiWiReasoningConnection connection = rpersistence.getConnection();
        try {
            // should not throw an exception and the program should have a database ID afterwards
            connection.storeProgram(p);
            connection.commit();
        } finally {
            connection.close();
        }
View Full Code Here

Examples of org.apache.marmotta.kiwi.reasoner.persistence.KiWiReasoningConnection.storeProgram()

        // store program in the database
        try {
            KiWiReasoningConnection connection = persistence.getConnection();
            try {
                // should not throw an exception and the program should have a database ID afterwards
                connection.storeProgram(program);
                connection.commit();
            } finally {
                connection.close();
            }
        } catch (SQLException ex) {
View Full Code Here

Examples of org.apache.marmotta.kiwi.reasoner.persistence.KiWiReasoningConnection.storeProgram()

        p.setName("test-001");

        KiWiReasoningConnection connection = rpersistence.getConnection();
        try {
            // should not throw an exception and the program should have a database ID afterwards
            connection.storeProgram(p);
            connection.commit();
        } finally {
            connection.close();
        }
View Full Code Here

Examples of org.apache.marmotta.kiwi.reasoner.persistence.KiWiReasoningConnection.storeProgram()

        p.setName("test-001");

        KiWiReasoningConnection connection = rpersistence.getConnection();
        try {
            // should not throw an exception and the program should have a database ID afterwards
            connection.storeProgram(p);
            connection.commit();

            Assert.assertTrue("program did not get a database ID", p.getId() >= 0);

            // load the program by name and check if it is equal to the original program
View Full Code Here

Examples of org.apache.marmotta.kiwi.reasoner.persistence.KiWiReasoningConnection.storeProgram()

        p.setName("test-001");

        KiWiReasoningConnection connection = rpersistence.getConnection();
        try {
            // should not throw an exception and the program should have a database ID afterwards
            connection.storeProgram(p);
            connection.commit();

            Assert.assertTrue("program did not get a database ID", p.getId() >= 0);

View Full Code Here

Examples of org.apache.marmotta.kiwi.reasoner.persistence.KiWiReasoningConnection.storeProgram()

            List<Program> programs = new ArrayList<Program>();
            for(String name : new String[] {"test-001", "test-002", "test-003", "test-004"}) {
                KWRLProgramParserBase parser = new KWRLProgramParser(repository.getValueFactory(), this.getClass().getResourceAsStream(name+".kwrl"));
                Program p = parser.parseProgram();
                p.setName(name);
                connection.storeProgram(p);
                connection.commit();

                programs.add(p);
            }
View Full Code Here

Examples of org.apache.marmotta.kiwi.reasoner.persistence.KiWiReasoningConnection.storeProgram()

        p.setName("simple");

        KiWiReasoningConnection connection = rpersistence.getConnection();
        try {
            // should not throw an exception and the program should have a database ID afterwards
            connection.storeProgram(p);
            connection.commit();
        } finally {
            connection.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.