ome-xml 5.2.3

Reagent.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_REAGENT_H
47 #define OME_XML_MODEL_REAGENT_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/primitives/Quantity.h>
63
64 #include <ome/xml/model/Screen.h>
65 #include <ome/xml/model/detail/OMEModelObject.h>
66
67 namespace ome
68 {
69 namespace xml
70 {
71 namespace model
72 {
73
74 // Forward declarations.
75 class Annotation;
76 class OMEModel;
77 class Well;
78
82 class Reagent : public detail::OMEModelObject
83 {
84 private:
85 class Impl;
87 ome::compat::shared_ptr<Impl> impl;
88
89 public:
91 Reagent();
92
98 Reagent (const Reagent& copy);
99
101 virtual
102 ~Reagent ();
103
118 static ome::compat::shared_ptr< Reagent>
119 create(const common::xml::dom::Element& element,
120 ome::xml::model::OMEModel& model);
121
122 // Documented in superclass.
123 const std::string&
124 elementName() const;
125
126 // Documented in superclass.
127 bool
128 validElementName(const std::string& name) const;
129
130 private:
132 Reagent&
133 operator= (const Reagent&);
134
135 public:
136 // -- OMEModelObject API methods --
137
139 virtual void
140 update(const common::xml::dom::Element& element,
141 ome::xml::model::OMEModel& model);
142
143 public:
144 // -- Reagent API methods --
145
147 bool
148 link (ome::compat::shared_ptr<Reference>& reference,
149 ome::compat::shared_ptr< ome::xml::model::OMEModelObject>& object);
150
156 ome::compat::shared_ptr<std::string>
157 getReagentIdentifier ();
158
164 const ome::compat::shared_ptr<std::string>
165 getReagentIdentifier () const;
166
172 void
173 setReagentIdentifier (ome::compat::shared_ptr<std::string>& reagentIdentifier);
174
180 const std::string&
181 getID () const;
182
188 void
189 setID (const std::string& id);
190
196 ome::compat::shared_ptr<std::string>
197 getName ();
198
204 const ome::compat::shared_ptr<std::string>
205 getName () const;
206
212 void
213 setName (ome::compat::shared_ptr<std::string>& name);
214
220 ome::compat::shared_ptr<std::string>
221 getDescription ();
222
228 const ome::compat::shared_ptr<std::string>
229 getDescription () const;
230
236 void
237 setDescription (ome::compat::shared_ptr<std::string>& description);
238
244 OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type
245 sizeOfLinkedAnnotationList () const;
246
252 OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type
253 getLinkedAnnotationList () const;
254
262 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
263 getLinkedAnnotation (OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type index) const;
264
275 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
276 setLinkedAnnotation (OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type index,
277 const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
278
289 bool
290 linkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
291
307 bool
308 unlinkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
309
315 ome::compat::weak_ptr<ome::xml::model::Screen>
316 getScreen ();
317
323 const ome::compat::weak_ptr<ome::xml::model::Screen>
324 getScreen () const;
325
331 void
332 setScreen (ome::compat::weak_ptr<ome::xml::model::Screen>& screen_BackReference);
333
339 OMEModelObject::indexed_container<ome::xml::model::Well, ome::compat::weak_ptr>::type::size_type
340 sizeOfLinkedWellList () const;
341
347 OMEModelObject::indexed_container<ome::xml::model::Well, ome::compat::weak_ptr>::type
348 getLinkedWellList () const;
349
357 const ome::compat::weak_ptr<ome::xml::model::Well>&
358 getLinkedWell (OMEModelObject::indexed_container<ome::xml::model::Well, ome::compat::weak_ptr>::type::size_type index) const;
359
370 const ome::compat::weak_ptr<ome::xml::model::Well>&
371 setLinkedWell (OMEModelObject::indexed_container<ome::xml::model::Well, ome::compat::weak_ptr>::type::size_type index,
372 const ome::compat::shared_ptr<ome::xml::model::Well>& well_BackReference);
373
384 bool
385 linkWell (const ome::compat::shared_ptr<ome::xml::model::Well>& well_BackReference);
386
402 bool
403 unlinkWell (const ome::compat::shared_ptr<ome::xml::model::Well>& well_BackReference);
404
406 virtual common::xml::dom::Element
407 asXMLElement (common::xml::dom::Document& document) const;
408
409
410 protected:
411 // Documented in base class.
412 virtual common::xml::dom::Element
413 asXMLElementInternal (common::xml::dom::Document& document,
414 common::xml::dom::Element& element) const;
415
416 public:
417 // Documented in superclass.
418 const std::string&
419 getXMLNamespace() const;
420 };
421
422 }
423 }
424 }
425
426 #endif // OME_XML_MODEL_REAGENT_H
427
428 /*
429 * Local Variables:
430 * mode:C++
431 * End:
432 */
ome::xml::model::OMEModel
OME model interface (abstract top-level container)
Definition: OMEModel.h:62
ome::xml::model::Reagent::linkWell
bool linkWell(const ome::compat::shared_ptr< ome::xml::model::Well > &well_BackReference)
Link Well.
Definition: Reagent.cpp:489
ome::xml::model::Reagent::setName
void setName(ome::compat::shared_ptr< std::string > &name)
Set the Name property.
Definition: Reagent.cpp:352
ome::xml::model::Reagent::getXMLNamespace
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Reagent.cpp:614
ome::xml::model::Reagent::getReagentIdentifier
ome::compat::shared_ptr< std::string > getReagentIdentifier()
Get the ReagentIdentifier property.
Definition: Reagent.cpp:303
ome::xml::model::Reagent::getDescription
ome::compat::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: Reagent.cpp:359
ome::xml::model::Reagent::unlinkAnnotation
bool unlinkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Reagent.cpp:422
ome::xml::model::Reagent::setLinkedAnnotation
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: Reagent.cpp:398
ome::common::xml::dom::Document
ome::xml::model::Reagent::getScreen
ome::compat::weak_ptr< ome::xml::model::Screen > getScreen()
Get the Screen property.
Definition: Reagent.cpp:440
ome::common::xml::dom::Element
ome::xml::model::detail::OMEModelObject
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
ome::xml::model::OMEModelObject::indexed_container::type
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
ome::xml::model::Reagent::unlinkWell
bool unlinkWell(const ome::compat::shared_ptr< ome::xml::model::Well > &well_BackReference)
Unlink Well.
Definition: Reagent.cpp:502
ome::xml::model::Reagent::setLinkedWell
const ome::compat::weak_ptr< ome::xml::model::Well > & setLinkedWell(OMEModelObject::indexed_container< ome::xml::model::Well, ome::compat::weak_ptr >::type::size_type index, const ome::compat::shared_ptr< ome::xml::model::Well > &well_BackReference)
Set linked Well.
Definition: Reagent.cpp:479
ome::xml::model::Reagent::setReagentIdentifier
void setReagentIdentifier(ome::compat::shared_ptr< std::string > &reagentIdentifier)
Set the ReagentIdentifier property.
Definition: Reagent.cpp:317
ome::xml::model::Reagent::setID
void setID(const std::string &id)
Set the ID property.
Definition: Reagent.cpp:331
ome::xml::model::Reagent::setScreen
void setScreen(ome::compat::weak_ptr< ome::xml::model::Screen > &screen_BackReference)
Set the Screen property.
Definition: Reagent.cpp:454
ome::xml::model::Reagent::getLinkedAnnotation
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: Reagent.cpp:392
ome::xml::model::Reagent::validElementName
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Reagent.cpp:191
ome::xml::model::OMEModelObject::indexed_container
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:85
ome::xml::model::Reagent::getLinkedWell
const ome::compat::weak_ptr< ome::xml::model::Well > & getLinkedWell(OMEModelObject::indexed_container< ome::xml::model::Well, ome::compat::weak_ptr >::type::size_type index) const
Get linked Well.
Definition: Reagent.cpp:473
ome::xml::model::Reagent
Reagent model object.
Definition: Reagent.h:82
ome
Open Microscopy Environment C++ implementation.
ome::xml::model::Reagent::setDescription
void setDescription(ome::compat::shared_ptr< std::string > &description)
Set the Description property.
Definition: Reagent.cpp:373
ome::xml::model::Reagent::operator=
Reagent & operator=(const Reagent &)
Assignment operator (deleted).
ome::xml::model::Reagent::getID
const std::string & getID() const
Get the ID property.
Definition: Reagent.cpp:324
ome::xml::model::Reagent::linkAnnotation
bool linkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Reagent.cpp:408
ome::xml::model::Reagent::asXMLElement
virtual common::xml::dom::Element asXMLElement(common::xml::dom::Document &document) const
Transform the object hierarchy rooted at this element to XML.
Definition: Reagent.cpp:518
ome::xml::model::Reagent::sizeOfLinkedAnnotationList
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Reagent.cpp:380
ome::xml::model::Reagent::sizeOfLinkedWellList
OMEModelObject::indexed_container< ome::xml::model::Well, ome::compat::weak_ptr >::type::size_type sizeOfLinkedWellList() const
Get size of linked Well list.
Definition: Reagent.cpp:461
ome::xml::model::Reagent::~Reagent
virtual ~Reagent()
Destructor.
Definition: Reagent.cpp:170
ome::xml::model::Reagent::update
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: Reagent.cpp:199
ome::xml::model::Reagent::link
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: Reagent.cpp:272
ome::xml::model::Reagent::elementName
const std::string & elementName() const
Get the element name of this model object.
Definition: Reagent.cpp:184
ome::xml::model::Reagent::getLinkedAnnotationList
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Reagent.cpp:386
ome::xml::model::Reagent::create
static ome::compat::shared_ptr< Reagent > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Reagent model object from DOM element.
Definition: Reagent.cpp:175
ome::xml::model::Reagent::impl
ome::compat::shared_ptr< Impl > impl
Private implementation details.
Definition: Reagent.h:85
ome::xml::model::Reagent::getLinkedWellList
OMEModelObject::indexed_container< ome::xml::model::Well, ome::compat::weak_ptr >::type getLinkedWellList() const
Get the linked Well list.
Definition: Reagent.cpp:467
ome::xml::model::Reagent::asXMLElementInternal
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: Reagent.cpp:525
ome::xml::model::Reagent::Impl
Private implementation details of Reagent model object.
Definition: Reagent.cpp:74
log.h
ome::xml::model::Reagent::Reagent
Reagent()
Default constructor.
Definition: Reagent.cpp:155
ome::xml::model::Reagent::getName
ome::compat::shared_ptr< std::string > getName()
Get the Name property.
Definition: Reagent.cpp:338