Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Talk:SMILA/Documentation/2011.Simplification/Data Model and Serialization Formats
Revision as of 10:30, 10 March 2011 by Tmenzel.brox.de (Talk | contribs) (New page: TM: I have just briefly looked @ the new DM and had some ideas/remarks which I just put down in all brevity as a bullet list. At times these are formulated rather strongly as "should be" a...)
TM: I have just briefly looked @ the new DM and had some ideas/remarks which I just put down in all brevity as a bullet list. At times these are formulated rather strongly as "should be" and not as a question. So plz. be not offended and just comment on why this is not a good idea or does not work for Smila.
- TM: AnyMap should extend Map interface
- TM: AnySeq should extend List
- TM: isValue -> isContainer, isLiteral
- Reason: also a Map, Seq is a Value, albeit a complex one hence isValue is not really that telling IMO
- TM: what is the distinction between Date and DateTime other than the use case? i.e. do we treat its value differently, e.g. truncate the time part in case we say asDate()
- TM: why have a Value class and not use java native objects directly? e.g. Boolean, Integer, …
- TM: Value.asXXX() I see that they throw exceptions, depending on what u want to do this is good or just bothersome.
- I would also provide a version that silently returns NULL (in C# the cast operator "as" behaves like so, and I miss it sometimes in java) OR
- a default value in case datatype doesn’t match – or even convert automatically.
- this could be done by overloading with a parameter that takes the default value, a flag that controls return null vs. throw exception or having 2 sets of methods
- TM: Record.getMetadata() -> Record.getValueMap()
- reason: sometimes we don’t have attachments at all and anly use the "meta data" which is the not just meta, e.g. in case of search
- TM: are we still going to have some Path object or smth equivalent? I kind of liked that…
- TM: Attachments, the record should always have an indicator of all attachments and tell if the attachement has been filtered out. that way we don’t need a trip to the BB and ask that.