2 * FreenetSone - Sone.java - Copyright © 2010 David Roden
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 package net.pterodactylus.sone.data;
20 import freenet.keys.FreenetURI;
23 * A Sone defines everything about a user: the {@link User} itself, her profile,
26 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
30 /** The URI under which the Sone is stored in Freenet. */
31 private final FreenetURI requestUri;
33 /** The URI used to insert a new version of this Sone. */
34 /* This will be null for remote Sones! */
35 private final FreenetURI insertUri;
41 * The request URI of the Sone
43 public Sone(FreenetURI requestUri) {
44 this(requestUri, null);
51 * The request URI of the Sone
53 * The insert URI of the Sone
55 public Sone(FreenetURI requestUri, FreenetURI insertUri) {
56 this.requestUri = requestUri;
57 this.insertUri = insertUri;
65 * Returns the request URI of this Sone.
67 * @return The request URI of this Sone
69 public FreenetURI requestUri() {
74 * Returns the insert URI of this Sone.
76 * @return The insert URI of this Sone
78 public FreenetURI insertUri() {