Return-Path: X-Original-To: apmail-oodt-dev-archive@www.apache.org Delivered-To: apmail-oodt-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D2E28448E for ; Sun, 29 May 2011 06:34:05 +0000 (UTC) Received: (qmail 74386 invoked by uid 500); 29 May 2011 06:34:05 -0000 Delivered-To: apmail-oodt-dev-archive@oodt.apache.org Received: (qmail 74312 invoked by uid 500); 29 May 2011 06:34:04 -0000 Mailing-List: contact dev-help@oodt.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@oodt.apache.org Delivered-To: mailing list dev@oodt.apache.org Received: (qmail 74304 invoked by uid 99); 29 May 2011 06:34:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 May 2011 06:34:04 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of holenoter@me.com designates 17.148.16.99 as permitted sender) Received: from [17.148.16.99] (HELO asmtpout024.mac.com) (17.148.16.99) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 May 2011 06:33:59 +0000 MIME-version: 1.0 Content-type: multipart/alternative; boundary="Boundary_(ID_L3jkGy5Yz3BPR5vgN4vdvQ)" Received: from spool004.mac.com ([10.150.69.54]) by asmtp024.mac.com (Oracle Communications Messaging Exchange Server 7u4-18.01 64bit (built Jul 15 2010)) with ESMTP id <0LLY00J1Q27V8X80@asmtp024.mac.com> for dev@oodt.apache.org; Sat, 28 May 2011 23:33:31 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.148,0.0.0000 definitions=2011-05-29_02:2011-05-28,2011-05-29,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1105280239 Received: from localhost ([10.150.79.226]) by spool004.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTP id <0LLY00BRL27NSS70@spool004.mac.com> for dev@oodt.apache.org; Sat, 28 May 2011 23:33:24 -0700 (PDT) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1105280239 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.148,0.0.0000 definitions=2011-05-29_02:2011-05-28,2011-05-29,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1105280239 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.4.6813,1.0.148,0.0.0000 definitions=2011-05-29_02:2011-05-28,2011-05-29,1970-01-01 signatures=0 To: dev@oodt.apache.org Cc: "dev@oodt.apache.org" From: holenoter Subject: Re: XMLValidation layer modifyElement Date: Sun, 29 May 2011 06:33:23 +0000 (GMT) X-Mailer: MobileMe Mail (1C3224) Message-id: <2da998d6-ab31-c24f-baad-878f70a39426@me.com> In-reply-to: <79A02AC1-1430-4AE4-9131-37C34747D733@jpl.nasa.gov> --Boundary_(ID_L3jkGy5Yz3BPR5vgN4vdvQ) Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: quoted-printable =0Ahey chris,=EF=BB=BF=0A=0Aif you modify an element then call getElements= (ProductType) you will not get the modified element because the product ty= pe element map was not updated. . . .hope hawaii was a good time dude!=0A=0A= -brian=0A=0AOn May 28, 2011, at 10:46 PM, "Mattmann, Chris A (388J)" wrote:=0A=0A> Hi Michael,=0A>=0A> > I looked at= the XMLValidation layer's modifyElement function, and it doesn't appear t= o modify elements that get put into the productTypeElementMap.=0A>=0A> It = looks like it's modifying the elements that get put into the product type = element map, indeed. The function consists of:=0A>=0A> {code}=0A> elementM= ap.put(element.getElementId(), element);=0A> saveElementsAndMappings();=0A= > {code}=0A>=0A> It first takes in the new element, updates the element ma= p, 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 eleme= nt has the same identifier as was used to originally link it, it will get = saved through fine.=0A>=0A> >=0A> > Thus an element will be modified in th= e elements map (element id to element) but if it is already mapped to a pr= oduct type the product type to element map will maintain a reference to th= e unmodified element. Is this intended behavior, or have I missed somethin= g?=0A>=0A> See above.=0A>=0A> >=0A> > I had intended to use the modifyElem= ent function, but with the purpose of updating any occurrence of that elem= ent. If this is not the intended purpose I will find a workaround.=0A>=0A>= Let me know if I'm misunderstanding you, but I think it works fine...=0A>= =0A> Cheers,=0A> Chris=0A>=0A> +++++++++++++++++++++++++++++++++++++++++++= +++++++++++++++++++++++=0A> Chris Mattmann, Ph.D.=0A> Senior Computer Scie= ntist=0A> NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA=0A> Office= : 171-266B, Mailstop: 171-246=0A> Email: chris.a.mattmann@nasa.gov=0A> WWW= : http://sunset.usc.edu/~mattmann/=0A> +++++++++++++++++++++++++++++++++++= +++++++++++++++++++++++++++++++=0A> Adjunct Assistant Professor, Computer = Science Department=0A> University of Southern California, Los Angeles, CA = 90089 USA=0A> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++++=0A>=0A= --Boundary_(ID_L3jkGy5Yz3BPR5vgN4vdvQ) Content-type: multipart/related; boundary="Boundary_(ID_urdFD44nZ8OJXoy6ybOZbg)"; type="text/html" --Boundary_(ID_urdFD44nZ8OJXoy6ybOZbg) Content-type: text/html; CHARSET=US-ASCII Content-transfer-encoding: 7BIT

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.mattmann@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.mattmann@nasa.gov
WWW: http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

--Boundary_(ID_urdFD44nZ8OJXoy6ybOZbg)-- --Boundary_(ID_L3jkGy5Yz3BPR5vgN4vdvQ)--