ome-xml  5.6.0
Screen.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_SCREEN_H
47 #define OME_XML_MODEL_SCREEN_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 OMEModel;
75  class Plate;
76  class Reagent;
77 
82  {
83  private:
84  class Impl;
86  std::shared_ptr<Impl> impl;
87 
88  public:
90  Screen();
91 
97  Screen (const Screen& copy);
98 
100  virtual
101  ~Screen ();
102 
117  static std::shared_ptr<Screen>
118  create(const common::xml::dom::Element& element,
120 
121  // Documented in superclass.
122  const std::string&
123  elementName() const;
124 
125  // Documented in superclass.
126  bool
127  validElementName(const std::string& name) const;
128 
130  Screen&
131  operator= (const Screen&) = delete;
133 
134  // -- OMEModelObject API methods --
135 
137  virtual void
138  update(const common::xml::dom::Element& element,
140 
141  public:
142  // -- Screen API methods --
143 
145  bool
146  link (std::shared_ptr<Reference>& reference,
147  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
148 
154  std::shared_ptr<std::string>
155  getName ();
156 
162  const std::shared_ptr<std::string>
163  getName () const;
164 
170  void
171  setName (std::shared_ptr<std::string>& name);
172 
178  std::shared_ptr<std::string>
180 
186  const std::shared_ptr<std::string>
187  getProtocolDescription () const;
188 
194  void
195  setProtocolDescription (std::shared_ptr<std::string>& protocolDescription);
196 
202  std::shared_ptr<std::string>
204 
210  const std::shared_ptr<std::string>
211  getProtocolIdentifier () const;
212 
218  void
219  setProtocolIdentifier (std::shared_ptr<std::string>& protocolIdentifier);
220 
226  std::shared_ptr<std::string>
228 
234  const std::shared_ptr<std::string>
235  getReagentSetDescription () const;
236 
242  void
243  setReagentSetDescription (std::shared_ptr<std::string>& reagentSetDescription);
244 
250  std::shared_ptr<std::string>
251  getType ();
252 
258  const std::shared_ptr<std::string>
259  getType () const;
260 
266  void
267  setType (std::shared_ptr<std::string>& type);
268 
274  const std::string&
275  getID () const;
276 
282  void
283  setID (const std::string& id);
284 
290  std::shared_ptr<std::string>
292 
298  const std::shared_ptr<std::string>
299  getReagentSetIdentifier () const;
300 
306  void
307  setReagentSetIdentifier (std::shared_ptr<std::string>& reagentSetIdentifier);
308 
314  std::shared_ptr<std::string>
315  getDescription ();
316 
322  const std::shared_ptr<std::string>
323  getDescription () const;
324 
330  void
331  setDescription (std::shared_ptr<std::string>& description);
332 
338  std::vector<std::shared_ptr<ome::xml::model::Reagent>>::size_type
339  sizeOfReagentList () const;
340 
347  std::vector<std::shared_ptr<ome::xml::model::Reagent>>&
348  getReagentList ();
349 
356  const std::vector<std::shared_ptr<ome::xml::model::Reagent>>&
357  getReagentList () const;
358 
366  std::shared_ptr<ome::xml::model::Reagent>&
367  getReagent (std::vector<std::shared_ptr<ome::xml::model::Reagent>>::size_type index);
368 
376  const std::shared_ptr<ome::xml::model::Reagent>&
377  getReagent (std::vector<std::shared_ptr<ome::xml::model::Reagent>>::size_type index) const;
378 
386  void
387  setReagent (std::vector<std::shared_ptr<ome::xml::model::Reagent>>::size_type index,
388  std::shared_ptr<ome::xml::model::Reagent>& reagent);
389 
398  void
399  addReagent (std::shared_ptr<ome::xml::model::Reagent>& reagent);
400 
410  void
411  removeReagent (std::shared_ptr<ome::xml::model::Reagent>& reagent);
412 
419  sizeOfLinkedPlateList () const;
420 
427  getLinkedPlateList () const;
428 
436  const std::weak_ptr<ome::xml::model::Plate>&
438 
449  const std::weak_ptr<ome::xml::model::Plate>&
451  const std::shared_ptr<ome::xml::model::Plate>& plate);
452 
463  bool
464  linkPlate (const std::shared_ptr<ome::xml::model::Plate>& plate);
465 
481  bool
482  unlinkPlate (const std::shared_ptr<ome::xml::model::Plate>& plate);
483 
491 
498  getLinkedAnnotationList () const;
499 
507  const std::weak_ptr<ome::xml::model::Annotation>&
509 
520  const std::weak_ptr<ome::xml::model::Annotation>&
522  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
523 
534  bool
535  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
536 
552  bool
553  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
554 
555  protected:
556  // Documented in base class.
557  virtual void
559  common::xml::dom::Element& element) const;
560 
561  public:
562  // Documented in superclass.
563  const std::string&
564  getXMLNamespace() const;
565  };
566 
567  }
568  }
569 }
570 
571 #endif // OME_XML_MODEL_SCREEN_H
572 
573 /*
574  * Local Variables:
575  * mode:C++
576  * End:
577  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:61
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Screen.cpp:730
static std::shared_ptr< Screen > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Screen model object from DOM element.
Definition: Screen.cpp:213
std::shared_ptr< std::string > getName()
Get the Name property.
Definition: Screen.cpp:409
bool unlinkPlate(const std::shared_ptr< ome::xml::model::Plate > &plate)
Unlink Plate.
Definition: Screen.cpp:670
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: Screen.cpp:706
OMEModelObject::indexed_container< ome::xml::model::Plate, std::weak_ptr >::type::size_type sizeOfLinkedPlateList() const
Get size of linked Plate list.
Definition: Screen.cpp:628
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::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Screen.cpp:694
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: Screen.cpp:700
Screen()
Default constructor.
Definition: Screen.cpp:189
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Screen.cpp:229
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: Screen.cpp:235
std::shared_ptr< Impl > impl
Private implementation details.
Definition: Screen.h:84
void setName(std::shared_ptr< std::string > &name)
Set the Name property.
Definition: Screen.cpp:423
void setReagent(std::vector< std::shared_ptr< ome::xml::model::Reagent >>::size_type index, std::shared_ptr< ome::xml::model::Reagent > &reagent)
Set Reagent.
Definition: Screen.cpp:600
std::shared_ptr< std::string > getProtocolDescription()
Get the ProtocolDescription property.
Definition: Screen.cpp:430
bool linkPlate(const std::shared_ptr< ome::xml::model::Plate > &plate)
Link Plate.
Definition: Screen.cpp:656
const std::weak_ptr< ome::xml::model::Plate > & getLinkedPlate(OMEModelObject::indexed_container< ome::xml::model::Plate, std::weak_ptr >::type::size_type index) const
Get linked Plate.
Definition: Screen.cpp:640
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Screen.cpp:716
void addReagent(std::shared_ptr< ome::xml::model::Reagent > &reagent)
Add Reagent.
Definition: Screen.cpp:609
std::shared_ptr< std::string > getType()
Get the Type property.
Definition: Screen.cpp:493
void setType(std::shared_ptr< std::string > &type)
Set the Type property.
Definition: Screen.cpp:507
Screen model object.
Definition: Screen.h:81
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:84
std::shared_ptr< ome::xml::model::Reagent > & getReagent(std::vector< std::shared_ptr< ome::xml::model::Reagent >>::size_type index)
Get Reagent.
Definition: Screen.cpp:588
Open Microscopy Environment C++ implementation.
void setReagentSetIdentifier(std::shared_ptr< std::string > &reagentSetIdentifier)
Set the ReagentSetIdentifier property.
Definition: Screen.cpp:542
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: Screen.cpp:747
std::shared_ptr< std::string > getReagentSetDescription()
Get the ReagentSetDescription property.
Definition: Screen.cpp:472
std::vector< std::shared_ptr< ome::xml::model::Reagent > >::size_type sizeOfReagentList() const
Get size of linked Reagent list.
Definition: Screen.cpp:570
void removeReagent(std::shared_ptr< ome::xml::model::Reagent > &reagent)
Remove Reagent.
Definition: Screen.cpp:617
void setProtocolDescription(std::shared_ptr< std::string > &protocolDescription)
Set the ProtocolDescription property.
Definition: Screen.cpp:444
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Screen.cpp:688
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: Screen.cpp:362
virtual ~Screen()
Destructor.
Definition: Screen.cpp:208
void setProtocolIdentifier(std::shared_ptr< std::string > &protocolIdentifier)
Set the ProtocolIdentifier property.
Definition: Screen.cpp:465
void setDescription(std::shared_ptr< std::string > &description)
Set the Description property.
Definition: Screen.cpp:563
void setReagentSetDescription(std::shared_ptr< std::string > &reagentSetDescription)
Set the ReagentSetDescription property.
Definition: Screen.cpp:486
const std::string & elementName() const
Get the element name of this model object.
Definition: Screen.cpp:222
const std::string & getID() const
Get the ID property.
Definition: Screen.cpp:514
Private implementation details of Screen model object.
Definition: Screen.cpp:76
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Screen.cpp:895
std::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: Screen.cpp:549
const std::weak_ptr< ome::xml::model::Plate > & setLinkedPlate(OMEModelObject::indexed_container< ome::xml::model::Plate, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Plate > &plate)
Set linked Plate.
Definition: Screen.cpp:646
OMEModelObject::indexed_container< ome::xml::model::Plate, std::weak_ptr >::type getLinkedPlateList() const
Get the linked Plate list.
Definition: Screen.cpp:634
std::vector< std::shared_ptr< ome::xml::model::Reagent > > & getReagentList()
Get the Reagent list.
Definition: Screen.cpp:576
std::shared_ptr< std::string > getProtocolIdentifier()
Get the ProtocolIdentifier property.
Definition: Screen.cpp:451
std::shared_ptr< std::string > getReagentSetIdentifier()
Get the ReagentSetIdentifier property.
Definition: Screen.cpp:528
void setID(const std::string &id)
Set the ID property.
Definition: Screen.cpp:521