@Test public void shouldGetDisseminationLastVersion() { FormatIdentificationModel formatIdentification = objectGroupModel.getLastVersionsModel("Dissemination").get().getFormatIdentification(); assertThat(formatIdentification.getFormatId()).isEqualTo("fmt/355"); }
@JsonIgnore public Optional<VersionsModel> getLastVersionsModel(String qualifier) { Optional<QualifiersModel> first = getQualifiersModel(qualifier); if (first.isPresent()) { return first .get() .getVersions() .stream() .max(comparing(VersionsModel::getDataVersion)); } return empty(); }
ObjectGroupResponse { @JsonIgnore public Optional<VersionsModel> getLastVersionsModel(String qualifier) { Optional<QualifiersModel> first = getQualifiersModel(qualifier); if (first.isPresent()) { return first .get() .getVersions() .stream() .max(comparing(VersionsModel::getDataVersion)); } return empty(); } }
ObjectGroupResponse { @JsonIgnore public Optional<VersionsModel> getLastVersionsModel(String qualifier) { Optional<QualifiersModel> first = getQualifiersModel(qualifier); if (first.isPresent()) { return first .get() .getVersions() .stream() .max(comparing(VersionsModel::getDataVersion)); } return empty(); }  }
ObjectGroupResponse { @JsonIgnore public Optional<VersionsModel> getLastVersionsModel(String qualifier) { Optional<QualifiersModel> first = getQualifiersModel(qualifier); if (first.isPresent()) { return first .get() .getVersions() .stream() .max(comparing(VersionsModel::getDataVersion)); } return empty(); }  StorageRacineModel getStorage(); void setStorage(StorageRacineModel storage); List<QualifiersModel> getQualifiers(); void setQualifiers(List<QualifiersModel> qualifiers); String getId(); void setId(String id); int getTenant(); void setTenant(int tenant); FileInfoModel getFileInfo(); void setFileInfo(FileInfoModel fileInfo); List<String> getUp(); void setUp(List<String> up); List<String> getUs(); void setUs(List<String> us); int getNbc(); void setNbc(int nbc); List<String> getOps(); void setOps(List<String> ops); String getOriginatingAgency(); void setOriginatingAgency(String originatingAgency); List<String> getOriginatingAgencies(); void setOriginatingAgencies(List<String> originatingAgencies); String getVersion(); void setVersion(String version); String getType(); void setType(String type); String getOpi(); void setOpi(String opi); @JsonIgnore Optional<VersionsModel> getLastVersionsModel(String qualifier); @JsonIgnore Optional<VersionsModel> getFirstVersionsModel(String qualifier); }
ObjectGroupResponse { @JsonIgnore public Optional<VersionsModel> getLastVersionsModel(String qualifier) { Optional<QualifiersModel> first = getQualifiersModel(qualifier); if (first.isPresent()) { return first .get() .getVersions() .stream() .max(comparing(VersionsModel::getDataVersion)); } return empty(); }  StorageRacineModel getStorage(); void setStorage(StorageRacineModel storage); List<QualifiersModel> getQualifiers(); void setQualifiers(List<QualifiersModel> qualifiers); String getId(); void setId(String id); int getTenant(); void setTenant(int tenant); FileInfoModel getFileInfo(); void setFileInfo(FileInfoModel fileInfo); List<String> getUp(); void setUp(List<String> up); List<String> getUs(); void setUs(List<String> us); int getNbc(); void setNbc(int nbc); List<String> getOps(); void setOps(List<String> ops); String getOriginatingAgency(); void setOriginatingAgency(String originatingAgency); List<String> getOriginatingAgencies(); void setOriginatingAgencies(List<String> originatingAgencies); String getVersion(); void setVersion(String version); String getType(); void setType(String type); String getOpi(); void setOpi(String opi); @JsonIgnore Optional<VersionsModel> getLastVersionsModel(String qualifier); @JsonIgnore Optional<VersionsModel> getFirstVersionsModel(String qualifier);  }