Project

General

Profile

« Previous | Next » 

Revision 1410

Added by Jing Tao almost 22 years ago

After finishing parsing a access rule and accessSection, assign them to a new object.

View differences:

src/edu/ucsb/nceas/metacat/EmlSAXHandler.java
356 356
     if ((currentNode.getTagName()).equals(ALLOW) ||
357 357
         (currentNode.getTagName()).equals(DENY))
358 358
     {
359
       // finish parser a ccess rule and  clone it
360
       AccessRule newRule = (AccessRule)accessRule.clone();
359
       // finish parser a ccess rule and  assign it to new one
360
       AccessRule newRule = accessRule;
361 361
       //add the new rule to access section object
362 362
       accessObject.addAccessRule(newRule);
363
       // reset access rule( if we didn't clone, after rseting, this object will
364
       // point to null
363
       // reset access rule
365 364
       accessRule = null;
366 365
     }
367 366
     else if ((currentNode.getTagName()).equals(ACCESS))
368 367
     {
369
       // finish parse a access setction and clone it
370
       AccessSection newAccessObject = (AccessSection)accessObject.clone();
368
       // finish parse a access setction and assign it to new one
369
       AccessSection newAccessObject = accessObject;
371 370
       if (processTopLeverAccess)
372 371
       {
373 372
         // top level access control will handle whole document -docid

Also available in: Unified diff