bioformats  5.1.2
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
ome::xml::model::OMEModelObject Class Referenceabstract

OME model object interface. More...

#include <ome/xml/model/OMEModelObject.h>

+ Inheritance diagram for ome::xml::model::OMEModelObject:
+ Collaboration diagram for ome::xml::model::OMEModelObject:

Classes

struct  indexed_container
 Multi-index container for efficient ordered insertion and deletion of model object references. More...
 

Public Member Functions

virtual ~OMEModelObject ()
 Destructor.
 
virtual const std::string & elementName () const =0
 Get the element name of this model object. More...
 
virtual bool validElementName (const std::string &name) const =0
 Check if a given element name is valid for processing by this model object. More...
 
virtual common::xml::dom::Element asXMLElement (common::xml::dom::Document &document) const =0
 Transform the object hierarchy rooted at this element to XML. More...
 
virtual void update (const common::xml::dom::Element &element, OMEModel &model)=0
 Update the object hierarchy recursively from an XML DOM tree. More...
 
virtual bool link (ome::compat::shared_ptr< Reference > &reference, ome::compat::shared_ptr< OMEModelObject > &object)=0
 Link a given OME model object to this model object. More...
 
virtual const std::string & getXMLNamespace () const =0
 Get the XML namespace for this model object. More...
 

Protected Member Functions

 OMEModelObject ()
 Constructor.
 

Private Member Functions

 OMEModelObject (const OMEModelObject &)
 Copy constructor (deleted).
 
OMEModelObjectoperator= (const OMEModelObject &)
 Assignment operator (deleted).
 

Detailed Description

OME model object interface.

Todo:

Check constness and reference type for params/return types.

Consider dropping redundant parts of typenames which are duplicated in the namespace. For example, OMEModelObject could just be Object, since it's really an ome::xml::model::Object.

Member Function Documentation

virtual common::xml::dom::Element ome::xml::model::OMEModelObject::asXMLElement ( common::xml::dom::Document document) const
pure virtual

Transform the object hierarchy rooted at this element to XML.

Parameters
documentdocument for element creation
Returns
an XML DOM tree root element for this model object.

Implemented in ome::xml::model::Annotation, ome::xml::model::OME, ome::xml::model::StructuredAnnotations, ome::xml::model::Pixels, ome::xml::model::Image, ome::xml::model::Experimenter, ome::xml::model::Plate, ome::xml::model::Instrument, ome::xml::model::Channel, ome::xml::model::ExperimenterGroup, ome::xml::model::Screen, ome::xml::model::Filter, ome::xml::model::Well, ome::xml::model::Dataset, ome::xml::model::MicrobeamManipulation, ome::xml::model::ROI, ome::xml::model::WellSample, ome::xml::model::PlateAcquisition, ome::xml::model::Plane, ome::xml::model::FilterSet, ome::xml::model::Project, ome::xml::model::Reagent, ome::xml::model::Experiment, ome::xml::model::Laser, ome::xml::model::DetectorSettings, ome::xml::model::Objective, ome::xml::model::Detector, ome::xml::model::Dichroic, ome::xml::model::LightPath, ome::xml::model::TiffData, ome::xml::model::Mask, ome::xml::model::TransmittanceRange, ome::xml::model::Line, ome::xml::model::LightSourceSettings, ome::xml::model::ObjectiveSettings, ome::xml::model::BinData, ome::xml::model::BinaryFile, ome::xml::model::AffineTransform, ome::xml::model::ImagingEnvironment, ome::xml::model::StageLabel, ome::xml::model::Leader, ome::xml::model::Pump, ome::xml::model::Union, ome::xml::model::ManufacturerSpec, ome::xml::model::Ellipse, ome::xml::model::Rectangle, ome::xml::model::Polyline, ome::xml::model::External, ome::xml::model::FileAnnotation, ome::xml::model::Rights, ome::xml::model::TimestampAnnotation, ome::xml::model::BooleanAnnotation, ome::xml::model::CommentAnnotation, ome::xml::model::DoubleAnnotation, ome::xml::model::LongAnnotation, ome::xml::model::TagAnnotation, ome::xml::model::TermAnnotation, ome::xml::model::XMLAnnotation, ome::xml::model::UUID, ome::xml::model::Label, ome::xml::model::Point, ome::xml::model::BinaryOnly, ome::xml::model::Arc, ome::xml::model::Filament, ome::xml::model::ListAnnotation, ome::xml::model::Microscope, ome::xml::model::Polygon, ome::xml::model::AnnotationRef, ome::xml::model::ChannelRef, ome::xml::model::DatasetRef, ome::xml::model::DichroicRef, ome::xml::model::ExperimenterGroupRef, ome::xml::model::ExperimenterRef, ome::xml::model::ExperimentRef, ome::xml::model::FilterRef, ome::xml::model::FilterSetRef, ome::xml::model::ImageRef, ome::xml::model::InstrumentRef, ome::xml::model::MicrobeamManipulationRef, ome::xml::model::PlateRef, ome::xml::model::ProjectRef, ome::xml::model::ReagentRef, ome::xml::model::ROIRef, ome::xml::model::WellSampleRef, ome::xml::model::MapPairs, ome::xml::model::OriginalMetadataAnnotation, ome::xml::model::LightEmittingDiode, ome::xml::model::Reference, ome::xml::model::EmissionFilterRef, ome::xml::model::ExcitationFilterRef, ome::xml::model::MetadataOnly, ome::xml::model::BasicAnnotation, ome::xml::model::NumericAnnotation, ome::xml::model::Settings, ome::xml::model::TextAnnotation, and ome::xml::model::TypeAnnotation.

