ome-xml  5.5.1
Experimenter.h
1 /*
2  * #%L
3  * OME-XML C++ library for working with OME-XML metadata structures.
4  * %%
5  * Copyright © 2006 - 2016 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_EXPERIMENTER_H
47 #define OME_XML_MODEL_EXPERIMENTER_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 
61 #include <ome/xml/model/primitives/Quantity.h>
62 
63 #include <ome/xml/model/detail/OMEModelObject.h>
64 
65 namespace ome
66 {
67  namespace xml
68  {
69  namespace model
70  {
71 
72  // Forward declarations.
73  class Annotation;
74  class Dataset;
75  class Experiment;
76  class ExperimenterGroup;
77  class Image;
78  class MicrobeamManipulation;
79  class OMEModel;
80  class Project;
81 
86  {
87  private:
88  class Impl;
90  std::shared_ptr<Impl> impl;
91 
92  public:
94  Experimenter();
95 
101  Experimenter (const Experimenter& copy);
102 
104  virtual
105  ~Experimenter ();
106 
121  static std::shared_ptr<Experimenter>
122  create(const common::xml::dom::Element& element,
124 
125  // Documented in superclass.
126  const std::string&
127  elementName() const;
128 
129  // Documented in superclass.
130  bool
131  validElementName(const std::string& name) const;
132 
133  private:
135  Experimenter&
136  operator= (const Experimenter&);
137 
138  public:
139  // -- OMEModelObject API methods --
140 
142  virtual void
143  update(const common::xml::dom::Element& element,
145 
146  public:
147  // -- Experimenter API methods --
148 
150  bool
151  link (std::shared_ptr<Reference>& reference,
152  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
153 
159  std::shared_ptr<std::string>
160  getEmail ();
161 
167  const std::shared_ptr<std::string>
168  getEmail () const;
169 
175  void
176  setEmail (std::shared_ptr<std::string>& email);
177 
183  std::shared_ptr<std::string>
184  getUserName ();
185 
191  const std::shared_ptr<std::string>
192  getUserName () const;
193 
199  void
200  setUserName (std::shared_ptr<std::string>& userName);
201 
207  std::shared_ptr<std::string>
208  getFirstName ();
209 
215  const std::shared_ptr<std::string>
216  getFirstName () const;
217 
223  void
224  setFirstName (std::shared_ptr<std::string>& firstName);
225 
231  std::shared_ptr<std::string>
232  getMiddleName ();
233 
239  const std::shared_ptr<std::string>
240  getMiddleName () const;
241 
247  void
248  setMiddleName (std::shared_ptr<std::string>& middleName);
249 
255  std::shared_ptr<std::string>
256  getLastName ();
257 
263  const std::shared_ptr<std::string>
264  getLastName () const;
265 
271  void
272  setLastName (std::shared_ptr<std::string>& lastName);
273 
279  const std::string&
280  getID () const;
281 
287  void
288  setID (const std::string& id);
289 
295  std::shared_ptr<std::string>
296  getInstitution ();
297 
303  const std::shared_ptr<std::string>
304  getInstitution () const;
305 
311  void
312  setInstitution (std::shared_ptr<std::string>& institution);
313 
321 
328  getLinkedAnnotationList () const;
329 
337  const std::weak_ptr<ome::xml::model::Annotation>&
339 
350  const std::weak_ptr<ome::xml::model::Annotation>&
352  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
353 
364  bool
365  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
366 
382  bool
383  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
384 
391  sizeOfLinkedImageList () const;
392 
399  getLinkedImageList () const;
400 
408  const std::weak_ptr<ome::xml::model::Image>&
410 
421  const std::weak_ptr<ome::xml::model::Image>&
423  const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
424 
435  bool
436  linkImage (const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
437 
453  bool
454  unlinkImage (const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
455 
463 
471 
479  const std::weak_ptr<ome::xml::model::MicrobeamManipulation>&
481 
492  const std::weak_ptr<ome::xml::model::MicrobeamManipulation>&
494  const std::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation_BackReference);
495 
506  bool
507  linkMicrobeamManipulation (const std::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation_BackReference);
508 
524  bool
525  unlinkMicrobeamManipulation (const std::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation_BackReference);
526 
533  sizeOfLinkedProjectList () const;
534 
541  getLinkedProjectList () const;
542 
550  const std::weak_ptr<ome::xml::model::Project>&
552 
563  const std::weak_ptr<ome::xml::model::Project>&
565  const std::shared_ptr<ome::xml::model::Project>& project_BackReference);
566 
577  bool
578  linkProject (const std::shared_ptr<ome::xml::model::Project>& project_BackReference);
579 
595  bool
596  unlinkProject (const std::shared_ptr<ome::xml::model::Project>& project_BackReference);
597 
605 
613 
621  const std::weak_ptr<ome::xml::model::ExperimenterGroup>&
623 
634  const std::weak_ptr<ome::xml::model::ExperimenterGroup>&
636  const std::shared_ptr<ome::xml::model::ExperimenterGroup>& experimenterGroup_BackReference);
637 
648  bool
649  linkExperimenterGroup (const std::shared_ptr<ome::xml::model::ExperimenterGroup>& experimenterGroup_BackReference);
650 
666  bool
667  unlinkExperimenterGroup (const std::shared_ptr<ome::xml::model::ExperimenterGroup>& experimenterGroup_BackReference);
668 
675  sizeOfLinkedDatasetList () const;
676 
683  getLinkedDatasetList () const;
684 
692  const std::weak_ptr<ome::xml::model::Dataset>&
694 
705  const std::weak_ptr<ome::xml::model::Dataset>&
707  const std::shared_ptr<ome::xml::model::Dataset>& dataset_BackReference);
708 
719  bool
720  linkDataset (const std::shared_ptr<ome::xml::model::Dataset>& dataset_BackReference);
721 
737  bool
738  unlinkDataset (const std::shared_ptr<ome::xml::model::Dataset>& dataset_BackReference);
739 
747 
754  getLinkedExperimentList () const;
755 
763  const std::weak_ptr<ome::xml::model::Experiment>&
765 
776  const std::weak_ptr<ome::xml::model::Experiment>&
778  const std::shared_ptr<ome::xml::model::Experiment>& experiment_BackReference);
779 
790  bool
791  linkExperiment (const std::shared_ptr<ome::xml::model::Experiment>& experiment_BackReference);
792 
808  bool
809  unlinkExperiment (const std::shared_ptr<ome::xml::model::Experiment>& experiment_BackReference);
810 
811  protected:
812  // Documented in base class.
813  virtual void
815  common::xml::dom::Element& element) const;
816 
817  public:
818  // Documented in superclass.
819  const std::string&
820  getXMLNamespace() const;
821  };
822 
823  }
824  }
825 }
826 
827 #endif // OME_XML_MODEL_EXPERIMENTER_H
828 
829 /*
830  * Local Variables:
831  * mode:C++
832  * End:
833  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:61
OMEModelObject::indexed_container< ome::xml::model::ExperimenterGroup, std::weak_ptr >::type getLinkedExperimenterGroupList() const
Get the linked ExperimenterGroup list.
Definition: Experimenter.cpp:753
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Experimenter.cpp:1023
void setID(const std::string &id)
Set the ID property.
Definition: Experimenter.cpp:485
const std::weak_ptr< ome::xml::model::Dataset > & setLinkedDataset(OMEModelObject::indexed_container< ome::xml::model::Dataset, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Dataset > &dataset_BackReference)
Set linked Dataset.
Definition: Experimenter.cpp:823
virtual ~Experimenter()
Destructor.
Definition: Experimenter.cpp:223
const std::weak_ptr< ome::xml::model::Experiment > & setLinkedExperiment(OMEModelObject::indexed_container< ome::xml::model::Experiment, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Experiment > &experiment_BackReference)
Set linked Experiment.
Definition: Experimenter.cpp:881
OMEModelObject::indexed_container< ome::xml::model::Experiment, std::weak_ptr >::type::size_type sizeOfLinkedExperimentList() const
Get size of linked Experiment list.
Definition: Experimenter.cpp:863
const std::weak_ptr< ome::xml::model::Project > & setLinkedProject(OMEModelObject::indexed_container< ome::xml::model::Project, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Project > &project_BackReference)
Set linked Project.
Definition: Experimenter.cpp:707
bool linkExperimenterGroup(const std::shared_ptr< ome::xml::model::ExperimenterGroup > &experimenterGroup_BackReference)
Link ExperimenterGroup.
Definition: Experimenter.cpp:775
const std::weak_ptr< ome::xml::model::Image > & setLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Set linked Image.
Definition: Experimenter.cpp:591
const std::weak_ptr< ome::xml::model::Project > & getLinkedProject(OMEModelObject::indexed_container< ome::xml::model::Project, std::weak_ptr >::type::size_type index) const
Get linked Project.
Definition: Experimenter.cpp:701
Experimenter()
Default constructor.
Definition: Experimenter.cpp:208
const std::weak_ptr< ome::xml::model::Dataset > & getLinkedDataset(OMEModelObject::indexed_container< ome::xml::model::Dataset, std::weak_ptr >::type::size_type index) const
Get linked Dataset.
Definition: Experimenter.cpp:817
bool unlinkDataset(const std::shared_ptr< ome::xml::model::Dataset > &dataset_BackReference)
Unlink Dataset.
Definition: Experimenter.cpp:846
bool linkImage(const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Link Image.
Definition: Experimenter.cpp:601
bool unlinkProject(const std::shared_ptr< ome::xml::model::Project > &project_BackReference)
Unlink Project.
Definition: Experimenter.cpp:730
void setInstitution(std::shared_ptr< std::string > &institution)
Set the Institution property.
Definition: Experimenter.cpp:506
const std::weak_ptr< ome::xml::model::Experiment > & getLinkedExperiment(OMEModelObject::indexed_container< ome::xml::model::Experiment, std::weak_ptr >::type::size_type index) const
Get linked Experiment.
Definition: Experimenter.cpp:875
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 > >, std::owner_less< Ptr< T > > > > > type
Multi-index container type.
Definition: OMEModelObject.h:93
OMEModelObject::indexed_container< ome::xml::model::MicrobeamManipulation, std::weak_ptr >::type::size_type sizeOfLinkedMicrobeamManipulationList() const
Get size of linked MicrobeamManipulation list.
Definition: Experimenter.cpp:631
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
const std::weak_ptr< ome::xml::model::ExperimenterGroup > & getLinkedExperimenterGroup(OMEModelObject::indexed_container< ome::xml::model::ExperimenterGroup, std::weak_ptr >::type::size_type index) const
Get linked ExperimenterGroup.
Definition: Experimenter.cpp:759
std::shared_ptr< std::string > getFirstName()
Get the FirstName property.
Definition: Experimenter.cpp:415
const std::weak_ptr< ome::xml::model::Annotation > & getLinkedAnnotation(OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type index) const
Get linked Annotation.
Definition: Experimenter.cpp:525
bool linkProject(const std::shared_ptr< ome::xml::model::Project > &project_BackReference)
Link Project.
Definition: Experimenter.cpp:717
const std::weak_ptr< ome::xml::model::ExperimenterGroup > & setLinkedExperimenterGroup(OMEModelObject::indexed_container< ome::xml::model::ExperimenterGroup, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::ExperimenterGroup > &experimenterGroup_BackReference)
Set linked ExperimenterGroup.
Definition: Experimenter.cpp:765
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Experimenter.cpp:555
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Experimenter.cpp:244
void setLastName(std::shared_ptr< std::string > &lastName)
Set the LastName property.
Definition: Experimenter.cpp:471
OMEModelObject::indexed_container< ome::xml::model::Dataset, std::weak_ptr >::type getLinkedDatasetList() const
Get the linked Dataset list.
Definition: Experimenter.cpp:811
bool linkDataset(const std::shared_ptr< ome::xml::model::Dataset > &dataset_BackReference)
Link Dataset.
Definition: Experimenter.cpp:833
bool unlinkExperimenterGroup(const std::shared_ptr< ome::xml::model::ExperimenterGroup > &experimenterGroup_BackReference)
Unlink ExperimenterGroup.
Definition: Experimenter.cpp:788
Experimenter model object.
Definition: Experimenter.h:85
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:84
static std::shared_ptr< Experimenter > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Experimenter model object from DOM element.
Definition: Experimenter.cpp:228
const std::weak_ptr< ome::xml::model::Annotation > & setLinkedAnnotation(OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Set linked Annotation.
Definition: Experimenter.cpp:531
OMEModelObject::indexed_container< ome::xml::model::Project, std::weak_ptr >::type::size_type sizeOfLinkedProjectList() const
Get size of linked Project list.
Definition: Experimenter.cpp:689
Open Microscopy Environment C++ implementation.
OMEModelObject::indexed_container< ome::xml::model::Project, std::weak_ptr >::type getLinkedProjectList() const
Get the linked Project list.
Definition: Experimenter.cpp:695
virtual void asXMLElementInternal(common::xml::dom::Document &document, common::xml::dom::Element &element) const
Transform the object hierarchy rooted at this element to XML.
Definition: Experimenter.cpp:920
void setEmail(std::shared_ptr< std::string > &email)
Set the Email property.
Definition: Experimenter.cpp:387
void setMiddleName(std::shared_ptr< std::string > &middleName)
Set the MiddleName property.
Definition: Experimenter.cpp:450
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Experimenter.cpp:519
std::shared_ptr< std::string > getMiddleName()
Get the MiddleName property.
Definition: Experimenter.cpp:436
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Experimenter.cpp:541
OMEModelObject::indexed_container< ome::xml::model::ExperimenterGroup, std::weak_ptr >::type::size_type sizeOfLinkedExperimenterGroupList() const
Get size of linked ExperimenterGroup list.
Definition: Experimenter.cpp:747
bool unlinkMicrobeamManipulation(const std::shared_ptr< ome::xml::model::MicrobeamManipulation > &microbeamManipulation_BackReference)
Unlink MicrobeamManipulation.
Definition: Experimenter.cpp:672
bool unlinkImage(const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Unlink Image.
Definition: Experimenter.cpp:614
const std::string & getID() const
Get the ID property.
Definition: Experimenter.cpp:478
bool linkExperiment(const std::shared_ptr< ome::xml::model::Experiment > &experiment_BackReference)
Link Experiment.
Definition: Experimenter.cpp:891
OMEModelObject::indexed_container< ome::xml::model::Experiment, std::weak_ptr >::type getLinkedExperimentList() const
Get the linked Experiment list.
Definition: Experimenter.cpp:869
std::shared_ptr< std::string > getInstitution()
Get the Institution property.
Definition: Experimenter.cpp:492
void setFirstName(std::shared_ptr< std::string > &firstName)
Set the FirstName property.
Definition: Experimenter.cpp:429
const std::weak_ptr< ome::xml::model::MicrobeamManipulation > & getLinkedMicrobeamManipulation(OMEModelObject::indexed_container< ome::xml::model::MicrobeamManipulation, std::weak_ptr >::type::size_type index) const
Get linked MicrobeamManipulation.
Definition: Experimenter.cpp:643
bool unlinkExperiment(const std::shared_ptr< ome::xml::model::Experiment > &experiment_BackReference)
Unlink Experiment.
Definition: Experimenter.cpp:904
Private implementation details of Experimenter model object.
Definition: Experimenter.cpp:78
const std::weak_ptr< ome::xml::model::MicrobeamManipulation > & setLinkedMicrobeamManipulation(OMEModelObject::indexed_container< ome::xml::model::MicrobeamManipulation, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::MicrobeamManipulation > &microbeamManipulation_BackReference)
Set linked MicrobeamManipulation.
Definition: Experimenter.cpp:649
bool linkMicrobeamManipulation(const std::shared_ptr< ome::xml::model::MicrobeamManipulation > &microbeamManipulation_BackReference)
Link MicrobeamManipulation.
Definition: Experimenter.cpp:659
const std::weak_ptr< ome::xml::model::Image > & getLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type index) const
Get linked Image.
Definition: Experimenter.cpp:585
Experimenter & operator=(const Experimenter &)
Assignment operator (deleted).
void setUserName(std::shared_ptr< std::string > &userName)
Set the UserName property.
Definition: Experimenter.cpp:408
std::shared_ptr< std::string > getEmail()
Get the Email property.
Definition: Experimenter.cpp:373
std::shared_ptr< std::string > getLastName()
Get the LastName property.
Definition: Experimenter.cpp:457
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: Experimenter.cpp:579
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: Experimenter.cpp:250
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type sizeOfLinkedImageList() const
Get size of linked Image list.
Definition: Experimenter.cpp:573
const std::string & elementName() const
Get the element name of this model object.
Definition: Experimenter.cpp:237
std::shared_ptr< Impl > impl
Private implementation details.
Definition: Experimenter.h:88
std::shared_ptr< std::string > getUserName()
Get the UserName property.
Definition: Experimenter.cpp:394
OMEModelObject::indexed_container< ome::xml::model::Dataset, std::weak_ptr >::type::size_type sizeOfLinkedDatasetList() const
Get size of linked Dataset list.
Definition: Experimenter.cpp:805
OMEModelObject::indexed_container< ome::xml::model::MicrobeamManipulation, std::weak_ptr >::type getLinkedMicrobeamManipulationList() const
Get the linked MicrobeamManipulation list.
Definition: Experimenter.cpp:637
bool link(std::shared_ptr< Reference > &reference, std::shared_ptr< ome::xml::model::OMEModelObject > &object)
Link a given OME model object to this model object.
Definition: Experimenter.cpp:342
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Experimenter.cpp:513