use of org.orcid.jaxb.model.common_v2.Country in project ORCID-Source by ORCID.
the class RDFWriterTest method fakeBio.
private Record fakeBio() throws DatatypeConfigurationException {
Record r = new Record();
r.setOrcidIdentifier(new OrcidIdentifier());
r.getOrcidIdentifier().setPath("000-1337");
r.getOrcidIdentifier().setUri("http://orcid.example.com/000-1337");
r.setHistory(new History());
r.getHistory().setCreationMethod(CreationMethod.WEBSITE);
XMLGregorianCalendar value = dataTypeFactory.newXMLGregorianCalendar(1980, 12, 31, 23, 29, 29, 999, 0);
r.getHistory().setLastModifiedDate(new LastModifiedDate(value));
r.getHistory().setClaimed(true);
r.setPerson(new Person());
r.getPerson().setBiography(new Biography());
r.getPerson().setName(new Name());
r.getPerson().getName().setFamilyName(new FamilyName("Doe"));
r.getPerson().getName().setCreditName(new CreditName("John F Doe"));
r.getPerson().getName().setGivenNames(new GivenNames("John"));
r.getPerson().setOtherNames(new OtherNames());
r.getPerson().getOtherNames().setOtherNames(new ArrayList<OtherName>());
OtherName n = new OtherName();
n.setContent("Johnny");
n.setVisibility(Visibility.PUBLIC);
OtherName n1 = new OtherName();
n1.setContent("Mr Doe");
n1.setVisibility(Visibility.PUBLIC);
r.getPerson().getOtherNames().getOtherNames().add(n);
r.getPerson().getOtherNames().getOtherNames().add(n1);
r.getPerson().setResearcherUrls(new ResearcherUrls());
r.getPerson().getResearcherUrls().setResearcherUrls(new ArrayList<ResearcherUrl>());
ResearcherUrl anonymous = new ResearcherUrl();
anonymous.setUrl(new Url("http://example.com/anon"));
anonymous.setVisibility(Visibility.PUBLIC);
r.getPerson().getResearcherUrls().getResearcherUrls().add(anonymous);
r.getPerson().getResearcherUrls().getResearcherUrls().add(buildRUrl("http://example.com/myPage", "homePage"));
r.getPerson().getResearcherUrls().getResearcherUrls().add(buildRUrl("http://example.com/foaf#me", "FOAF"));
r.getPerson().getResearcherUrls().getResearcherUrls().add(buildRUrl("http://example.com/webId", "webID"));
r.getPerson().getResearcherUrls().getResearcherUrls().add(buildRUrl("http://example.com/other", "other"));
r.getPerson().setAddresses(new Addresses());
r.getPerson().getAddresses().setAddress(new ArrayList<Address>());
Address a = new Address();
a.setCountry(new Country());
a.getCountry().setValue(Iso3166Country.GB);
r.getPerson().getAddresses().getAddress().add(a);
r.getPerson().setEmails(new Emails());
r.getPerson().getEmails().setEmails(new ArrayList<Email>());
Email e = new Email();
e.setEmail("john@example.org");
e.setCurrent(true);
Email e1 = new Email();
e1.setEmail("doe@example.com");
e1.setCurrent(true);
r.getPerson().getEmails().getEmails().add(e);
r.getPerson().getEmails().getEmails().add(e1);
return r;
}
Aggregations