Changeset 6146


Ignore:
Timestamp:
04/20/10 10:03:13 (10 years ago)
Author:
callan
Message:

Added object creation for the Instrument hierarchy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/ome-xml/test/ome/xml/utests/InOut201004Test.java

    r6145 r6146  
    5353 
    5454import ome.xml.r201004.Channel; 
     55import ome.xml.r201004.Detector; 
    5556import ome.xml.r201004.Image; 
     57import ome.xml.r201004.Instrument; 
     58import ome.xml.r201004.Laser; 
    5659import ome.xml.r201004.MetadataOnly; 
    5760import ome.xml.r201004.OME; 
     
    5962import ome.xml.r201004.enums.DimensionOrder; 
    6063import ome.xml.r201004.enums.EnumerationException; 
     64import ome.xml.r201004.enums.LaserType; 
    6165import ome.xml.r201004.enums.PixelType; 
    6266 
     
    8084 
    8185  private static String PIXELS_ID = "Pixels:0"; 
     86 
     87  private static String INSTRUMENT_ID = "Instrument:0"; 
     88 
     89  private static String DETECTOR_ID = "Detector:0"; 
     90 
     91  private static String LIGHTSOURCE_ID = "LightSource:0"; 
    8292 
    8393  private static DimensionOrder dimensionOrder = DimensionOrder.XYZCT; 
     
    122132    ome = new OME(); 
    123133    ome.addImage(makeImage()); 
     134    ome.addInstrument(makeInstrument()); 
    124135    // Produce a valid OME DOM element hierarchy 
    125136    Element root = ome.asXMLElement(document); 
     
    196207  } 
    197208 
     209  private Instrument makeInstrument() { 
     210    // Create <Instrument/> 
     211    Instrument instrument = new Instrument(); 
     212    instrument.setID(INSTRUMENT_ID); 
     213    // Create <Detector/> under <Instrument/> 
     214    Detector detector = new Detector(); 
     215    detector.setID(DETECTOR_ID); 
     216    instrument.addDetector(detector); 
     217    // Create <Laser/> under <Instrument/> 
     218    Laser laser = new Laser(); 
     219    //laser.setID(LIGHTSOURCE_ID);  /// XXX: Missing ID!?! 
     220    laser.setType(LaserType.DYE); 
     221    //instrument.addLightSource(laser);  // XXX: Fucked type hierarchy!?! 
     222    return instrument; 
     223  } 
     224 
    198225  private String asString() throws TransformerException { 
    199226    TransformerFactory transformerFactory = 
Note: See TracChangeset for help on using the changeset viewer.