X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.java;h=1b76588502033fc45ca88cc57ad98873cbd9b24c;hb=fdffe49b10613e1d9caacdf62ab99bca06edf3e1;hp=166591f16be52ba5ff48dccac99703c7bbef4d8a;hpb=1deeb8285b1347baa98994b10322b548fd71a449;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 166591f..1b76588 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -27,13 +27,17 @@ import java.util.Comparator; import java.util.List; import java.util.Set; -import net.pterodactylus.sone.core.Options; +import javax.annotation.Nonnegative; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + import net.pterodactylus.sone.freenet.wot.Identity; import net.pterodactylus.sone.freenet.wot.OwnIdentity; import net.pterodactylus.sone.template.SoneAccessor; import freenet.keys.FreenetURI; +import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.primitives.Ints; @@ -167,6 +171,17 @@ public interface Sone extends Identified, Fingerprintable, Comparable { } }; + public static final Function toSoneXmlUri = + new Function() { + @Nonnull + @Override + public String apply(@Nullable Sone input) { + return input.getRequestUri() + .setMetaString(new String[] { "sone.xml" }) + .toString(); + } + }; + /** * Returns the identity of this Sone. * @@ -535,7 +550,7 @@ public interface Sone extends Identified, Fingerprintable, Comparable { * * @return The options of this Sone */ - Options getOptions(); + SoneOptions getOptions(); /** * Sets the options of this Sone. @@ -544,6 +559,6 @@ public interface Sone extends Identified, Fingerprintable, Comparable { * The options of this Sone */ /* TODO - remove this method again, maybe add an option provider */ - void setOptions(Options options); + void setOptions(SoneOptions options); }