aramorph-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Aramorph-users] XML tables


From: Ahmed El-dawy
Subject: Re: [Aramorph-users] XML tables
Date: Fri, 19 Aug 2005 18:01:35 +0300

Hello,

> 2. Is it accepted to add two classes: one for Dictionary and the other
> for CompatabilityTable? This will make the XML parser much easier for
> me. Also it will make the code easier to understand.

Soryy. I don't understand what you mean here.
The InMemoryDictionaryHandler you made handles all work of dictionaries and compatability tables via Maps and Sets. My idea is building a class that handles the work of Dictionary, and another one for handling the work of CompatabilityTable. For example, Dictionary class will contains a method containsEntry(String) for checking of existence, and a method getIterator(String) for getting all entries with the given key. This will make parsing easier because each XML file will be mapped to an object.

 
> 3. I think it is better to add an interface DictionaryHandler which will
> be implemented by InMemoryDictionaryHandler and XMLDictionaryHandler.

Of course. I think it is in the TODO. What's your mind about such an
interface ?
I have attached one. I have just copied functions from InMemoryDictionaryHandler. I had to change access method to public because the interface cannot have a protected method. However, we can set them to package access (default).
 
Don't use com.sun.* packages but *standard* ones (javax.*, org.*)
because I want Aramorph to be buildable on any JVM in order to keep my
Savannah hosting :-)
You are talking about the DOM class. I didn't found the classes I used in another package!!!

Furthermore don't use DocumentBuilderFactoryImpl, just
DocumentBuilderFactory : you shouldn't have access to the factory's
underlying implementation*s* ;-)
I don't get your point. This part of code is copy & paste :). Can you send me the updated code to understand?
 
In the SAX file, the compatibility tables ares build using... DOM.
Sorry! I forgot to change it. I have changed it in the attached version.

When you process a string from the original dictionary, please give it
as as a comment in the code (my fault if this has not been done earlier).
Don't understand.
 
Please try to revise the SAX transformer. I will start working in the parser right now.
--
regards,
Ahmed Saad

Attachment: DictTables2XML.zip
Description: Zip archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]