Closed jbfaden closed 4 years ago
I'd like to get started on this this week. Also, the Java code produced should be easily converted to JavaScript, which I will do as a validation with Bob's assistance.
The Java client is written, but Bob and I discovered $v is part of the spec and I didn't really address this. This means additional information needs to be passed out when parsing, so I'll support adding tags to a map. I thought about doing this anyway, to provide the matched $x content.
Also Bob was expecting that I would run against the formatting and parsing json files (https://github.com/hapi-server/uri-templates/blob/master/formatting.json), and this showed we are thinking of the interface slightly differently. I can easily add a static method which will match those expectations.
Last, I noticed that the two interfaces between parse and format are inconsistent. One uses decomposed times, the other uses formatted times.
These changes are done. The parse and format methods have a map argument where extra information like version numbers and named fields are kept.
The URI_templates code, which is exposed as a servlet here http://jfaden.net/AutoplotServlet/URI_Templates.jsp. This should be extracted into its own independent library. I believe the problem is that the Autoplot version uses DatumRange objects to represent time spans and its FileSystem objects to do remote listings.