Package ome.specification
Class XMLMockObjects
java.lang.Object
ome.specification.XMLMockObjects
public class XMLMockObjects
extends java.lang.Object
Creates XML objects for the 2010-06 schema.
- Since:
- 3.0-Beta4
- Version:
- 3.0 (Internal version: $Revision: $Date: $)
- Author:
- Jean-Marie Burel [email protected], Chris Allan Chris Allan callan at blackcat dot ca
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]
ANNOTATIONS
The supported types of annotations.static ArcType
ARC_TYPE
The default type of an arc.static Binning
BINNING
The default binning value.static java.lang.Integer
BYTES_PER_PIXEL
The number of bytes per pixels.static NamingConvention
COLUMN_NAMING_CONVENTION
The default naming convention for columns.static int
COLUMNS
The default number of columns for a plate.static java.lang.String
COMPONENT_LOT_NUMBER
The default lot number of a component of a microscope.static java.lang.String
COMPONENT_MANUFACTURER
The default manufacturer of a component of a microscope.static java.lang.String
COMPONENT_MODEL
The default model of a component of a microscope.static java.lang.String
COMPONENT_SERIAL_NUMBER
The default serial number of a component of a microscope.static Correction
CORRECTION
The default objective's correction.static java.lang.Double
CUT_IN
The default cut-in.static java.lang.Double
CUT_OUT
The default cut-out.static java.awt.Color
DEFAULT_COLOR
The default color.static DetectorType
DETECTOR_TYPE
The default type of a detector.static DimensionOrder
DIMENSION_ORDER
The default dimension order.static ExperimentType
EXPERIMENT_TYPE
The default type of a microscope.static int
FIELDS
The default number of fields for a well.static FilamentType
FILAMENT_TYPE
The default type of a filament.static FilterType
FILTER_TYPE
The default objective's immersion.static Immersion
IMMERSION
The default objective's immersion.protected Instrument
instrument
The instrument used for the metadata.static LaserMedium
LASER_MEDIUM
The default type of a laser.static LaserType
LASER_TYPE
The default type of a laser.static java.lang.String[]
LIGHT_SOURCES
The light sources to handle.static java.lang.Double
LIGHTSOURCE_POWER
The default power of a light source.static Medium
MEDIUM
The default medium for the objective.static MicrobeamManipulationType
MICROBEAM_MANIPULATION_TYPE
The default type of a microbeam manipulation.static MicroscopeType
MICROSCOPE_TYPE
The default type of a microscope.static int
NUMBER_OF_DECTECTORS
The number of detectors created.static int
NUMBER_OF_DICHROICS
The number of dichroics created.static int
NUMBER_OF_FILTERS
The number of filters created.static int
NUMBER_OF_OBJECTIVES
The number of objectives created.protected OME
ome
Root of the file.static PixelType
PIXEL_TYPE
The default pixels type.static java.lang.String
POINTS
Points used to create Polyline and Polygon shape.static NamingConvention
ROW_NAMING_CONVENTION
The default naming convention for rows.static int
ROWS
The default number of rows for a plate.static java.lang.String[]
SHAPES
The shapes to handle.static java.lang.Integer
SIZE_C
The default number of channels.static java.lang.Integer
SIZE_T
The default number of time-points.static java.lang.Integer
SIZE_X
The default number of pixels along the X-axis.static java.lang.Integer
SIZE_Y
The default number of pixels along the Y-axis.static java.lang.Integer
SIZE_Z
The default number of z-sections.static java.lang.String
TIME
The default time. -
Constructor Summary
Constructors Constructor Description XMLMockObjects()
Creates a new instance. -
Method Summary
Modifier and Type Method Description OME
createAnnotatedImage()
Creates and annotates an image.Annotation
createAnnotation(java.lang.String type, OMEModelObject object, int index)
Create a comment annotation for the specified object.Plate
createBasicPlate(int index)
Creates a basic plate.OME
createBasicPlateWithReagent()
Creates a plate with1
row,1
column and1
field.BinaryFile
createBinaryFile()
Creates a binary file.BinData
createBinData(int sizeX, int sizeY, int bpp)
Creates a new object.Channel
createChannel(int index)
Creates a channel.Dataset
createDataset(int index)
Creates a dataset.Detector
createDetector(int index)
Creates a detector.DetectorSettings
createDetectorSettings(int ref)
Creates a detector settings.Dichroic
createDichroic(int index)
Creates a dichroic.Experiment
createExperiment(int index)
Creates an experiment.Experimenter
createExperimenter(int index)
Creates an experimenter.Experiment
createExperimentWithMicrobeam(int index)
Creates an experiment with a microbeam.Filter
createFilter(int index, double cutIn, double cutOut)
Creates a filter.FilterSet
createFilterSet(int index)
Creates a filter set.OME
createFullPopulatedPlate(int n)
OME
createImage()
Creates and returns the root element.OME
createImage(boolean metadata)
Creates and returns the root element.Image
createImage(int index)
Creates a new image.Image
createImage(int index, boolean metadata)
Creates a new image.ImagingEnvironment
createImageEnvironment()
Creates a imaging environment.OME
createImageWithAcquisitionData()
Creates an image with acquisition data.OME
createImageWithAnnotatedAcquisitionData()
Creates an image with acquisition data.Image
createImageWithExperiment(int index, boolean metadata, Experiment exp)
Creates an image with a given experiment.OME
createImageWithROI()
Creates an image with ROI.Instrument
createInstrument(boolean populate)
Creates an instrument with filters, light sources etc.LightPath
createLightPath()
Creates a light path.LightSource
createLightSource(java.lang.String type, int index)
Creates a light source of the specified type.LightSourceSettings
createLightSourceSettings(int ref)
Creates a light source settings.MicrobeamManipulation
createMicrobeamManipulation(int index)
Creates a microbeam manipulation.Microscope
createMicroscope()
Creates a microscope.Objective
createObjective(int index)
Creates an objective.ObjectiveSettings
createObjectiveSettings(int ref)
Creates an objective settings.Plane
createPlane(int z, int c, int t)
Creates a plane information object.Plate
createPlate(int numberOfPlates, int index, int numberOfPlateAcquisition)
Creates a default platePlate
createPlate(int numberOfPlates, int index, int rows, int columns, int fields, int numberOfPlateAcquisition)
Creates a populated plate with images.Plate
createPlate(int numberOfPlates, int index, int rows, int columns, int fields, int numberOfPlateAcquisition, boolean withMicrobeam)
Creates a populated plate with images.Plate
createPlate(int numberOfScreens, int screenIndex, int numberOfPlates, int plateIndex, int rows, int columns, int fields, int numberOfPlateAcquisition)
Creates a populated plate with images.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.OME
createPopulatedPlate(int n)
Creates a plate with1
row,1
column and1
field.OME
createPopulatedPlate(int n, int fields)
Creates a plate with1
row,1
column andfields
field.OME
createPopulatedPlate(int plates, int rows, int cols, int fields, int acqs)
Creates several plates but no containing screen.OME
createPopulatedPlate(int plates, int rows, int cols, int fields, int acqs, boolean withMicrobeam)
Creates several plates but no containing screen.OME
createPopulatedScreen()
Creates one 2x2 plate of with a single well sample per well and one plate acquisition.OME
createPopulatedScreen(int plates, int rows, int cols, int fields, int acqs)
Creates a screen with several plates.OME
createPopulatedScreen(int screens, int plates, int rows, int cols, int fields, int acqs)
Creates several screens each with several plates.OME
createPopulatedScreen(int screens, int plates, int rows, int cols, int fields, int acqs, boolean withMicrobeam)
Creates several screens each with several plates.Project
createProject(int index)
Creates a project.Reagent
createReagent(int index)
Creates a reagent.ROI
createROI(int index, int z, int c, int t)
Creates an ROI.Screen
createScreen(int index)
Creates a screen.Shape
createShape(int index, java.lang.String type, int z, int c, int t)
Creates the specified type of shape.StageLabel
createStageLabel()
Creates a imaging environment.OME
getRoot()
Returns the root of the XML file.
-
Field Details
-
DEFAULT_COLOR
public static final java.awt.Color DEFAULT_COLORThe default color. -
LIGHTSOURCE_POWER
public static final java.lang.Double LIGHTSOURCE_POWERThe default power of a light source. -
COMPONENT_MODEL
public static final java.lang.String COMPONENT_MODELThe default model of a component of a microscope.- See Also:
- Constant Field Values
-
COMPONENT_MANUFACTURER
public static final java.lang.String COMPONENT_MANUFACTURERThe default manufacturer of a component of a microscope.- See Also:
- Constant Field Values
-
COMPONENT_SERIAL_NUMBER
public static final java.lang.String COMPONENT_SERIAL_NUMBERThe default serial number of a component of a microscope.- See Also:
- Constant Field Values
-
COMPONENT_LOT_NUMBER
public static final java.lang.String COMPONENT_LOT_NUMBERThe default lot number of a component of a microscope.- See Also:
- Constant Field Values
-
LASER_TYPE
The default type of a laser. -
ARC_TYPE
The default type of an arc. -
FILAMENT_TYPE
The default type of a filament. -
DETECTOR_TYPE
The default type of a detector. -
CORRECTION
The default objective's correction. -
IMMERSION
The default objective's immersion. -
FILTER_TYPE
The default objective's immersion. -
MICROSCOPE_TYPE
The default type of a microscope. -
EXPERIMENT_TYPE
The default type of a microscope. -
MICROBEAM_MANIPULATION_TYPE
The default type of a microbeam manipulation. -
BINNING
The default binning value. -
MEDIUM
The default medium for the objective. -
LASER_MEDIUM
The default type of a laser. -
SIZE_X
public static final java.lang.Integer SIZE_XThe default number of pixels along the X-axis. -
SIZE_Y
public static final java.lang.Integer SIZE_YThe default number of pixels along the Y-axis. -
SIZE_Z
public static final java.lang.Integer SIZE_ZThe default number of z-sections. -
SIZE_C
public static final java.lang.Integer SIZE_CThe default number of channels. -
SIZE_T
public static final java.lang.Integer SIZE_TThe default number of time-points. -
BYTES_PER_PIXEL
public static final java.lang.Integer BYTES_PER_PIXELThe number of bytes per pixels. -
ROWS
public static final int ROWSThe default number of rows for a plate.- See Also:
- Constant Field Values
-
COLUMNS
public static final int COLUMNSThe default number of columns for a plate.- See Also:
- Constant Field Values
-
FIELDS
public static final int FIELDSThe default number of fields for a well.- See Also:
- Constant Field Values
-
LIGHT_SOURCES
public static final java.lang.String[] LIGHT_SOURCESThe light sources to handle. -
SHAPES
public static final java.lang.String[] SHAPESThe shapes to handle. -
ANNOTATIONS
public static final java.lang.String[] ANNOTATIONSThe supported types of annotations. -
ROW_NAMING_CONVENTION
The default naming convention for rows. -
COLUMN_NAMING_CONVENTION
The default naming convention for columns. -
DIMENSION_ORDER
The default dimension order. -
PIXEL_TYPE
The default pixels type. -
NUMBER_OF_DECTECTORS
public static final int NUMBER_OF_DECTECTORSThe number of detectors created.- See Also:
- Constant Field Values
-
NUMBER_OF_OBJECTIVES
public static final int NUMBER_OF_OBJECTIVESThe number of objectives created.- See Also:
- Constant Field Values
-
NUMBER_OF_FILTERS
public static final int NUMBER_OF_FILTERSThe number of filters created.- See Also:
- Constant Field Values
-
NUMBER_OF_DICHROICS
public static final int NUMBER_OF_DICHROICSThe number of dichroics created.- See Also:
- Constant Field Values
-
POINTS
public static final java.lang.String POINTSPoints used to create Polyline and Polygon shape.- See Also:
- Constant Field Values
-
TIME
public static final java.lang.String TIMEThe default time.- See Also:
- Constant Field Values
-
CUT_IN
public static final java.lang.Double CUT_INThe default cut-in. -
CUT_OUT
public static final java.lang.Double CUT_OUTThe default cut-out. -
ome
Root of the file. -
instrument
The instrument used for the metadata.
-
-
Constructor Details
-
XMLMockObjects
public XMLMockObjects()Creates a new instance.
-
-
Method Details
-
createDetector
Creates a detector.- Parameters:
index
- The index of the detector in the file.- Returns:
- See above.
-
createFilterSet
Creates a filter set.- Parameters:
index
- The index of the filter set in the file.- Returns:
- See above.
-
createMicroscope
Creates a microscope.- Returns:
- See above.
-
createDichroic
Creates a dichroic.- Parameters:
index
- The index of the dichroic in the file.- Returns:
- See above.
-
createObjective
Creates an objective.- Parameters:
index
- The index of the objective in the file.- Returns:
- See above.
-
createFilter
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
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
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
Creates a light path.- Returns:
- See above.
-
createImageEnvironment
Creates a imaging environment.- Returns:
- See above.
-
createStageLabel
Creates a imaging environment.- Returns:
- See above.
-
createLightSourceSettings
Creates a light source settings.- Parameters:
ref
- Reference to the light source.- Returns:
- See above.
-
createMicrobeamManipulation
Creates a microbeam manipulation.- Parameters:
index
- The index in the file.- Returns:
- See above.
-
createExperimenter
Creates an experimenter.- Parameters:
index
- The index of the Experimenter.- Returns:
- See above.
-
createExperiment
Creates an experiment.- Parameters:
index
- The index in the file.- Returns:
- See above.
-
createExperimentWithMicrobeam
Creates an experiment with a microbeam.- Parameters:
index
- The index in the file.- Returns:
- See above.
-
createDetectorSettings
Creates a detector settings.- Parameters:
ref
- Reference to the detector.- Returns:
- See above.
-
createObjectiveSettings
Creates an objective settings.- Parameters:
ref
- Reference to the objective.- Returns:
- See above.
-
createBinaryFile
Creates a binary file.- Returns:
- See above.
-
createShape
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
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
Returns the root of the XML file.- Returns:
- See above.
-
createProject
Creates a project.- Parameters:
index
- The index of the project.- Returns:
- See above.
-
createDataset
Creates a dataset.- Parameters:
index
- The index of the dataset.- Returns:
- See above.
-
createScreen
Creates a screen.- Parameters:
index
- The index of the screen.- Returns:
- See above.
-
createBasicPlate
Creates a basic plate.- Parameters:
index
- The index of the plate.- Returns:
- See above.
-
createPlate
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
Creates a plane information object.- Parameters:
z
- The z-section.c
- The channel.t
- The time-point.- Returns:
- See above.
-
createImage
Creates a new image.- Parameters:
index
- The identifier of the image.metadata
- Passtrue
to create channel with acquisition metadata,false
otherwise.- Returns:
- See above.
-
createChannel
Creates a channel.- Parameters:
index
- The index in the file.- Returns:
- See above.
-
createImage
Creates a new image.- Parameters:
index
- The identifier of the image.- Returns:
- See above.
-
createInstrument
Creates an instrument with filters, light sources etc.- Parameters:
populate
- Passtrue
to populate the instrument,false
otherwise.- Returns:
- See above.
-
createReagent
Creates a reagent.- Parameters:
index
- The index in the file.- Returns:
- See above.
-
createAnnotation
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
Creates and returns the root element. Creates an image w/o metadata.- Returns:
- See above.
-
createImage
Creates and returns the root element.- Parameters:
metadata
- Passtrue
to create an image with metadata,false
w/o/- Returns:
- See above.
-
createAnnotatedImage
Creates and annotates an image. The following types of annotations are added: TagAnnotation, TermAnnotation, BooleanAnnotation, LongAnnotation, CommentAnnotation.- Returns:
- See above.
-
createImageWithAcquisitionData
Creates an image with acquisition data.- Returns:
- See above.
-
createImageWithAnnotatedAcquisitionData
Creates an image with acquisition data.- Returns:
- See above.
-
createImageWithExperiment
Creates an image with a given experiment. The Image is not added to ome.- Returns:
- See above.
-
createImageWithROI
Creates an image with ROI.- Returns:
- See above.
-
createPopulatedPlate
Creates a plate with1
row,1
column and1
field. The plate will have images with acquisition data but no plate acquisition data if the passed value is0
otherwise will haven
plate acquisitions.- Parameters:
n
- The number of plate acquisition.- Returns:
- See above
-
createPopulatedPlate
Creates a plate with1
row,1
column andfields
field. The plate will have images with acquisition data but no plate acquisition data if the passed value is0
otherwise will haven
plate acquisitions.- Parameters:
n
- The number of plate acquisition.fields
- The number of fields.- Returns:
- See above
-
createPopulatedPlate
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
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
Creates one 2x2 plate of with a single well sample per well and one plate acquisition. -
createBasicPlateWithReagent
Creates a plate with1
row,1
column and1
field. This plate will be added to a screen and the well linked to a reagent.- Returns:
- See above
-
createFullPopulatedPlate
Creates a plate withROWS
rows,COLUMNS
columns andFIELDS
field. The plate will have images with acquisition data but no plate acquisition data.- Parameters:
n
- The number of plate acquisition.- Returns:
- See above
-