Search in sources :

Example 91 with Visibility

use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.

the class OrcidSecurityManagerTestBase method createWork.

protected Work createWork(Visibility v, String sourceId) {
    Work work = new Work();
    work.setVisibility(v);
    setSource(work, sourceId);
    return work;
}
Also used : Work(org.orcid.jaxb.model.v3.dev1.record.Work)

Example 92 with Visibility

use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.

the class OrcidSecurityManagerTestBase method createOtherName.

protected OtherName createOtherName(Visibility v, String sourceId) {
    OtherName otherName = new OtherName();
    otherName.setContent("other-name-" + System.currentTimeMillis());
    otherName.setVisibility(v);
    setSource(otherName, sourceId);
    return otherName;
}
Also used : OtherName(org.orcid.jaxb.model.v3.dev1.record.OtherName)

Example 93 with Visibility

use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.

the class OrcidSecurityManagerTestBase method createAddress.

protected Address createAddress(Visibility v, String sourceId) {
    Address a = new Address();
    a.setVisibility(v);
    Iso3166Country[] all = Iso3166Country.values();
    Random r = new Random();
    int index = r.nextInt(all.length);
    if (index < 0 || index >= all.length) {
        index = 0;
    }
    a.setCountry(new Country(all[index]));
    setSource(a, sourceId);
    return a;
}
Also used : Address(org.orcid.jaxb.model.v3.dev1.record.Address) Random(java.util.Random) Country(org.orcid.jaxb.model.v3.dev1.common.Country) Iso3166Country(org.orcid.jaxb.model.v3.dev1.common.Iso3166Country) Iso3166Country(org.orcid.jaxb.model.v3.dev1.common.Iso3166Country)

Example 94 with Visibility

use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.

the class OrcidSecurityManagerTestBase method createEducationSummary.

protected EducationSummary createEducationSummary(Visibility v, String sourceId) {
    EducationSummary e = new EducationSummary();
    e.setVisibility(v);
    setSource(e, sourceId);
    return e;
}
Also used : EducationSummary(org.orcid.jaxb.model.v3.dev1.record.summary.EducationSummary)

Example 95 with Visibility

use of org.orcid.jaxb.model.v3.dev1.common.Visibility in project ORCID-Source by ORCID.

the class WorkManagerTest method getWorkSummary.

private WorkSummary getWorkSummary(String titleValue, String extIdValue, Visibility visibility, String displayIndex) {
    WorkSummary summary = new WorkSummary();
    summary.setDisplayIndex(displayIndex);
    Title title = new Title(titleValue);
    WorkTitle workTitle = new WorkTitle();
    workTitle.setTitle(title);
    summary.setTitle(workTitle);
    summary.setType(WorkType.ARTISTIC_PERFORMANCE);
    summary.setVisibility(visibility);
    ExternalIDs extIds = new ExternalIDs();
    ExternalID extId = new ExternalID();
    extId.setRelationship(Relationship.SELF);
    extId.setType("doi");
    extId.setUrl(new Url("http://orcid.org"));
    extId.setValue(extIdValue);
    extIds.getExternalIdentifier().add(extId);
    summary.setExternalIdentifiers(extIds);
    return summary;
}
Also used : WorkSummary(org.orcid.jaxb.model.v3.dev1.record.summary.WorkSummary) ExternalIDs(org.orcid.jaxb.model.v3.dev1.record.ExternalIDs) WorkTitle(org.orcid.jaxb.model.v3.dev1.record.WorkTitle) ExternalID(org.orcid.jaxb.model.v3.dev1.record.ExternalID) Title(org.orcid.jaxb.model.v3.dev1.common.Title) WorkTitle(org.orcid.jaxb.model.v3.dev1.record.WorkTitle) Url(org.orcid.jaxb.model.v3.dev1.common.Url)

Aggregations

Visibility (org.orcid.jaxb.model.v3.dev1.common.Visibility)44 ClientResponse (com.sun.jersey.api.client.ClientResponse)17 Test (org.junit.Test)17 ExternalID (org.orcid.jaxb.model.v3.dev1.record.ExternalID)14 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)12 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)12 Url (org.orcid.jaxb.model.v3.dev1.common.Url)11 OrcidError (org.orcid.jaxb.model.v3.dev1.error.OrcidError)11 ExternalIDs (org.orcid.jaxb.model.v3.dev1.record.ExternalIDs)11 SourceEntity (org.orcid.persistence.jpa.entities.SourceEntity)11 HashMap (java.util.HashMap)10 ProfileEntity (org.orcid.persistence.jpa.entities.ProfileEntity)10 Name (org.orcid.jaxb.model.v3.dev1.record.Name)7 OtherName (org.orcid.jaxb.model.v3.dev1.record.OtherName)7 Organization (org.orcid.jaxb.model.v3.dev1.common.Organization)6 Biography (org.orcid.jaxb.model.v3.dev1.record.Biography)6 Work (org.orcid.jaxb.model.v3.dev1.record.Work)6 EducationSummary (org.orcid.jaxb.model.v3.dev1.record.summary.EducationSummary)6 Date (java.util.Date)5 OrcidDuplicatedElementException (org.orcid.core.exception.OrcidDuplicatedElementException)5