public static OptionalWithCause<String> getCompleteOpenExternalURL(DIP dip) { OptionalWithCause<String> ret; Optional<String> dipProperty = getDIPProperty(dip, RodaConstants.RODA_OBJECT_DIP, dip.getType(), "openExternalURL"); if (dipProperty.isPresent()) { try { String externalUrl = HandlebarsUtility.executeHandlebars(dipProperty.get(), dip.getProperties()); ret = OptionalWithCause.of(externalUrl); } catch (GenericException e) { ret = OptionalWithCause.empty(e); } } else { ret = OptionalWithCause.of(Optional.empty()); } return ret; }
public static OptionalWithCause<String> getCompleteDeleteExternalURL(DIP dip) { OptionalWithCause<String> ret; Optional<String> dipProperty = getDIPProperty(dip, RodaConstants.RODA_OBJECT_DIP, dip.getType(), "deleteExternalURL"); if (dipProperty.isPresent()) { try { String externalUrl = HandlebarsUtility.executeHandlebars(dipProperty.get(), dip.getProperties()); ret = OptionalWithCause.of(externalUrl); } catch (GenericException e) { ret = OptionalWithCause.empty(e); } } else { ret = OptionalWithCause.of(Optional.empty()); } return ret; }
@Override public List<Object> toCsvValues() { return Arrays.asList(super.getId(), super.getTitle(), super.getDescription(), super.getType(), super.getDateCreated(), super.getLastModified(), super.getIsPermanent(), super.getProperties(), super.getAipIds(), super.getRepresentationIds(), super.getFileIds(), super.getPermissions(), openExternalURL); }
public DIP(DIP other) { this(other.getId(), other.getTitle(), other.getDescription(), other.getType(), other.getDateCreated(), other.getLastModified(), other.getIsPermanent(), other.getProperties(), other.getAipIds(), other.getRepresentationIds(), other.getFileIds(), other.getPermissions()); }
doc.addField(RodaConstants.DIP_LAST_MODIFIED, SolrUtils.formatDate(dip.getLastModified())); doc.addField(RodaConstants.DIP_IS_PERMANENT, dip.getIsPermanent()); doc.addField(RodaConstants.DIP_PROPERTIES, JsonUtils.getJsonFromObject(dip.getProperties()));