Examples of listPrograms()


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

            Assert.assertEquals(4, result.getInt("count"));
            result.close();
            connection.commit();

            // list programs should return the same number and equal programs
            List<Program> dbPrograms1 = asList(connection.listPrograms());
            Assert.assertEquals(4, dbPrograms1.size());
            Assert.assertEquals("list of original programs differs from list of database",programs,dbPrograms1);

            // delete all programs and check if the database does not contain any remaining entries in the different tables
            for(Program p : programs) {
View Full Code Here

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

            // delete all programs and check if the database does not contain any remaining entries in the different tables
            for(Program p : programs) {
                connection.deleteProgram(p);
                connection.commit();
            }
            List<Program> dbPrograms2 = asList(connection.listPrograms());
            Assert.assertEquals(0, dbPrograms2.size());

            PreparedStatement listPrograms = connection.getJDBCConnection().prepareStatement("SELECT count(*) AS count FROM reasoner_programs");
            ResultSet resultListPrograms = listPrograms.executeQuery();

View Full Code Here

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

        patternRuleMap = HashMultimap.<Pattern,Rule>create();

        try {
            KiWiReasoningConnection connection = persistence.getConnection();
            try {
                programs       = Iterations.asList(connection.listPrograms());

                for(Program p : programs) {
                    for(Rule rule : p.getRules()) {
                        for(Pattern pattern : rule.getBody()) {
                            patternRuleMap.put(pattern,rule);
View Full Code Here

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

     */
    public CloseableIteration<Program,SailException> listPrograms() throws SailException {
        try {
            final KiWiReasoningConnection connection = persistence.getConnection();

            return new ExceptionConvertingIteration<Program, SailException>(connection.listPrograms()) {
                /**
                 * Converts an exception from the underlying iteration to an exception of
                 * type <tt>X</tt>.
                 */
                @Override
View Full Code Here

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

            Assert.assertEquals(4, result.getInt("count"));
            result.close();
            connection.commit();

            // list programs should return the same number and equal programs
            List<Program> dbPrograms1 = asList(connection.listPrograms());
            Assert.assertEquals(4, dbPrograms1.size());
            Assert.assertEquals("list of original programs differs from list of database",programs,dbPrograms1);

            // delete all programs and check if the database does not contain any remaining entries in the different tables
            for(Program p : programs) {
View Full Code Here

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

            // delete all programs and check if the database does not contain any remaining entries in the different tables
            for(Program p : programs) {
                connection.deleteProgram(p);
                connection.commit();
            }
            List<Program> dbPrograms2 = asList(connection.listPrograms());
            Assert.assertEquals(0, dbPrograms2.size());

            PreparedStatement listPrograms = connection.getJDBCConnection().prepareStatement("SELECT count(*) AS count FROM reasoner_programs");
            ResultSet resultListPrograms = listPrograms.executeQuery();

View Full Code Here

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

     */
    public CloseableIteration<Program,SailException> listPrograms() throws SailException {
        try {
            final KiWiReasoningConnection connection = persistence.getConnection();

            return new ExceptionConvertingIteration<Program, SailException>(connection.listPrograms()) {
                /**
                 * Converts an exception from the underlying iteration to an exception of
                 * type <tt>X</tt>.
                 */
                @Override
View Full Code Here

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

        patternRuleMap = HashMultimap.<Pattern,Rule>create();

        try {
            KiWiReasoningConnection connection = persistence.getConnection();
            try {
                programs       = Iterations.asList(connection.listPrograms());

                for(Program p : programs) {
                    for(Rule rule : p.getRules()) {
                        for(Pattern pattern : rule.getBody()) {
                            patternRuleMap.put(pattern,rule);
View Full Code Here

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

            Assert.assertEquals(4, result.getInt("count"));
            result.close();
            connection.commit();

            // list programs should return the same number and equal programs
            List<Program> dbPrograms1 = asList(connection.listPrograms());
            Assert.assertEquals(4, dbPrograms1.size());
            Assert.assertEquals("list of original programs differs from list of database",programs,dbPrograms1);

            // delete all programs and check if the database does not contain any remaining entries in the different tables
            for(Program p : programs) {
View Full Code Here

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

            // delete all programs and check if the database does not contain any remaining entries in the different tables
            for(Program p : programs) {
                connection.deleteProgram(p);
                connection.commit();
            }
            List<Program> dbPrograms2 = asList(connection.listPrograms());
            Assert.assertEquals(0, dbPrograms2.size());

            PreparedStatement listPrograms = connection.getJDBCConnection().prepareStatement("SELECT count(*) AS count FROM reasoner_programs");
            ResultSet resultListPrograms = listPrograms.executeQuery();

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.