Add Sone stub.
[Sone.git] / src / main / java / net / pterodactylus / sone / data / Sone.java
1 /*
2  * FreenetSone - Sone.java - Copyright © 2010 David Roden
3  *
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.
8  *
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.
13  *
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/>.
16  */
17
18 package net.pterodactylus.sone.data;
19
20 import freenet.keys.FreenetURI;
21
22 /**
23  * A Sone defines everything about a user: the {@link User} itself, her profile,
24  * her status updates.
25  *
26  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
27  */
28 public class Sone {
29
30         /** The URI under which the Sone is stored in Freenet. */
31         private final FreenetURI requestUri;
32
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;
36
37         /**
38          * Creates a new Sone.
39          *
40          * @param requestUri
41          *            The request URI of the Sone
42          */
43         public Sone(FreenetURI requestUri) {
44                 this(requestUri, null);
45         }
46
47         /**
48          * Creates a new Sone.
49          *
50          * @param requestUri
51          *            The request URI of the Sone
52          * @param insertUri
53          *            The insert URI of the Sone
54          */
55         public Sone(FreenetURI requestUri, FreenetURI insertUri) {
56                 this.requestUri = requestUri;
57                 this.insertUri = insertUri;
58         }
59
60         //
61         // ACCESSORS
62         //
63
64         /**
65          * Returns the request URI of this Sone.
66          *
67          * @return The request URI of this Sone
68          */
69         public FreenetURI requestUri() {
70                 return requestUri;
71         }
72
73         /**
74          * Returns the insert URI of this Sone.
75          *
76          * @return The insert URI of this Sone
77          */
78         public FreenetURI insertUri() {
79                 return insertUri;
80         }
81
82 }