diff options
Diffstat (limited to 'src/net/cbaines/suma/DataManager.java')
-rw-r--r-- | src/net/cbaines/suma/DataManager.java | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/src/net/cbaines/suma/DataManager.java b/src/net/cbaines/suma/DataManager.java index b4a0e3d..fbede76 100644 --- a/src/net/cbaines/suma/DataManager.java +++ b/src/net/cbaines/suma/DataManager.java @@ -23,8 +23,6 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import java.io.PrintWriter; -import java.io.StringWriter; import java.sql.SQLException; import java.util.ArrayList; import java.util.Calendar; @@ -60,8 +58,6 @@ import org.xml.sax.XMLReader; import android.content.Context; import android.util.Log; -import com.hp.hpl.jena.rdf.model.Model; -import com.hp.hpl.jena.tdb.TDBFactory; import com.j256.ormlite.android.apptools.OpenHelperManager; import com.j256.ormlite.dao.Dao; import com.j256.ormlite.stmt.PreparedQuery; @@ -213,64 +209,6 @@ public class DataManager { } - public static void loadBuildingPhotos(Context context) { - // Direct way: Make a TDB-backed Jena model in the named directory. - String directory = "/data/data/net.cbaines.suma/databases"; - Model model = TDBFactory.createModel(directory); - - Log.i(TAG, "Created the model"); - - // write it to standard out - StringWriter sw = new StringWriter(); - model.write(new PrintWriter(sw)); - Log.v(TAG, sw.toString()); - - Log.i(TAG, "Finished the first output"); - - if (model.isEmpty()) { - - Log.i(TAG, "Model is empty"); - - // use the FileManager to find the input file - InputStream in; - try { - - String[] datasets = { "photos.rdf", "places.rdf" }; - - for (String dataset : datasets) { - - in = context.getAssets().open(dataset); - - if (in == null) { - throw new IllegalArgumentException(dataset + " not found"); - } - - // read the RDF/XML file - model.read(in, null); - - Log.i(TAG, "Finished the read of " + dataset); - - } - - // write it to standard out - sw = new StringWriter(); - model.write(new PrintWriter(sw)); - Log.i(TAG, sw.toString()); - - Log.i(TAG, "Finished the second output"); - - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - - model.close(); - - Log.i(TAG, "Closed the model"); - } - public static void loadBusData(Context context, boolean onlyUniLink) throws SQLException, IOException { DatabaseHelper helper = OpenHelperManager.getHelper(context, DatabaseHelper.class); |