Changeset 6617


Ignore:
Timestamp:
07/01/10 06:16:56 (9 years ago)
Author:
callan
Message:

Support for TagAnnotation and TermAnnotation conversion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/meta/MetadataConverter.java

    r6600 r6617  
    21292129    } 
    21302130    } catch (NullPointerException e) { } 
     2131    try { 
     2132    int tagAnnotationCount = src.getTagAnnotationCount(); 
     2133    for (int tagAnnotationIndex=0; tagAnnotationIndex<tagAnnotationCount; tagAnnotationIndex++) { 
     2134    try { 
     2135      String tagAnnotationIDValue = src.getTagAnnotationID(tagAnnotationIndex); 
     2136      if (tagAnnotationIDValue != null) dest.setTagAnnotationID(tagAnnotationIDValue, tagAnnotationIndex); 
     2137    } catch (NullPointerException e) { } 
     2138    try { 
     2139      String tagAnnotationNamespaceValue = src.getTagAnnotationNamespace(tagAnnotationIndex); 
     2140      if (tagAnnotationNamespaceValue != null) dest.setTagAnnotationNamespace(tagAnnotationNamespaceValue, tagAnnotationIndex); 
     2141    } catch (NullPointerException e) { } 
     2142    try { 
     2143      String tagAnnotationValueValue = src.getTagAnnotationValue(tagAnnotationIndex); 
     2144      if (tagAnnotationValueValue != null) dest.setTagAnnotationValue(tagAnnotationValueValue, tagAnnotationIndex); 
     2145    } catch (NullPointerException e) { } 
     2146    } 
     2147    } catch (NullPointerException e) { } 
     2148    try { 
     2149    int termAnnotationCount = src.getTermAnnotationCount(); 
     2150    for (int termAnnotationIndex=0; termAnnotationIndex<termAnnotationCount; termAnnotationIndex++) { 
     2151    try { 
     2152      String termAnnotationIDValue = src.getTermAnnotationID(termAnnotationIndex); 
     2153      if (termAnnotationIDValue != null) dest.setTermAnnotationID(termAnnotationIDValue, termAnnotationIndex); 
     2154    } catch (NullPointerException e) { } 
     2155    try { 
     2156      String termAnnotationNamespaceValue = src.getTermAnnotationNamespace(termAnnotationIndex); 
     2157      if (termAnnotationNamespaceValue != null) dest.setTermAnnotationNamespace(termAnnotationNamespaceValue, termAnnotationIndex); 
     2158    } catch (NullPointerException e) { } 
     2159    try { 
     2160      String termAnnotationValueValue = src.getTermAnnotationValue(termAnnotationIndex); 
     2161      if (termAnnotationValueValue != null) dest.setTermAnnotationValue(termAnnotationValueValue, termAnnotationIndex); 
     2162    } catch (NullPointerException e) { } 
     2163    } 
     2164    } catch (NullPointerException e) { } 
    21312165  } 
    21322166 
Note: See TracChangeset for help on using the changeset viewer.