virtual const std::string& ome::xml::model::OMEModelObject::elementName ( ) const
pure virtual

Get the element name of this model object.

This will be the most-derived class name.

Returns
the element type.

Implemented in ome::xml::model::Pixels, ome::xml::model::Channel, ome::xml::model::Image, ome::xml::model::OME, ome::xml::model::Plate, ome::xml::model::Experimenter, ome::xml::model::StructuredAnnotations, ome::xml::model::Well, ome::xml::model::Instrument, ome::xml::model::Plane, ome::xml::model::Screen, ome::xml::model::WellSample, ome::xml::model::ExperimenterGroup, ome::xml::model::Filter, ome::xml::model::PlateAcquisition, ome::xml::model::Laser, ome::xml::model::MicrobeamManipulation, ome::xml::model::Dataset, ome::xml::model::DetectorSettings, ome::xml::model::Objective, ome::xml::model::ROI, ome::xml::model::Detector, ome::xml::model::Project, ome::xml::model::Reagent, ome::xml::model::TiffData, ome::xml::model::Experiment, ome::xml::model::FilterSet, ome::xml::model::BinData, ome::xml::model::LightSourceSettings, ome::xml::model::BinaryFile, ome::xml::model::Line, ome::xml::model::TransmittanceRange, ome::xml::model::AffineTransform, ome::xml::model::ObjectiveSettings, ome::xml::model::Dichroic, ome::xml::model::Mask, ome::xml::model::ImagingEnvironment, ome::xml::model::Ellipse, ome::xml::model::LightPath, ome::xml::model::Rectangle, ome::xml::model::StageLabel, ome::xml::model::External, ome::xml::model::Polyline, ome::xml::model::FileAnnotation, ome::xml::model::TimestampAnnotation, ome::xml::model::BooleanAnnotation, ome::xml::model::CommentAnnotation, ome::xml::model::DoubleAnnotation, ome::xml::model::Leader, ome::xml::model::LongAnnotation, ome::xml::model::Pump, ome::xml::model::TagAnnotation, ome::xml::model::TermAnnotation, ome::xml::model::XMLAnnotation, ome::xml::model::BinaryOnly, ome::xml::model::Label, ome::xml::model::Point, ome::xml::model::Rights, ome::xml::model::UUID, ome::xml::model::Arc, ome::xml::model::Filament, ome::xml::model::ListAnnotation, ome::xml::model::Microscope, ome::xml::model::Union, ome::xml::model::AnnotationRef, ome::xml::model::ChannelRef, ome::xml::model::DatasetRef, ome::xml::model::DichroicRef, ome::xml::model::ExperimenterGroupRef, ome::xml::model::ExperimenterRef, ome::xml::model::ExperimentRef, ome::xml::model::FilterRef, ome::xml::model::FilterSetRef, ome::xml::model::ImageRef, ome::xml::model::InstrumentRef, ome::xml::model::MicrobeamManipulationRef, ome::xml::model::PlateRef, ome::xml::model::Polygon, ome::xml::model::ProjectRef, ome::xml::model::ReagentRef, ome::xml::model::ROIRef, ome::xml::model::WellSampleRef, ome::xml::model::EmissionFilterRef, ome::xml::model::ExcitationFilterRef, ome::xml::model::LightEmittingDiode, ome::xml::model::MetadataOnly, ome::xml::model::MapPairs, and ome::xml::model::OriginalMetadataAnnotation.

