mace-opensaml-users - Re: prepareForAssignment
Subject: OpenSAML user discussion
List archive
- From: Chad La Joie <>
- To:
- Subject: Re: prepareForAssignment
- Date: Tue, 18 Dec 2007 10:30:54 +0100
- Organization: SWITCH
I think org.opensaml.xml.util.AttributeMap does what you want.
Asa Hardcastle wrote:
Hi All,
I am in the middle of modeling ID-WSF 2.0 DST using the java XMLTooling library. It appears that AbstractXMLObject.prepareForAssignment(oldString, newString) -- a protected method -- is used to determine whether or not the DOM should be dumped.
One of the challenges I am facing is writing all of the xmltooling classes without an xsd class generator, hence I am trying to keep the maintainable code to a minimum. One way I am doing this is by modeling attribute sets and using them to store values in my XML Tooling classes. This seemed like a great idea until I realized that xmltooling would have no way of knowing if I changed the value of an attribute, unless I told it.
My solution.
Create a utility class that looks like this:
OpenLibertyHelpers.prepareForAssignment(oldString, newString, abstractXMLObject)
where I compare the strings the same way AbstractXMLObject does it, and then if needed, I call abstractXMLObject.releaseThisAndParentDOM()
Does this sound like an ok approach? Is there a better approach? Any pitfalls?
thanks,
asa
--
Asa Hardcastle, Technical Lead, openLiberty ID-WSF ClientLib
Tel: +1.413.429.1044 Skype: subsystem7
--
SWITCH
Serving Swiss Universities
--------------------------
Chad La Joie, Software Engineer, Security
Werdstrasse 2, P.O. Box, 8021 Zurich, Switzerland
phone +41 44 268 15 75, fax +41 44 268 15 68
,
http://www.switch.ch
- prepareForAssignment, Asa Hardcastle, 12/17/2007
- Re: prepareForAssignment, Chad La Joie, 12/18/2007
Archive powered by MHonArc 2.6.16.