Turn Sone into an interface, add in-memory implementation of Sone.
[Sone.git] / src / main / java / net / pterodactylus / sone / text / SoneTextParser.java
index 3362132..558edb0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - FreenetLinkParser.java - Copyright © 2010 David Roden
+ * Sone - FreenetLinkParser.java - Copyright © 2010–2012 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -30,6 +30,7 @@ import net.pterodactylus.sone.core.PostProvider;
 import net.pterodactylus.sone.core.SoneProvider;
 import net.pterodactylus.sone.data.Post;
 import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.database.memory.MemorySone;
 import net.pterodactylus.util.logging.Logging;
 import freenet.keys.FreenetURI;
 
@@ -207,7 +208,7 @@ public class SoneTextParser implements Parser<SoneTextParserContext> {
                                                         * don’t use create=true above, we don’t want the
                                                         * empty shell.
                                                         */
-                                                       sone = new Sone(soneId);
+                                                       sone = new MemorySone(soneId, false);
                                                }
                                                parts.add(new SonePart(sone));
                                                line = line.substring(50);