Add site container.
[arachne.git] / src / net / pterodactylus / arachne / core / Site.java
1 /*
2  * © 2009 David ‘Bombe’ Roden
3  */
4 package net.pterodactylus.arachne.core;
5
6 /**
7  * Container for a freenet site. A freenet site consists of the routing and
8  * decryption keys and the basename, without the edition.
9  *
10  * @author David ‘Bombe’ Roden <bombe@pterodactylus.net>
11  */
12 public class Site {
13
14         /** The key of the site. */
15         private final String key;
16
17         /** The basename of the site. */
18         private final String basename;
19
20         /**
21          * Creates a new site with the given key and basename.
22          *
23          * @param key
24          *            The key of the site
25          * @param basename
26          *            The basename of the site
27          */
28         public Site(String key, String basename) {
29                 this.key = key;
30                 this.basename = basename;
31         }
32
33         /**
34          * The routing and decryption keys of the site.
35          *
36          * @return The site’s routing and decryption keys
37          */
38         public String getKey() {
39                 return key;
40         }
41
42         /**
43          * Returns the basename of the site, without the edition number.
44          *
45          * @return The site’s basename
46          */
47         public String getBasename() {
48                 return basename;
49         }
50
51 }