@@ -0,0 +1,2228 @@
+package com.alwaysallthetime.adnlibutils;%0A%0Aimport com.alwaysallthetime.adnlib.Annotations;%0Aimport com.alwaysallthetime.adnlib.data.Annotation;%0Aimport com.alwaysallthetime.adnlib.data.File;%0A%0Aimport java.util.HashMap;%0A%0Apublic class AnnotationFactory %7B%0A    public static Annotation getCheckinAnnotation(String factualId) %7B%0A        HashMap%3CString, Object%3E value = new HashMap%3CString, Object%3E(1);%0A        HashMap%3CString, String%3E replacement = new HashMap%3CString, String%3E(1);%0A        replacement.put(%22factual_id%22, factualId);%0A        value.put(Annotations.REPLACEMENT_PLACE, replacement);%0A        Annotation a = new Annotation(Annotations.CHECKIN);%0A        a.setValue(value);%0A        return a;%0A    %7D%0A%0A    public static Annotation getGeolocationAnnotation(double latitude, double longitude, float altitude) %7B%0A        HashMap%3CString, Object%3E value = new HashMap%3CString, Object%3E(2);%0A        value.put(%22latitude%22, String.valueOf(latitude));%0A        value.put(%22longitude%22, String.valueOf(longitude));%0A        if(altitude != 0) %7B%0A            value.put(%22altitude%22, String.valueOf(altitude));%0A        %7D%0A        Annotation a = new Annotation(Annotations.GEOLOCATION);%0A        a.setValue(value);%0A        return a;%0A    %7D%0A%0A    public static Annotation getOEmbedAnnotation(File file) %7B%0A        HashMap%3CString, Object%3E value = new HashMap%3CString, Object%3E(1);%0A        HashMap%3CString, String%3E replacement = new HashMap%3CString, String%3E(1);%0A        replacement.put(%22file_token%22, file.getFileToken());%0A        replacement.put(%22format%22, %22oembed%22);%0A        replacement.put(%22file_id%22, file.getId());%0A        value.put(Annotations.REPLACEMENT_FILE, replacement);%0A        Annotation a = new Annotation(Annotations.OEMBED);%0A        a.setValue(value);%0A        return a;%0A    %7D%0A%0A    public static Annotation getGeolocationAnnotation(double latitude, double longitude) %7B%0A        return getGeolocationAnnotation(latitude, longitude, 0);%0A    %7D%0A%0A    public static Annotation getOhaiDateAnnotation(String iso8601DateString) %7B%0A        HashMap%3CString, Object%3E value = new HashMap%3CString, Object%3E(1);%0A        value.put(%22date%22, iso8601DateString);%0A        Annotation a = new Annotation(Annotations.OHAI_DISPLAY_DATE);%0A        a.setValue(value);%0A        return a;%0A    %7D%0A%7D%0A

add AnnotationFactory with a few get methods