X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Ftodesbaum%2Futil%2Ffreenet%2Ffcp2%2Fwot%2FDefaultOwnIdentity.java;fp=src%2Fmain%2Fjava%2Fde%2Ftodesbaum%2Futil%2Ffreenet%2Ffcp2%2Fwot%2FDefaultOwnIdentity.java;h=058116effd68c796a4b86b22e86a171ebc4f1459;hb=38bdc433e50669e8244a63b5af59e597f88f1d29;hp=0000000000000000000000000000000000000000;hpb=f14b9fbe6d88e23920b10a75ebeba4d38390301b;p=jSite.git
diff --git a/src/main/java/de/todesbaum/util/freenet/fcp2/wot/DefaultOwnIdentity.java b/src/main/java/de/todesbaum/util/freenet/fcp2/wot/DefaultOwnIdentity.java
new file mode 100644
index 0000000..058116e
--- /dev/null
+++ b/src/main/java/de/todesbaum/util/freenet/fcp2/wot/DefaultOwnIdentity.java
@@ -0,0 +1,73 @@
+/*
+ * Sone - DefaultOwnIdentity.java - Copyright © 2010â2012 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 .
+ */
+
+package de.todesbaum.util.freenet.fcp2.wot;
+
+/**
+ * An own identity is an identity that the owner of the node has full control
+ * over.
+ *
+ * @author David âBombeâ Roden
+ */
+public class DefaultOwnIdentity extends DefaultIdentity implements OwnIdentity {
+
+ /** The insert URI of the identity. */
+ private final String insertUri;
+
+ /**
+ * Creates a new own identity.
+ *
+ * @param id
+ * The ID of the identity
+ * @param nickname
+ * The nickname of the identity
+ * @param requestUri
+ * The request URI of the identity
+ * @param insertUri
+ * The insert URI of the identity
+ */
+ public DefaultOwnIdentity(String id, String nickname, String requestUri, String insertUri) {
+ super(id, nickname, requestUri);
+ this.insertUri = insertUri;
+ }
+
+ /**
+ * Copy constructor for an own identity.
+ *
+ * @param ownIdentity
+ * The own identity to copy
+ */
+ public DefaultOwnIdentity(OwnIdentity ownIdentity) {
+ super(ownIdentity.getId(), ownIdentity.getNickname(), ownIdentity.getRequestUri());
+ this.insertUri = ownIdentity.getInsertUri();
+ setContexts(ownIdentity.getContexts());
+ setProperties(ownIdentity.getProperties());
+ }
+
+ //
+ // ACCESSORS
+ //
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getInsertUri() {
+ return insertUri;
+ }
+
+}