virtual const std::string& ome::xml::model::OMEModelObject::getXMLNamespace ( ) const
pure virtual

Get the XML namespace for this model object.

Returns
the XML namespace.

Implemented in ome::xml::model::Annotation, ome::xml::model::OME, ome::xml::model::StructuredAnnotations, ome::xml::model::Pixels, ome::xml::model::Image, ome::xml::model::Experimenter, ome::xml::model::Plate, ome::xml::model::Instrument, ome::xml::model::Channel, ome::xml::model::ExperimenterGroup, ome::xml::model::Shape, ome::xml::model::Screen, ome::xml::model::Filter, ome::xml::model::Well, ome::xml::model::Dataset, ome::xml::model::MicrobeamManipulation, ome::xml::model::ROI, ome::xml::model::WellSample, ome::xml::model::PlateAcquisition, ome::xml::model::Plane, ome::xml::model::FilterSet, ome::xml::model::Project, ome::xml::model::Reagent, ome::xml::model::Experiment, ome::xml::model::Laser, ome::xml::model::DetectorSettings, ome::xml::model::Objective, ome::xml::model::Detector, ome::xml::model::Dichroic, ome::xml::model::LightPath, ome::xml::model::TiffData, ome::xml::model::Mask, ome::xml::model::TransmittanceRange, ome::xml::model::Line, ome::xml::model::LightSourceSettings, ome::xml::model::ObjectiveSettings, ome::xml::model::BinData, ome::xml::model::BinaryFile, ome::xml::model::AffineTransform, ome::xml::model::ImagingEnvironment, ome::xml::model::StageLabel, ome::xml::model::Leader, ome::xml::model::Pump, ome::xml::model::Union, ome::xml::model::ManufacturerSpec, ome::xml::model::Ellipse, ome::xml::model::Rectangle, ome::xml::model::Polyline, ome::xml::model::External, ome::xml::model::LightSource, ome::xml::model::FileAnnotation, ome::xml::model::Rights, ome::xml::model::TimestampAnnotation, ome::xml::model::BooleanAnnotation, ome::xml::model::CommentAnnotation, ome::xml::model::DoubleAnnotation, ome::xml::model::LongAnnotation, ome::xml::model::TagAnnotation, ome::xml::model::TermAnnotation, ome::xml::model::XMLAnnotation, ome::xml::model::UUID, ome::xml::model::Label, ome::xml::model::Point, ome::xml::model::BinaryOnly, ome::xml::model::Arc, ome::xml::model::Filament, ome::xml::model::ListAnnotation, ome::xml::model::Microscope, ome::xml::model::Polygon, ome::xml::model::AnnotationRef, ome::xml::model::ChannelRef, ome::xml::model::DatasetRef, ome::xml::model::DichroicRef, ome::xml::model::ExperimenterGroupRef, ome::xml::model::ExperimenterRef, ome::xml::model::ExperimentRef, ome::xml::model::FilterRef, ome::xml::model::FilterSetRef, ome::xml::model::ImageRef, ome::xml::model::InstrumentRef, ome::xml::model::MicrobeamManipulationRef, ome::xml::model::PlateRef, ome::xml::model::ProjectRef, ome::xml::model::ReagentRef, ome::xml::model::ROIRef, ome::xml::model::WellSampleRef, ome::xml::model::MapPairs, ome::xml::model::LightEmittingDiode, ome::xml::model::Reference, ome::xml::model::EmissionFilterRef, ome::xml::model::ExcitationFilterRef, ome::xml::model::MetadataOnly, ome::xml::model::BasicAnnotation, ome::xml::model::NumericAnnotation, ome::xml::model::Settings, ome::xml::model::TextAnnotation, and ome::xml::model::TypeAnnotation.

virtual bool ome::xml::model::OMEModelObject::link ( ome::compat::shared_ptr< Reference > &  reference,
ome::compat::shared_ptr< OMEModelObject > &  object 
)
pure virtual

