I have been looking at the restconfig-java code... I had hoped there 
would be an easy temporary fix for all the missing parts that would just 
leave the missing parts unchanged, but the way the code is set up I do 
not see any easy way to do that. This is because it uses "@Xml..." 
annotations from the javax.xml.bind.annotation package to translate the 
xml into java objects, uses mutate methods to change things and then 
translates back to xml. So the code needs to be fixed to have all xml 
elements properly translated so that it doesn't wipe them out.

I am wondering if this is a reasonable approach- unless the Rest schema 
is very stable, this code will have to be carefully updated anytime 
something new is added to the schema, or it will cause these new 
elements to be wiped.

I am guessing this is what happend with the current code- it looks like 
the author wrote it to correspond to a different xml schema, and then 
the schema changed.  Actually now that I know how it is supposed to 
work, I am reluctant to fix it, because then it becomes dangerous if the 
Rest schema changes, unless there are checks that will verify that the 
complete xml element was translated and shut down before any harm is done.

Before I heard of the restconfig-java module, I was working on some PHP 
that would download the xml into an object, change certain things, leave 
everything else the same and then upload.  I think a similar approach 
would work in java using the DOM API. Although this is not as slick as 
using the @Xml annotations, it seems more robust to me.

Comments are appreciated,
Tara

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to