ome-xml  5.6.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 
133  operator= (const ExperimenterGroup&) = delete;
135 
136  // -- OMEModelObject API methods --
137 
139  virtual void
140  update(const common::xml::dom::Element& element,
142 
143  public:
144  // -- ExperimenterGroup API methods --
145 
147  bool
148  link (std::shared_ptr<Reference>& reference,
149  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
150 
156  std::shared_ptr<std::string>
157  getName ();
158 
164  const std::shared_ptr<std::string>
165  getName () const;
166 
172  void
173  setName (std::shared_ptr<std::string>& name);
174 
180  const std::string&
181  getID () const;
182 
188  void
189  setID (const std::string& id);
190 
196  std::shared_ptr<std::string>
197  getDescription ();
198 
204  const std::shared_ptr<std::string>
205  getDescription () const;
206 
212  void
213  setDescription (std::shared_ptr<std::string>& description);
214 
222 
229  getLinkedExperimenterList () const;
230 
238  const std::weak_ptr<ome::xml::model::Experimenter>&
240 
251  const std::weak_ptr<ome::xml::model::Experimenter>&
253  const std::shared_ptr<ome::xml::model::Experimenter>& experimenter);
254 
265  bool
266  linkExperimenter (const std::shared_ptr<ome::xml::model::Experimenter>& experimenter);
267 
283  bool
284  unlinkExperimenter (const std::shared_ptr<ome::xml::model::Experimenter>& experimenter);
285 
292  sizeOfLinkedLeaderList () const;
293 
300  getLinkedLeaderList () const;
301 
309  const std::weak_ptr<ome::xml::model::Experimenter>&
311 
322  const std::weak_ptr<ome::xml::model::Experimenter>&
324  const std::shared_ptr<ome::xml::model::Experimenter>& leader);
325 
336  bool
337  linkLeader (const std::shared_ptr<ome::xml::model::Experimenter>& leader);
338 
354  bool
355  unlinkLeader (const std::shared_ptr<ome::xml::model::Experimenter>& leader);
356 
364 
371  getLinkedAnnotationList () const;
372 
380  const std::weak_ptr<ome::xml::model::Annotation>&
382 
393  const std::weak_ptr<ome::xml::model::Annotation>&
395  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
396 
407  bool
408  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
409 
425  bool
426  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
427 
434  sizeOfLinkedImageList () const;
435 
442  getLinkedImageList () const;
443 
451  const std::weak_ptr<ome::xml::model::Image>&
453 
464  const std::weak_ptr<ome::xml::model::Image>&
466  const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
467 
478  bool
479  linkImage (const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
480 
496  bool
497  unlinkImage (const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
498 
505  sizeOfLinkedProjectList () const;
506 
513  getLinkedProjectList () const;
514 
522  const std::weak_ptr<ome::xml::model::Project>&
524 
535  const std::weak_ptr<ome::xml::model::Project>&
537  const std::shared_ptr<ome::xml::model::Project>& project_BackReference);
538 
549  bool
550  linkProject (const std::shared_ptr<ome::xml::model::Project>& project_BackReference);
551 
567  bool
568  unlinkProject (const std::shared_ptr<ome::xml::model::Project>& project_BackReference);
569 
576  sizeOfLinkedDatasetList () const;
577 
584  getLinkedDatasetList () const;
585 
593  const std::weak_ptr<ome::xml::model::Dataset>&
595 
606  const std::weak_ptr<ome::xml::model::Dataset>&
608  const std::shared_ptr<ome::xml::model::Dataset>& dataset_BackReference);
609 
620  bool
621  linkDataset (const std::shared_ptr<ome::xml::model::Dataset>& dataset_BackReference);
622 
638  bool
639  unlinkDataset (const std::shared_ptr<ome::xml::model::Dataset>& dataset_BackReference);
640 
641  protected:
642  // Documented in base class.
643  virtual void
645  common::xml::dom::Element& element) const;
646 
647  public:
648  // Documented in superclass.
649  const std::string&
650  getXMLNamespace() const;
651  };
652 
653  }
654  }
655 }
656 
657 #endif // OME_XML_MODEL_EXPERIMENTERGROUP_H
658 
659 /*
660  * Local Variables:
661  * mode:C++
662  * End:
663  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:61
virtual ~ExperimenterGroup()
Destructor.
Definition: ExperimenterGroup.cpp:196
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:680
OMEModelObject::indexed_container< ome::xml::model::Experimenter, std::weak_ptr >::type::size_type sizeOfLinkedExperimenterList() const
Get size of linked Experimenter list.
Definition: ExperimenterGroup.cpp:424
void setID(const std::string &id)
Set the ID property.
Definition: ExperimenterGroup.cpp:396
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: ExperimenterGroup.cpp:881
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:436
const std::string & elementName() const
Get the element name of this model object.
Definition: ExperimenterGroup.cpp:210
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:562
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: ExperimenterGroup.cpp:610
const std::string & getID() const
Get the ID property.
Definition: ExperimenterGroup.cpp:389
OMEModelObject::indexed_container< ome::xml::model::Experimenter, std::weak_ptr >::type getLinkedExperimenterList() const
Get the linked Experimenter list.
Definition: ExperimenterGroup.cpp:430
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:674
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:662
bool unlinkImage(const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Unlink Image.
Definition: ExperimenterGroup.cpp:645
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:556
bool linkProject(const std::shared_ptr< ome::xml::model::Project > &project_BackReference)
Link Project.
Definition: ExperimenterGroup.cpp:690
bool linkDataset(const std::shared_ptr< ome::xml::model::Dataset > &dataset_BackReference)
Link Dataset.
Definition: ExperimenterGroup.cpp:748
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: ExperimenterGroup.cpp:217
ExperimenterGroup()
Default constructor.
Definition: ExperimenterGroup.cpp:177
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type sizeOfLinkedImageList() const
Get size of linked Image list.
Definition: ExperimenterGroup.cpp:604
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:305
Private implementation details of ExperimenterGroup model object.
Definition: ExperimenterGroup.cpp:78
virtual SKIP 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:223
void setDescription(std::shared_ptr< std::string > &description)
Set the Description property.
Definition: ExperimenterGroup.cpp:417
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:496
bool linkLeader(const std::shared_ptr< ome::xml::model::Experimenter > &leader)
Link Leader.
Definition: ExperimenterGroup.cpp:512
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:201
std::shared_ptr< std::string > getName()
Get the Name property.
Definition: ExperimenterGroup.cpp:368
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: ExperimenterGroup.cpp:586
OMEModelObject::indexed_container< ome::xml::model::Project, std::weak_ptr >::type getLinkedProjectList() const
Get the linked Project list.
Definition: ExperimenterGroup.cpp:668
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: ExperimenterGroup.cpp:550
bool linkImage(const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Link Image.
Definition: ExperimenterGroup.cpp:632
std::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: ExperimenterGroup.cpp:403
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:732
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:442
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: ExperimenterGroup.cpp:544
OMEModelObject::indexed_container< ome::xml::model::Experimenter, std::weak_ptr >::type::size_type sizeOfLinkedLeaderList() const
Get size of linked Leader list.
Definition: ExperimenterGroup.cpp:484
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: ExperimenterGroup.cpp:572
bool unlinkExperimenter(const std::shared_ptr< ome::xml::model::Experimenter > &experimenter)
Unlink Experimenter.
Definition: ExperimenterGroup.cpp:466
bool unlinkDataset(const std::shared_ptr< ome::xml::model::Dataset > &dataset_BackReference)
Unlink Dataset.
Definition: ExperimenterGroup.cpp:761
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:616
void setName(std::shared_ptr< std::string > &name)
Set the Name property.
Definition: ExperimenterGroup.cpp:382
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:622
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:502
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:738
OMEModelObject::indexed_container< ome::xml::model::Experimenter, std::weak_ptr >::type getLinkedLeaderList() const
Get the linked Leader list.
Definition: ExperimenterGroup.cpp:490
OMEModelObject::indexed_container< ome::xml::model::Dataset, std::weak_ptr >::type getLinkedDatasetList() const
Get the linked Dataset list.
Definition: ExperimenterGroup.cpp:726
bool unlinkProject(const std::shared_ptr< ome::xml::model::Project > &project_BackReference)
Unlink Project.
Definition: ExperimenterGroup.cpp:703
bool linkExperimenter(const std::shared_ptr< ome::xml::model::Experimenter > &experimenter)
Link Experimenter.
Definition: ExperimenterGroup.cpp:452
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:777
bool unlinkLeader(const std::shared_ptr< ome::xml::model::Experimenter > &leader)
Unlink Leader.
Definition: ExperimenterGroup.cpp:526
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:720