Open line-o opened 2 years ago
@line-o how would the API look like? Any suggestions on how to use it within code?
As noted by @adamretter in Slack it would be beneficial to limit network requests for remote databases. Therefore, there should be exactly one request that will gather all accessible resources and collections (recursively). Your idea of using an interface like FileWalker might not allow that.
In other words we need to limit the capabilities to a set of options that can be set at the initial request that will then tell the remote database which resources it needs to provide.
Sorting can then be done on the client - the code that will handle the list of resources.
I am unsure in which Class this kind of method would fit best. How about a new method in Collection
List<String> list(Map options) throws XMLDBException;
With options including
I will give it a taught, maybe something like the nio walk file tree could be an option...
It could be useful to have methods that list entire collection subtrees.
Even nicer would be, if the API would provide a method similar to the
ls
command line tool.