@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((experiment == null) ? 0 : experiment.hashCode()); result = prime * result + ((partition == null) ? 0 : partition.hashCode()); result = prime * result + ((run == null) ? 0 : run.hashCode()); return result; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((container == null) ? 0 : container.hashCode()); result = prime * result + ((position == null) ? 0 : position.hashCode()); result = prime * result + ((run == null) ? 0 : run.hashCode()); return result; }
@Override public String getDeleteDescription() { return getInstrument().getName() + " " + (getReferenceNumber() == null ? "" : "RE " + getReferenceNumber() + ": ") + getTitle(); }
private void validateGhostTissueLookup(SampleTissue tissue) { if (tissue.getParent() == null || tissue.getParent().getId() == SampleImpl.UNSAVED_ID || tissue.getTissueOrigin() == null || tissue.getTissueOrigin().getId() == TissueOrigin.UNSAVED_ID || tissue.getTissueType() == null || tissue.getTissueType().getId() == TissueTypeImpl.UNSAVED_ID || tissue.getTimesReceived() == null || tissue.getTubeNumber() == null) { throw new IllegalArgumentException("Missing tissue attributes required for lookup"); } }
@Override protected Stream<Pair<PoolableElementView, Partition>> items() { return submission.getExperiments().stream().flatMap(experiment -> experiment.getRunPartitions().stream()).flatMap( rp -> rp.getPartition().getPool().getPoolDilutions().stream() .map(pd -> new Pair<>(pd.getPoolableElementView(), rp.getPartition()))); }
private static boolean isValidRelationship(Iterable<SampleValidRelationship> relations, SampleClass parent, SampleClass child) { for (SampleValidRelationship relation : relations) { if (relation.getParent().getId() == parent.getId() && relation.getChild().getId() == child.getId()) { return true; } } return false; }
public String getLabel() { if (getSequence() == null || getFamily().hasFakeSequence()) return getName(); return getName() + " (" + getSequence() + ")"; }
@Override public String toString() { return "AbstractInstrument [id=" + id + ", name=" + name + ", instrumentModel=" + instrumentModel.getId() + ", serialNumber=" + serialNumber + ", dateCommissioned=" + dateCommissioned + ", dateDecommissioned=" + dateDecommissioned + ", upgradedInstrument=" + (upgradedInstrument == null ? null : upgradedInstrument.getId()) + "]"; }
@Override public void updateField(Library library, double value, String units) { library.setVolume(value); VolumeUnit volUnit = VolumeUnit.getFromString(units); if (volUnit != null) { library.setVolumeUnits(volUnit); } }
@Override public void updateField(Sample sample, double value, String units) { sample.setConcentration(value); ConcentrationUnit concUnit = ConcentrationUnit.getFromString(units); if (concUnit != null) { sample.setConcentrationUnits(concUnit); } }
@Override public void updateField(Sample sample, double value, String units) { sample.setVolume(value); VolumeUnit volUnit = VolumeUnit.getFromString(units); if (volUnit != null) { sample.setVolumeUnits(volUnit); } }
@Override public void updateField(Library library, double value, String units) { library.setConcentration(value); ConcentrationUnit concUnit = ConcentrationUnit.getFromString(units); if (concUnit != null) { library.setConcentrationUnits(concUnit); } }
private boolean isInBounds(int x, int y) { return x > 0 && x <= getArrayModel().getColumns() && y > 0 && y <= getArrayModel().getRows(); }
@Override public void updateField(Pool pool, double value, String units) { pool.setVolume(value); VolumeUnit volUnit = VolumeUnit.getFromString(units); if (volUnit != null) { pool.setVolumeUnits(volUnit); } }
@Override public void updateField(Pool pool, double value, String units) { pool.setConcentration(value); ConcentrationUnit concUnit = ConcentrationUnit.getFromString(units); if (concUnit != null) { pool.setConcentrationUnits(concUnit); } }
@Override public IndexFamily getCurrentFamily() { if (indices == null) { return IndexFamily.NULL; } for (Index index : indices) { if (index != null) { return index.getFamily(); } } return IndexFamily.NULL; }
@Override public Run createRun(User user) { return new IonTorrentRun(user); } }, //