return person;
}
private Person buildCanonicalPerson() throws Exception {
Person person = buildPersonTemplate("canonical");
person.setAboutMe("I have an example of every piece of data");
person.setActivities(asList("Coding Shindig"));
List<Address> addresses = new ArrayList<Address>();
PersonAddressDb address = new PersonAddressDb();
address.setCountry("US");
address.setLatitude(28.3043F);
address.setLongitude(143.0859F);
address.setLocality("who knows");
address.setPostalCode("12345");
address.setRegion("Apache, CA");
address.setStreetAddress("1 OpenStandards Way");
address.setType("home");
address.setFormatted("PoBox 3565, 1 OpenStandards Way, Apache, CA");
// address.setPerson(person);
addresses.add(address);
person.setAddresses(addresses);
person.setAge(33);
BodyTypeDb bodyType = new BodyTypeDb();
bodyType.setBuild("svelte");
bodyType.setEyeColor("blue");
bodyType.setHairColor("black");
bodyType.setHeight(1.84F);
bodyType.setWeight(74F);
person.setBodyType(bodyType);
person.setBooks(asList("The Cathedral & the Bazaar","Catch 22"));
person.setCars(asList("beetle","prius"));
person.setChildren("3");
AddressDb currentLocation = new AddressDb();
currentLocation.setLatitude(48.858193F);
currentLocation.setLongitude(2.29419F);
person.setCurrentLocation(currentLocation);
person.setBirthday(buildDate("1975-01-01"));
person.setDisplayName("Shin Digg");
person.setDrinker(new EnumDb<Drinker>(Drinker.SOCIALLY));
List<ListField> emails = new ArrayList<ListField>();
EmailDb email = new EmailDb();
email.setValue("shindig-dev@incubator.apache.org");
email.setType("work");
emails.add(email);
person.setEmails(emails);
person.setEthnicity("developer");
person.setFashion("t-shirts");
person.setFood(asList("sushi","burgers"));
person.setGender(Person.Gender.male);
person.setHappiestWhen("coding");
person.setHasApp(true);
person.setHeroes(asList("Doug Crockford", "Charles Babbage"));
person.setHumor("none to speak of");
person.setInterests(asList("PHP","Java"));
person.setJobInterests("will work for beer");
List<Organization> organizations = new ArrayList<Organization>();
PersonOrganizationDb organization1 = new PersonOrganizationDb();
OrganizationAddressDb orgAddress1 = new OrganizationAddressDb();
orgAddress1.setFormatted("1 Shindig Drive");
organization1.setAddress(orgAddress1);
organization1.setDescription("lots of coding");
organization1.setEndDate(buildDate("2010-10-10"));
organization1.setField("Software Engineering");
organization1.setName("Apache.com");
organization1.setSalary("$1000000000");
organization1.setStartDate(buildDate("1995-01-01"));
organization1.setSubField("Development");
organization1.setTitle("Grand PooBah");
organization1.setWebpage("http://incubator.apache.org/projects/shindig.html");
organization1.setType("job");
PersonOrganizationDb organization2 = new PersonOrganizationDb();
OrganizationAddressDb orgAddress2 = new OrganizationAddressDb();
orgAddress2.setFormatted("1 Skid Row");
organization2.setAddress(orgAddress2);
organization2.setDescription("");
organization2.setEndDate(buildDate("1995-01-01"));
organization2.setField("College");
organization2.setName("School of hard Knocks");
organization2.setSalary("$100");
organization2.setStartDate(buildDate("1991-01-01"));
organization2.setSubField("Lab Tech");
organization2.setTitle("Gopher");
organization2.setWebpage("");
organization2.setType("job");
organizations.add(organization1);
organizations.add(organization2);
person.setOrganizations(organizations);
person.setLanguagesSpoken(asList("English","Dutch","Esperanto"));
person.setUpdated(new Date());
person.setLivingArrangement("in a house");
List<Enum<LookingFor>> lookingFor = Lists.newArrayList();
Enum<LookingFor> lookingForOne = new EnumImpl<LookingFor>(LookingFor.RANDOM);
Enum<LookingFor> lookingForTwo = new EnumImpl<LookingFor>(LookingFor.NETWORKING);
lookingFor.add(lookingForOne);
lookingFor.add(lookingForTwo);
person.setLookingFor(lookingFor);
person.setMovies(asList("Iron Man", "Nosferatu"));
person.setMusic(asList("Chieftains","Beck"));
NameDb name = new NameDb();
name.setAdditionalName("H");
name.setFamilyName("Digg");
name.setGivenName("Shin");
name.setHonorificPrefix("Sir");
name.setHonorificSuffix("Social Butterfly");
name.setFormatted("Sir Shin H. Digg Social Butterfly");
person.setName(name);
person.setNetworkPresence(new EnumDb<NetworkPresence>(NetworkPresence.ONLINE));
person.setNickname("diggy");
person.setPets("dog,cat");
List<ListField> phoneNumbers = new ArrayList<ListField>();
PhoneDb phone1 = new PhoneDb();
phone1.setValue("111-111-111");
phone1.setType("work");
PhoneDb phone2 = new PhoneDb();
phone2.setValue("999-999-999");
phone2.setType("mobile");
phoneNumbers.add(phone1);
phoneNumbers.add(phone2);
person.setPhoneNumbers(phoneNumbers);
person.setPoliticalViews("open leaning");
person.setProfileSong(buildUrl("http://www.example.org/songs/OnlyTheLonely.mp3", "Feelin' blue", "road"));
person.setProfileUrl("http://www.example.org/?id=1");
person.setProfileVideo(buildUrl("http://www.example.org/videos/Thriller.flv", "Thriller", "video"));
person.setQuotes(asList("I am therfore I code", "Doh!"));
person.setRelationshipStatus("married to my job");
person.setReligion("druidic");
person.setRomance("twice a year");
person.setScaredOf("COBOL");
person.setSexualOrientation("north");
person.setSmoker(new EnumDb<Smoker>(Smoker.NO));
person.setSports(asList("frisbee","rugby"));
person.setStatus("happy");
person.setTags(asList("C#","JSON","template"));
person.setUtcOffset(-8L);
person.setTurnOffs(asList("lack of unit tests","cabbage"));
person.setTurnOns(asList("well document code"));
person.setTvShows(asList("House","Battlestar Galactica"));
List<Url> urls = new ArrayList<Url>();
urls.add(buildUrl("http://www.example.org/?id=1", "my profile", "Profile"));
urls.add(buildUrl("http://www.example.org/pic/?id=1", "my awesome picture", "Thumbnail"));
person.setUrls(urls);
List<ListField> photos = new ArrayList<ListField>();
PhotoDb photo = new PhotoDb();
photo.setValue("http://www.example.org/pic/?id=1");
photo.setType("thumbnail");
photos.add(photo);
person.setPhotos(photos);
return person;
}