@JsonValue public String jsonValue() { return this.name(); }
@Override public int hashCode() { int result = workCitationType != null ? workCitationType.hashCode() : 0; result = 31 * result + (citation != null ? citation.hashCode() : 0); return result; } }
public static CitationType fromValue(String v) { for (CitationType c : CitationType.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); }
private Citation getWorkCitation(WorkEntity work) { if (StringUtils.isNotBlank(work.getCitation()) && work.getCitationType() != null) { return new Citation(work.getCitation(), CitationType.valueOf(work.getCitationType())); } return null; }
public org.orcid.jaxb.model.message.Citation toCitiation() { org.orcid.jaxb.model.message.Citation c = new org.orcid.jaxb.model.message.Citation(); if (this.getCitation() != null) c.setCitation(this.getCitation().getValue()); if (!PojoUtil.isEmpty(this.getCitationType())) c.setWorkCitationType(CitationType.fromValue(this.getCitationType().getValue())); return c; }
public static Citation valueOf(org.orcid.jaxb.model.message.Citation citation) { Citation c = new Citation(); if (citation.getCitation() != null) { Text cText = new Text(); cText.setValue(citation.getCitation()); c.setCitation(cText); } if (citation.getWorkCitationType() != null) { Text ctText = new Text(); ctText.setValue(citation.getWorkCitationType().value()); c.setCitationType(ctText); } return c; }
if (workCitation != null && StringUtils.isNotBlank(workCitation.getCitation()) && workCitation.getWorkCitationType() != null) { workEntity.setCitation(workCitation.getCitation()); workEntity.setCitationType(workCitation.getWorkCitationType().name());