bioformats  5.1.2
Well.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_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 #include <ome/common/xml/dom/NodeList.h>
61 
62 #include <ome/xml/model/Plate.h>
63 #include <ome/xml/model/Reagent.h>
64 #include <ome/xml/model/detail/OMEModelObject.h>
65 #include <ome/xml/model/primitives/Color.h>
66 #include <ome/xml/model/primitives/NonNegativeInteger.h>
67 
68 namespace ome
69 {
70  namespace xml
71  {
72  namespace model
73  {
74 
75  // Forward declarations.
76  class Annotation;
77  class OMEModel;
78  class WellSample;
79 
84  {
85  private:
87  ome::compat::shared_ptr<std::string> externalIdentifier;
91  ome::compat::shared_ptr<std::string> externalDescription;
93  ome::compat::shared_ptr<ome::xml::model::primitives::Color> color;
95  ome::compat::shared_ptr<std::string> type;
97  std::string id;
101  std::vector<ome::compat::shared_ptr<ome::xml::model::WellSample> > wellSamples;
103  ome::compat::weak_ptr<ome::xml::model::Reagent> reagent;
107  ome::compat::weak_ptr<ome::xml::model::Plate> plate;
108 
109  public:
111  Well ();
112 
118  Well (const Well& copy);
119 
121  virtual
122  ~Well ();
123 
124 
125 
140  static ome::compat::shared_ptr< Well>
141  create(const common::xml::dom::Element& element,
143 
144  // Documented in superclass.
145  const std::string&
146  elementName() const;
147 
148  // Documented in superclass.
149  bool
150  validElementName(const std::string& name) const;
151 
152 
153  // -- OMEModelObject API methods --
154 
156  virtual void
157  update(const common::xml::dom::Element& element,
159 
160  public:
161  // -- Well API methods --
162 
164  bool
165  link (ome::compat::shared_ptr<Reference>& reference,
166  ome::compat::shared_ptr< ome::xml::model::OMEModelObject>& object);
167 
173  ome::compat::shared_ptr<std::string>
175 
181  const ome::compat::shared_ptr<std::string>
182  getExternalIdentifier () const;
183 
189  void
190  setExternalIdentifier (ome::compat::shared_ptr<std::string>& externalIdentifier);
191 
198  getColumn () const;
199 
205  void
207 
213  ome::compat::shared_ptr<std::string>
215 
221  const ome::compat::shared_ptr<std::string>
222  getExternalDescription () const;
223 
229  void
230  setExternalDescription (ome::compat::shared_ptr<std::string>& externalDescription);
231 
237  ome::compat::shared_ptr<ome::xml::model::primitives::Color>
238  getColor ();
239 
245  const ome::compat::shared_ptr<ome::xml::model::primitives::Color>
246  getColor () const;
247 
253  void
254  setColor (ome::compat::shared_ptr<ome::xml::model::primitives::Color>& color);
255 
261  ome::compat::shared_ptr<std::string>
262  getType ();
263 
269  const ome::compat::shared_ptr<std::string>
270  getType () const;
271 
277  void
278  setType (ome::compat::shared_ptr<std::string>& type);
279 
285  const std::string&
286  getID () const;
287 
293  void
294  setID (const std::string& id);
295 
302  getRow () const;
303 
309  void
311 
317  std::vector<ome::compat::shared_ptr<ome::xml::model::WellSample> >::size_type
318  sizeOfWellSampleList () const;
319 
326  std::vector<ome::compat::shared_ptr<ome::xml::model::WellSample> >&
328 
335  const std::vector<ome::compat::shared_ptr<ome::xml::model::WellSample> >&
336  getWellSampleList () const;
337 
345  ome::compat::shared_ptr<ome::xml::model::WellSample>&
346  getWellSample (std::vector<ome::compat::shared_ptr<ome::xml::model::WellSample> >::size_type index);
347 
355  const ome::compat::shared_ptr<ome::xml::model::WellSample>&
356  getWellSample (std::vector<ome::compat::shared_ptr<ome::xml::model::WellSample> >::size_type index) const;
357 
365  void
366  setWellSample (std::vector<ome::compat::shared_ptr<ome::xml::model::WellSample> >::size_type index,
367  ome::compat::shared_ptr<ome::xml::model::WellSample>& wellSample);
368 
377  void
378  addWellSample (ome::compat::shared_ptr<ome::xml::model::WellSample>& wellSample);
379 
389  void
390  removeWellSample (ome::compat::shared_ptr<ome::xml::model::WellSample>& wellSample);
391 
398  ome::compat::weak_ptr<ome::xml::model::Reagent>
399  getLinkedReagent ();
400 
407  const ome::compat::weak_ptr<ome::xml::model::Reagent>
408  getLinkedReagent () const;
409 
415  void
416  linkReagent (ome::compat::shared_ptr<ome::xml::model::Reagent>& reagent);
417 
427  void
428  unlinkReagent (ome::compat::shared_ptr<ome::xml::model::Reagent>& reagent);
429 
437 
444  getLinkedAnnotationList () const;
445 
453  const ome::compat::weak_ptr<ome::xml::model::Annotation>&
455 
466  const ome::compat::weak_ptr<ome::xml::model::Annotation>&
468  const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
469 
480  bool
481  linkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
482 
498  bool
499  unlinkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
500 
506  ome::compat::weak_ptr<ome::xml::model::Plate>
507  getPlate ();
508 
514  const ome::compat::weak_ptr<ome::xml::model::Plate>
515  getPlate () const;
516 
522  void
523  setPlate (ome::compat::weak_ptr<ome::xml::model::Plate>& plate_BackReference);
524 
525 
528  asXMLElement (common::xml::dom::Document& document) const;
529 
530 
531  protected:
532  // Documented in base class.
535  common::xml::dom::Element& element) const;
536 
537  public:
538  // Documented in superclass.
539  const std::string&
540  getXMLNamespace() const;
541  };
542 
543  }
544  }
545 }
546 
547 #endif // OME_XML_MODEL_WELL_H
548 
549 /*
550  * Local Variables:
551  * mode:C++
552  * End:
553  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:62
std::string id
ID property.
Definition: Well.h:97
void setExternalDescription(ome::compat::shared_ptr< std::string > &externalDescription)
Set the ExternalDescription property.
Definition: Well.cpp:411
std::vector< ome::compat::shared_ptr< ome::xml::model::WellSample > > wellSamples
WellSample property (occurs more than once)
Definition: Well.h:101
std::vector< ome::compat::shared_ptr< ome::xml::model::WellSample > > & getWellSampleList()
Get the WellSample list.
Definition: Well.cpp:494
ome::compat::shared_ptr< std::string > getExternalIdentifier()
Get the ExternalIdentifier property.
Definition: Well.cpp:362
const ome::compat::weak_ptr< ome::xml::model::Annotation > & setLinkedAnnotation(OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type index, const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Set linked Annotation.
Definition: Well.cpp:593
const std::string & elementName() const
Get the element name of this model object.
Definition: Well.cpp:187
ome::compat::weak_ptr< ome::xml::model::Reagent > getLinkedReagent()
Get linked Reagent.
Definition: Well.cpp:546
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Well.cpp:575
ome::compat::shared_ptr< std::string > externalDescription
ExternalDescription property.
Definition: Well.h:91
DOM Document wrapper.
Definition: Document.h:82
ome::compat::shared_ptr< ome::xml::model::WellSample > & getWellSample(std::vector< ome::compat::shared_ptr< ome::xml::model::WellSample > >::size_type index)
Get WellSample.
Definition: Well.cpp:506
DOM Element wrapper.
Definition: Element.h:66
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
ome::compat::shared_ptr< ome::xml::model::primitives::Color > getColor()
Get the Color property.
Definition: Well.cpp:418
void setRow(const ome::xml::model::primitives::NonNegativeInteger &row)
Set the Row property.
Definition: Well.cpp:481
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
const std::string & getID() const
Get the ID property.
Definition: Well.cpp:460
ome::xml::model::primitives::NonNegativeInteger column
Column property.
Definition: Well.h:89
void setWellSample(std::vector< ome::compat::shared_ptr< ome::xml::model::WellSample > >::size_type index, ome::compat::shared_ptr< ome::xml::model::WellSample > &wellSample)
Set WellSample.
Definition: Well.cpp:518
ome::xml::model::primitives::NonNegativeInteger row
Row property.
Definition: Well.h:99
Well model object.
Definition: Well.h:83
ome::compat::shared_ptr< std::string > externalIdentifier
ExternalIdentifier property.
Definition: Well.h:87
static ome::compat::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:178
virtual ~Well()
Destructor.
Definition: Well.cpp:173
const ome::xml::model::primitives::NonNegativeInteger & getRow() const
Get the Row property.
Definition: Well.cpp:474
void setType(ome::compat::shared_ptr< std::string > &type)
Set the Type property.
Definition: Well.cpp:453
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: Well.cpp:320
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:85
bool linkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Well.cpp:603
ome::compat::shared_ptr< ome::xml::model::primitives::Color > color
Color property.
Definition: Well.h:93
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40
bool unlinkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Well.cpp:617
void addWellSample(ome::compat::shared_ptr< ome::xml::model::WellSample > &wellSample)
Add WellSample.
Definition: Well.cpp:527
void setID(const std::string &id)
Set the ID property.
Definition: Well.cpp:467
void setExternalIdentifier(ome::compat::shared_ptr< std::string > &externalIdentifier)
Set the ExternalIdentifier property.
Definition: Well.cpp:376
ome::compat::shared_ptr< std::string > getExternalDescription()
Get the ExternalDescription property.
Definition: Well.cpp:397
virtual common::xml::dom::Element asXMLElement(common::xml::dom::Document &document) const
Transform the object hierarchy rooted at this element to XML.
Definition: Well.cpp:656
ome::compat::weak_ptr< ome::xml::model::Plate > plate
Plate_BackReference back reference.
Definition: Well.h:107
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type annotationLinks
AnnotationRef reference (occurs more than once)
Definition: Well.h:105
void unlinkReagent(ome::compat::shared_ptr< ome::xml::model::Reagent > &reagent)
Unlink Reagent.
Definition: Well.cpp:565
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: Well.cpp:663
void setColumn(const ome::xml::model::primitives::NonNegativeInteger &column)
Set the Column property.
Definition: Well.cpp:390
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Well.cpp:194
ome::compat::weak_ptr< ome::xml::model::Plate > getPlate()
Get the Plate property.
Definition: Well.cpp:635
void removeWellSample(ome::compat::shared_ptr< ome::xml::model::WellSample > &wellSample)
Remove WellSample.
Definition: Well.cpp:535
const ome::xml::model::primitives::NonNegativeInteger & getColumn() const
Get the Column property.
Definition: Well.cpp:383
void linkReagent(ome::compat::shared_ptr< ome::xml::model::Reagent > &reagent)
Link Reagent.
Definition: Well.cpp:559
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Well.cpp:581
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Well.cpp:809
ome::compat::weak_ptr< ome::xml::model::Reagent > reagent
ReagentRef reference.
Definition: Well.h:103
Boost.Log compatibility.
ome::compat::shared_ptr< std::string > getType()
Get the Type property.
Definition: Well.cpp:439
ome::compat::shared_ptr< std::string > type
Type property.
Definition: Well.h:95
std::vector< ome::compat::shared_ptr< ome::xml::model::WellSample > >::size_type sizeOfWellSampleList() const
Get size of linked WellSample list.
Definition: Well.cpp:488
const ome::compat::weak_ptr< ome::xml::model::Annotation > & getLinkedAnnotation(OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type index) const
Get linked Annotation.
Definition: Well.cpp:587
void setColor(ome::compat::shared_ptr< ome::xml::model::primitives::Color > &color)
Set the Color property.
Definition: Well.cpp:432
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:203
Well()
Default constructor.
Definition: Well.cpp:134
void setPlate(ome::compat::weak_ptr< ome::xml::model::Plate > &plate_BackReference)
Set the Plate property.
Definition: Well.cpp:649
A numeric type constrained to a subrange (or subranges) of its range limits.
Definition: ConstrainedNumeric.h:119
Xerces-C modern C++ wrapper.
Definition: Base.h:53