Package ome.xml.model

Examples of ome.xml.model.StructuredAnnotations


    // Non-standard, have to add a "Series" annotation
    //
    // First, see if we have one for this series before
    // creating a new one
    //
    StructuredAnnotations sa = ome.getStructuredAnnotations();
    if (sa == null) {
      ome.setStructuredAnnotations(sa = new StructuredAnnotations());
    }
    LongAnnotation seriesAnnotation = null;
    for (int saIdx=0; saIdx<sa.sizeOfLongAnnotationList(); saIdx++) {
      final LongAnnotation candidate = sa.getLongAnnotation(saIdx);
      if ((candidate.getDescription().equals(description)) &&
        (candidate.getNamespace().equals(ANNOTATION_NAMESPACE)) &&
        (candidate.getValue().equals(value))) {
        seriesAnnotation = candidate;
        break;
      }
    }
    if (seriesAnnotation == null) {
      seriesAnnotation = new LongAnnotation();
      seriesAnnotation.setDescription(description);
      seriesAnnotation.setNamespace(ANNOTATION_NAMESPACE);
      seriesAnnotation.setValue(value);
      seriesAnnotation.setID(String.format("%s/%s/%d", ANNOTATION_NAMESPACE, description, value));
      sa.addLongAnnotation(seriesAnnotation);
    }
    plane.linkAnnotation(seriesAnnotation);
   
  }
View Full Code Here

TOP

Related Classes of ome.xml.model.StructuredAnnotations

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.