binder.registerCustomEditor(Boolean.class, new CustomBooleanEditor(CustomBooleanEditor.VALUE_TRUE, CustomBooleanEditor.VALUE_FALSE, true));
binder.registerCustomEditor(Date.class, new CustomDateEditor(
new SimpleDateFormat("dd/MM/yyyy"), true));
binder.registerCustomEditor(InetAddress.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveInetAddress(element));
}
});
binder.registerCustomEditor(Activity.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveActivity(element));
}
});
/*
binder.registerCustomEditor(Request.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveRequest(element));
}
});
*/
binder.registerCustomEditor(Protocol.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveProtocol(element));
}
});
binder.registerCustomEditor(Group.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveGroup(element));
}
});
binder.registerCustomEditor(Set.class, "users", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolveUser(element);
}
});
binder.registerCustomEditor(Set.class, "groups", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolveGroup(element);
}
});
//TGAC Classes
binder.registerCustomEditor(com.eaglegenomics.simlims.core.User.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveUser(element));
}
});
binder.registerCustomEditor(Project.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveProject(element));
}
});
/*
binder.registerCustomEditor(ProjectOverview.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
log.info("Overviews set found... resolving...");
setValue(resolveProjectOverview(element));
}
});
binder.registerCustomEditor(Set.class, "overviews", new CustomCollectionEditor(Set.class) {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveProjectOverview(element));
}
});
*/
binder.registerCustomEditor(Set.class, "studies", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolveStudy(element);
}
});
binder.registerCustomEditor(Study.class, "study", new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveStudy(element));
}
});
binder.registerCustomEditor(Set.class, "experiments", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolveExperiment(element);
}
});
binder.registerCustomEditor(Experiment.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveExperiment(element));
}
});
binder.registerCustomEditor(Pool.class, "sequencerPartitionContainers.partitions.pool", new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolvePool(element));
}
});
/*
binder.registerCustomEditor(Pool.class, "flowcells.lanes.pool", new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolvePool(element));
}
});
*/
binder.registerCustomEditor(Set.class, "samples", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolveSample(element);
}
});
binder.registerCustomEditor(Sample.class, "sample", new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveSample(element));
}
});
binder.registerCustomEditor(Set.class, "runs", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolveRun(element);
}
});
binder.registerCustomEditor(Run.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveRun(element));
}
});
binder.registerCustomEditor(Pool.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolvePool(element));
}
});
binder.registerCustomEditor(PlatformType.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolvePlatformType(element));
}
});
binder.registerCustomEditor(Set.class, "platformTypes", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolvePlatformType(element);
}
});
binder.registerCustomEditor(List.class, "partitions", new CustomCollectionEditor(List.class) {
@Override
protected Object convertElement(Object element) {
return resolvePartition(element);
}
});
binder.registerCustomEditor(SequencerPartitionContainer.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveSequencerPartitionContainer(element));
}
});
binder.registerCustomEditor(List.class, "sequencerPartitionContainers", new CustomCollectionEditor(List.class) {
@Override
protected Object convertElement(Object element) {
return resolveSequencerPartitionContainer(element);
}
});
binder.registerCustomEditor(Library.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveLibrary(element));
}
});
binder.registerCustomEditor(Set.class, "libraries", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolveLibrary(element);
}
});
binder.registerCustomEditor(Dilution.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
log.info("Binding dilution " + element);
setValue(resolveDilution(element));
}
});
binder.registerCustomEditor(Set.class, "dilutions", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
log.info("Binding dilution set " + element.toString());
return resolveDilution(element);
}
});
binder.registerCustomEditor(LibraryDilution.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
log.info("Binding library dilution " + element);
setValue(resolveLibraryDilution(element));
}
});
binder.registerCustomEditor(Set.class, "libraryDilutions", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
log.info("Binding library dilution set " + element.toString());
return resolveLibraryDilution(element);
}
});
binder.registerCustomEditor(LibraryType.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveLibraryType(element));
}
});
binder.registerCustomEditor(Set.class, "libraryTypes", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolveLibraryType(element);
}
});
binder.registerCustomEditor(LibrarySelectionType.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveLibrarySelectionType(element));
}
});
binder.registerCustomEditor(Set.class, "librarySelectionTypes", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolveLibrarySelectionType(element);
}
});
binder.registerCustomEditor(LibraryStrategyType.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveLibraryStrategyType(element));
}
});
binder.registerCustomEditor(Set.class, "libraryStrategyTypes", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolveLibraryStrategyType(element);
}
});
binder.registerCustomEditor(TagBarcode.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveTagBarcode(element));
}
});
binder.registerCustomEditor(HashMap.class, "tagBarcodes", new CustomMapEditor(HashMap.class) {
@Override
protected Object convertValue(Object element) {
return resolveTagBarcode(element);
}
});
binder.registerCustomEditor(emPCRDilution.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveEmPcrDilution(element));
}
});
binder.registerCustomEditor(Set.class, "pcrDilutions", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolveEmPcrDilution(element);
}
});
binder.registerCustomEditor(Platform.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolvePlatform(element));
}
});
binder.registerCustomEditor(SequencerReference.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveSequencerReference(element));
}
});
binder.registerCustomEditor(Status.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveStatus(element));
}
});
binder.registerCustomEditor(SecurityProfile.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveSecurityProfile(element));
}
});
binder.registerCustomEditor(Submittable.class, "submissionElement", new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveSubmittable(element));
}
});
binder.registerCustomEditor(Set.class, "submissionElements", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolveSubmittable(element);
}
});
binder.registerCustomEditor(Kit.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveKit(element));
}
});
binder.registerCustomEditor(Set.class, "kits", new CustomCollectionEditor(Set.class) {
@Override
protected Object convertElement(Object element) {
return resolveKit(element);
}
});
binder.registerCustomEditor(KitDescriptor.class, new PropertyEditorSupport() {
@Override
public void setAsText(String element) throws IllegalArgumentException {
setValue(resolveKitDescriptor(element));
}
});