From: Harald K. <har...@we...> - 2004-08-23 15:21:12
|
Hi Kal, i did some more thinking and changed the prototype a bit. I now (hope to) have some more answers (suggestions) to your questions. I think that we should do the conversion only on request as this means that we do not have to check the type of data inside the Occurrence. If a Format is requested, we try to convert it. Errors and everything else will then be reported by means of Exceptions. This solution does not increase the amount of processing done on reading a TopicMap and it also gives credit to the fact that most Occurrences will still hold data that is not of any of the supported formats. The parameter for getAdapter should be the desired class, however creation should be done by means of Factories. I implemented this by using a properties file where the DataFormats (Classnames) are Mapped to Factories (Classnames). It would be good if you (and everybody else who is intersted) could have a look at the prototype and give me some feedback. I will check in the classes packed into a zip archive into the root folder of tm4j (so we can remove it later and it is still available to everybody interested). The file is called OccurrenceHandling.zip Cheers, Harald ____________________________________________________ Aufnehmen, abschicken, nah sein - So einfach ist WEB.DE Video-Mail: http://freemail.web.de/?mc=021200 |