From c0ac0c2b1b4cc304e4f0428ca6ddde3473cfa78f Mon Sep 17 00:00:00 2001 From: Ben Linskey Date: Tue, 31 Dec 2013 00:38:45 -0500 Subject: Change "_ID" column name to "_id." --- bin/sqlite-jdbc-3.7.2.jar | Bin 0 -> 3201128 bytes src/com/benlinskey/grdbc/LexiconCreator.java | 2 +- src/com/benlinskey/grdbc/SyntaxCreator.java | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 bin/sqlite-jdbc-3.7.2.jar diff --git a/bin/sqlite-jdbc-3.7.2.jar b/bin/sqlite-jdbc-3.7.2.jar new file mode 100644 index 0000000..b0bec7b Binary files /dev/null and b/bin/sqlite-jdbc-3.7.2.jar differ diff --git a/src/com/benlinskey/grdbc/LexiconCreator.java b/src/com/benlinskey/grdbc/LexiconCreator.java index 6dca163..ec3a99a 100644 --- a/src/com/benlinskey/grdbc/LexiconCreator.java +++ b/src/com/benlinskey/grdbc/LexiconCreator.java @@ -106,7 +106,7 @@ public class LexiconCreator { try { String dropTable = "DROP TABLE IF EXISTS " + TABLE_NAME; String createTable = "CREATE TABLE " + TABLE_NAME + " (" + - "_ID INTEGER PRIMARY KEY, " + + "_id INTEGER PRIMARY KEY, " + "betaNoSymbols VARCHAR(100), " + "betaSymbols VARCHAR(100), " + "greekFullWord VARCHAR(100), " + diff --git a/src/com/benlinskey/grdbc/SyntaxCreator.java b/src/com/benlinskey/grdbc/SyntaxCreator.java index 172b53e..de93d77 100644 --- a/src/com/benlinskey/grdbc/SyntaxCreator.java +++ b/src/com/benlinskey/grdbc/SyntaxCreator.java @@ -109,7 +109,7 @@ public class SyntaxCreator { try { String dropTable = "DROP TABLE IF EXISTS " + TABLE_NAME; String createTable = "CREATE TABLE " + TABLE_NAME + " (" + - "_ID INTEGER PRIMARY KEY, " + + "_id INTEGER PRIMARY KEY, " + "chapter VARCHAR(100), " + "section VARCHAR(100), " + "xml TEXT)"; -- cgit v1.2.3 From 341ee65afbd5932b441f179ba45ec8808f49af72 Mon Sep 17 00:00:00 2001 From: Ben Linskey Date: Tue, 7 Jan 2014 17:40:17 -0500 Subject: Add Sources Cited to syntax database --- src/com/benlinskey/grdbc/SyntaxCreator.java | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/com/benlinskey/grdbc/SyntaxCreator.java b/src/com/benlinskey/grdbc/SyntaxCreator.java index de93d77..10637aa 100644 --- a/src/com/benlinskey/grdbc/SyntaxCreator.java +++ b/src/com/benlinskey/grdbc/SyntaxCreator.java @@ -33,8 +33,6 @@ import org.xml.sax.SAXException; /** * Reads in an XML file containing the Overview of Greek Syntax text and stores * sections of the text in an SQLite database. - *

- * Note that the Sources Cited section is omitted, as it is on Perseus. * @author Ben Linskey * */ @@ -146,6 +144,13 @@ public class SyntaxCreator { Matcher matcher = pattern.matcher(line); matcher.find(); chapter = matcher.group(1); + + if (chapter.equals("Sources Cited")) { + section = chapter; + xml.delete(0, xml.length()); + xml.append("

"); + xml.append("Sources Cited"); + } } else if (line.startsWith("") && chapter.equals("Sources Cited")) { + // Get any XML before the "" tag. + String[] split = line.split(""); + xml.append(split[0]); + + // Add closing root tag. + xml.append("
"); + + // Add data to database. + insertStatement.setString(1, chapter); + insertStatement.setString(2, section); + insertStatement.setString(3, xml.toString()); + insertStatement.addBatch(); } else { // Get next line of XML. xml.append(line); -- cgit v1.2.3 From c599f41101c6015188b5e115fea1cb772151c65b Mon Sep 17 00:00:00 2001 From: Ben Linskey Date: Sun, 12 Jan 2014 16:25:37 -0500 Subject: Update readme --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 7493e9e..973242a 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,6 @@ This program creates the SQLite database used in the [Greek Reference][] app for Android. -## Important Note - -This version of GRDBC is designed to work with a new version of Greek Reference that will be hosted on GitHub. It replaces the old version of GRDBC currently hosted on Bitbucket and is incompatible with the version of Greek Reference currently hosted on Bitbucket. - ## Dependencies - SQLite3 -- cgit v1.2.3 From e847431136d889ef9ba8d4683beee3cc4e1776f1 Mon Sep 17 00:00:00 2001 From: Ben Linskey Date: Sun, 2 Feb 2014 01:29:27 -0500 Subject: Add SQLite JDBC library. --- bin/sqlite-jdbc-3.7.2.jar | Bin 0 -> 3201128 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 bin/sqlite-jdbc-3.7.2.jar diff --git a/bin/sqlite-jdbc-3.7.2.jar b/bin/sqlite-jdbc-3.7.2.jar new file mode 100644 index 0000000..b0bec7b Binary files /dev/null and b/bin/sqlite-jdbc-3.7.2.jar differ -- cgit v1.2.3