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 16 years ago by cblackburn
- Milestone changed from OMERO-Beta4 to Future
- Status changed from new to assigned
comment:2 Changed 13 years ago by jmoore
- Type changed from User Story to Task
OMERO.fs currently provides a block read interface.
I'll leave this one open for now but close if the current interface is sufficient.