ome-xml  5.5.1
Well.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_WELL_H
47 #define OME_XML_MODEL_WELL_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/Plate.h>
64 #include <ome/xml/model/Reagent.h>
65 #include <ome/xml/model/detail/OMEModelObject.h>
66 #include <ome/xml/model/primitives/Color.h>
67 #include <ome/xml/model/primitives/NonNegativeInteger.h>
68 
69 namespace ome
70 {
71  namespace xml
72  {
73  namespace model
74  {
75 
76  // Forward declarations.
77  class Annotation;
78  class OMEModel;
79  class WellSample;
80 
85  {
86  private:
87  class Impl;
89  std::shared_ptr<Impl> impl;
90 
91  public:
93  Well();
94 
100  Well (const Well& copy);
101 
103  virtual
104  ~Well ();
105 
120  static std::shared_ptr<Well>
121  create(const common::xml::dom::Element& element,
123 
124  // Documented in superclass.
125  const std::string&
126  elementName() const;
127 
128  // Documented in superclass.
129  bool
130  validElementName(const std::string& name) const;
131 
132  private:
134  Well&
135  operator= (const Well&);
136 
137  public:
138  // -- OMEModelObject API methods --
139 
141  virtual void
142  update(const common::xml::dom::Element& element,
144 
145  public:
146  // -- Well API methods --
147 
149  bool
150  link (std::shared_ptr<Reference>& reference,
151  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
152 
158  std::shared_ptr<std::string>
160 
166  const std::shared_ptr<std::string>
167  getExternalIdentifier () const;
168 
174  void
175  setExternalIdentifier (std::shared_ptr<std::string>& externalIdentifier);
176 
183  getColumn () const;
184 
190  void
192 
198  std::shared_ptr<std::string>
200 
206  const std::shared_ptr<std::string>
207  getExternalDescription () const;
208 
214  void
215  setExternalDescription (std::shared_ptr<std::string>& externalDescription);
216 
222  std::shared_ptr<ome::xml::model::primitives::Color>
223  getColor ();
224 
230  const std::shared_ptr<ome::xml::model::primitives::Color>
231  getColor () const;
232 
238  void
239  setColor (std::shared_ptr<ome::xml::model::primitives::Color>& color);
240 
246  std::shared_ptr<std::string>
247  getType ();
248 
254  const std::shared_ptr<std::string>
255  getType () const;
256 
262  void
263  setType (std::shared_ptr<std::string>& type);
264 
270  const std::string&
271  getID () const;
272 
278  void
279  setID (const std::string& id);
280 
287  getRow () const;
288 
294  void
296 
302  std::vector<std::shared_ptr<ome::xml::model::WellSample>>::size_type
303  sizeOfWellSampleList () const;
304 
311  std::vector<std::shared_ptr<ome::xml::model::WellSample>>&
313 
320  const std::vector<std::shared_ptr<ome::xml::model::WellSample>>&
321  getWellSampleList () const;
322 
330  std::shared_ptr<ome::xml::model::WellSample>&
331  getWellSample (std::vector<std::shared_ptr<ome::xml::model::WellSample>>::size_type index);
332 
340  const std::shared_ptr<ome::xml::model::WellSample>&
341  getWellSample (std::vector<std::shared_ptr<ome::xml::model::WellSample>>::size_type index) const;
342 
350  void
351  setWellSample (std::vector<std::shared_ptr<ome::xml::model::WellSample>>::size_type index,
352  std::shared_ptr<ome::xml::model::WellSample>& wellSample);
353 
362  void
363  addWellSample (std::shared_ptr<ome::xml::model::WellSample>& wellSample);
364 
374  void
375  removeWellSample (std::shared_ptr<ome::xml::model::WellSample>& wellSample);
376 
383  std::weak_ptr<ome::xml::model::Reagent>
384  getLinkedReagent ();
385 
392  const std::weak_ptr<ome::xml::model::Reagent>
393  getLinkedReagent () const;
394 
400  void
401  linkReagent (std::shared_ptr<ome::xml::model::Reagent>& reagent);
402 
412  void
413  unlinkReagent (std::shared_ptr<ome::xml::model::Reagent>& reagent);
414 
422 
429  getLinkedAnnotationList () const;
430 
438  const std::weak_ptr<ome::xml::model::Annotation>&
440 
451  const std::weak_ptr<ome::xml::model::Annotation>&
453  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
454 
465  bool
466  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
467 
483  bool
484  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
485 
491  std::weak_ptr<ome::xml::model::Plate>
492  getPlate ();
493 
499  const std::weak_ptr<ome::xml::model::Plate>
500  getPlate () const;
501 
507  void
508  setPlate (std::weak_ptr<ome::xml::model::Plate>& plate_BackReference);
509 
510  protected:
511  // Documented in base class.
512  virtual void
514  common::xml::dom::Element& element) const;
515 
516  public:
517  // Documented in superclass.
518  const std::string&
519  getXMLNamespace() const;
520  };
521 
522  }
523  }
524 }
525 
526 #endif // OME_XML_MODEL_WELL_H
527 
528 /*
529  * Local Variables:
530  * mode:C++
531  * End:
532  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:61
const std::string & getID() const
Get the ID property.
Definition: Well.cpp:483
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Well.cpp:604
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
const std::string & elementName() const
Get the element name of this model object.
Definition: Well.cpp:218
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
void setRow(const ome::xml::model::primitives::NonNegativeInteger &row)
Set the Row property.
Definition: Well.cpp:504
static std::shared_ptr< Well > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Well model object from DOM element.
Definition: Well.cpp:209
void setWellSample(std::vector< std::shared_ptr< ome::xml::model::WellSample >>::size_type index, std::shared_ptr< ome::xml::model::WellSample > &wellSample)
Set WellSample.
Definition: Well.cpp:541
void setType(std::shared_ptr< std::string > &type)
Set the Type property.
Definition: Well.cpp:476
std::vector< std::shared_ptr< ome::xml::model::WellSample > >::size_type sizeOfWellSampleList() const
Get size of linked WellSample list.
Definition: Well.cpp:511
Well model object.
Definition: Well.h:84
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: Well.cpp:678
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Well.cpp:803
virtual ~Well()
Destructor.
Definition: Well.cpp:204
std::vector< std::shared_ptr< ome::xml::model::WellSample > > & getWellSampleList()
Get the WellSample list.
Definition: Well.cpp:517
const ome::xml::model::primitives::NonNegativeInteger & getColumn() const
Get the Column property.
Definition: Well.cpp:406
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:84
void setExternalIdentifier(std::shared_ptr< std::string > &externalIdentifier)
Set the ExternalIdentifier property.
Definition: Well.cpp:399
std::weak_ptr< ome::xml::model::Reagent > getLinkedReagent()
Get linked Reagent.
Definition: Well.cpp:569
void unlinkReagent(std::shared_ptr< ome::xml::model::Reagent > &reagent)
Unlink Reagent.
Definition: Well.cpp:588
Open Microscopy Environment C++ implementation.
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Well.cpp:225
void setID(const std::string &id)
Set the ID property.
Definition: Well.cpp:490
std::shared_ptr< ome::xml::model::WellSample > & getWellSample(std::vector< std::shared_ptr< ome::xml::model::WellSample >>::size_type index)
Get WellSample.
Definition: Well.cpp:529
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Well.cpp:640
std::shared_ptr< std::string > getExternalIdentifier()
Get the ExternalIdentifier property.
Definition: Well.cpp:385
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: Well.cpp:610
void removeWellSample(std::shared_ptr< ome::xml::model::WellSample > &wellSample)
Remove WellSample.
Definition: Well.cpp:558
void setColumn(const ome::xml::model::primitives::NonNegativeInteger &column)
Set the Column property.
Definition: Well.cpp:413
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: Well.cpp:616
std::shared_ptr< std::string > getType()
Get the Type property.
Definition: Well.cpp:462
void linkReagent(std::shared_ptr< ome::xml::model::Reagent > &reagent)
Link Reagent.
Definition: Well.cpp:582
std::shared_ptr< ome::xml::model::primitives::Color > getColor()
Get the Color property.
Definition: Well.cpp:441
Private implementation details of Well model object.
Definition: Well.cpp:80
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Well.cpp:598
void setColor(std::shared_ptr< ome::xml::model::primitives::Color > &color)
Set the Color property.
Definition: Well.cpp:455
std::weak_ptr< ome::xml::model::Plate > getPlate()
Get the Plate property.
Definition: Well.cpp:658
Well & operator=(const Well &)
Assignment operator (deleted).
void setExternalDescription(std::shared_ptr< std::string > &externalDescription)
Set the ExternalDescription property.
Definition: Well.cpp:434
void addWellSample(std::shared_ptr< ome::xml::model::WellSample > &wellSample)
Add WellSample.
Definition: Well.cpp:550
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Well.cpp:626
std::shared_ptr< std::string > getExternalDescription()
Get the ExternalDescription property.
Definition: Well.cpp:420
void setPlate(std::weak_ptr< ome::xml::model::Plate > &plate_BackReference)
Set the Plate property.
Definition: Well.cpp:672
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: Well.cpp:343
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: Well.cpp:231
Well()
Default constructor.
Definition: Well.cpp:189
const ome::xml::model::primitives::NonNegativeInteger & getRow() const
Get the Row property.
Definition: Well.cpp:497
A numeric type constrained to a subrange (or subranges) of its range limits.
Definition: ConstrainedNumeric.h:118
std::shared_ptr< Impl > impl
Private implementation details.
Definition: Well.h:87