Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #12683 (closed)

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

Bug: xsd-fu does not code generate methods for BinData on Mask ROIs - Mask is broken

Reported by: rleigh Owned by: mlinkert
Priority: major Milestone: B-F-5.2.0
Component: Bio-Formats Version: 5.0.5
Keywords: xsd-fu Cc: mlinkert, jamoore
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

The Mask ROI type in the OME data model does not currently generate methods or variables for getting and setting the contained BinData? object. This applies to both the model object and to the MetadataStore/Retrieve? interfaces. This means that Mask ROIs do not work with the current model and code generation.

I think this is related to similar issues with TIFF/HDF elements outside the main namespace. xsd-fu doesn't handle namespaces properly when looking at the schema elements to decide what needs to be generated. While the immediate defect is with Mask/BinData?, it does have a wider impact in terms of future model changes. And on the C++ side, it means that Masks are not functional in any situation, which isn't great.

This works in a single case: the OMEROMetadataStoreClient, since the Java implementation hardcodes the single required method, but on the Bio-Formats side this is a nonfunctional stub since the required model object methods are not available.

It would be ideal if we can fix up xsd-fu to generate the code properly in this case. Or, worst case, hardcode it into the templates so that it at least works. But having to do the latter would indicate a serious and unfixable problem with the code generation.

Is there anyone who understand the details of what's going on here? Do we need to teach xsd-fu about XML namespaces across the board or is there a simpler fix?

Change History (7)

comment:1 Changed 9 years ago by mlinkert

  • Milestone changed from Unscheduled to 5.1.1

Moving to 5.1.1 for triage.

comment:2 Changed 9 years ago by mlinkert

  • Cc ajpatterson removed
  • Milestone changed from 5.1.1 to 5.2.0-m1

Very unlikely to be able to make safe, well-tested changes here before the end of the week. Moving to 5.2.0-m1, with the hope of making incremental progress in 5.1.2/5.1.3.

comment:3 Changed 9 years ago by rleigh

No worries, this one is definitely not a trivial change. I'll be happy to dig into the xsd-fu code to try and find out what's going on. [I've tried before but without great success.]

comment:4 Changed 9 years ago by rleigh

This is due to generateDS

  • not being namespace aware (it doesn't process namespaces)
  • not being able to process multiple schemas (it doesn't follow import directives, or if it does, is buggy)

This means that if you have an enumeration in e.g. ome.xsd, and then use that in e.g. ROI.xsd or BinaryFile?.xsd, in those schemas the enumeration will default to an xsd:string, and will be a string in all the generated code.

comment:5 Changed 9 years ago by jamoore

  • Milestone changed from 5.2.0 to B-F-5.2.0

Splitting due to milestone decoupling.

comment:6 Changed 8 years ago by sbesson

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.69268 sec.)

We're Hiring!