xnat:abstractProjectAsset

64 views
Skip to first unread message

Célia Sage

unread,
Feb 17, 2023, 3:43:38 AM2/17/23
to xnat_discussion
Hi,

In 2 conversations I read that there is a datatype (xnat:abstractProjectAsset) but cannot find it on XNAT 1.8.6 or 1.8.5. I couldn't find any documentation either. Does it really exist?

Thanks,
Célia

Charlie Moore

unread,
Feb 17, 2023, 6:18:11 PM2/17/23
to xnat_discussion

Hi Célia,

It does indeed exist, but where are you looking for it? If you're trying to find it under the Administer > Data Types section in XNAT, you won't find it there; there are never intended to be any pure instances of just xnat:abstractProjectAsset. Rather, it's a base data type for the concept of "project assessors" which custom data types can extend. One such example would be the data types in https://bitbucket.org/xnatx/datasets-plugin/src/master/ . Here's one spot in that plugin to check out: https://bitbucket.org/xnatx/datasets-plugin/src/398797b6b60ff1baa767fb569d3cdcabe580f3bb/src/main/resources/schemas/datasets/datasets.xsd#lines-79 .

Thanks,
Charlie Moore

Victor Ferat

unread,
Mar 6, 2023, 5:19:03 PM3/6/23
to xnat_discussion
Hey Charlie, hey Célia,

I am trying to use xnat:abstractProjectAsset as suggested by Charlie.

I managed to create, build and install my plugin (explugin) from this source code : https://github.com/vferat/xnat-plugin-demo ( the plugin file can be downloaded form the artefact of the build_plugin workflow).

The first issue I find is that the default xnat:abstractProjectAsset contains elements specific to an experiment such as data, time, duration... (see attached file "xnat_edit.PNG"). Do you know another data type is a bit more generic ? I know that I can simply remove these elements form the edit screens so they are always empty.

The second issue is that I would like to have one and only one exprojectMetadata per project. Is there a way to specify this constraint in the schema definition, or should I handle this in the velocity/turbine scripts ?

For now, I need to define the experiment ID manually using the edit screen, but keep having an error while submitting the form ( see attached file "xnat_edit_error"). In the mean time, the report page doesn't work at all (see xnat_report_error) It seems that most of these issues could be solved by modifying the turbine files. However, I found very little literature on how to edit the turbine files. The xnat generated class XDATScreen_edit_ex_projectMetadata inherits from EditScreenA, but I am not sure how it works. Do you have any useful resources to share on this ? The datasets-plugin doesn't provide much help in this case, as everything seems to be done through the Rest API.

Best,
Victor
xnat_edit_error.PNG
xnat_edit.PNG
xnat_report_error.PNG
Reply all
Reply to author
Forward
0 new messages