46 #ifndef OME_XML_MODEL_INSTRUMENT_H
47 #define OME_XML_MODEL_INSTRUMENT_H
57 #include <ome/common/xml/dom/Document.h>
58 #include <ome/common/xml/dom/Element.h>
59 #include <ome/common/xml/dom/Node.h>
60 #include <ome/common/xml/dom/NodeList.h>
62 #include <ome/xml/model/Microscope.h>
63 #include <ome/xml/model/detail/OMEModelObject.h>
91 ome::compat::shared_ptr<ome::xml::model::Microscope>
microscope;
93 std::vector<ome::compat::shared_ptr<ome::xml::model::LightSource> >
lightSources;
95 std::vector<ome::compat::shared_ptr<ome::xml::model::Detector> >
detectors;
97 std::vector<ome::compat::shared_ptr<ome::xml::model::Objective> >
objectives;
99 std::vector<ome::compat::shared_ptr<ome::xml::model::FilterSet> >
filterSets;
101 std::vector<ome::compat::shared_ptr<ome::xml::model::Filter> >
filters;
103 std::vector<ome::compat::shared_ptr<ome::xml::model::Dichroic> >
dichroics;
138 static ome::compat::shared_ptr< Instrument>
163 link (ome::compat::shared_ptr<Reference>& reference,
164 ome::compat::shared_ptr< ome::xml::model::OMEModelObject>&
object);
180 setID (
const std::string&
id);
187 ome::compat::shared_ptr<ome::xml::model::Microscope>
195 const ome::compat::shared_ptr<ome::xml::model::Microscope>
204 setMicroscope (ome::compat::shared_ptr<ome::xml::model::Microscope>& microscope);
211 std::vector<ome::compat::shared_ptr<ome::xml::model::LightSource> >::size_type
220 std::vector<ome::compat::shared_ptr<ome::xml::model::LightSource> >&
229 const std::vector<ome::compat::shared_ptr<ome::xml::model::LightSource> >&
239 ome::compat::shared_ptr<ome::xml::model::LightSource>&
240 getLightSource (std::vector<ome::compat::shared_ptr<ome::xml::model::LightSource> >::size_type index);
249 const ome::compat::shared_ptr<ome::xml::model::LightSource>&
250 getLightSource (std::vector<ome::compat::shared_ptr<ome::xml::model::LightSource> >::size_type index)
const;
260 setLightSource (std::vector<ome::compat::shared_ptr<ome::xml::model::LightSource> >::size_type index,
261 ome::compat::shared_ptr<ome::xml::model::LightSource>& lightSource);
272 addLightSource (ome::compat::shared_ptr<ome::xml::model::LightSource>& lightSource);
284 removeLightSource (ome::compat::shared_ptr<ome::xml::model::LightSource>& lightSource);
291 std::vector<ome::compat::shared_ptr<ome::xml::model::Detector> >::size_type
300 std::vector<ome::compat::shared_ptr<ome::xml::model::Detector> >&
309 const std::vector<ome::compat::shared_ptr<ome::xml::model::Detector> >&
319 ome::compat::shared_ptr<ome::xml::model::Detector>&
320 getDetector (std::vector<ome::compat::shared_ptr<ome::xml::model::Detector> >::size_type index);
329 const ome::compat::shared_ptr<ome::xml::model::Detector>&
330 getDetector (std::vector<ome::compat::shared_ptr<ome::xml::model::Detector> >::size_type index)
const;
340 setDetector (std::vector<ome::compat::shared_ptr<ome::xml::model::Detector> >::size_type index,
341 ome::compat::shared_ptr<ome::xml::model::Detector>& detector);
352 addDetector (ome::compat::shared_ptr<ome::xml::model::Detector>& detector);
364 removeDetector (ome::compat::shared_ptr<ome::xml::model::Detector>& detector);
371 std::vector<ome::compat::shared_ptr<ome::xml::model::Objective> >::size_type
380 std::vector<ome::compat::shared_ptr<ome::xml::model::Objective> >&
389 const std::vector<ome::compat::shared_ptr<ome::xml::model::Objective> >&
399 ome::compat::shared_ptr<ome::xml::model::Objective>&
400 getObjective (std::vector<ome::compat::shared_ptr<ome::xml::model::Objective> >::size_type index);
409 const ome::compat::shared_ptr<ome::xml::model::Objective>&
410 getObjective (std::vector<ome::compat::shared_ptr<ome::xml::model::Objective> >::size_type index)
const;
420 setObjective (std::vector<ome::compat::shared_ptr<ome::xml::model::Objective> >::size_type index,
421 ome::compat::shared_ptr<ome::xml::model::Objective>& objective);
432 addObjective (ome::compat::shared_ptr<ome::xml::model::Objective>& objective);
444 removeObjective (ome::compat::shared_ptr<ome::xml::model::Objective>& objective);
451 std::vector<ome::compat::shared_ptr<ome::xml::model::FilterSet> >::size_type
460 std::vector<ome::compat::shared_ptr<ome::xml::model::FilterSet> >&
469 const std::vector<ome::compat::shared_ptr<ome::xml::model::FilterSet> >&
479 ome::compat::shared_ptr<ome::xml::model::FilterSet>&
480 getFilterSet (std::vector<ome::compat::shared_ptr<ome::xml::model::FilterSet> >::size_type index);
489 const ome::compat::shared_ptr<ome::xml::model::FilterSet>&
490 getFilterSet (std::vector<ome::compat::shared_ptr<ome::xml::model::FilterSet> >::size_type index)
const;
500 setFilterSet (std::vector<ome::compat::shared_ptr<ome::xml::model::FilterSet> >::size_type index,
501 ome::compat::shared_ptr<ome::xml::model::FilterSet>& filterSet);
512 addFilterSet (ome::compat::shared_ptr<ome::xml::model::FilterSet>& filterSet);
524 removeFilterSet (ome::compat::shared_ptr<ome::xml::model::FilterSet>& filterSet);
531 std::vector<ome::compat::shared_ptr<ome::xml::model::Filter> >::size_type
540 std::vector<ome::compat::shared_ptr<ome::xml::model::Filter> >&
549 const std::vector<ome::compat::shared_ptr<ome::xml::model::Filter> >&
559 ome::compat::shared_ptr<ome::xml::model::Filter>&
560 getFilter (std::vector<ome::compat::shared_ptr<ome::xml::model::Filter> >::size_type index);
569 const ome::compat::shared_ptr<ome::xml::model::Filter>&
570 getFilter (std::vector<ome::compat::shared_ptr<ome::xml::model::Filter> >::size_type index)
const;
580 setFilter (std::vector<ome::compat::shared_ptr<ome::xml::model::Filter> >::size_type index,
581 ome::compat::shared_ptr<ome::xml::model::Filter>& filter);
592 addFilter (ome::compat::shared_ptr<ome::xml::model::Filter>& filter);
604 removeFilter (ome::compat::shared_ptr<ome::xml::model::Filter>& filter);
611 std::vector<ome::compat::shared_ptr<ome::xml::model::Dichroic> >::size_type
620 std::vector<ome::compat::shared_ptr<ome::xml::model::Dichroic> >&
629 const std::vector<ome::compat::shared_ptr<ome::xml::model::Dichroic> >&
639 ome::compat::shared_ptr<ome::xml::model::Dichroic>&
640 getDichroic (std::vector<ome::compat::shared_ptr<ome::xml::model::Dichroic> >::size_type index);
649 const ome::compat::shared_ptr<ome::xml::model::Dichroic>&
650 getDichroic (std::vector<ome::compat::shared_ptr<ome::xml::model::Dichroic> >::size_type index)
const;
660 setDichroic (std::vector<ome::compat::shared_ptr<ome::xml::model::Dichroic> >::size_type index,
661 ome::compat::shared_ptr<ome::xml::model::Dichroic>& dichroic);
672 addDichroic (ome::compat::shared_ptr<ome::xml::model::Dichroic>& dichroic);
684 removeDichroic (ome::compat::shared_ptr<ome::xml::model::Dichroic>& dichroic);
709 const ome::compat::weak_ptr<ome::xml::model::Image>&
722 const ome::compat::weak_ptr<ome::xml::model::Image>&
724 const ome::compat::shared_ptr<ome::xml::model::Image>& image_BackReference);
737 linkImage (
const ome::compat::shared_ptr<ome::xml::model::Image>& image_BackReference);
755 unlinkImage (
const ome::compat::shared_ptr<ome::xml::model::Image>& image_BackReference);
779 #endif // OME_XML_MODEL_INSTRUMENT_H
OME model interface (abstract top-level container)
Definition: OMEModel.h:62
void setMicroscope(ome::compat::shared_ptr< ome::xml::model::Microscope > µscope)
Set the Microscope property.
Definition: Instrument.cpp:418
std::vector< ome::compat::shared_ptr< ome::xml::model::Dichroic > >::size_type sizeOfDichroicList() const
Get size of linked Dichroic list.
Definition: Instrument.cpp:715
std::vector< ome::compat::shared_ptr< ome::xml::model::FilterSet > > & getFilterSetList()
Get the FilterSet list.
Definition: Instrument.cpp:605
Instrument model object.
Definition: Instrument.h:85
std::vector< ome::compat::shared_ptr< ome::xml::model::FilterSet > > filterSets
FilterSet property (occurs more than once)
Definition: Instrument.h:99
bool linkImage(const ome::compat::shared_ptr< ome::xml::model::Image > &image_BackReference)
Link Image.
Definition: Instrument.cpp:801
std::vector< ome::compat::shared_ptr< ome::xml::model::Objective > >::size_type sizeOfObjectiveList() const
Get size of linked Objective list.
Definition: Instrument.cpp:541
DOM Document wrapper.
Definition: Document.h:82
DOM Element wrapper.
Definition: Element.h:66
virtual ~Instrument()
Destructor.
Definition: Instrument.cpp:184
void removeFilterSet(ome::compat::shared_ptr< ome::xml::model::FilterSet > &filterSet)
Remove FilterSet.
Definition: Instrument.cpp:646
void addDichroic(ome::compat::shared_ptr< ome::xml::model::Dichroic > &dichroic)
Add Dichroic.
Definition: Instrument.cpp:754
std::vector< ome::compat::shared_ptr< ome::xml::model::Filter > > & getFilterList()
Get the Filter list.
Definition: Instrument.cpp:663
void addFilter(ome::compat::shared_ptr< ome::xml::model::Filter > &filter)
Add Filter.
Definition: Instrument.cpp:696
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
void setID(const std::string &id)
Set the ID property.
Definition: Instrument.cpp:397
void removeFilter(ome::compat::shared_ptr< ome::xml::model::Filter > &filter)
Remove Filter.
Definition: Instrument.cpp:704
boost::multi_index_container< Ptr< T >, boost::multi_index::indexed_by< boost::multi_index::random_access<>, boost::multi_index::ordered_unique< boost::multi_index::identity< Ptr< T > >, ome::compat::owner_less< Ptr< T > > > > > type
Multi-index container type.
Definition: OMEModelObject.h:94
void addFilterSet(ome::compat::shared_ptr< ome::xml::model::FilterSet > &filterSet)
Add FilterSet.
Definition: Instrument.cpp:638
std::vector< ome::compat::shared_ptr< ome::xml::model::Filter > >::size_type sizeOfFilterList() const
Get size of linked Filter list.
Definition: Instrument.cpp:657
void addObjective(ome::compat::shared_ptr< ome::xml::model::Objective > &objective)
Add Objective.
Definition: Instrument.cpp:580
std::vector< ome::compat::shared_ptr< ome::xml::model::Dichroic > > & getDichroicList()
Get the Dichroic list.
Definition: Instrument.cpp:721
virtual void update(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Update the object hierarchy recursively from an XML DOM tree.
Definition: Instrument.cpp:214
std::vector< ome::compat::shared_ptr< ome::xml::model::Detector > >::size_type sizeOfDetectorList() const
Get size of linked Detector list.
Definition: Instrument.cpp:483
bool unlinkImage(const ome::compat::shared_ptr< ome::xml::model::Image > &image_BackReference)
Unlink Image.
Definition: Instrument.cpp:814
bool link(ome::compat::shared_ptr< Reference > &reference, ome::compat::shared_ptr< ome::xml::model::OMEModelObject > &object)
Link a given OME model object to this model object.
Definition: Instrument.cpp:375
void setDichroic(std::vector< ome::compat::shared_ptr< ome::xml::model::Dichroic > >::size_type index, ome::compat::shared_ptr< ome::xml::model::Dichroic > &dichroic)
Set Dichroic.
Definition: Instrument.cpp:745
std::vector< ome::compat::shared_ptr< ome::xml::model::FilterSet > >::size_type sizeOfFilterSetList() const
Get size of linked FilterSet list.
Definition: Instrument.cpp:599
ome::compat::shared_ptr< ome::xml::model::Objective > & getObjective(std::vector< ome::compat::shared_ptr< ome::xml::model::Objective > >::size_type index)
Get Objective.
Definition: Instrument.cpp:559
std::vector< ome::compat::shared_ptr< ome::xml::model::Filter > > filters
Filter property (occurs more than once)
Definition: Instrument.h:101
virtual common::xml::dom::Element asXMLElement(common::xml::dom::Document &document) const
Transform the object hierarchy rooted at this element to XML.
Definition: Instrument.cpp:831
std::vector< ome::compat::shared_ptr< ome::xml::model::Detector > > & getDetectorList()
Get the Detector list.
Definition: Instrument.cpp:489
std::vector< ome::compat::shared_ptr< ome::xml::model::Objective > > & getObjectiveList()
Get the Objective list.
Definition: Instrument.cpp:547
std::string id
ID property.
Definition: Instrument.h:89
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:85
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Instrument.cpp:969
ome::compat::shared_ptr< ome::xml::model::FilterSet > & getFilterSet(std::vector< ome::compat::shared_ptr< ome::xml::model::FilterSet > >::size_type index)
Get FilterSet.
Definition: Instrument.cpp:617
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40
void addDetector(ome::compat::shared_ptr< ome::xml::model::Detector > &detector)
Add Detector.
Definition: Instrument.cpp:522
ome::compat::shared_ptr< ome::xml::model::LightSource > & getLightSource(std::vector< ome::compat::shared_ptr< ome::xml::model::LightSource > >::size_type index)
Get LightSource.
Definition: Instrument.cpp:443
void setLightSource(std::vector< ome::compat::shared_ptr< ome::xml::model::LightSource > >::size_type index, ome::compat::shared_ptr< ome::xml::model::LightSource > &lightSource)
Set LightSource.
Definition: Instrument.cpp:455
void removeLightSource(ome::compat::shared_ptr< ome::xml::model::LightSource > &lightSource)
Remove LightSource.
Definition: Instrument.cpp:472
std::vector< ome::compat::shared_ptr< ome::xml::model::Dichroic > > dichroics
Dichroic property (occurs more than once)
Definition: Instrument.h:103
std::vector< ome::compat::shared_ptr< ome::xml::model::LightSource > > & getLightSourceList()
Get the LightSource list.
Definition: Instrument.cpp:431
void removeDetector(ome::compat::shared_ptr< ome::xml::model::Detector > &detector)
Remove Detector.
Definition: Instrument.cpp:530
const std::string & elementName() const
Get the element name of this model object.
Definition: Instrument.cpp:198
std::vector< ome::compat::shared_ptr< ome::xml::model::Detector > > detectors
Detector property (occurs more than once)
Definition: Instrument.h:95
ome::compat::shared_ptr< ome::xml::model::Detector > & getDetector(std::vector< ome::compat::shared_ptr< ome::xml::model::Detector > >::size_type index)
Get Detector.
Definition: Instrument.cpp:501
const std::string & getID() const
Get the ID property.
Definition: Instrument.cpp:390
void setFilter(std::vector< ome::compat::shared_ptr< ome::xml::model::Filter > >::size_type index, ome::compat::shared_ptr< ome::xml::model::Filter > &filter)
Set Filter.
Definition: Instrument.cpp:687
virtual common::xml::dom::Element asXMLElementInternal(common::xml::dom::Document &document, common::xml::dom::Element &element) const
Transform the object hierarchy rooted at this element to XML.
Definition: Instrument.cpp:838
void setObjective(std::vector< ome::compat::shared_ptr< ome::xml::model::Objective > >::size_type index, ome::compat::shared_ptr< ome::xml::model::Objective > &objective)
Set Objective.
Definition: Instrument.cpp:571
const ome::compat::weak_ptr< ome::xml::model::Image > & setLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type::size_type index, const ome::compat::shared_ptr< ome::xml::model::Image > &image_BackReference)
Set linked Image.
Definition: Instrument.cpp:791
void setFilterSet(std::vector< ome::compat::shared_ptr< ome::xml::model::FilterSet > >::size_type index, ome::compat::shared_ptr< ome::xml::model::FilterSet > &filterSet)
Set FilterSet.
Definition: Instrument.cpp:629
std::vector< ome::compat::shared_ptr< ome::xml::model::LightSource > > lightSources
LightSource property (occurs more than once)
Definition: Instrument.h:93
static ome::compat::shared_ptr< Instrument > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Instrument model object from DOM element.
Definition: Instrument.cpp:189
OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type::size_type sizeOfLinkedImageList() const
Get size of linked Image list.
Definition: Instrument.cpp:773
OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type images
Image_BackReference back reference (occurs more than once)
Definition: Instrument.h:105
ome::compat::shared_ptr< ome::xml::model::Microscope > microscope
Microscope property.
Definition: Instrument.h:91
Instrument()
Default constructor.
Definition: Instrument.cpp:149
void addLightSource(ome::compat::shared_ptr< ome::xml::model::LightSource > &lightSource)
Add LightSource.
Definition: Instrument.cpp:464
void removeObjective(ome::compat::shared_ptr< ome::xml::model::Objective > &objective)
Remove Objective.
Definition: Instrument.cpp:588
std::vector< ome::compat::shared_ptr< ome::xml::model::LightSource > >::size_type sizeOfLightSourceList() const
Get size of linked LightSource list.
Definition: Instrument.cpp:425
ome::compat::shared_ptr< ome::xml::model::Microscope > getMicroscope()
Get the Microscope property.
Definition: Instrument.cpp:404
OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: Instrument.cpp:779
void removeDichroic(ome::compat::shared_ptr< ome::xml::model::Dichroic > &dichroic)
Remove Dichroic.
Definition: Instrument.cpp:762
ome::compat::shared_ptr< ome::xml::model::Filter > & getFilter(std::vector< ome::compat::shared_ptr< ome::xml::model::Filter > >::size_type index)
Get Filter.
Definition: Instrument.cpp:675
const ome::compat::weak_ptr< ome::xml::model::Image > & getLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type::size_type index) const
Get linked Image.
Definition: Instrument.cpp:785
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Instrument.cpp:205
std::vector< ome::compat::shared_ptr< ome::xml::model::Objective > > objectives
Objective property (occurs more than once)
Definition: Instrument.h:97
ome::compat::shared_ptr< ome::xml::model::Dichroic > & getDichroic(std::vector< ome::compat::shared_ptr< ome::xml::model::Dichroic > >::size_type index)
Get Dichroic.
Definition: Instrument.cpp:733
Xerces-C modern C++ wrapper.
Definition: Base.h:53
void setDetector(std::vector< ome::compat::shared_ptr< ome::xml::model::Detector > >::size_type index, ome::compat::shared_ptr< ome::xml::model::Detector > &detector)
Set Detector.
Definition: Instrument.cpp:513