Commit 9c1470c0 authored by Matija Obreza's avatar Matija Obreza

Display links to datasets of Accession

parent 3b966bed
...@@ -15,12 +15,21 @@ ...@@ -15,12 +15,21 @@
*/ */
package org.genesys.catalog.model.dataset; package org.genesys.catalog.model.dataset;
import java.io.Serializable;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Embeddable; import javax.persistence.Embeddable;
import java.io.Serializable; import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import org.genesys2.server.model.genesys.AccessionId;
import org.genesys2.server.model.impl.AccessionIdentifier3; import org.genesys2.server.model.impl.AccessionIdentifier3;
import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.JsonIdentityReference;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
/** /**
* Identifies an accession by it's INSTCODE, ACCENUMB and GENUS. Use of DOI * Identifies an accession by it's INSTCODE, ACCENUMB and GENUS. Use of DOI
* remains optional. * remains optional.
...@@ -54,6 +63,13 @@ public class AccessionIdentifier implements AccessionIdentifier3, Serializable { ...@@ -54,6 +63,13 @@ public class AccessionIdentifier implements AccessionIdentifier3, Serializable {
@Column(nullable = true, length = 100) @Column(nullable = true, length = 100)
private String species; private String species;
/** The accession. */
@ManyToOne(optional = true, fetch = FetchType.LAZY, cascade = {})
@JoinColumn(name = "accessionId", nullable = true)
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "uuid")
@JsonIdentityReference(alwaysAsId = true)
private AccessionId accession;
/** /**
* Gets the doi. * Gets the doi.
* *
...@@ -144,6 +160,24 @@ public class AccessionIdentifier implements AccessionIdentifier3, Serializable { ...@@ -144,6 +160,24 @@ public class AccessionIdentifier implements AccessionIdentifier3, Serializable {
this.species = species; this.species = species;
} }
/**
* Gets the accession.
*
* @return the accession
*/
public AccessionId getAccession() {
return accession;
}
/**
* Sets the accession.
*
* @param accession the new accession
*/
public void setAccession(final AccessionId accession) {
this.accession = accession;
}
/** /**
* Gets holding institute code. * Gets holding institute code.
* *
...@@ -223,6 +257,24 @@ public class AccessionIdentifier implements AccessionIdentifier3, Serializable { ...@@ -223,6 +257,24 @@ public class AccessionIdentifier implements AccessionIdentifier3, Serializable {
} else if (!species.equals(other.species)) { } else if (!species.equals(other.species)) {
return false; return false;
} }
if (accession == null) {
if (other.accession != null) {
return false;
}
} else {
if (other.accession != null) {
if (!accession.getUuid().equals(other.accession.getUuid())) {
return false;
}
} else {
return false;
}
}
return true; return true;
} }
@Override
public String toString() {
return "Dataset.AccessionIdentifier " + instCode + " " + acceNumb + " " + genus;
}
} }
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
*/ */
package org.genesys.catalog.model.dataset; package org.genesys.catalog.model.dataset;
import com.fasterxml.jackson.annotation.JsonIdentityReference;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonView; import com.fasterxml.jackson.annotation.JsonView;
import org.genesys.blocks.auditlog.annotations.Audited; import org.genesys.blocks.auditlog.annotations.Audited;
...@@ -30,7 +29,6 @@ import org.genesys.catalog.model.traits.Descriptor; ...@@ -30,7 +29,6 @@ import org.genesys.catalog.model.traits.Descriptor;
import org.genesys.catalog.service.PublishValidationInterface; import org.genesys.catalog.service.PublishValidationInterface;
import org.genesys.filerepository.model.RepositoryFile; import org.genesys.filerepository.model.RepositoryFile;
import org.genesys2.server.model.PublishState; import org.genesys2.server.model.PublishState;
import org.genesys2.server.model.genesys.AccessionId;
import org.genesys2.util.MCPDUtil; import org.genesys2.util.MCPDUtil;
import org.springframework.data.elasticsearch.annotations.Document; import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field; import org.springframework.data.elasticsearch.annotations.Field;
...@@ -81,12 +79,6 @@ public class Dataset extends UuidModel implements Publishable, SelfCleaning, Pub ...@@ -81,12 +79,6 @@ public class Dataset extends UuidModel implements Publishable, SelfCleaning, Pub
@JsonView({ JsonViews.Public.class }) @JsonView({ JsonViews.Public.class })
private Set<AccessionIdentifier> accessionIdentifiers; private Set<AccessionIdentifier> accessionIdentifiers;
/** The accessions. */
@ManyToMany(cascade = {}, fetch = FetchType.LAZY)
@JoinTable(name = "dataset_acce", joinColumns = @JoinColumn(name = "datasetId"), inverseJoinColumns = @JoinColumn(name = "acce_id"))
@JsonIdentityReference(alwaysAsId = true)
private List<AccessionId> accessions;
/** The descriptors. */ /** The descriptors. */
@ManyToMany(fetch = FetchType.LAZY, cascade = {}) @ManyToMany(fetch = FetchType.LAZY, cascade = {})
@JoinTable(name = "dataset_descriptor", joinColumns = @JoinColumn(name = "datasetId", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "descriptorId", referencedColumnName = "id")) @JoinTable(name = "dataset_descriptor", joinColumns = @JoinColumn(name = "datasetId", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "descriptorId", referencedColumnName = "id"))
...@@ -537,24 +529,6 @@ public class Dataset extends UuidModel implements Publishable, SelfCleaning, Pub ...@@ -537,24 +529,6 @@ public class Dataset extends UuidModel implements Publishable, SelfCleaning, Pub
this.accessionIdentifiers = accessionIdentifiers; this.accessionIdentifiers = accessionIdentifiers;
} }
/**
* Gets the accessions.
*
* @return the accessions
*/
public List<AccessionId> getAccessions() {
return accessions;
}
/**
* Sets the accessions.
*
* @param accessions the new accessions
*/
public void setAccessions(final List<AccessionId> accessions) {
this.accessions = accessions;
}
/** /**
* Gets the descriptors. * Gets the descriptors.
* *
......
...@@ -258,4 +258,6 @@ public interface DatasetService { ...@@ -258,4 +258,6 @@ public interface DatasetService {
*/ */
List<Object[]> lastPublished(); List<Object[]> lastPublished();
void rematchDatasetAccessions();
} }
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
*/ */
package org.genesys.catalog.service.impl; package org.genesys.catalog.service.impl;
import static org.genesys.catalog.model.dataset.QDataset.dataset; import static org.genesys.catalog.model.dataset.QDataset.*;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Paths; import java.nio.file.Paths;
...@@ -27,7 +27,6 @@ import java.util.Set; ...@@ -27,7 +27,6 @@ import java.util.Set;
import java.util.UUID; import java.util.UUID;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.google.common.collect.Lists;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.genesys.blocks.security.service.CustomAclService; import org.genesys.blocks.security.service.CustomAclService;
import org.genesys.catalog.exceptions.InvalidApiUsageException; import org.genesys.catalog.exceptions.InvalidApiUsageException;
...@@ -51,9 +50,9 @@ import org.genesys2.server.model.PublishState; ...@@ -51,9 +50,9 @@ import org.genesys2.server.model.PublishState;
import org.genesys2.server.model.UserRole; import org.genesys2.server.model.UserRole;
import org.genesys2.server.model.genesys.Accession; import org.genesys2.server.model.genesys.Accession;
import org.genesys2.server.model.genesys.AccessionId; import org.genesys2.server.model.genesys.AccessionId;
import org.genesys2.server.persistence.AccessionRepository;
import org.genesys2.server.security.SecurityUtils; import org.genesys2.server.security.SecurityUtils;
import org.genesys2.server.service.GenesysService; import org.genesys2.server.service.GenesysService;
import org.genesys2.server.service.impl.NonUniqueAccessionException;
import org.genesys2.util.JPAUtils; import org.genesys2.util.JPAUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -69,6 +68,7 @@ import org.springframework.stereotype.Service; ...@@ -69,6 +68,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.google.common.collect.Lists;
import com.querydsl.core.BooleanBuilder; import com.querydsl.core.BooleanBuilder;
...@@ -99,8 +99,8 @@ public class DatasetServiceImpl implements DatasetService { ...@@ -99,8 +99,8 @@ public class DatasetServiceImpl implements DatasetService {
private SecurityUtils securityUtils; private SecurityUtils securityUtils;
@Autowired @Autowired
private GenesysService genesysService; private AccessionRepository accessionRepository;
/** The file repository path. */ /** The file repository path. */
@Value("${file.repository.datasets.folder}") @Value("${file.repository.datasets.folder}")
public String datasetRepositoryPath; public String datasetRepositoryPath;
...@@ -128,8 +128,7 @@ public class DatasetServiceImpl implements DatasetService { ...@@ -128,8 +128,7 @@ public class DatasetServiceImpl implements DatasetService {
dataset.setCrops(source.getCrops()); dataset.setCrops(source.getCrops());
if (source.getAccessionIdentifiers() != null && !source.getAccessionIdentifiers().isEmpty()) { if (source.getAccessionIdentifiers() != null && !source.getAccessionIdentifiers().isEmpty()) {
dataset.setAccessionIdentifiers(new HashSet<>(source.getAccessionIdentifiers())); dataset.setAccessionIdentifiers(lookupMatchingAccessions(new HashSet<>(source.getAccessionIdentifiers())));
dataset.setAccessions(lookupMatchingAccessions(dataset.getAccessionIdentifiers()));
} }
copyDescriptors(dataset, source.getDescriptors()); copyDescriptors(dataset, source.getDescriptors());
...@@ -177,8 +176,7 @@ public class DatasetServiceImpl implements DatasetService { ...@@ -177,8 +176,7 @@ public class DatasetServiceImpl implements DatasetService {
LOG.info("Update AccessionIdentifiers. Input dataset: {}, input accessionIdentifiers {}", dataset, accessionIdentifiers); LOG.info("Update AccessionIdentifiers. Input dataset: {}, input accessionIdentifiers {}", dataset, accessionIdentifiers);
dataset = loadDataset(dataset); dataset = loadDataset(dataset);
dataset.getAccessionIdentifiers().clear(); dataset.getAccessionIdentifiers().clear();
dataset.setAccessionIdentifiers(new HashSet<>(accessionIdentifiers)); dataset.setAccessionIdentifiers(lookupMatchingAccessions(new HashSet<>(accessionIdentifiers)));
dataset.setAccessions(lookupMatchingAccessions(dataset.getAccessionIdentifiers()));
return lazyLoad(datasetRepository.save(dataset)); return lazyLoad(datasetRepository.save(dataset));
} }
...@@ -324,7 +322,7 @@ public class DatasetServiceImpl implements DatasetService { ...@@ -324,7 +322,7 @@ public class DatasetServiceImpl implements DatasetService {
*/ */
@Override @Override
public List<Dataset> listByAccession(final AccessionId accessionId) { public List<Dataset> listByAccession(final AccessionId accessionId) {
final Iterable<Dataset> datasets = datasetRepository.findAll(dataset.accessions.contains(accessionId).and(dataset.state.in(PublishState.PUBLISHED))); final Iterable<Dataset> datasets = datasetRepository.findAll(dataset.accessionIdentifiers.any().accession.eq(accessionId).and(dataset.state.in(PublishState.PUBLISHED)));
return Lists.newArrayList(datasets); return Lists.newArrayList(datasets);
} }
...@@ -443,8 +441,7 @@ public class DatasetServiceImpl implements DatasetService { ...@@ -443,8 +441,7 @@ public class DatasetServiceImpl implements DatasetService {
throw new NotFoundElement("Dataset doesn't exist"); throw new NotFoundElement("Dataset doesn't exist");
} }
loadedDataset.setState(PublishState.DRAFT); loadedDataset.setState(PublishState.DRAFT);
loadedDataset.setAccessionIdentifiers(new HashSet<>(accessionIdentifiers)); loadedDataset.setAccessionIdentifiers(lookupMatchingAccessions(new HashSet<>(accessionIdentifiers)));
loadedDataset.setAccessions(lookupMatchingAccessions(loadedDataset.getAccessionIdentifiers()));
return lazyLoad(datasetRepository.save(loadedDataset)); return lazyLoad(datasetRepository.save(loadedDataset));
} }
...@@ -608,31 +605,45 @@ public class DatasetServiceImpl implements DatasetService { ...@@ -608,31 +605,45 @@ public class DatasetServiceImpl implements DatasetService {
} }
/** /**
* Looking for matching Accession * Looking for matching Accession and then sets that to AccessionIdentifier
* *
* @param identifiers the accessionIdentifiers * @param accessionIdentifiers the accessionIdentifiers
* @return list of matching accessions from Genesys * @return accessionIdentifiers with matching accessions from Genesys
*/ */
private List<AccessionId> lookupMatchingAccessions(final Set<AccessionIdentifier> identifiers) { private Set<AccessionIdentifier> lookupMatchingAccessions(final Set<AccessionIdentifier> accessionIdentifiers) {
final List<AccessionId> accessions = new ArrayList<>(); List<AccessionIdentifier> list = new ArrayList<AccessionIdentifier>(accessionIdentifiers);
if (!identifiers.isEmpty()) { List<Accession> foundAccessions = accessionRepository.findById(list);
identifiers.forEach(accei -> {
Accession foundAccession = null; LOG.info("Found {} matches for {} identifiers", foundAccessions.size(), accessionIdentifiers.size());
if (!StringUtils.isBlank(accei.getDoi())) {
foundAccession = genesysService.getAccessionByDOI(accei.getDoi()); accessionIdentifiers.forEach(accei -> {
} else { Accession foundAccession = foundAccessions.stream().filter(a -> {
try { return StringUtils.equalsIgnoreCase(a.getInstCode(), accei.getInstCode())
foundAccession = genesysService.getAccession(accei.getInstCode(), accei.getDoi(), accei.getAcceNumb(), accei.getGenus()); && (
} catch (final NonUniqueAccessionException e) { // when DOI provided
LOG.warn(e.getMessage()); (accei.getDoi() != null && a.getDoi() != null && StringUtils.equals(a.getDoi(), accei.getDoi()))
} // OR when without DOI
} ||
if (foundAccession != null) { (StringUtils.equalsIgnoreCase(a.getAccessionNumber(), accei.getAcceNumb()) && StringUtils.equalsIgnoreCase(a.getGenus(), accei.getGenus()))
accessions.add(foundAccession.getAccessionId()); );
} }).findFirst().orElse(null);
}); accei.setAccession(foundAccession == null ? null : foundAccession.getAccessionId());
} if (foundAccession == null) {
return accessions.stream().distinct().collect(Collectors.toList()); LOG.debug("No match for {}", accei);
}
});
return accessionIdentifiers;
} }
@Override
@Transactional(readOnly = false)
public void rematchDatasetAccessions() {
datasetRepository.findAll().forEach(dataset -> {
LOG.warn("Linking {} accessions with dataset {}", dataset.getAccessionCount(), dataset.getId());
dataset.setAccessionIdentifiers(lookupMatchingAccessions(new HashSet<>(dataset.getAccessionIdentifiers())));
datasetRepository.save(dataset);
});
}
} }
...@@ -241,6 +241,10 @@ public abstract class AccessionData extends AuditedVersionedModel implements IdU ...@@ -241,6 +241,10 @@ public abstract class AccessionData extends AuditedVersionedModel implements IdU
this.taxonomy = taxonomy; this.taxonomy = taxonomy;
} }
public String getGenus() {
return genus;
}
public String getAcquisitionSource() { public String getAcquisitionSource() {
return this.acquisitionSource; return this.acquisitionSource;
} }
......
...@@ -30,6 +30,7 @@ import org.genesys.catalog.persistence.PartnerRepository; ...@@ -30,6 +30,7 @@ import org.genesys.catalog.persistence.PartnerRepository;
import org.genesys.catalog.persistence.dataset.DatasetRepository; import org.genesys.catalog.persistence.dataset.DatasetRepository;
import org.genesys.catalog.persistence.traits.DescriptorListRepository; import org.genesys.catalog.persistence.traits.DescriptorListRepository;
import org.genesys.catalog.persistence.traits.DescriptorRepository; import org.genesys.catalog.persistence.traits.DescriptorRepository;
import org.genesys.catalog.service.DatasetService;
import org.genesys2.server.model.UserRole; import org.genesys2.server.model.UserRole;
import org.genesys2.server.model.impl.User; import org.genesys2.server.model.impl.User;
import org.genesys2.server.persistence.UserRepository; import org.genesys2.server.persistence.UserRepository;
...@@ -110,7 +111,10 @@ public class ApplicationStartup implements InitializingBean, ApplicationListener ...@@ -110,7 +111,10 @@ public class ApplicationStartup implements InitializingBean, ApplicationListener
*/ */
@Override @Override
public void onApplicationEvent(ContextRefreshedEvent event) { public void onApplicationEvent(ContextRefreshedEvent event) {
rematchDatasetAccessions();
aclService.cleanupAcl(); aclService.cleanupAcl();
if (reindexElastic) { if (reindexElastic) {
reindexElasticsearch(); reindexElasticsearch();
} }
...@@ -129,6 +133,7 @@ public class ApplicationStartup implements InitializingBean, ApplicationListener ...@@ -129,6 +133,7 @@ public class ApplicationStartup implements InitializingBean, ApplicationListener
ensure1OAuthClient(); ensure1OAuthClient();
} }
@Autowired @Autowired
private PasswordEncoder passwordEncoder; private PasswordEncoder passwordEncoder;
...@@ -212,4 +217,12 @@ public class ApplicationStartup implements InitializingBean, ApplicationListener ...@@ -212,4 +217,12 @@ public class ApplicationStartup implements InitializingBean, ApplicationListener
private void reindexElasticsearch() { private void reindexElasticsearch() {
elasticsearch.reindexAll(); elasticsearch.reindexAll();
} }
@Autowired
private DatasetService datasetService;
private void rematchDatasetAccessions() {
datasetService.rematchDatasetAccessions();
}
} }
...@@ -307,6 +307,7 @@ accession.breederCode=Breeder Code ...@@ -307,6 +307,7 @@ accession.breederCode=Breeder Code
accession.pedigree=Pedigree accession.pedigree=Pedigree
accession.collecting=Collecting information accession.collecting=Collecting information
accession.datasets=List of Datasets accession.datasets=List of Datasets
accession.datasets.traits={0} traits observed
accession.collecting.site=Location of collecting site accession.collecting.site=Location of collecting site
accession.collecting.institute=Collecting institute accession.collecting.institute=Collecting institute
accession.collecting.number=Collecting number accession.collecting.number=Collecting number
......
...@@ -3739,64 +3739,3 @@ databaseChangeLog: ...@@ -3739,64 +3739,3 @@ databaseChangeLog:
- sql: - sql:
sql: >- sql: >-
update accession_historic ah right join acce ac on ac.id = ah.id right join accession_geo geo on geo.id = ac.geoId set ah.tileIndex = geo.tileIndex; update accession_historic ah right join acce ac on ac.id = ah.id right join accession_geo geo on geo.id = ac.geoId set ah.tileIndex = geo.tileIndex;
- changeSet:
id: 1534922647579-1
author: mborodenko
changes:
- dropForeignKeyConstraint:
baseTableName: dataset_accessions
constraintName: FK_ekss0g19xg9h2tsp1zl8g9h2t
- dropColumn:
tableName: dataset_accessions
columnName: accessionId
- changeSet:
id: 1534922647579-2
author: mborodenko
changes:
- createTable:
columns:
- column:
constraints:
nullable: false
name: datasetId
type: BIGINT
- column:
constraints:
nullable: false
name: acce_id
type: BIGINT
tableName: dataset_acce
- createIndex:
columns:
- column:
name: datasetId
indexName: FK_17w5b5xt9tbw0l6eefqayh33q
tableName: dataset_acce
- createIndex:
columns:
- column:
name: acce_id
indexName: FK_7jyg2if8kyxyw8toq5qyy5vj2
tableName: dataset_acce
- addForeignKeyConstraint:
baseColumnNames: acce_id
baseTableName: dataset_acce
constraintName: FK_7jyg2if8kyxyw8toq5qyy5vj2
deferrable: false
initiallyDeferred: false
onDelete: NO ACTION
onUpdate: NO ACTION
referencedColumnNames: id
referencedTableName: acce
- addForeignKeyConstraint:
baseColumnNames: datasetId
baseTableName: dataset_acce
constraintName: FK_17w5b5xt9tbw0l6eefqayh33q
deferrable: false
initiallyDeferred: false
onDelete: NO ACTION
onUpdate: NO ACTION
referencedColumnNames: id
referencedTableName: dataset
...@@ -1079,15 +1079,15 @@ ...@@ -1079,15 +1079,15 @@
<div class="terms-table"> <div class="terms-table">
<c:forEach items="${accessionDatasets}" var="dataset" varStatus="status"> <c:forEach items="${accessionDatasets}" var="dataset" varStatus="status">
<div class="row"> <div class="row">
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-8"> <div class="col-md-8 col-sm-12">
<p> <p>
<a class="" title="Dataset" href="<c:url value='${genesysCatalogUrl}/datasets/${dataset.uuid}' />"> <a class="" title="Dataset" href="<c:url value='${genesysCatalogUrl}/datasets/${dataset.uuid}' />">
<c:out value="${dataset.title}" /> <c:out value="${dataset.title}" />
</a> </a>
</p> </p>
</div> </div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-4 text-left"> <div class="col-md-4 col-sm-12 text-right">
<p><fmt:formatNumber value="${dataset.descriptorCount}" /></p> <p><spring:message code="accession.datasets.traits" arguments="${dataset.descriptorCount}" /></p>
</div> </div>
</div> </div>
</c:forEach> </c:forEach>
......
...@@ -16,9 +16,7 @@ ...@@ -16,9 +16,7 @@
package org.genesys.test.catalog.services; package org.genesys.test.catalog.services;
import static org.hamcrest.Matchers.*; import static org.hamcrest.Matchers.*;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
...@@ -155,6 +153,11 @@ public class DatasetServiceTest extends AbstractDatasetServiceTest { ...@@ -155,6 +153,11 @@ public class DatasetServiceTest extends AbstractDatasetServiceTest {
assertThat(input, not(nullValue())); assertThat(input, not(nullValue()));
assertThat(input.getAccessionIdentifiers().size(), is(1)); assertThat(input.getAccessionIdentifiers().size(), is(1));
assertThat(input.getAccessionIdentifiers().iterator().next(), is(accessionIdentifiers.iterator().next())); assertThat(input.getAccessionIdentifiers().iterator().next(), is(accessionIdentifiers.iterator().next()));
AccessionIdentifier accessionIdentifier = input.getAccessionIdentifiers().stream().findFirst().orElse(null);
assertThat(accessionIdentifier, notNullValue());
AccessionId accessionId = accessionIdentifier.getAccession();
assertThat(accessionId, nullValue());
} }
@Test @Test
...@@ -180,8 +183,9 @@ public class DatasetServiceTest extends AbstractDatasetServiceTest { ...@@ -180,8 +183,9 @@ public class DatasetServiceTest extends AbstractDatasetServiceTest {
assertThat(input.getAccessionIdentifiers().size(), is(1)); assertThat(input.getAccessionIdentifiers().size(), is(1));
assertThat(input.getAccessionIdentifiers().iterator().next(), is(accessionIdentifiers.iterator().next())); assertThat(input.getAccessionIdentifiers().iterator().next(), is(accessionIdentifiers.iterator().next()));