use of org.orcid.jaxb.model.common_rc1.Title in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TitleIT method setup.
public void setup() throws ClientException {
// 1.
testPage = authorClient.createPage("testPage", "Test Page Title", rootPage, defaultPageTemplate).getSlingPath();
redirectPage = authorClient.createPage("redirectPage", "Redirect Page Title", rootPage, defaultPageTemplate).getSlingPath();
// 2.
String policySuffix = "/structure/page/new_policy";
HashMap<String, String> data = new HashMap<String, String>();
data.put("jcr:title", "New Policy");
data.put("sling:resourceType", "wcm/core/components/policy/policy");
data.put("clientlibs", clientlibs);
String policyPath1 = "/conf/" + label + "/settings/wcm/policies/core-component/components";
String policyPath = Commons.createPolicy(adminClient, policySuffix, data, policyPath1);
// 3.
String policyLocation = "core-component/components";
String policyAssignmentPath = defaultPageTemplate + "/policies/jcr:content";
data.clear();
data.put("cq:policy", policyLocation + policySuffix);
data.put("sling:resourceType", "wcm/core/components/policies/mappings");
Commons.assignPolicy(adminClient, "", data, policyAssignmentPath);
// 4.
proxyPath = Commons.createProxyComponent(adminClient, titleRT, Commons.proxyPath, null, null);
// 5.
cmpPath = Commons.addComponent(adminClient, proxyPath, testPage + Commons.relParentCompPath, componentName, null);
// 6.
editorPage = new PageEditorPage(testPage);
editorPage.open();
// 7.
title = new Title();
}
use of org.orcid.jaxb.model.common_rc1.Title in project ORCID-Source by ORCID.
the class SourceInActivitiesTest method getFundingWithoutExtIdentifiers.
private ProfileFundingEntity getFundingWithoutExtIdentifiers(String userOrcid) {
Funding funding = new Funding();
funding.setOrganization(getOrganization());
FundingTitle title = new FundingTitle();
title.setTitle(new Title("Title " + System.currentTimeMillis()));
funding.setTitle(title);
funding.setType(org.orcid.jaxb.model.record_v2.FundingType.AWARD);
funding = profileFundingManager.createFunding(userOrcid, funding, true);
return profileFundingManager.getProfileFundingEntity(funding.getPutCode());
}
use of org.orcid.jaxb.model.common_rc1.Title in project ORCID-Source by ORCID.
the class SourceInActivitiesTest method getFunding.
private Funding getFunding(String userOrcid) {
Funding funding = new Funding();
funding.setOrganization(getOrganization());
FundingTitle title = new FundingTitle();
title.setTitle(new Title("Title " + System.currentTimeMillis()));
funding.setTitle(title);
funding.setType(org.orcid.jaxb.model.record_v2.FundingType.AWARD);
ExternalID extId = new ExternalID();
extId.setValue("111");
extId.setType(FundingExternalIdentifierType.GRANT_NUMBER.value());
extId.setUrl(new Url("http://test.com"));
extId.setRelationship(Relationship.PART_OF);
ExternalIDs extIdentifiers = new ExternalIDs();
extIdentifiers.getExternalIdentifier().add(extId);
funding.setExternalIdentifiers(extIdentifiers);
funding = profileFundingManager.createFunding(userOrcid, funding, true);
return profileFundingManager.getFunding(userOrcid, funding.getPutCode());
}
use of org.orcid.jaxb.model.common_rc1.Title in project ORCID-Source by ORCID.
the class ProfileFundingManagerTest method getFunding.
private Funding getFunding(String grantNumber) {
Funding funding = new Funding();
ExternalIDs extIds = new ExternalIDs();
ExternalID extId = new ExternalID();
extId.setRelationship(Relationship.SELF);
extId.setType("grant_number");
extId.setUrl(new Url("http://orcid.org"));
if (grantNumber == null) {
extId.setValue("ext-id-value");
} else {
extId.setValue(grantNumber);
}
extIds.getExternalIdentifier().add(extId);
funding.setExternalIdentifiers(extIds);
FundingTitle title = new FundingTitle();
if (grantNumber == null) {
title.setTitle(new Title("Funding title"));
} else {
title.setTitle(new Title("Funding title " + grantNumber));
}
funding.setTitle(title);
Organization org = new Organization();
org.setName("org-name");
OrganizationAddress address = new OrganizationAddress();
address.setCity("city");
address.setCountry(Iso3166Country.US);
org.setAddress(address);
funding.setOrganization(org);
funding.setVisibility(Visibility.PUBLIC);
funding.setType(FundingType.AWARD);
return funding;
}
use of org.orcid.jaxb.model.common_rc1.Title in project ORCID-Source by ORCID.
the class ProfileFundingManagerTest method getFundingSummary.
private FundingSummary getFundingSummary(String titleValue, String extIdValue, Visibility visibility) {
FundingSummary summary = new FundingSummary();
FundingTitle fundingTitle = new FundingTitle();
fundingTitle.setTitle(new Title(titleValue));
summary.setTitle(fundingTitle);
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);
Organization org = new Organization();
org.setName("org-name");
OrganizationAddress address = new OrganizationAddress();
address.setCity("city");
address.setCountry(Iso3166Country.US);
org.setAddress(address);
summary.setOrganization(org);
return summary;
}
Aggregations