Class XMLMockObjects


  • public class XMLMockObjects
    extends Object
    Creates XML objects for the 2010-06 schema.
    Since:
    3.0-Beta4
    Version:
    3.0 (Internal version: $Revision: $Date: $)
    Author:
    Jean-Marie Burel      j.burel@dundee.ac.uk, Chris Allan      Chris Allan callan at blackcat dot ca
    • Field Detail

      • DEFAULT_COLOR

        public static final Color DEFAULT_COLOR
        The default color.
      • LIGHTSOURCE_POWER

        public static final Double LIGHTSOURCE_POWER
        The default power of a light source.
      • COMPONENT_MODEL

        public static final String COMPONENT_MODEL
        The default model of a component of a microscope.
        See Also:
        Constant Field Values
      • COMPONENT_MANUFACTURER

        public static final String COMPONENT_MANUFACTURER
        The default manufacturer of a component of a microscope.
        See Also:
        Constant Field Values
      • COMPONENT_SERIAL_NUMBER

        public static final String COMPONENT_SERIAL_NUMBER
        The default serial number of a component of a microscope.
        See Also:
        Constant Field Values
      • COMPONENT_LOT_NUMBER

        public static final String COMPONENT_LOT_NUMBER
        The default lot number of a component of a microscope.
        See Also:
        Constant Field Values
      • LASER_TYPE

        public static final LaserType LASER_TYPE
        The default type of a laser.
      • ARC_TYPE

        public static final ArcType ARC_TYPE
        The default type of an arc.
      • FILAMENT_TYPE

        public static final FilamentType FILAMENT_TYPE
        The default type of a filament.
      • DETECTOR_TYPE

        public static final DetectorType DETECTOR_TYPE
        The default type of a detector.
      • CORRECTION

        public static final Correction CORRECTION
        The default objective's correction.
      • IMMERSION

        public static final Immersion IMMERSION
        The default objective's immersion.
      • FILTER_TYPE

        public static final FilterType FILTER_TYPE
        The default objective's immersion.
      • MICROSCOPE_TYPE

        public static final MicroscopeType MICROSCOPE_TYPE
        The default type of a microscope.
      • EXPERIMENT_TYPE

        public static final ExperimentType EXPERIMENT_TYPE
        The default type of a microscope.
      • MICROBEAM_MANIPULATION_TYPE

        public static final MicrobeamManipulationType MICROBEAM_MANIPULATION_TYPE
        The default type of a microbeam manipulation.
      • BINNING

        public static final Binning BINNING
        The default binning value.
      • MEDIUM

        public static final Medium MEDIUM
        The default medium for the objective.
      • LASER_MEDIUM

        public static final LaserMedium LASER_MEDIUM
        The default type of a laser.
      • SIZE_X

        public static final Integer SIZE_X
        The default number of pixels along the X-axis.
      • SIZE_Y

        public static final Integer SIZE_Y
        The default number of pixels along the Y-axis.
      • SIZE_Z

        public static final Integer SIZE_Z
        The default number of z-sections.
      • SIZE_C

        public static final Integer SIZE_C
        The default number of channels.
      • SIZE_T

        public static final Integer SIZE_T
        The default number of time-points.
      • BYTES_PER_PIXEL

        public static final Integer BYTES_PER_PIXEL
        The number of bytes per pixels.
      • ROWS

        public static final int ROWS
        The default number of rows for a plate.
        See Also:
        Constant Field Values
      • COLUMNS

        public static final int COLUMNS
        The default number of columns for a plate.
        See Also:
        Constant Field Values
      • FIELDS

        public static final int FIELDS
        The default number of fields for a well.
        See Also:
        Constant Field Values
      • LIGHT_SOURCES

        public static final String[] LIGHT_SOURCES
        The light sources to handle.
      • SHAPES

        public static final String[] SHAPES
        The shapes to handle.
      • ANNOTATIONS

        public static final String[] ANNOTATIONS
        The supported types of annotations.
      • ROW_NAMING_CONVENTION

        public static final NamingConvention ROW_NAMING_CONVENTION
        The default naming convention for rows.
      • COLUMN_NAMING_CONVENTION

        public static final NamingConvention COLUMN_NAMING_CONVENTION
        The default naming convention for columns.
      • DIMENSION_ORDER

        public static final DimensionOrder DIMENSION_ORDER
        The default dimension order.
      • PIXEL_TYPE

        public static final PixelType PIXEL_TYPE
        The default pixels type.
      • NUMBER_OF_DECTECTORS

        public static final int NUMBER_OF_DECTECTORS
        The number of detectors created.
        See Also:
        Constant Field Values
      • NUMBER_OF_OBJECTIVES

        public static final int NUMBER_OF_OBJECTIVES
        The number of objectives created.
        See Also:
        Constant Field Values
      • NUMBER_OF_FILTERS

        public static final int NUMBER_OF_FILTERS
        The number of filters created.
        See Also:
        Constant Field Values
      • NUMBER_OF_DICHROICS

        public static final int NUMBER_OF_DICHROICS
        The number of dichroics created.
        See Also:
        Constant Field Values
      • CUT_IN

        public static final Double CUT_IN
        The default cut-in.
      • CUT_OUT

        public static final Double CUT_OUT
        The default cut-out.
      • ome

        protected final OME ome
        Root of the file.
      • instrument

        protected Instrument instrument
        The instrument used for the metadata.
    • Constructor Detail

      • XMLMockObjects

        public XMLMockObjects()
        Creates a new instance.
    • Method Detail

      • createDetector

        public Detector createDetector​(int index)
        Creates a detector.
        Parameters:
        index - The index of the detector in the file.
        Returns:
        See above.
      • createFilterSet

        public FilterSet createFilterSet​(int index)
        Creates a filter set.
        Parameters:
        index - The index of the filter set in the file.
        Returns:
        See above.
      • createMicroscope

        public Microscope createMicroscope()
        Creates a microscope.
        Returns:
        See above.
      • createDichroic

        public Dichroic createDichroic​(int index)
        Creates a dichroic.
        Parameters:
        index - The index of the dichroic in the file.
        Returns:
        See above.
      • createObjective

        public Objective createObjective​(int index)
        Creates an objective.
        Parameters:
        index - The index of the objective in the file.
        Returns:
        See above.
      • createFilter

        public Filter createFilter​(int index,
                                   double cutIn,
                                   double cutOut)
        Creates a filter.
        Parameters:
        index - The index of the objective in the file.
        cutIn - The cut in value.
        cutOut - The cut out value.
        Returns:
        See above.
      • createLightSource

        public LightSource createLightSource​(String type,
                                             int index)
        Creates a light source of the specified type.
        Parameters:
        type - The type of light source to create.
        index - The index of the light source in the file.
        Returns:
        See above.
      • createBinData

        public BinData createBinData​(int sizeX,
                                     int sizeY,
                                     int bpp)
        Creates a new object.
        Parameters:
        sizeX - The number of pixels along the X-axis.
        sizeY - The number of pixels along the Y-axis.
        bpp - The number of bytes per pixels.
        Returns:
        See above.
      • createLightPath

        public LightPath createLightPath()
        Creates a light path.
        Returns:
        See above.
      • createImageEnvironment

        public ImagingEnvironment createImageEnvironment()
        Creates a imaging environment.
        Returns:
        See above.
      • createStageLabel

        public StageLabel createStageLabel()
        Creates a imaging environment.
        Returns:
        See above.
      • createLightSourceSettings

        public LightSourceSettings createLightSourceSettings​(int ref)
        Creates a light source settings.
        Parameters:
        ref - Reference to the light source.
        Returns:
        See above.
      • createMicrobeamManipulation

        public MicrobeamManipulation createMicrobeamManipulation​(int index)
        Creates a microbeam manipulation.
        Parameters:
        index - The index in the file.
        Returns:
        See above.
      • createExperimenter

        public Experimenter createExperimenter​(int index)
        Creates an experimenter.
        Parameters:
        index - The index of the Experimenter.
        Returns:
        See above.
      • createExperiment

        public Experiment createExperiment​(int index)
        Creates an experiment.
        Parameters:
        index - The index in the file.
        Returns:
        See above.
      • createExperimentWithMicrobeam

        public Experiment createExperimentWithMicrobeam​(int index)
        Creates an experiment with a microbeam.
        Parameters:
        index - The index in the file.
        Returns:
        See above.
      • createDetectorSettings

        public DetectorSettings createDetectorSettings​(int ref)
        Creates a detector settings.
        Parameters:
        ref - Reference to the detector.
        Returns:
        See above.
      • createObjectiveSettings

        public ObjectiveSettings createObjectiveSettings​(int ref)
        Creates an objective settings.
        Parameters:
        ref - Reference to the objective.
        Returns:
        See above.
      • createBinaryFile

        public BinaryFile createBinaryFile()
        Creates a binary file.
        Returns:
        See above.
      • createShape

        public Shape createShape​(int index,
                                 String type,
                                 int z,
                                 int c,
                                 int t)
        Creates the specified type of shape.
        Parameters:
        index - The index of the shape in the file.
        type - The type of shape to create.
        z - The selected z-section.
        c - The selected channel.
        t - The selected time-point.
        Returns:
        See above.
      • createROI

        public ROI createROI​(int index,
                             int z,
                             int c,
                             int t)
        Creates an ROI.
        Parameters:
        index - The index of the ROI in the file.
        z - The selected z-section.
        c - The selected channel.
        t - The selected time-point.
      • getRoot

        public OME getRoot()
        Returns the root of the XML file.
        Returns:
        See above.
      • createProject

        public Project createProject​(int index)
        Creates a project.
        Parameters:
        index - The index of the project.
        Returns:
        See above.
      • createDataset

        public Dataset createDataset​(int index)
        Creates a dataset.
        Parameters:
        index - The index of the dataset.
        Returns:
        See above.
      • createScreen

        public Screen createScreen​(int index)
        Creates a screen.
        Parameters:
        index - The index of the screen.
        Returns:
        See above.
      • createBasicPlate

        public Plate createBasicPlate​(int index)
        Creates a basic plate.
        Parameters:
        index - The index of the plate.
        Returns:
        See above.
      • createPlate

        public Plate createPlate​(int numberOfPlates,
                                 int index,
                                 int numberOfPlateAcquisition)
        Creates a default plate
        Parameters:
        numberOfPlates - The total number of plates.
        index - The index of the plate.
        numberOfPlateAcquisition - The number of plate acquisition to add.
        Returns:
        See above.
      • createPlate

        public Plate createPlate​(int numberOfPlates,
                                 int index,
                                 int rows,
                                 int columns,
                                 int fields,
                                 int numberOfPlateAcquisition)
        Creates a populated plate with images.
        Parameters:
        numberOfPlates - The total number of plates.
        index - The index of the plate.
        rows - The number of rows.
        columns - The number of columns.
        fields - The number of fields.
        numberOfPlateAcquisition - The number of plate acquisition to add.
        Returns:
        See above.
      • createPlate

        public Plate createPlate​(int numberOfPlates,
                                 int index,
                                 int rows,
                                 int columns,
                                 int fields,
                                 int numberOfPlateAcquisition,
                                 boolean withMicrobeam)
        Creates a populated plate with images.
        Parameters:
        numberOfPlates - The total number of plates.
        index - The index of the plate.
        rows - The number of rows.
        columns - The number of columns.
        fields - The number of fields.
        numberOfPlateAcquisition - The number of plate acquisition to add.
        withMicrobeam - Whether the experiment should contain a microbeam
        Returns:
        See above.
      • createPlate

        public Plate createPlate​(int numberOfScreens,
                                 int screenIndex,
                                 int numberOfPlates,
                                 int plateIndex,
                                 int rows,
                                 int columns,
                                 int fields,
                                 int numberOfPlateAcquisition)
        Creates a populated plate with images.
        Parameters:
        numberOfScreens - The total number of screens.
        screenIndex - The index of the screen.
        numberOfPlates - The total number of plates.
        plateIndex - The index of the plate.
        rows - The number of rows.
        columns - The number of columns.
        fields - The number of fields.
        numberOfPlateAcquisition - The number of plate acquisition to add.
        Returns:
        See above.
      • createPlate

        public Plate createPlate​(int numberOfScreens,
                                 int screenIndex,
                                 int numberOfPlates,
                                 int plateIndex,
                                 int rows,
                                 int columns,
                                 int fields,
                                 int numberOfPlateAcquisition,
                                 boolean withMicrobeam)
        Creates a populated plate with images.
        Parameters:
        numberOfScreens - The total number of screens.
        screenIndex - The index of the screen.
        numberOfPlates - The total number of plates.
        plateIndex - The index of the plate.
        rows - The number of rows.
        columns - The number of columns.
        fields - The number of fields.
        numberOfPlateAcquisition - The number of plate acquisition to add.
        withMicrobeam - Whether the experiment should contain a microbeam
        Returns:
        See above.
      • createPlane

        public Plane createPlane​(int z,
                                 int c,
                                 int t)
        Creates a plane information object.
        Parameters:
        z - The z-section.
        c - The channel.
        t - The time-point.
        Returns:
        See above.
      • createImage

        public Image createImage​(int index,
                                 boolean metadata)
        Creates a new image.
        Parameters:
        index - The identifier of the image.
        metadata - Pass true to create channel with acquisition metadata, false otherwise.
        Returns:
        See above.
      • createChannel

        public Channel createChannel​(int index)
        Creates a channel.
        Parameters:
        index - The index in the file.
        Returns:
        See above.
      • createImage

        public Image createImage​(int index)
        Creates a new image.
        Parameters:
        index - The identifier of the image.
        Returns:
        See above.
      • createInstrument

        public Instrument createInstrument​(boolean populate)
        Creates an instrument with filters, light sources etc.
        Parameters:
        populate - Pass true to populate the instrument, false otherwise.
        Returns:
        See above.
      • createReagent

        public Reagent createReagent​(int index)
        Creates a reagent.
        Parameters:
        index - The index in the file.
        Returns:
        See above.
      • createAnnotation

        public Annotation createAnnotation​(String type,
                                           OMEModelObject object,
                                           int index)
        Create a comment annotation for the specified object.
        Parameters:
        type - The type of annotation to create.
        object - The object to link the annotation to.
        index - The index of the annotation.
        Returns:
        See above.
      • createImage

        public OME createImage()
        Creates and returns the root element. Creates an image w/o metadata.
        Returns:
        See above.
      • createImage

        public OME createImage​(boolean metadata)
        Creates and returns the root element.
        Parameters:
        metadata - Pass true to create an image with metadata, false w/o/
        Returns:
        See above.
      • createAnnotatedImage

        public OME createAnnotatedImage()
        Creates and annotates an image. The following types of annotations are added: TagAnnotation, TermAnnotation, BooleanAnnotation, LongAnnotation, CommentAnnotation.
        Returns:
        See above.
      • createImageWithAcquisitionData

        public OME createImageWithAcquisitionData()
        Creates an image with acquisition data.
        Returns:
        See above.
      • createImageWithAnnotatedAcquisitionData

        public OME createImageWithAnnotatedAcquisitionData()
        Creates an image with acquisition data.
        Returns:
        See above.
      • createImageWithExperiment

        public Image createImageWithExperiment​(int index,
                                               boolean metadata,
                                               Experiment exp)
        Creates an image with a given experiment. The Image is not added to ome.
        Returns:
        See above.
      • createImageWithROI

        public OME createImageWithROI()
        Creates an image with ROI.
        Returns:
        See above.
      • createPopulatedPlate

        public OME createPopulatedPlate​(int n)
        Creates a plate with 1 row, 1 column and 1field. The plate will have images with acquisition data but no plate acquisition data if the passed value is 0 otherwise will have n plate acquisitions.
        Parameters:
        n - The number of plate acquisition.
        Returns:
        See above
      • createPopulatedPlate

        public OME createPopulatedPlate​(int n,
                                        int fields)
        Creates a plate with 1 row, 1 column and fieldsfield. The plate will have images with acquisition data but no plate acquisition data if the passed value is 0 otherwise will have n plate acquisitions.
        Parameters:
        n - The number of plate acquisition.
        fields - The number of fields.
        Returns:
        See above
      • createPopulatedPlate

        public OME createPopulatedPlate​(int plates,
                                        int rows,
                                        int cols,
                                        int fields,
                                        int acqs)
        Creates several plates but no containing screen.
        Parameters:
        plates - The number of plates to create.
        rows - The number of rows for plate.
        cols - The number of columns for plate.
        fields - The number of fields.
        acqs - The number of plate acquisitions.
        Returns:
        See above.
      • createPopulatedPlate

        public OME createPopulatedPlate​(int plates,
                                        int rows,
                                        int cols,
                                        int fields,
                                        int acqs,
                                        boolean withMicrobeam)
        Creates several plates but no containing screen.
        Parameters:
        plates - The number of plates to create.
        rows - The number of rows for plate.
        cols - The number of columns for plate.
        fields - The number of fields.
        acqs - The number of plate acquisitions.
        withMicrobeam - Whether the experiment should contain a microbeam
        Returns:
        See above.
      • createPopulatedScreen

        public OME createPopulatedScreen​(int screens,
                                         int plates,
                                         int rows,
                                         int cols,
                                         int fields,
                                         int acqs)
        Creates several screens each with several plates.
        Parameters:
        screens - The number of screens to create.
        plates - The number of plates to create.
        rows - The number of rows for plate.
        cols - The number of columns for plate.
        fields - The number of fields.
        acqs - The number of plate acquisitions.
        Returns:
        See above.
      • createPopulatedScreen

        public OME createPopulatedScreen​(int screens,
                                         int plates,
                                         int rows,
                                         int cols,
                                         int fields,
                                         int acqs,
                                         boolean withMicrobeam)
        Creates several screens each with several plates.
        Parameters:
        screens - The number of screens to create.
        plates - The number of plates to create.
        rows - The number of rows for plate.
        cols - The number of columns for plate.
        fields - The number of fields.
        acqs - The number of plate acquisitions.
        withMicrobeam - Whether the experiment should contain a microbeam
        Returns:
        See above.
      • createPopulatedScreen

        public OME createPopulatedScreen​(int plates,
                                         int rows,
                                         int cols,
                                         int fields,
                                         int acqs)
        Creates a screen with several plates.
        Parameters:
        plates - The number of plates to create.
        rows - The number of rows for plate.
        cols - The number of columns for plate.
        fields - The number of fields.
        acqs - The number of plate acquisitions.
        Returns:
        See above.
      • createPopulatedScreen

        public OME createPopulatedScreen()
        Creates one 2x2 plate of with a single well sample per well and one plate acquisition.
      • createBasicPlateWithReagent

        public OME createBasicPlateWithReagent()
        Creates a plate with 1 row, 1 column and 1 field. This plate will be added to a screen and the well linked to a reagent.
        Returns:
        See above
      • createFullPopulatedPlate

        public OME createFullPopulatedPlate​(int n)
        Creates a plate with ROWS rows, COLUMNS columns and FIELDS field. The plate will have images with acquisition data but no plate acquisition data.
        Parameters:
        n - The number of plate acquisition.
        Returns:
        See above