Changeset 7357


Ignore:
Timestamp:
12/08/10 18:16:01 (9 years ago)
Author:
melissa
Message:

Make sure references are resolved before resetting an OMEXMLMetadata's root object.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/services/OMEXMLServiceImpl.java

    r7157 r7357  
    346346    Hashtable<String, Object> metadata) 
    347347  { 
     348    ((OMEXMLMetadataImpl) omexmlMeta).resolveReferences(); 
    348349    OME root = (OME) omexmlMeta.getRoot(); 
    349350    StructuredAnnotations annotations = root.getStructuredAnnotations(); 
     
    370371    String key, String value) 
    371372  { 
     373    ((OMEXMLMetadataImpl) omexmlMeta).resolveReferences(); 
    372374    OME root = (OME) omexmlMeta.getRoot(); 
    373375    StructuredAnnotations annotations = root.getStructuredAnnotations(); 
     
    420422  /** @see OMEXMLService#removeBinData(OMEXMLMetadata) */ 
    421423  public void removeBinData(OMEXMLMetadata omexmlMeta) { 
     424    ((OMEXMLMetadataImpl) omexmlMeta).resolveReferences(); 
    422425    OME root = (OME) omexmlMeta.getRoot(); 
    423426    List<Image> images = root.copyImageList(); 
     
    434437  /** @see OMEXMLService#removeChannels(OMEXMLMetadata, int, int) */ 
    435438  public void removeChannels(OMEXMLMetadata omexmlMeta, int image, int sizeC) { 
     439    ((OMEXMLMetadataImpl) omexmlMeta).resolveReferences(); 
    436440    OME root = (OME) omexmlMeta.getRoot(); 
    437441    Pixels img = root.getImage(image).getPixels(); 
     
    449453  /** @see OMEXMLService#addMetadataOnly(OMEXMLMetadata, int) */ 
    450454  public void addMetadataOnly(OMEXMLMetadata omexmlMeta, int image) { 
     455    ((OMEXMLMetadataImpl) omexmlMeta).resolveReferences(); 
    451456    MetadataOnly meta = new MetadataOnly(); 
    452457    OME root = (OME) omexmlMeta.getRoot(); 
Note: See TracChangeset for help on using the changeset viewer.