use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.
the class PublicAPISecurityManagerV3Test method setVisibility.
private void setVisibility(GroupsContainer container, Visibility... vs) {
assertEquals(container.retrieveGroups().size(), vs.length);
int idx = 0;
for (Group g : container.retrieveGroups()) {
// Every group have just one element
assertEquals(1, g.getActivities().size());
for (Filterable f : g.getActivities()) {
f.setVisibility(vs[idx++]);
}
}
}
use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.
the class PublicAPISecurityManagerV3Test method getActivitiesSummaryElement.
private ActivitiesSummary getActivitiesSummaryElement() {
Visibility[] vs = { Visibility.PUBLIC, Visibility.PUBLIC, Visibility.PUBLIC };
ActivitiesSummary s = new ActivitiesSummary();
s.setDistinctions(getDistinctions(vs));
s.setEducations(getEducations(vs));
s.setEmployments(getEmployments(vs));
s.setInvitedPositions(getInvitedPositions(vs));
s.setMemberships(getMemberships(vs));
s.setQualifications(getQualifications(vs));
s.setServices(getServices(vs));
s.setFundings(getFundings(vs));
s.setPeerReviews(getPeerReviews(vs));
s.setWorks(getWorks(vs));
return s;
}
use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.
the class PublicAPISecurityManagerV3Test method getOtherNamesElement.
private OtherNames getOtherNamesElement(Visibility... vs) {
OtherNames otherNames = new OtherNames();
for (Visibility v : vs) {
OtherName o = new OtherName();
o.setVisibility(v);
if (otherNames.getOtherNames() == null) {
otherNames.setOtherNames(new ArrayList<OtherName>());
}
otherNames.getOtherNames().add(o);
}
return otherNames;
}
use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.
the class PublicAPISecurityManagerV3Test method getAddressesElement.
private Addresses getAddressesElement(Visibility... vs) {
Addresses elements = new Addresses();
for (Visibility v : vs) {
Address element = new Address();
element.setVisibility(v);
if (elements.getAddress() == null) {
elements.setAddress(new ArrayList<Address>());
}
elements.getAddress().add(element);
}
return elements;
}
use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.
the class PublicAPISecurityManagerV3Test method getFilterableElement.
/**
* Utilities
*/
private Filterable getFilterableElement(Visibility v) {
EducationSummary s = new EducationSummary();
s.setVisibility(v);
return s;
}
Aggregations