Opened 10 years ago
Closed 10 years ago
#803 closed (fixed)
It should be possible to define biomaterial - file associations from the file side
Reported by: | olle | Owned by: | olle |
---|---|---|---|
Milestone: | Proteios SE 2.19.0 | Keywords: | |
Cc: |
Description
Biomaterial - file associations can currently be defined by selecting files to be associated with a biomaterial. It should also be possible to define the association from the file, by selecting biomaterials to be associated with it.
Change History (8)
comment:1 Changed 10 years ago by
Status: | new → assigned |
---|
comment:2 Changed 10 years ago by
Traceability note:
- Biomaterial - file associations were introduced in Ticket #283 (Add possiblitiy for direct file - sample links).
- Biomaterial - file associations were extended to extracts and labeled extracts in Ticket #339 (Enable annotations for extracts).
- Removal of biomaterial - file associations from the GUI were added in Ticket #800 (Removal of sample - file associations).
comment:3 Changed 10 years ago by
Design discussion.
Display of file properties/annotations is performed by class/file action/file/ViewActiveFile.java
in client/servlet/
, and biomaterial - file associations are shown in a table in the annotations tab, similarly to how the associations are shown for biomaterials by action/sample/ViewActiveSample.java
, action/extract/ViewActiveExtract.java
, and action/extract/ViewActiveLabeledExtract.java
, all in client/servlet/
. For a file, associations are shown by listing the associated biomaterials, while for a biomaterial, the assocated files are listed. This symmetrical arrangement is currently upset by the following two exceptions:
- The association table for biomaterials have a toolbar button for adding files.
- The association table is always shown for biomaterials, while for a file, it is hidden if no associations exist.
In order to make the arrangement symmetrical, the following updates are needed:
- The association table for a file should get a toolbar button for adding biomaterials.
- In order to be able to use the functionality above to add the first file - biomaterial association, the association table for a file should always be shown.
In order to implement the desired functionality to associate biomaterials to a file, one more lack of symmetry needs to be rectified:
- Classes/files
action/sample/AddSampleFile.java
,action/extract/AddExtractFile.java
, andaction/extract/AddLabeledExtractFile.java
inclient/servlet/
, all use class/fileaction/directory/ViewActiveDirectory.java
inclient/servlet/
to perform the file selection. The latter class was introduced in the first year of Proteios SE development, and has grown in complexity since the start. It contains a directory table and a file table, and has two major modes, one for browsing the Proteios SE file system, and one support mode for selecting one or more files as part of the set-up for a multi-step operation. There is currently no corresponding class for the latter purpose for other items than files. It has been possible to select multiple items in a table and then select an extension to process the items, but this is a different approach.
In order to be able to select biomaterials to be associated with a file, the following update should be made:
- An equivalent class to
ViewActiveDirectory
should be created for general items (only restricted to be instances ofClass<? extends BasicItem>
), in order to be able to select the items as part of the set-up for a multi-step operation. The new class will be namedViewItemTable
, and will be based onViewActiveDirectory
, but without the extra complexity added by the directory table.
comment:4 Changed 10 years ago by
Design update:
- For the new class
ViewItemTable
to be able to show a table ofBioMaterial
items, class fileClassDescriptor.java
inapi/core/
needs to be updated. The latter class is used by class/filegui/table/TableFactory2.java
inclient/servlet/
to read values for various item attributes to be placed in table cells.ClassDescriptor
is configured to use a specific class,describedClass
, as a kind of template when reading values for an item, and will only read values if the item belongs to the same class. This leads to problems when showing a table ofBioMaterial
items, sinceBioMaterial
is an abstract class, and the individual items will be instances of classesSample
,Extract
, andLabeledExtract
. However, all the latter classes are subclasses ofBioMaterial
, and this should be adequate for the current purpose.ClassDescriptor
should therefore be updated in public methodObject readValue(Object obj, AttributeDefinition attributeDefinition)
to check ifdescribedClass
is assignable from the object's class, instead of checking for equality of the classes.
comment:5 Changed 10 years ago by
(In [4455]) Refs #803. New class ViewItemTable
introduced for displaying a table of items of a specific class. It has two modes, one for general inspection, and one support mode for selecting one or more items as part of the set-up for a multi-step operation:
- Class/file
action/ViewItemTable.java
inclient/servlet/
added. It is based on class/fileaction/directory/ViewActiveDirectory.java
inclient/servlet/
, but without the extra complexity added by the directory table.ViewItemTable
is intended to be used for item classes of typeClass<? extends BasicItem>
. If session attributeVBoolean ViewItemTable.VSELECT
isnull
ortrue
, select mode will be used. The list of integer id values for selected items is available in valid parameterFormFactory.VID
. - Class/file
ClassDescriptor
inapi/core/
is updated in public methodObject readValue(Object obj, AttributeDefinition attributeDefinition)
to check ifdescribedClass
is assignable from the object's class, instead of checking for equality of the classes.
comment:6 Changed 10 years ago by
(In [4458]) Refs #803. Refs #283. Biomaterial - file associations can now be defined by selecting biomaterials to be associated with a file, instead of the other way around:
- Class/file
action/file/ViewActiveFile.java
inclient/servlet/
updated to always show the association table. The table tool-bar is updated with a new button "Add BioMaterials
" coupled to action link to new class/fileaction/file/AddFileBioMaterial.java
inclient/servlet/
. - New class/file
action/file/AddFileBioMaterial.java
inclient/servlet/
added. It uses classViewItemTable
to display a table of available biomaterials to select from, after which action is forwarded to new classCreateFileBioMaterial
. - Class/file
action/ViewItemTable.java
inclient/servlet/
is based on class/fileaction/directory/ViewActiveDirectory.java
inclient/servlet/
, but without the extra complexity added by the directory table.ViewItemTable
is intended to be used for item classes of typeClass<? extends BasicItem>
. If session attributeVBoolean ViewItemTable.VSELECT
isnull
ortrue
, select mode will be used. The list of integer id values for selected items is available in valid parameterFormFactory.VID
. - New class/file
action/file/CreateFileBioMaterial.java
inclient/servlet/
added. It obtains a list of biomaterial id values from valid parameterFormFactory.VID
and adds the items to the file. - English dictionary file
locale/en/dictionary
inclient/servlet/
updated with new entries for various string keys. - Default icon settings file
icons/default
inclient/servlet/
updated with icon assignments for new string keys.
comment:7 Changed 10 years ago by
(In [4459]) Refs #803. Class/file action/sample/AddSample.java
in client/servlet/
updated to create the sample set as a HashSet<SharedItem>
, instead of a TreeSet<SharedItem>
, in order to avoid problems when adding a sample item (a TreeSet
requires that its members adheres to the Comparable
interface).
comment:8 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Ticket closed as the requested functionality has been added.
Ticket accepted.