@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-04-24T11:17:38-05:00", comments = "JAXB RI v2.2.11") public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { { String theValue; theValue = this.getValue(); strategy.appendField(locator, this, "value", buffer, theValue); } return buffer; }
private boolean isDuplicated(ResearcherUrlEntity existing, ResearcherUrl newResearcherUrl, SourceEntity source) { if (!existing.getId().equals(newResearcherUrl.getPutCode())) { //If they have the same source String existingSourceId = existing.getElementSourceId(); // If they have the same source if (!PojoUtil.isEmpty(existingSourceId) && existingSourceId.equals(SourceEntityUtils.getSourceId(source))) { // If the url is the same if (existing.getUrl() != null && existing.getUrl().equals(newResearcherUrl.getUrl().getValue())) { return true; } } } return false; }
return; if(PojoUtil.isEmpty(researcherUrl.getUrl().getValue())) { String message = "Url field must not be empty"; LOGGER.error(message); throw new OrcidValidationException(message); } else { if(SiteConstants.URL_MAX_LENGTH < researcherUrl.getUrl().getValue().length()) { String message = "Url field must not be longer than " + SiteConstants.URL_MAX_LENGTH + " characters"; LOGGER.error(message);
public ExternalID clone() { ExternalID id = new ExternalID(); id.type=this.getType(); id.value=this.getValue(); if (this.getUrl()!=null) id.url=new Url(this.getUrl().getValue()); if (this.getRelationship()!=null) id.relationship=this.getRelationship(); return id; }
throw new OrcidValidationException(message); } else { if(SiteConstants.URL_MAX_LENGTH < externalIdentifier.getUrl().getValue().length()) { String message = "Url must not be longer than " + SiteConstants.URL_MAX_LENGTH + " characters"; LOGGER.error(message);
Map<String, String> params = new HashMap<String, String>(); params.put("type", "external-identifier"); params.put("value", externalIdentifier.getUrl().getValue()); throw new OrcidDuplicatedElementException(params);
Map<String, String> params = new HashMap<String, String>(); params.put("type", "external-identifier"); params.put("value", externalIdentifier.getUrl().getValue()); throw new OrcidDuplicatedElementException(params);
@Override public String convertTo(ExternalIDs source, Type<String> destinationType) { JSONFundingExternalIdentifiers jsonFundingExternalIdentifiers = new JSONFundingExternalIdentifiers(); for (ExternalID externalID : source.getExternalIdentifier()) { JSONExternalIdentifier jsonExternalIdentifier = new JSONExternalIdentifier(); if (externalID.getType() != null) { jsonExternalIdentifier.setType(conv.convertTo(externalID.getType(), null)); } if (externalID.getUrl() != null) { jsonExternalIdentifier.setUrl(new JSONUrl(externalID.getUrl().getValue())); } if (!PojoUtil.isEmpty(externalID.getValue())) { jsonExternalIdentifier.setValue(externalID.getValue()); } if (externalID.getRelationship() != null) { jsonExternalIdentifier.setRelationship(conv.convertTo(externalID.getRelationship().value(), null)); } jsonFundingExternalIdentifiers.getFundingExternalIdentifier().add(jsonExternalIdentifier); } return JsonUtils.convertToJsonString(jsonFundingExternalIdentifiers); }
@Override public String convertTo(ExternalIDs source, Type<String> destinationType) { JSONWorkExternalIdentifiers jsonWorkExternalIdentifiers = new JSONWorkExternalIdentifiers(); for (ExternalID externalID : source.getExternalIdentifier()) { JSONWorkExternalIdentifier jsonWorkExternalIdentifier = new JSONWorkExternalIdentifier(); if (externalID.getType() != null) { jsonWorkExternalIdentifier.setWorkExternalIdentifierType(conv.convertTo(externalID.getType(), null)); } if (externalID.getUrl() != null) { jsonWorkExternalIdentifier.setUrl(new JSONUrl(externalID.getUrl().getValue())); } if (!PojoUtil.isEmpty(externalID.getValue())) { jsonWorkExternalIdentifier.setWorkExternalIdentifierId(new WorkExternalIdentifierId(externalID.getValue())); } if (externalID.getRelationship() != null) { jsonWorkExternalIdentifier.setRelationship(conv.convertTo(externalID.getRelationship().value(), null)); } jsonWorkExternalIdentifiers.getWorkExternalIdentifier().add(jsonWorkExternalIdentifier); } return JsonUtils.convertToJsonString(jsonWorkExternalIdentifiers); }
@Override public String convertTo(ExternalID source, Type<String> destinationType) { JSONWorkExternalIdentifier jsonWorkExternalIdentifier = new JSONWorkExternalIdentifier(); if (source.getType() != null) { jsonWorkExternalIdentifier.setWorkExternalIdentifierType(conv.convertTo(source.getType(), null)); } if (source.getUrl() != null) { jsonWorkExternalIdentifier.setUrl(new JSONUrl(source.getUrl().getValue())); } if (!PojoUtil.isEmpty(source.getValue())) { jsonWorkExternalIdentifier.setWorkExternalIdentifierId(new WorkExternalIdentifierId(source.getValue())); } if (source.getRelationship() != null) { jsonWorkExternalIdentifier.setRelationship(conv.convertTo(source.getRelationship().value(), null)); } return JsonUtils.convertToJsonString(jsonWorkExternalIdentifier); }
existingEntity.setLastModified(new Date()); existingEntity.setVisibility(updatedOrNew.getVisibility().name()); existingEntity.setUrl(updatedOrNew.getUrl().getValue()); existingEntity.setUrlName(updatedOrNew.getUrlName()); existingEntity.setDisplayIndex(updatedOrNew.getDisplayIndex());
Individual page = m.createIndividual(url.getUrl().getValue(), null); String urlName = url.getUrlName(); if (isHomePage(urlName)) {