ome-xml  5.5.0
ExperimenterGroup.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_EXPERIMENTERGROUP_H
47 #define OME_XML_MODEL_EXPERIMENTERGROUP_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 Experimenter;
76  class Image;
77  class OMEModel;
78  class Project;
79 
84  {
85  private:
86  class Impl;
88  std::shared_ptr<Impl> impl;
89 
90  public:
93 
100 
102  virtual
104 
119  static std::shared_ptr<ExperimenterGroup>
120  create(const common::xml::dom::Element& element,
122 
123  // Documented in superclass.
124  const std::string&
125  elementName() const;
126 
127  // Documented in superclass.
128  bool
129  validElementName(const std::string& name) const;
130 
131  private:
135 
136  public:
137  // -- OMEModelObject API methods --
138 
140  virtual void
141  update(const common::xml::dom::Element& element,
143 
144  public:
145  // -- ExperimenterGroup API methods --
146 
148  bool
149  link (std::shared_ptr<Reference>& reference,
150  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
151 
157  std::shared_ptr<std::string>
158  getName ();
159 
165  const std::shared_ptr<std::string>
166  getName () const;
167 
173  void
174  setName (std::shared_ptr<std::string>& name);
175 
181  const std::string&
182  getID () const;
183 
189  void
190  setID (const std::string& id);
191 
197  std::shared_ptr<std::string>
198  getDescription ();
199 
205  const std::shared_ptr<std::string>
206  getDescription () const;
207 
213  void
214  setDescription (std::shared_ptr<std::string>& description);
215 
223 
230  getLinkedExperimenterList () const;
231 
239  const std::weak_ptr<ome::xml::model::Experimenter>&
241 
252  const std::weak_ptr<ome::xml::model::Experimenter>&
254  const std::shared_ptr<ome::xml::model::Experimenter>& experimenter);
255 
266  bool
267  linkExperimenter (const std::shared_ptr<ome::xml::model::Experimenter>& experimenter);
268 
284  bool
285  unlinkExperimenter (const std::shared_ptr<ome::xml::model::Experimenter>& experimenter);
286 
293  sizeOfLinkedLeaderList () const;
294 
301  getLinkedLeaderList () const;
302 
310  const std::weak_ptr<ome::xml::model::Experimenter>&
312 
323  const std::weak_ptr<ome::xml::model::Experimenter>&
325  const std::shared_ptr<ome::xml::model::Experimenter>& leader);
326 
337  bool
338  linkLeader (const std::shared_ptr<ome::xml::model::Experimenter>& leader);
339 
355  bool
356  unlinkLeader (const std::shared_ptr<ome::xml::model::Experimenter>& leader);
357 
365 
372  getLinkedAnnotationList () const;
373 
381  const std::weak_ptr<ome::xml::model::Annotation>&
383 
394  const std::weak_ptr<ome::xml::model::Annotation>&
396  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
397 
408  bool
409  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
410 
426  bool
427  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
428 
435  sizeOfLinkedImageList () const;
436 
443  getLinkedImageList () const;
444 
452  const std::weak_ptr<ome::xml::model::Image>&
454 
465  const std::weak_ptr<ome::xml::model::Image>&
467  const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
468 
479  bool
480  linkImage (const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
481 
497  bool
498  unlinkImage (const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
499 
506  sizeOfLinkedProjectList () const;
507 
514  getLinkedProjectList () const;
515 
523  const std::weak_ptr<ome::xml::model::Project>&
525 
536  const std::weak_ptr<ome::xml::model::Project>&
538  const std::shared_ptr<ome::xml::model::Project>& project_BackReference);
539 
550  bool
551  linkProject (const std::shared_ptr<ome::xml::model::Project>& project_BackReference);
552 
568  bool
569  unlinkProject (const std::shared_ptr<ome::xml::model::Project>& project_BackReference);
570 
577  sizeOfLinkedDatasetList () const;
578 
585  getLinkedDatasetList () const;
586 
594  const std::weak_ptr<ome::xml::model::Dataset>&
596 
607  const std::weak_ptr<ome::xml::model::Dataset>&
609  const std::shared_ptr<ome::xml::model::Dataset>& dataset_BackReference);
610 
621  bool
622  linkDataset (const std::shared_ptr<ome::xml::model::Dataset>& dataset_BackReference);
623 
639  bool
640  unlinkDataset (const std::shared_ptr<ome::xml::model::Dataset>& dataset_BackReference);
641 
642  protected:
643  // Documented in base class.
644  virtual void
646  common::xml::dom::Element& element) const;
647 
648  public:
649  // Documented in superclass.
650  const std::string&
651  getXMLNamespace() const;
652  };
653 
654  }
655  }
656 }
657 
658 #endif // OME_XML_MODEL_EXPERIMENTERGROUP_H
659 
660 /*
661  * Local Variables:
662  * mode:C++
663  * End:
664  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:61
virtual ~ExperimenterGroup()
Destructor.
Definition: ExperimenterGroup.cpp:188
ExperimenterGroup model object.
Definition: ExperimenterGroup.h:83
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: ExperimenterGroup.cpp:672
OMEModelObject::indexed_container< ome::xml::model::Experimenter, std::weak_ptr >::type::size_type sizeOfLinkedExperimenterList() const
Get size of linked Experimenter list.
Definition: ExperimenterGroup.cpp:416
void setID(const std::string &id)
Set the ID property.
Definition: ExperimenterGroup.cpp:388
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: ExperimenterGroup.cpp:873
const std::weak_ptr< ome::xml::model::Experimenter > & getLinkedExperimenter(OMEModelObject::indexed_container< ome::xml::model::Experimenter, std::weak_ptr >::type::size_type index) const
Get linked Experimenter.
Definition: ExperimenterGroup.cpp:428
ExperimenterGroup & operator=(const ExperimenterGroup &)
Assignment operator (deleted).
const std::string & elementName() const
Get the element name of this model object.
Definition: ExperimenterGroup.cpp:202
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: ExperimenterGroup.cpp:554
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: ExperimenterGroup.cpp:602
const std::string & getID() const
Get the ID property.
Definition: ExperimenterGroup.cpp:381
OMEModelObject::indexed_container< ome::xml::model::Experimenter, std::weak_ptr >::type getLinkedExperimenterList() const
Get the linked Experimenter list.
Definition: ExperimenterGroup.cpp:422
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: ExperimenterGroup.cpp:666
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::Project, std::weak_ptr >::type::size_type sizeOfLinkedProjectList() const
Get size of linked Project list.
Definition: ExperimenterGroup.cpp:654
bool unlinkImage(const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Unlink Image.
Definition: ExperimenterGroup.cpp:637
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
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: ExperimenterGroup.cpp:548
bool linkProject(const std::shared_ptr< ome::xml::model::Project > &project_BackReference)
Link Project.
Definition: ExperimenterGroup.cpp:682
bool linkDataset(const std::shared_ptr< ome::xml::model::Dataset > &dataset_BackReference)
Link Dataset.
Definition: ExperimenterGroup.cpp:740
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: ExperimenterGroup.cpp:209
ExperimenterGroup()
Default constructor.
Definition: ExperimenterGroup.cpp:173
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type sizeOfLinkedImageList() const
Get size of linked Image list.
Definition: ExperimenterGroup.cpp:596
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: ExperimenterGroup.cpp:297
Private implementation details of ExperimenterGroup model object.
Definition: ExperimenterGroup.cpp:78
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: ExperimenterGroup.cpp:215
void setDescription(std::shared_ptr< std::string > &description)
Set the Description property.
Definition: ExperimenterGroup.cpp:409
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:84
const std::weak_ptr< ome::xml::model::Experimenter > & getLinkedLeader(OMEModelObject::indexed_container< ome::xml::model::Experimenter, std::weak_ptr >::type::size_type index) const
Get linked Leader.
Definition: ExperimenterGroup.cpp:488
bool linkLeader(const std::shared_ptr< ome::xml::model::Experimenter > &leader)
Link Leader.
Definition: ExperimenterGroup.cpp:504
Open Microscopy Environment C++ implementation.
static std::shared_ptr< ExperimenterGroup > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a ExperimenterGroup model object from DOM element.
Definition: ExperimenterGroup.cpp:193
std::shared_ptr< std::string > getName()
Get the Name property.
Definition: ExperimenterGroup.cpp:360
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: ExperimenterGroup.cpp:578
OMEModelObject::indexed_container< ome::xml::model::Project, std::weak_ptr >::type getLinkedProjectList() const
Get the linked Project list.
Definition: ExperimenterGroup.cpp:660
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: ExperimenterGroup.cpp:542
bool linkImage(const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Link Image.
Definition: ExperimenterGroup.cpp:624
std::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: ExperimenterGroup.cpp:395
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: ExperimenterGroup.cpp:724
const std::weak_ptr< ome::xml::model::Experimenter > & setLinkedExperimenter(OMEModelObject::indexed_container< ome::xml::model::Experimenter, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Experimenter > &experimenter)
Set linked Experimenter.
Definition: ExperimenterGroup.cpp:434
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: ExperimenterGroup.cpp:536
OMEModelObject::indexed_container< ome::xml::model::Experimenter, std::weak_ptr >::type::size_type sizeOfLinkedLeaderList() const
Get size of linked Leader list.
Definition: ExperimenterGroup.cpp:476
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: ExperimenterGroup.cpp:564
bool unlinkExperimenter(const std::shared_ptr< ome::xml::model::Experimenter > &experimenter)
Unlink Experimenter.
Definition: ExperimenterGroup.cpp:458
bool unlinkDataset(const std::shared_ptr< ome::xml::model::Dataset > &dataset_BackReference)
Unlink Dataset.
Definition: ExperimenterGroup.cpp:753
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: ExperimenterGroup.cpp:608
void setName(std::shared_ptr< std::string > &name)
Set the Name property.
Definition: ExperimenterGroup.cpp:374
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: ExperimenterGroup.cpp:614
const std::weak_ptr< ome::xml::model::Experimenter > & setLinkedLeader(OMEModelObject::indexed_container< ome::xml::model::Experimenter, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Experimenter > &leader)
Set linked Leader.
Definition: ExperimenterGroup.cpp:494
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: ExperimenterGroup.cpp:730
OMEModelObject::indexed_container< ome::xml::model::Experimenter, std::weak_ptr >::type getLinkedLeaderList() const
Get the linked Leader list.
Definition: ExperimenterGroup.cpp:482
OMEModelObject::indexed_container< ome::xml::model::Dataset, std::weak_ptr >::type getLinkedDatasetList() const
Get the linked Dataset list.
Definition: ExperimenterGroup.cpp:718
bool unlinkProject(const std::shared_ptr< ome::xml::model::Project > &project_BackReference)
Unlink Project.
Definition: ExperimenterGroup.cpp:695
bool linkExperimenter(const std::shared_ptr< ome::xml::model::Experimenter > &experimenter)
Link Experimenter.
Definition: ExperimenterGroup.cpp:444
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: ExperimenterGroup.cpp:769
bool unlinkLeader(const std::shared_ptr< ome::xml::model::Experimenter > &leader)
Unlink Leader.
Definition: ExperimenterGroup.cpp:518
std::shared_ptr< Impl > impl
Private implementation details.
Definition: ExperimenterGroup.h:86
OMEModelObject::indexed_container< ome::xml::model::Dataset, std::weak_ptr >::type::size_type sizeOfLinkedDatasetList() const
Get size of linked Dataset list.
Definition: ExperimenterGroup.cpp:712