oodt-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Starch, Michael D (388L)" <Michael.D.Sta...@jpl.nasa.gov>
Subject RE: XMLValidation layer modifyElement
Date Sun, 29 May 2011 15:34:27 GMT

The function does save out the file but, it does not update the in-memory product to element
map.   This leaves the two in-memory maps out of synch, until the fm is restarted and the
updated files are re-read.

On this note, I am also getting a rather nasty crash when writing the file back to disk, but
I have not sorted out whither it is user-error or a bug.  If it is a bug, I will do my best
to report it and fix it.  More on this hopefully on Tuesday.


From: holenoter [holenoter@me.com]
Sent: Saturday, May 28, 2011 11:33 PM
To: dev@oodt.apache.org
Cc: dev@oodt.apache.org
Subject: Re: XMLValidation layer modifyElement

hey chris,

if you modify an element then call getElements(ProductType) you will not get the modified
element because the product type element map was not updated. . . .hope hawaii was a good
time dude!


On May 28, 2011, at 10:46 PM, "Mattmann, Chris A (388J)" <chris.a.mattmann@jpl.nasa.gov>

Hi Michael,

> I looked at the XMLValidation layer's modifyElement function, and it doesn't appear to
modify elements that get put into the productTypeElementMap.

It looks like it's modifying the elements that get put into the product type element map,
indeed. The function consists of:

elementMap.put(element.getElementId(), element);

It first takes in the new element, updates the element map, and then saves out the new map
file with the updated element definition. The product type element map is left unmodified,
so as long as the element has the same identifier as was used to originally link it, it will
get saved through fine.

> Thus an element will be modified in the elements map (element id to element) but if it
is already mapped to a product type the product type to element map will maintain a reference
to the unmodified element. Is this intended behavior, or have I missed something?

See above.

> I had intended to use the modifyElement function, but with the purpose of updating any
occurrence of that element. If this is not the intended purpose I will find a workaround.

Let me know if I'm misunderstanding you, but I think it works fine...


Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: chris.a.mattmann@nasa.gov<mailto:chris.a.mattmann@nasa.gov>
WWW: http://sunset.usc.edu/~mattmann/<http://sunset.usc.edu/%7Emattmann/>
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA

View raw message