Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for readerless formats #211

Open
hinerm opened this issue Jul 14, 2014 · 1 comment
Open

Account for readerless formats #211

hinerm opened this issue Jul 14, 2014 · 1 comment
Labels
Milestone

Comments

@hinerm
Copy link
Member

hinerm commented Jul 14, 2014

Currently we assume that if a checker exists for a format, then a parser/reader exist as well.

This is actually incorrect as we can have formats that are output-only (e.g., https://github.com/scifio/scifio/blob/master/src/main/java/io/scif/formats/JavaFormat.java)

So we need to rethink either or both:
a) the API, providing a way to search for formats that have their own reader implementations (similar to how we look for writer-enabled formats)
b) use of the API, ensuring we only indicate support for a dataset if we can perform the desired operation (reading or writing)

@hinerm hinerm self-assigned this Jul 14, 2014
@ctrueden
Copy link
Member

I suggest expanding the FormatService API. Instead of just getFormat(String) we really need a way of asking for a Format for the purpose of parsing, reading, and/or writing separately.

Of course, right now you can call getFormatList(String) and then iterate over the list calling getReaderClass etc. and check for nulls. (We should probably also have Format#canRead(), Format#canParse() and Format#canWrite() to make that more straightforward.) But such iteration is not DRY. The FormatService having built-in API for this would be better.

@hinerm hinerm added this to the 1.0.0 - Official Release milestone Mar 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants