Changeset 2830


Ignore:
Timestamp:
05/29/07 08:40:04 (13 years ago)
Author:
melissa
Message:

Speed up calls to setOriginalMetadata.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/ome/OMEXMLMetadataStore.java

    r2822 r2830  
    6565  private double[] channelMaximum; 
    6666 
    67   /** First Image's CustomAttributes node. */ 
    68   private CustomAttributesNode firstImageCA; 
     67  /** DOM element that backs the first Image's CustomAttributes node. */ 
     68  private Element firstImageCA; 
    6969 
    7070  // -- Constructor -- 
     
    101101    if (firstImageCA == null) {  
    102102      ImageNode image = (ImageNode) getChild(root, "Image", 0); 
    103       firstImageCA =  
     103      CustomAttributesNode ca =  
    104104        (CustomAttributesNode) getChild(image, "CustomAttributes", 0); 
     105      firstImageCA = ca.getDOMElement(); 
    105106 
    106107      Vector original = DOMUtil.getChildElements("OriginalMetadata",  
    107         firstImageCA.getDOMElement()); 
     108        ca.getDOMElement()); 
    108109      if (original.size() == 0) { 
    109110        Element el = DOMUtil.createChild(root.getDOMElement(), 
     
    131132    } 
    132133 
    133     Element el =  
    134       DOMUtil.createChild(firstImageCA.getDOMElement(), "OriginalMetadata"); 
    135     OMEXMLNode node = OMEXMLNode.createNode(el); 
     134    Element el = DOMUtil.createChild(firstImageCA, "OriginalMetadata"); 
     135    OMEXMLNode node = new AttributeNode(el); 
    136136    node.setAttribute("name", key); 
    137137    node.setAttribute("value", value); 
Note: See TracChangeset for help on using the changeset viewer.