Package net.yacy.document.content.dao

Examples of net.yacy.document.content.dao.Dao


            sb.setConfig("content.phpbb3.ppf", ppf);
            sb.setConfig("content.phpbb3.dumpfile", dumpfile);
           
            if (post.containsKey("check")) {
                try {
                    Dao db = new PhpBB3Dao(
                                            urlstub,
                                            dbtype,
                                            dbhost,
                                            dbport,
                                            dbname,
                                            prefix,
                                            dbuser,
                                            dbpw
                                            );
                    prop.put("check", 1);
                    prop.put("check_posts", db.size());
                    prop.putHTML("check_first", db.first().toString());
                    prop.putHTML("check_last", db.latest().toString());
                    db.close();
                } catch (Exception e) {
                    Log.logException(e);
                    prop.put("check", 2);
                    prop.put("check_error", e.getMessage());
                }
            }
           
            if (post.containsKey("export")) {
                try {
                    Dao db = new PhpBB3Dao(
                                            urlstub,
                                            dbtype,
                                            dbhost,
                                            dbport,
                                            dbname,
                                            prefix,
                                            dbuser,
                                            dbpw
                                            );
                   
                    int files = db.writeSurrogates(db.query(0, -1, 100), sb.surrogatesInPath, "fullexport-" + GenericFormatter.SHORT_SECOND_FORMATTER.format(), ppf);
                    prop.put("export", 1);
                    prop.put("export_files", files);
                    db.close();
                } catch (Exception e) {
                    Log.logException(e);
                    prop.put("export", 2);
                    prop.put("export_error", e.getMessage());
                }
View Full Code Here


            sb.setConfig("content.phpbb3.ppf", ppf);
            sb.setConfig("content.phpbb3.dumpfile", dumpfile);
           
            if (post.containsKey("check")) {
                try {
                    Dao db = new PhpBB3Dao(
                                            urlstub,
                                            dbtype,
                                            dbhost,
                                            dbport,
                                            dbname,
                                            prefix,
                                            dbuser,
                                            dbpw
                                            );
                    prop.put("check", 1);
                    prop.put("check_posts", db.size());
                    prop.putHTML("check_first", db.first().toString());
                    prop.putHTML("check_last", db.latest().toString());
                    db.close();
                } catch (Exception e) {
                    Log.logException(e);
                    prop.put("check", 2);
                    prop.put("check_error", e.getMessage());
                }
            }
           
            if (post.containsKey("export")) {
                try {
                    Dao db = new PhpBB3Dao(
                                            urlstub,
                                            dbtype,
                                            dbhost,
                                            dbport,
                                            dbname,
                                            prefix,
                                            dbuser,
                                            dbpw
                                            );
                   
                    int files = db.writeSurrogates(db.query(0, -1, 100), sb.surrogatesInPath, "fullexport-" + GenericFormatter.SHORT_SECOND_FORMATTER.format(), ppf);
                    prop.put("export", 1);
                    prop.put("export_files", files);
                    db.close();
                } catch (Exception e) {
                    Log.logException(e);
                    prop.put("export", 2);
                    prop.put("export_error", e.getMessage());
                }
View Full Code Here

TOP

Related Classes of net.yacy.document.content.dao.Dao

Copyright © 2018 www.massapicom. 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.