ome-xml  5.6.0
Classes | Public Member Functions | Protected 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 SKIP 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 asXMLElement (common::xml::dom::Document &document, common::xml::dom::Element &element) 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 (std::shared_ptr< Reference > &reference, std::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.
 

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

◆ asXMLElement() [1/2]

virtual SKIP 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::detail::OMEModelObject.

Referenced by ~OMEModelObject().

+ Here is the caller graph for this function:

◆ asXMLElement() [2/2]

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

Transform the object hierarchy rooted at this element to XML.

This internal implementation of asXMLelement also requires an XML element, which must not be null, or may be instantiated and passed from superclasses.

Parameters
documentXML document for element creation.
elementXML element for setting model data.

Implemented in ome::xml::model::detail::OMEModelObject.

◆ elementName()

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

Referenced by ome::xml::model::detail::OMEModelObject::asXMLElement(), and ~OMEModelObject().

+ Here is the caller graph for this function:

◆ getXMLNamespace()

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::Image, ome::xml::model::Instrument, ome::xml::model::Pixels, ome::xml::model::Experimenter, ome::xml::model::Plate, ome::xml::model::Channel, ome::xml::model::ExperimenterGroup, ome::xml::model::Filter, ome::xml::model::Shape, ome::xml::model::Folder, ome::xml::model::Screen, ome::xml::model::ROI, ome::xml::model::Well, ome::xml::model::Dataset, ome::xml::model::MicrobeamManipulation, ome::xml::model::PlateAcquisition, ome::xml::model::FilterSet, ome::xml::model::Plane, ome::xml::model::Project, ome::xml::model::Objective, ome::xml::model::Detector, ome::xml::model::Dichroic, ome::xml::model::Experiment, ome::xml::model::Reagent, ome::xml::model::LightPath, ome::xml::model::WellSample, ome::xml::model::Laser, ome::xml::model::DetectorSettings, ome::xml::model::TiffData, ome::xml::model::ImagingEnvironment, ome::xml::model::LightSource, ome::xml::model::TransmittanceRange, ome::xml::model::LightSourceSettings, ome::xml::model::Line, ome::xml::model::ObjectiveSettings, ome::xml::model::BinaryFile, ome::xml::model::BinData, ome::xml::model::AffineTransform, ome::xml::model::Mask, ome::xml::model::StageLabel, ome::xml::model::Leader, ome::xml::model::Pump, ome::xml::model::Union, ome::xml::model::ManufacturerSpec, ome::xml::model::Polyline, ome::xml::model::Ellipse, ome::xml::model::Rectangle, ome::xml::model::External, ome::xml::model::FileAnnotation, ome::xml::model::Rights, ome::xml::model::MapAnnotation, 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::GenericExcitationSource, 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::FolderRef, 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::LightEmittingDiode, ome::xml::model::EmissionFilterRef, ome::xml::model::ExcitationFilterRef, ome::xml::model::MetadataOnly, ome::xml::model::Reference, ome::xml::model::BasicAnnotation, ome::xml::model::NumericAnnotation, ome::xml::model::Settings, ome::xml::model::TextAnnotation, and ome::xml::model::TypeAnnotation.

Referenced by ome::xml::model::detail::OMEModelObject::asXMLElement(), and ~OMEModelObject().

+ Here is the caller graph for this function:

◆ link()

virtual bool ome::xml::model::OMEModelObject::link ( std::shared_ptr< Reference > &  reference,
std::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.

Referenced by ~OMEModelObject().

+ Here is the caller graph for this function:

◆ update()

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

Referenced by ~OMEModelObject().

+ Here is the caller graph for this function:

◆ validElementName()

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.
Deprecated:
Always returns true since any element name is now regarded as being valid.

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

Referenced by ~OMEModelObject().

+ Here is the caller graph for this function:

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