Search in sources :

Example 21 with BookmarkInfo

use of org.loboevolution.info.BookmarkInfo in project LoboEvolution by LoboEvolution.

the class MozilaFirefoxData method getHostEntries.

private static List<BookmarkInfo> getHostEntries(String path) {
    final List<BookmarkInfo> hostEntries = new ArrayList<>();
    try (Connection conn = DriverManager.getConnection(DatabseSQLite.JDBC_SQLITE + path);
        PreparedStatement pstmt = conn.prepareStatement(MOZ_HISTORY);
        ResultSet rs = pstmt.executeQuery()) {
        while (rs != null && rs.next()) {
            BookmarkInfo info = new BookmarkInfo();
            info.setUrl(rs.getString(1));
            info.setTitle(rs.getString(2));
            hostEntries.add(info);
        }
    } catch (final Exception e) {
        logger.log(Level.SEVERE, e.getMessage(), e);
    }
    return hostEntries;
}
Also used : BookmarkInfo(org.loboevolution.info.BookmarkInfo) ArrayList(java.util.ArrayList) Connection(java.sql.Connection) ResultSet(java.sql.ResultSet) PreparedStatement(java.sql.PreparedStatement)

Aggregations

BookmarkInfo (org.loboevolution.info.BookmarkInfo)21 ArrayList (java.util.ArrayList)8 NavigationStore (org.loboevolution.store.NavigationStore)7 HTMLDocumentImpl (org.loboevolution.html.dom.domimpl.HTMLDocumentImpl)6 HtmlPanel (org.loboevolution.html.gui.HtmlPanel)6 Connection (java.sql.Connection)5 PreparedStatement (java.sql.PreparedStatement)5 ResultSet (java.sql.ResultSet)5 ITabbedPane (org.loboevolution.component.ITabbedPane)4 BookmarksStore (org.loboevolution.store.BookmarksStore)4 LoboButton (com.jtattoo.plaf.lobo.LoboButton)3 LoboPanel (com.jtattoo.plaf.lobo.LoboPanel)3 LoboTextField (com.jtattoo.plaf.lobo.LoboTextField)3 Dimension (java.awt.Dimension)3 Font (java.awt.Font)3 BrowserPanel (org.loboevolution.component.BrowserPanel)2 IBrowserFrame (org.loboevolution.component.IBrowserFrame)2 IBrowserPanel (org.loboevolution.component.IBrowserPanel)2 IToolBar (org.loboevolution.component.IToolBar)2 LoboSeparator (com.jtattoo.plaf.lobo.LoboSeparator)1