Link a given OME model object to this model object.

Parameters
referencetype qualifier for the reference. This should be the corresponding reference type for object. If, for example, object is of type Image, reference must be of type ImageRef.
objectModel object to link to.
Returns
true if this model object was able to handle the reference, otherwise false.
Todo:
the use of reference to provide type information for the type of object is unconventional and quite possibly unnecessary–a simple string or type_info would suffice for what it's being used for, if it's needed at all. Is this true for all cases? The implementation also needs to do strict checking of the object type; it's not currently failing if it's of the wrong type. This applies to all generated model objects implementing this interface.
virtual void ome::xml::model::OMEModelObject::update ( const common::xml::dom::Element element,
OMEModel model 
)
pure virtual

Update the object hierarchy recursively from an XML DOM tree.

Note
No properties are removed, only added or updated.
Parameters
elementroot of the XML DOM tree to from which to construct the model object graph.
modelhandler for the OME model used to track instances and references seen during the update.
Exceptions
EnumerationExceptionif there is an error instantiating an enumeration during model object creation, or ModelException if there are any consistency or validity errors found during processing.

Implemented in ome::xml::model::Pixels, ome::xml::model::Channel, ome::xml::model::Image, ome::xml::model::OME, ome::xml::model::Plate, ome::xml::model::Experimenter, ome::xml::model::Annotation, ome::xml::model::Shape, ome::xml::model::StructuredAnnotations, ome::xml::model::Well, ome::xml::model::Instrument, ome::xml::model::Plane, ome::xml::model::Screen, ome::xml::model::WellSample, ome::xml::model::ExperimenterGroup, ome::xml::model::Filter, ome::xml::model::PlateAcquisition, ome::xml::model::Laser, ome::xml::model::MicrobeamManipulation, ome::xml::model::Dataset, ome::xml::model::DetectorSettings, ome::xml::model::Objective, ome::xml::model::ROI, ome::xml::model::Detector, ome::xml::model::Project, ome::xml::model::Reagent, ome::xml::model::TiffData, ome::xml::model::Experiment, ome::xml::model::FilterSet, ome::xml::model::BinData, ome::xml::model::LightSourceSettings, ome::xml::model::BinaryFile, ome::xml::model::Line, ome::xml::model::TransmittanceRange, ome::xml::model::AffineTransform, ome::xml::model::ObjectiveSettings, ome::xml::model::Dichroic, ome::xml::model::Mask, ome::xml::model::ImagingEnvironment, ome::xml::model::Ellipse, ome::xml::model::LightPath, ome::xml::model::Rectangle, ome::xml::model::StageLabel, ome::xml::model::External, ome::xml::model::Polyline, ome::xml::model::FileAnnotation, ome::xml::model::TimestampAnnotation, ome::xml::model::BooleanAnnotation, ome::xml::model::CommentAnnotation, ome::xml::model::DoubleAnnotation, ome::xml::model::Leader, ome::xml::model::LongAnnotation, ome::xml::model::Pump, ome::xml::model::TagAnnotation, ome::xml::model::TermAnnotation, ome::xml::model::XMLAnnotation, ome::xml::model::BinaryOnly, ome::xml::model::Label, ome::xml::model::Point, ome::xml::model::Rights, ome::xml::model::UUID, ome::xml::model::Arc, ome::xml::model::Filament, ome::xml::model::ListAnnotation, ome::xml::model::Microscope, ome::xml::model::Union, ome::xml::model::AnnotationRef, ome::xml::model::ChannelRef, ome::xml::model::DatasetRef, ome::xml::model::DichroicRef, ome::xml::model::ExperimenterGroupRef, ome::xml::model::ExperimenterRef, ome::xml::model::ExperimentRef, ome::xml::model::FilterRef, ome::xml::model::FilterSetRef, ome::xml::model::ImageRef, ome::xml::model::InstrumentRef, ome::xml::model::MicrobeamManipulationRef, ome::xml::model::PlateRef, ome::xml::model::Polygon, ome::xml::model::ProjectRef, ome::xml::model::ReagentRef, ome::xml::model::ROIRef, ome::xml::model::WellSampleRef, ome::xml::model::Reference, ome::xml::model::EmissionFilterRef, ome::xml::model::ExcitationFilterRef, ome::xml::model::LightEmittingDiode, ome::xml::model::MetadataOnly, ome::xml::model::LightSource, ome::xml::model::ManufacturerSpec, ome::xml::model::BasicAnnotation, ome::xml::model::NumericAnnotation, ome::xml::model::Settings, ome::xml::model::TextAnnotation, and ome::xml::model::TypeAnnotation.

