|
From: Lars H. <he...@se...> - 2008-07-02 12:53:37
|
Hi Stefan,
[...]
> next thing i wanna talk about is naming of:
> serializer/deserialize (i misstyped it 2 times while writing :-) or
> writer/parser
I don't care. How about Writer / Reader? Maybe with "TopicMap" as
prefix to distinguish it better from the Java io.Reader / .io.Writer:
TopicMapReader, TopicMapWriter.
> then we have to talk about the interfaces. i'd prefer the tmapi-utils way
> TopicMapSystem tmsystem;
> TopicMap tm = parser.parse(tmsystem, file)
> or mio way
> TopicMapSystem tmsystem;
> TopicMap tm = tmsystem.createTopicmap(???,???)
> tm = parser.parse(tm, file)
> while using this i did not know what to insert in ???,??? cause its
> overwritten by the parser, so the first way is better in my view.
> let the parser call createTopicMap
Actually, I'd prefer the latter (maybe that's the reason, why it is
handled that way in MIO ;)).
If the user wants that the topic map is accessible under the same IRI
as the the document IRI, she can use the document IRI to create the
topic map. IMO the latter style is nice because it would be possible
to add more content to an *existing* topic map. Importing more topic
map content into an existing topic map should usually be faster than
letting the TMReader create a topic map, merge it with an existing
topic map and to delete the topic map the TMReader has created.
The latter style allows the user to create a topic map and then
TopicMapReader reader = new XTMTopicMapReader();
reader.read(tm, file)
reader = new LTMTopicMapReader();
reader.read(tm, file2);
After that, the topic map "tm" would contain the content from the XTM
source and the LTM source.
Best regards,
Lars
--
Semagia
<http://www.semagia.com>
|