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!

-brian

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

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:

{code}
elementMap.put(element.getElementId(), element);
saveElementsAndMappings();
{code}

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...

Cheers,
Chris

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

Reply via email to