virtual bool ome::xml::model::OMEModelObject::validElementName ( const std::string &  name) const
pure virtual

Check if a given element name is valid for processing by this model object.

Used for processing nodes when interitance is involved.

Parameters
namethe element name to check.
Returns
true if valid, false if invalid.

Implemented in ome::xml::model::Pixels, ome::xml::model::Channel, ome::xml::model::Image, ome::xml::model::OME, ome::xml::model::Plate, ome::xml::model::Experimenter, ome::xml::model::Annotation, ome::xml::model::Shape, ome::xml::model::StructuredAnnotations, ome::xml::model::Well, ome::xml::model::Instrument, ome::xml::model::Plane, ome::xml::model::Screen, ome::xml::model::WellSample, ome::xml::model::ExperimenterGroup, ome::xml::model::Filter, ome::xml::model::PlateAcquisition, ome::xml::model::Laser, ome::xml::model::MicrobeamManipulation, ome::xml::model::Dataset, ome::xml::model::DetectorSettings, ome::xml::model::Objective, ome::xml::model::ROI, ome::xml::model::Detector, ome::xml::model::Project, ome::xml::model::Reagent, ome::xml::model::TiffData, ome::xml::model::Experiment, ome::xml::model::FilterSet, ome::xml::model::BinData, ome::xml::model::LightSourceSettings, ome::xml::model::BinaryFile, ome::xml::model::Line, ome::xml::model::TransmittanceRange, ome::xml::model::AffineTransform, ome::xml::model::ObjectiveSettings, ome::xml::model::Dichroic, ome::xml::model::Mask, ome::xml::model::ImagingEnvironment, ome::xml::model::Ellipse, ome::xml::model::LightPath, ome::xml::model::Rectangle, ome::xml::model::StageLabel, ome::xml::model::External, ome::xml::model::Polyline, ome::xml::model::FileAnnotation, ome::xml::model::TimestampAnnotation, ome::xml::model::BooleanAnnotation, ome::xml::model::CommentAnnotation, ome::xml::model::DoubleAnnotation, ome::xml::model::Leader, ome::xml::model::LongAnnotation, ome::xml::model::Pump, ome::xml::model::TagAnnotation, ome::xml::model::TermAnnotation, ome::xml::model::XMLAnnotation, ome::xml::model::BinaryOnly, ome::xml::model::Label, ome::xml::model::Point, ome::xml::model::Rights, ome::xml::model::UUID, ome::xml::model::Arc, ome::xml::model::Filament, ome::xml::model::ListAnnotation, ome::xml::model::Microscope, ome::xml::model::Union, ome::xml::model::AnnotationRef, ome::xml::model::ChannelRef, ome::xml::model::DatasetRef, ome::xml::model::DichroicRef, ome::xml::model::ExperimenterGroupRef, ome::xml::model::ExperimenterRef, ome::xml::model::ExperimentRef, ome::xml::model::FilterRef, ome::xml::model::FilterSetRef, ome::xml::model::ImageRef, ome::xml::model::InstrumentRef, ome::xml::model::MicrobeamManipulationRef, ome::xml::model::PlateRef, ome::xml::model::Polygon, ome::xml::model::ProjectRef, ome::xml::model::ReagentRef, ome::xml::model::ROIRef, ome::xml::model::WellSampleRef, ome::xml::model::EmissionFilterRef, ome::xml::model::ExcitationFilterRef, ome::xml::model::LightEmittingDiode, ome::xml::model::MetadataOnly, ome::xml::model::MapPairs, ome::xml::model::OriginalMetadataAnnotation, ome::xml::model::LightSource, ome::xml::model::ManufacturerSpec, ome::xml::model::BasicAnnotation, ome::xml::model::NumericAnnotation, ome::xml::model::Reference, ome::xml::model::Settings, ome::xml::model::TextAnnotation, ome::xml::model::TypeAnnotation, and ome::xml::model::detail::OMEModelObject.


The documentation for this class was generated from the following file: