bioformats  5.1.3
Experiment.h
1 /*
2  * #%L
3  * OME-XML C++ library for working with OME-XML metadata structures.
4  * %%
5  * Copyright © 2006 - 2015 Open Microscopy Environment:
6  * - Massachusetts Institute of Technology
7  * - National Institutes of Health
8  * - University of Dundee
9  * - Board of Regents of the University of Wisconsin-Madison
10  * - Glencoe Software, Inc.
11  * %%
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions are met:
14  *
15  * 1. Redistributions of source code must retain the above copyright notice,
16  * this list of conditions and the following disclaimer.
17  * 2. Redistributions in binary form must reproduce the above copyright notice,
18  * this list of conditions and the following disclaimer in the documentation
19  * and/or other materials provided with the distribution.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  *
33  * The views and conclusions contained in the software and documentation are
34  * those of the authors and should not be interpreted as representing official
35  * policies, either expressed or implied, of any organization.
36  * #L%
37  */
38 
39 /*─────────────────────────────────────────────────────────────────────────────
40  *
41  * THIS IS AUTOMATICALLY GENERATED CODE. DO NOT MODIFY.
42  *
43  *─────────────────────────────────────────────────────────────────────────────
44  */
45 
46 #ifndef OME_XML_MODEL_EXPERIMENT_H
47 #define OME_XML_MODEL_EXPERIMENT_H
48 
49 #include <algorithm>
50 #include <list>
51 #include <stdexcept>
52 #include <string>
53 #include <vector>
54 
55 #include <ome/common/log.h>
56 
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>
61 
62 #include <ome/xml/model/Experimenter.h>
63 #include <ome/xml/model/detail/OMEModelObject.h>
64 #include <ome/xml/model/enums/ExperimentType.h>
65 
66 namespace ome
67 {
68  namespace xml
69  {
70  namespace model
71  {
72 
73  // Forward declarations.
74  class Image;
75  class MicrobeamManipulation;
76  class OMEModel;
77 
82  {
83  private:
85  ome::compat::shared_ptr<ome::xml::model::enums::ExperimentType> type;
87  std::string id;
89  ome::compat::shared_ptr<std::string> description;
91  ome::compat::weak_ptr<ome::xml::model::Experimenter> experimenter;
93  std::vector<ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation> > microbeamManipulations;
96 
97  public:
99  Experiment ();
100 
106  Experiment (const Experiment& copy);
107 
109  virtual
110  ~Experiment ();
111 
112 
113 
128  static ome::compat::shared_ptr< Experiment>
129  create(const common::xml::dom::Element& element,
131 
132  // Documented in superclass.
133  const std::string&
134  elementName() const;
135 
136  // Documented in superclass.
137  bool
138  validElementName(const std::string& name) const;
139 
140 
141  // -- OMEModelObject API methods --
142 
144  virtual void
145  update(const common::xml::dom::Element& element,
147 
148  public:
149  // -- Experiment API methods --
150 
152  bool
153  link (ome::compat::shared_ptr<Reference>& reference,
154  ome::compat::shared_ptr< ome::xml::model::OMEModelObject>& object);
155 
161  ome::compat::shared_ptr<ome::xml::model::enums::ExperimentType>
162  getType ();
163 
169  const ome::compat::shared_ptr<ome::xml::model::enums::ExperimentType>
170  getType () const;
171 
177  void
178  setType (ome::compat::shared_ptr<ome::xml::model::enums::ExperimentType>& type);
179 
185  const std::string&
186  getID () const;
187 
193  void
194  setID (const std::string& id);
195 
201  ome::compat::shared_ptr<std::string>
202  getDescription ();
203 
209  const ome::compat::shared_ptr<std::string>
210  getDescription () const;
211 
217  void
218  setDescription (ome::compat::shared_ptr<std::string>& description);
219 
226  ome::compat::weak_ptr<ome::xml::model::Experimenter>
228 
235  const ome::compat::weak_ptr<ome::xml::model::Experimenter>
236  getLinkedExperimenter () const;
237 
243  void
244  linkExperimenter (ome::compat::shared_ptr<ome::xml::model::Experimenter>& experimenter);
245 
255  void
256  unlinkExperimenter (ome::compat::shared_ptr<ome::xml::model::Experimenter>& experimenter);
257 
263  std::vector<ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation> >::size_type
265 
272  std::vector<ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation> >&
274 
281  const std::vector<ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation> >&
283 
291  ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation>&
292  getMicrobeamManipulation (std::vector<ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation> >::size_type index);
293 
301  const ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation>&
302  getMicrobeamManipulation (std::vector<ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation> >::size_type index) const;
303 
311  void
312  setMicrobeamManipulation (std::vector<ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation> >::size_type index,
313  ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation);
314 
323  void
324  addMicrobeamManipulation (ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation);
325 
335  void
336  removeMicrobeamManipulation (ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation);
337 
344  sizeOfLinkedImageList () const;
345 
352  getLinkedImageList () const;
353 
361  const ome::compat::weak_ptr<ome::xml::model::Image>&
363 
374  const ome::compat::weak_ptr<ome::xml::model::Image>&
376  const ome::compat::shared_ptr<ome::xml::model::Image>& image_BackReference);
377 
388  bool
389  linkImage (const ome::compat::shared_ptr<ome::xml::model::Image>& image_BackReference);
390 
406  bool
407  unlinkImage (const ome::compat::shared_ptr<ome::xml::model::Image>& image_BackReference);
408 
409 
412  asXMLElement (common::xml::dom::Document& document) const;
413 
414 
415  protected:
416  // Documented in base class.
419  common::xml::dom::Element& element) const;
420 
421  public:
422  // Documented in superclass.
423  const std::string&
424  getXMLNamespace() const;
425  };
426 
427  }
428  }
429 }
430 
431 #endif // OME_XML_MODEL_EXPERIMENT_H
432 
433 /*
434  * Local Variables:
435  * mode:C++
436  * End:
437  */
std::string id
ID property.
Definition: Experiment.h:87
ome::compat::shared_ptr< ome::xml::model::MicrobeamManipulation > & getMicrobeamManipulation(std::vector< ome::compat::shared_ptr< ome::xml::model::MicrobeamManipulation > >::size_type index)
Get MicrobeamManipulation.
Definition: Experiment.cpp:381
OME model interface (abstract top-level container)
Definition: OMEModel.h:62
void addMicrobeamManipulation(ome::compat::shared_ptr< ome::xml::model::MicrobeamManipulation > &microbeamManipulation)
Add MicrobeamManipulation.
Definition: Experiment.cpp:402
OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: Experiment.cpp:427
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: Experiment.cpp:439
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: Experiment.cpp:179
OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type images
Image_BackReference back reference (occurs more than once)
Definition: Experiment.h:95
ome::compat::shared_ptr< std::string > description
Description property.
Definition: Experiment.h:89
static ome::compat::shared_ptr< Experiment > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Experiment model object from DOM element.
Definition: Experiment.cpp:154
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Experiment.cpp:571
DOM Document wrapper.
Definition: Document.h:82
DOM Element wrapper.
Definition: Element.h:66
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
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 setType(ome::compat::shared_ptr< ome::xml::model::enums::ExperimentType > &type)
Set the Type property.
Definition: Experiment.cpp:292
void linkExperimenter(ome::compat::shared_ptr< ome::xml::model::Experimenter > &experimenter)
Link Experimenter.
Definition: Experiment.cpp:347
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Experiment.cpp:170
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: Experiment.cpp:252
ome::compat::shared_ptr< ome::xml::model::enums::ExperimentType > getType()
Get the Type property.
Definition: Experiment.cpp:278
const std::string & getID() const
Get the ID property.
Definition: Experiment.cpp:299
OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type::size_type sizeOfLinkedImageList() const
Get size of linked Image list.
Definition: Experiment.cpp:421
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: Experiment.cpp:433
std::vector< ome::compat::shared_ptr< ome::xml::model::MicrobeamManipulation > >::size_type sizeOfMicrobeamManipulationList() const
Get size of linked MicrobeamManipulation list.
Definition: Experiment.cpp:363
void removeMicrobeamManipulation(ome::compat::shared_ptr< ome::xml::model::MicrobeamManipulation > &microbeamManipulation)
Remove MicrobeamManipulation.
Definition: Experiment.cpp:410
Experiment model object.
Definition: Experiment.h:81
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:85
ome::compat::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: Experiment.cpp:313
void setID(const std::string &id)
Set the ID property.
Definition: Experiment.cpp:306
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40
bool unlinkImage(const ome::compat::shared_ptr< ome::xml::model::Image > &image_BackReference)
Unlink Image.
Definition: Experiment.cpp:462
ome::compat::weak_ptr< ome::xml::model::Experimenter > experimenter
ExperimenterRef reference.
Definition: Experiment.h:91
std::vector< ome::compat::shared_ptr< ome::xml::model::MicrobeamManipulation > > microbeamManipulations
MicrobeamManipulation property (occurs more than once)
Definition: Experiment.h:93
void unlinkExperimenter(ome::compat::shared_ptr< ome::xml::model::Experimenter > &experimenter)
Unlink Experimenter.
Definition: Experiment.cpp:353
bool linkImage(const ome::compat::shared_ptr< ome::xml::model::Image > &image_BackReference)
Link Image.
Definition: Experiment.cpp:449
void setDescription(ome::compat::shared_ptr< std::string > &description)
Set the Description property.
Definition: Experiment.cpp:327
ome::compat::shared_ptr< ome::xml::model::enums::ExperimentType > type
Type property.
Definition: Experiment.h:85
Experiment()
Default constructor.
Definition: Experiment.cpp:120
ome::compat::weak_ptr< ome::xml::model::Experimenter > getLinkedExperimenter()
Get linked Experimenter.
Definition: Experiment.cpp:334
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: Experiment.cpp:486
virtual ~Experiment()
Destructor.
Definition: Experiment.cpp:149
void setMicrobeamManipulation(std::vector< ome::compat::shared_ptr< ome::xml::model::MicrobeamManipulation > >::size_type index, ome::compat::shared_ptr< ome::xml::model::MicrobeamManipulation > &microbeamManipulation)
Set MicrobeamManipulation.
Definition: Experiment.cpp:393
std::vector< ome::compat::shared_ptr< ome::xml::model::MicrobeamManipulation > > & getMicrobeamManipulationList()
Get the MicrobeamManipulation list.
Definition: Experiment.cpp:369
virtual common::xml::dom::Element asXMLElement(common::xml::dom::Document &document) const
Transform the object hierarchy rooted at this element to XML.
Definition: Experiment.cpp:479
Boost.Log compatibility.
const std::string & elementName() const
Get the element name of this model object.
Definition: Experiment.cpp:163
Xerces-C modern C++ wrapper.
Definition: Base.h:53