Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.5
    • Component/s: XFT
    • Labels:
      None
    • Sprint:
      1.7.1 Release Sprint 1, 1.7.5-RC-1
    • Rank:
      0|0hzzg1:zr
    • Sprint:
      1.7.1 Release Sprint 1, 1.7.5-RC-1

      Description

      I want a service that I can call (from a plugin in my case, but it could be from anywhere) that will create a new object from an XML file. Ideally I would only need to provide the file and the user, and everything that needs to be discovered about the object and where it goes could be read out of the XML.

      The specific use case I have in mind is creating an image assessor (a Freesurfer assessor, for example) at the end of a container execution. When a container finishes, an event is fired that will kick off "container finalization" tasks; one of those may be finding XML files that have been generated and creating assessors from them. It would be very nice if all the container service had to do is find the file and pass it along to some service within XNAT proper that could do the rest of the job.

      Similar in spirit to XNAT-4548. Here, I want an XML file -> Assessor/Whatever service; in XNAT-4548 I wanted a directory -> Resource service.

        Issue Links

          Activity

          Hide
          jrherrick@wustl.edu Rick Herrick added a comment -

          Currently supported in 1.7-auth-perf branch of xnat-web.

          I refactored the code for the XMLUpload action to pull it into the catalog service with the CatalogService.insertXmlObject() method. The XMLUpload action calls this method in place of its previous implementation.

          The new method is also referenced from the CatalogApi REST service through two new REST methods. The path to the REST methods is the same:

          http://server/xapi/archive/upload/xml

          The methods differ in HTTP method and content type:

          • PUT accepts the text/plain and application/xml content types, with the XML in the request body. Parameters like allowDataDeletion, event_action, event_reason, and event_comment can be specified as query-string parameters.
          • POST accepts the multipart/form-data content type, with the XML as a file form parameter named item and event_action, event_reason, and event_comment as regular form parameters.

          Both methods return text/plain with the system ID of the newly created or updated object.

          Show
          jrherrick@wustl.edu Rick Herrick added a comment - Currently supported in 1.7-auth-perf branch of xnat-web. I refactored the code for the XMLUpload action to pull it into the catalog service with the CatalogService.insertXmlObject() method. The XMLUpload action calls this method in place of its previous implementation. The new method is also referenced from the CatalogApi REST service through two new REST methods. The path to the REST methods is the same: http://server/xapi/archive/upload/xml The methods differ in HTTP method and content type: PUT accepts the text/plain and application/xml content types, with the XML in the request body. Parameters like allowDataDeletion , event_action , event_reason , and event_comment can be specified as query-string parameters. POST accepts the multipart/form-data content type, with the XML as a file form parameter named item and event_action , event_reason , and event_comment as regular form parameters. Both methods return text/plain with the system ID of the newly created or updated object.

            People

            • Assignee:
              moore.c@wustl.edu Charlie Moore
              Reporter:
              jflavin@wustl.edu John Flavin (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours
                6h

                  Agile