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

Re: Are you too busy?





Nathan Potter wrote:
John,

Thursday works for me.

I have two things:

1) Mods/fixes to java-dods 1.1.7.

Things that you need.

Ive made a few minor changes, but lost track exactly what. I can recreate, but Id like to get them into your repository, and perhaps start working out of that. Are you using Subversion now?



Possibly released as java-opendap which would mean package name changes.

no problem

Discussion.

What is the status of your integrate "Java and C++" work? Status of bugs in the DDS parser? What do we need to do for cataloging? What are long range plans for the Java library?



2) Integrating XML into Java-OPeNDAP.

I have been thinking about the whole XML thing. I realized that my initial implementation of XML in the DAP was somewhat bumbling: Basically I had the DAP objects "print" themselves as a set of XML tags. Lame. So I think, minimally the DAP objects should return something like an org.jdom.Element that contains their correct representation. But then I get to thinking that I've got this structured data object in memory, and I am asking it to give me _another_ structured data object containing the same structure. Why? Why not make them the same? What would be the implications of doing something more holistic? What about having opendap.dap.BaseType extend org.jdom.Element? This has really got my wheels turning and I want to talk to you about the implications.

Well, I dont see any obvious problem of starting your heirarchy with org.jdom.Element instead of Object. OTOH, standard wisdom is to "prefer delegation over inheritence", so I would be cautious, you may find some problems.


I tend to use a "jdom parser" class to convert object trees to and from XML. 
Ive gotten so used to writing them, and they are so automatic, i dont think about it. I 
prefer to code them by hand, because you can fix all kinds of little problems in the 
translation.

I doubt theres any performance considerations, just ease of code maintenence.

Heres a code sample, where i do a little processing that couldnt be done easily 
in an auto-translater:

 private Element writeService( InvService service) {
   Element serviceElem = new Element("service", defNS);
   serviceElem.setAttribute("name", service.getName());
   serviceElem.setAttribute("serviceType", service.getServiceType().toString());
   serviceElem.setAttribute("base", service.getBase());
   if ((service.getSuffix() != null) && (service.getSuffix().length() > 0))
     serviceElem.setAttribute("suffix", service.getSuffix());

   // properties
   Iterator props = service.getProperties().iterator();
   while ( props.hasNext()) {
     InvProperty p = (InvProperty) props.next();
     serviceElem.addContent( writeProperty( p));
   }

   // services
   Iterator services = service.getServices().iterator();
   while ( services.hasNext()) {
     InvService nested = (InvService) services.next();
     serviceElem.addContent( writeService( nested));
   }

   // dataset roots
   if (raw) {
     Iterator iter = service.getDatasetRoots().iterator();
     while ( iter.hasNext()) {
       InvProperty p = (InvProperty) iter.next();
       serviceElem.addContent( writeDatasetRoot( p));
     }
   }

   return serviceElem;
 }





N



On Nov 8, 2005, at 8:26 AM, John Caron wrote:

hi nathan, i've been gone, then sick and working at home so i havent been sure when i would have time. how about thursday about 2 pm my time? can you send a written summary of the issues so i can think about them before hand?


Nathan Potter wrote:

John,
So, I realize I am being a nag here, but are you going to be available at any point this week to talk? I want to get straight what you need in a interim release and I want to ask you about some architectural ideas regarding the DAP.
Nathan
========================================================
Nathan Potter The OPeNDAP Project
address@hidden http://opendap.org
541 737 2293 voice
541 737 2064 fax


==============================================================
Nathan Potter         O.H. Hinsdale Wave Research Laboratory
address@hidden     Oregon State University
541 737 6971 voice    3550 SW Jefferson Ave
541 737 6974 fax      Corvallis, OR   97333


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.