- /** The logger. */
- private static final Logger logger = Logging.getLogger(Sone.class);
-
- /** The ID of this Sone. */
- private final String id;
-
- /** Whether the Sone is local. */
- private final boolean local;
-
- /** The identity of this Sone. */
- private Identity identity;
-
- /** The URI under which the Sone is stored in Freenet. */
- private volatile FreenetURI requestUri;
-
- /** The URI used to insert a new version of this Sone. */
- /* This will be null for remote Sones! */
- private volatile FreenetURI insertUri;
-
- /** The latest edition of the Sone. */
- private volatile long latestEdition;
-
- /** The time of the last inserted update. */
- private volatile long time;
-
- /** The status of this Sone. */
- private volatile SoneStatus status = SoneStatus.unknown;
-
- /** The profile of this Sone. */
- private volatile Profile profile = new Profile(this);
-
- /** The client used by the Sone. */
- private volatile Client client;
-
- /** Whether this Sone is known. */
- private volatile boolean known;
-
- /** All friend Sones. */
- private final Set<String> friendSones = new CopyOnWriteArraySet<String>();
-
- /** All posts. */
- private final Set<Post> posts = new CopyOnWriteArraySet<Post>();
-
- /** All replies. */
- private final Set<PostReply> replies = new CopyOnWriteArraySet<PostReply>();
-
- /** The IDs of all liked posts. */
- private final Set<String> likedPostIds = new CopyOnWriteArraySet<String>();
-
- /** The IDs of all liked replies. */
- private final Set<String> likedReplyIds = new CopyOnWriteArraySet<String>();
-
- /** The root album containing all albums. */
- private final Album rootAlbum = new Album().setSone(this);
-
- /** Sone-specific options. */
- private Options options = new Options();
-
- /**
- * Creates a new Sone.
- *
- * @param id
- * The ID of the Sone
- * @param local
- * {@code true} if the Sone is a local Sone, {@code false} otherwise
- */
- public Sone(String id, boolean local) {
- this.id = id;
- this.local = local;
- }
-
- //
- // ACCESSORS
- //
-
- /**
- * Returns the identity of this Sone.
- *
- * @return The identity of this Sone
- */
- public String getId() {
- return id;
- }
-