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 #953 (assigned)

Opened 16 years ago

Last modified 13 years ago

Can OMERO.fs provide the java.io.Reader interface?

Reported by: jamoore Owned by: cblackburn
Priority: major Milestone: Unscheduled
Component: OmeroFs Version: 3.0-M1
Keywords: search Cc: cxallan
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

Hey guys.

I'm just working down in the belly of search and was wondering if the
plan was to make access to an OMERO.fs file via the
OriginalFileService. That's currently what I'm injecting.

It's obviously ok if that has to change, but in the way of another use
case I currently do this:

    protected Iterable<Reader> parse(OriginalFile file) {
        if (files != null && parsers != null) {
            if (file != null && file.getFormat() != null) {
                String path = files.getFilesPath(file.getId());
                String format = file.getFormat().getValue();
                FileParser parser = parsers.get(format);
                if (parser != null) {
                    return parser.parse(new File(path));
                } else {
                    parser = parsers.get("*");
                    if (parser != null) {
                        return parser.parse(new File(path));
                    }
                }
            }
        }
        return FileParser.EMPTY;
    }

where "files" is the OriginalFileService. I can teach parser.parse()
to read from pretty much anything that implements the java.io.Reader interface.

Change History (2)

comment:1 Changed 15 years ago by cblackburn

  • Milestone changed from OMERO-Beta4 to Future
  • Status changed from new to assigned

OMERO.fs currently provides a block read interface.
I'll leave this one open for now but close if the current interface is sufficient.

comment:2 Changed 13 years ago by jmoore

  • Type changed from User Story to Task
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.67130 sec.)

We're Hiring!