import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.sone.data.Sone.ShowCustomAvatars;
import net.pterodactylus.sone.data.Sone.SoneStatus;
+import net.pterodactylus.sone.database.PostProvider;
+import net.pterodactylus.sone.database.PostReplyProvider;
+import net.pterodactylus.sone.database.SoneProvider;
import net.pterodactylus.sone.data.TemporaryImage;
import net.pterodactylus.sone.fcp.FcpInterface;
import net.pterodactylus.sone.fcp.FcpInterface.FullAccessRequired;
+++ /dev/null
-/*
- * Sone - PostProvider.java - Copyright © 2011–2013 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
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.core;
-
-import java.util.Collection;
-
-import net.pterodactylus.sone.data.Post;
-
-/**
- * Interface for objects that can provide {@link Post}s by their ID.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
-public interface PostProvider {
-
- /**
- * Returns the post with the given ID.
- *
- * @param postId
- * The ID of the post to return
- * @return The post with the given ID, or {@code null}
- */
- public Post getPost(String postId);
-
- /**
- * Returns all posts that have the given Sone as recipient.
- *
- * @see Post#getRecipient()
- * @param recipientId
- * The ID of the recipient of the posts
- * @return All posts that have the given Sone as recipient
- */
- public Collection<Post> getDirectedPosts(String recipientId);
-
-}
+++ /dev/null
-/*
- * Sone - PostReplyProvider.java - Copyright © 2013 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
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.core;
-
-import java.util.List;
-
-import net.pterodactylus.sone.data.Post;
-import net.pterodactylus.sone.data.PostReply;
-
-/**
- * Interface for objects that can provide {@link PostReply}s.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
-public interface PostReplyProvider {
-
- /**
- * Returns the reply with the given ID.
- *
- * @param id
- * The ID of the reply to get
- * @return The reply, or {@code null} if there is no such reply
- */
- public PostReply getPostReply(String id);
-
- /**
- * Returns all replies for the given post, order ascending by time.
- *
- * @param post
- * The post to get all replies for
- * @return All replies for the given post
- */
- public List<PostReply> getReplies(Post post);
-
-}
+++ /dev/null
-/*
- * Sone - SoneProvider.java - Copyright © 2011–2013 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
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-package net.pterodactylus.sone.core;
-
-import net.pterodactylus.sone.data.Sone;
-
-/**
- * Interface for objects that can provide {@link Sone}s by their ID.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
- */
-public interface SoneProvider {
-
- /**
- * Returns the Sone with the given ID, if it exists.
- *
- * @param soneId
- * The ID of the Sone to return
- * @return The Sone with the given ID, or {@code null}
- */
- public Sone getSone(String soneId);
-
-}
package net.pterodactylus.sone.data.impl;
-import net.pterodactylus.sone.core.SoneProvider;
import net.pterodactylus.sone.data.PostBuilder;
import net.pterodactylus.sone.data.PostBuilderFactory;
+import net.pterodactylus.sone.database.SoneProvider;
/**
* {@link PostBuilderFactory} implementation that creates
package net.pterodactylus.sone.data.impl;
-import net.pterodactylus.sone.core.PostProvider;
-import net.pterodactylus.sone.core.SoneProvider;
import net.pterodactylus.sone.data.PostReplyBuilder;
import net.pterodactylus.sone.data.PostReplyBuilderFactory;
+import net.pterodactylus.sone.database.PostProvider;
+import net.pterodactylus.sone.database.SoneProvider;
import com.google.inject.Inject;
import java.util.UUID;
-import net.pterodactylus.sone.core.SoneProvider;
import net.pterodactylus.sone.data.Post;
import net.pterodactylus.sone.data.PostBuilder;
+import net.pterodactylus.sone.database.SoneProvider;
import org.apache.commons.lang.StringUtils;
import java.util.UUID;
-import net.pterodactylus.sone.core.SoneProvider;
import net.pterodactylus.sone.data.Post;
import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.database.SoneProvider;
/**
* A post is a short message that a user writes in his Sone to let other users
import java.util.UUID;
-import net.pterodactylus.sone.core.PostProvider;
-import net.pterodactylus.sone.core.SoneProvider;
import net.pterodactylus.sone.data.PostReply;
import net.pterodactylus.sone.data.PostReplyBuilder;
+import net.pterodactylus.sone.database.PostProvider;
+import net.pterodactylus.sone.database.SoneProvider;
import org.apache.commons.lang.StringUtils;
package net.pterodactylus.sone.data.impl;
-import net.pterodactylus.sone.core.PostProvider;
-import net.pterodactylus.sone.core.SoneProvider;
import net.pterodactylus.sone.data.Post;
import net.pterodactylus.sone.data.PostReply;
+import net.pterodactylus.sone.database.PostProvider;
+import net.pterodactylus.sone.database.SoneProvider;
/**
* Simple {@link PostReply} implementation.
package net.pterodactylus.sone.data.impl;
-import net.pterodactylus.sone.core.SoneProvider;
import net.pterodactylus.sone.data.Reply;
import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.database.SoneProvider;
/**
* Abstract base class for all replies.
--- /dev/null
+/*
+ * Sone - PostProvider.java - Copyright © 2011–2013 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.sone.database;
+
+import java.util.Collection;
+
+import net.pterodactylus.sone.data.Post;
+
+/**
+ * Interface for objects that can provide {@link Post}s by their ID.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public interface PostProvider {
+
+ /**
+ * Returns the post with the given ID.
+ *
+ * @param postId
+ * The ID of the post to return
+ * @return The post with the given ID, or {@code null}
+ */
+ public Post getPost(String postId);
+
+ /**
+ * Returns all posts that have the given Sone as recipient.
+ *
+ * @see Post#getRecipient()
+ * @param recipientId
+ * The ID of the recipient of the posts
+ * @return All posts that have the given Sone as recipient
+ */
+ public Collection<Post> getDirectedPosts(String recipientId);
+
+}
--- /dev/null
+/*
+ * Sone - PostReplyProvider.java - Copyright © 2013 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.sone.database;
+
+import java.util.List;
+
+import net.pterodactylus.sone.data.Post;
+import net.pterodactylus.sone.data.PostReply;
+
+/**
+ * Interface for objects that can provide {@link PostReply}s.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public interface PostReplyProvider {
+
+ /**
+ * Returns the reply with the given ID.
+ *
+ * @param id
+ * The ID of the reply to get
+ * @return The reply, or {@code null} if there is no such reply
+ */
+ public PostReply getPostReply(String id);
+
+ /**
+ * Returns all replies for the given post, order ascending by time.
+ *
+ * @param post
+ * The post to get all replies for
+ * @return All replies for the given post
+ */
+ public List<PostReply> getReplies(Post post);
+
+}
--- /dev/null
+/*
+ * Sone - SoneProvider.java - Copyright © 2011–2013 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package net.pterodactylus.sone.database;
+
+import net.pterodactylus.sone.data.Sone;
+
+/**
+ * Interface for objects that can provide {@link Sone}s by their ID.
+ *
+ * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+ */
+public interface SoneProvider {
+
+ /**
+ * Returns the Sone with the given ID, if it exists.
+ *
+ * @param soneId
+ * The ID of the Sone to return
+ * @return The Sone with the given ID, or {@code null}
+ */
+ public Sone getSone(String soneId);
+
+}
import net.pterodactylus.sone.core.Core;
import net.pterodactylus.sone.core.FreenetInterface;
-import net.pterodactylus.sone.core.PostProvider;
-import net.pterodactylus.sone.core.SoneProvider;
import net.pterodactylus.sone.core.WebOfTrustUpdater;
import net.pterodactylus.sone.data.PostBuilderFactory;
import net.pterodactylus.sone.data.PostReplyBuilderFactory;
import net.pterodactylus.sone.data.impl.DefaultPostBuilderFactory;
import net.pterodactylus.sone.data.impl.DefaultPostReplyBuilderFactory;
+import net.pterodactylus.sone.database.PostProvider;
+import net.pterodactylus.sone.database.SoneProvider;
import net.pterodactylus.sone.fcp.FcpInterface;
import net.pterodactylus.sone.freenet.PluginStoreConfigurationBackend;
import net.pterodactylus.sone.freenet.plugin.PluginConnector;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-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.PostProvider;
+import net.pterodactylus.sone.database.SoneProvider;
import net.pterodactylus.util.io.Closer;
import net.pterodactylus.util.logging.Logging;
import freenet.keys.FreenetURI;
import java.util.Arrays;
import junit.framework.TestCase;
-import net.pterodactylus.sone.core.SoneProvider;
import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.database.SoneProvider;
/**
* JUnit test case for {@link SoneTextParser}.