bioformats  5.1.3
Reagent.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_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/Screen.h>
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 OMEModel;
75  class Well;
76 
81  {
82  private:
84  ome::compat::shared_ptr<std::string> reagentIdentifier;
86  std::string id;
88  ome::compat::shared_ptr<std::string> name;
90  ome::compat::shared_ptr<std::string> description;
94  ome::compat::weak_ptr<ome::xml::model::Screen> screen;
97 
98  public:
100  Reagent ();
101 
107  Reagent (const Reagent& copy);
108 
110  virtual
111  ~Reagent ();
112 
113 
114 
129  static ome::compat::shared_ptr< Reagent>
130  create(const common::xml::dom::Element& element,
132 
133  // Documented in superclass.
134  const std::string&
135  elementName() const;
136 
137  // Documented in superclass.
138  bool
139  validElementName(const std::string& name) const;
140 
141 
142  // -- OMEModelObject API methods --
143 
145  virtual void
146  update(const common::xml::dom::Element& element,
148 
149  public:
150  // -- Reagent API methods --
151 
153  bool
154  link (ome::compat::shared_ptr<Reference>& reference,
155  ome::compat::shared_ptr< ome::xml::model::OMEModelObject>& object);
156 
162  ome::compat::shared_ptr<std::string>
164 
170  const ome::compat::shared_ptr<std::string>
171  getReagentIdentifier () const;
172 
178  void
179  setReagentIdentifier (ome::compat::shared_ptr<std::string>& reagentIdentifier);
180 
186  const std::string&
187  getID () const;
188 
194  void
195  setID (const std::string& id);
196 
202  ome::compat::shared_ptr<std::string>
203  getName ();
204 
210  const ome::compat::shared_ptr<std::string>
211  getName () const;
212 
218  void
219  setName (ome::compat::shared_ptr<std::string>& name);
220 
226  ome::compat::shared_ptr<std::string>
227  getDescription ();
228 
234  const ome::compat::shared_ptr<std::string>
235  getDescription () const;
236 
242  void
243  setDescription (ome::compat::shared_ptr<std::string>& description);
244 
252 
259  getLinkedAnnotationList () const;
260 
268  const ome::compat::weak_ptr<ome::xml::model::Annotation>&
270 
281  const ome::compat::weak_ptr<ome::xml::model::Annotation>&
283  const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
284 
295  bool
296  linkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
297 
313  bool
314  unlinkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
315 
321  ome::compat::weak_ptr<ome::xml::model::Screen>
322  getScreen ();
323 
329  const ome::compat::weak_ptr<ome::xml::model::Screen>
330  getScreen () const;
331 
337  void
338  setScreen (ome::compat::weak_ptr<ome::xml::model::Screen>& screen_BackReference);
339 
346  sizeOfLinkedWellList () const;
347 
354  getLinkedWellList () const;
355 
363  const ome::compat::weak_ptr<ome::xml::model::Well>&
365 
376  const ome::compat::weak_ptr<ome::xml::model::Well>&
378  const ome::compat::shared_ptr<ome::xml::model::Well>& well_BackReference);
379 
390  bool
391  linkWell (const ome::compat::shared_ptr<ome::xml::model::Well>& well_BackReference);
392 
408  bool
409  unlinkWell (const ome::compat::shared_ptr<ome::xml::model::Well>& well_BackReference);
410 
411 
414  asXMLElement (common::xml::dom::Document& document) const;
415 
416 
417  protected:
418  // Documented in base class.
421  common::xml::dom::Element& element) const;
422 
423  public:
424  // Documented in superclass.
425  const std::string&
426  getXMLNamespace() const;
427  };
428 
429  }
430  }
431 }
432 
433 #endif // OME_XML_MODEL_REAGENT_H
434 
435 /*
436  * Local Variables:
437  * mode:C++
438  * End:
439  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:62
bool linkWell(const ome::compat::shared_ptr< ome::xml::model::Well > &well_BackReference)
Link Well.
Definition: Reagent.cpp:467
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:439
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:504
OMEModelObject::indexed_container< ome::xml::model::Well, ome::compat::weak_ptr >::type getLinkedWellList() const
Get the linked Well list.
Definition: Reagent.cpp:445
void setName(ome::compat::shared_ptr< std::string > &name)
Set the Name property.
Definition: Reagent.cpp:330
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:370
ome::compat::shared_ptr< std::string > getReagentIdentifier()
Get the ReagentIdentifier property.
Definition: Reagent.cpp:281
ome::compat::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: Reagent.cpp:337
bool unlinkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Reagent.cpp:400
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:376
ome::compat::weak_ptr< ome::xml::model::Screen > screen
Screen_BackReference back reference.
Definition: Reagent.h:94
DOM Document wrapper.
Definition: Document.h:82
ome::compat::weak_ptr< ome::xml::model::Screen > getScreen()
Get the Screen property.
Definition: Reagent.cpp:418
DOM Element wrapper.
Definition: Element.h:66
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:451
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type annotationLinks
AnnotationRef reference (occurs more than once)
Definition: Reagent.h:92
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
bool unlinkWell(const ome::compat::shared_ptr< ome::xml::model::Well > &well_BackReference)
Unlink Well.
Definition: Reagent.cpp:480
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:457
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:358
void setReagentIdentifier(ome::compat::shared_ptr< std::string > &reagentIdentifier)
Set the ReagentIdentifier property.
Definition: Reagent.cpp:295
void setID(const std::string &id)
Set the ID property.
Definition: Reagent.cpp:309
std::string id
ID property.
Definition: Reagent.h:86
void setScreen(ome::compat::weak_ptr< ome::xml::model::Screen > &screen_BackReference)
Set the Screen property.
Definition: Reagent.cpp:432
ome::compat::shared_ptr< std::string > name
Name property.
Definition: Reagent.h:88
ome::compat::shared_ptr< std::string > reagentIdentifier
ReagentIdentifier property.
Definition: Reagent.h:84
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:85
Reagent model object.
Definition: Reagent.h:80
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40
const std::string & elementName() const
Get the element name of this model object.
Definition: Reagent.cpp:162
void setDescription(ome::compat::shared_ptr< std::string > &description)
Set the Description property.
Definition: Reagent.cpp:351
ome::compat::shared_ptr< std::string > description
Description property.
Definition: Reagent.h:90
bool linkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Reagent.cpp:386
OMEModelObject::indexed_container< ome::xml::model::Well, ome::compat::weak_ptr >::type wells
Well_BackReference back reference (occurs more than once)
Definition: Reagent.h:96
const std::string & getID() const
Get the ID property.
Definition: Reagent.cpp:302
virtual ~Reagent()
Destructor.
Definition: Reagent.cpp:148
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:178
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:497
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:250
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:153
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Reagent.cpp:593
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Reagent.cpp:364
Boost.Log compatibility.
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Reagent.cpp:169
Reagent()
Default constructor.
Definition: Reagent.cpp:117
Xerces-C modern C++ wrapper.
Definition: Base.h:53
ome::compat::shared_ptr< std::string > getName()
Get the Name property.
Definition: Reagent.cpp:316