Work other = (Work) obj; if (this.getWorkTitle() == null) { if (other.getWorkTitle() != null) return false; } else if (!this.getWorkTitle().equals(other.getWorkTitle())) return false;
out.append(",\ntitle={"+escapeStringForBibtex((work.getWorkTitle() != null) ? work.getWorkTitle().getTitle().getContent() : "No Title")+"}");
if (this.getWorkTitle() == null) { if (other.getWorkTitle() != null) return false; } else if (!this.getWorkTitle().equals(other.getWorkTitle())) return false;
public static void cleanEmptyFields(Work work) { if (work != null) { if (work.getWorkCitation() != null) { if (PojoUtil.isEmpty(work.getWorkCitation().getCitation())) { work.setWorkCitation(null); } } if (work.getWorkTitle() != null) { if (work.getWorkTitle().getTranslatedTitle() != null) { if (PojoUtil.isEmpty(work.getWorkTitle().getTranslatedTitle().getContent())) { work.getWorkTitle().setTranslatedTitle(null); } } } if (work.getWorkContributors() != null && work.getWorkContributors().getContributor() != null) { for (Contributor c : work.getWorkContributors().getContributor()) { if (c.getCreditName() != null && PojoUtil.isEmpty(c.getCreditName().getContent())) { c.setCreditName(null); } } } } }
public void validateWork(Work work, Source activeSource, boolean createFlag, boolean isApiRequest, Visibility originalVisibility) { WorkTitle title = work.getWorkTitle(); if (title == null || title.getTitle() == null || PojoUtil.isEmpty(title.getTitle().getContent())) { throw new ActivityTitleValidationException();
builder.title((work.getWorkTitle() != null) ? StringUtils.stripAccents(work.getWorkTitle().getTitle().getContent()) : "No Title"); String doi = extractID(work, WorkExternalIdentifierType.DOI); String url = extractID(work, WorkExternalIdentifierType.URI);
if (work.getWorkTitle() != null) { if (work.getWorkTitle().getTitle() != null) { w.setTitle(Text.valueOf(work.getWorkTitle().getTitle().getContent())); if (work.getWorkTitle().getTranslatedTitle() != null) { TranslatedTitleForm tt = new TranslatedTitleForm(); tt.setContent(work.getWorkTitle().getTranslatedTitle().getContent()); tt.setLanguageCode(work.getWorkTitle().getTranslatedTitle().getLanguageCode()); w.setTranslatedTitle(tt); if (work.getWorkTitle().getSubtitle() != null) { w.setSubtitle(Text.valueOf(work.getWorkTitle().getSubtitle().getContent()));