ome-xml  5.6.0
Folder.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_FOLDER_H
47 #define OME_XML_MODEL_FOLDER_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 Image;
75  class OMEModel;
76  class ROI;
77 
82  {
83  private:
84  class Impl;
86  std::shared_ptr<Impl> impl;
87 
88  public:
90  Folder();
91 
97  Folder (const Folder& copy);
98 
100  virtual
101  ~Folder ();
102 
117  static std::shared_ptr<Folder>
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  Folder&
131  operator= (const Folder&) = delete;
133 
134  // -- OMEModelObject API methods --
135 
137  virtual void
138  update(const common::xml::dom::Element& element,
140 
141  public:
142  // -- Folder API methods --
143 
145  bool
146  link (std::shared_ptr<Reference>& reference,
147  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
148 
154  const std::string&
155  getID () const;
156 
162  void
163  setID (const std::string& id);
164 
170  std::shared_ptr<std::string>
171  getName ();
172 
178  const std::shared_ptr<std::string>
179  getName () const;
180 
186  void
187  setName (std::shared_ptr<std::string>& name);
188 
194  std::shared_ptr<std::string>
195  getDescription ();
196 
202  const std::shared_ptr<std::string>
203  getDescription () const;
204 
210  void
211  setDescription (std::shared_ptr<std::string>& description);
212 
219  sizeOfLinkedFolderList () const;
220 
227  getLinkedFolderList () const;
228 
236  const std::weak_ptr<ome::xml::model::Folder>&
238 
249  const std::weak_ptr<ome::xml::model::Folder>&
251  const std::shared_ptr<ome::xml::model::Folder>& folder);
252 
263  bool
264  linkFolder (const std::shared_ptr<ome::xml::model::Folder>& folder);
265 
281  bool
282  unlinkFolder (const std::shared_ptr<ome::xml::model::Folder>& folder);
283 
290  sizeOfLinkedImageList () const;
291 
298  getLinkedImageList () const;
299 
307  const std::weak_ptr<ome::xml::model::Image>&
309 
320  const std::weak_ptr<ome::xml::model::Image>&
322  const std::shared_ptr<ome::xml::model::Image>& image);
323 
334  bool
335  linkImage (const std::shared_ptr<ome::xml::model::Image>& image);
336 
352  bool
353  unlinkImage (const std::shared_ptr<ome::xml::model::Image>& image);
354 
361  sizeOfLinkedROIList () const;
362 
369  getLinkedROIList () const;
370 
378  const std::weak_ptr<ome::xml::model::ROI>&
380 
391  const std::weak_ptr<ome::xml::model::ROI>&
393  const std::shared_ptr<ome::xml::model::ROI>& roi);
394 
405  bool
406  linkROI (const std::shared_ptr<ome::xml::model::ROI>& roi);
407 
423  bool
424  unlinkROI (const std::shared_ptr<ome::xml::model::ROI>& roi);
425 
433 
440  getLinkedAnnotationList () const;
441 
449  const std::weak_ptr<ome::xml::model::Annotation>&
451 
462  const std::weak_ptr<ome::xml::model::Annotation>&
464  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
465 
476  bool
477  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
478 
494  bool
495  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
496 
504 
511  getLinkedChildFolderList () const;
512 
520  const std::weak_ptr<ome::xml::model::Folder>&
522 
533  const std::weak_ptr<ome::xml::model::Folder>&
535  const std::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
536 
547  bool
548  linkChildFolder (const std::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
549 
565  bool
566  unlinkChildFolder (const std::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
567 
568  protected:
569  // Documented in base class.
570  virtual void
572  common::xml::dom::Element& element) const;
573 
574  public:
575  // Documented in superclass.
576  const std::string&
577  getXMLNamespace() const;
578  };
579 
580  }
581  }
582 }
583 
584 #endif // OME_XML_MODEL_FOLDER_H
585 
586 /*
587  * Local Variables:
588  * mode:C++
589  * End:
590  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:61
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Folder.cpp:625
const std::weak_ptr< ome::xml::model::Folder > & getLinkedFolder(OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type::size_type index) const
Get linked Folder.
Definition: Folder.cpp:453
OMEModelObject::indexed_container< ome::xml::model::ROI, std::weak_ptr >::type::size_type sizeOfLinkedROIList() const
Get size of linked ROI list.
Definition: Folder.cpp:559
bool unlinkFolder(const std::shared_ptr< ome::xml::model::Folder > &folder)
Unlink Folder.
Definition: Folder.cpp:482
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Folder.cpp:647
virtual ~Folder()
Destructor.
Definition: Folder.cpp:188
const std::weak_ptr< ome::xml::model::Image > & setLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Image > &image)
Set linked Image.
Definition: Folder.cpp:517
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Folder.cpp:859
bool linkFolder(const std::shared_ptr< ome::xml::model::Folder > &folder)
Link Folder.
Definition: Folder.cpp:469
const std::string & getID() const
Get the ID property.
Definition: Folder.cpp:385
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: Folder.cpp:505
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Folder.cpp:661
OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type::size_type sizeOfLinkedFolderList() const
Get size of linked Folder list.
Definition: Folder.cpp:441
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type sizeOfLinkedImageList() const
Get size of linked Image list.
Definition: Folder.cpp:499
const std::weak_ptr< ome::xml::model::Folder > & setLinkedChildFolder(OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Set linked ChildFolder.
Definition: Folder.cpp:697
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::weak_ptr< ome::xml::model::Folder > & getLinkedChildFolder(OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type::size_type index) const
Get linked ChildFolder.
Definition: Folder.cpp:691
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
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: Folder.cpp:637
Folder model object.
Definition: Folder.h:81
const std::weak_ptr< ome::xml::model::ROI > & getLinkedROI(OMEModelObject::indexed_container< ome::xml::model::ROI, std::weak_ptr >::type::size_type index) const
Get linked ROI.
Definition: Folder.cpp:571
std::shared_ptr< Impl > impl
Private implementation details.
Definition: Folder.h:84
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: Folder.cpp:631
OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type::size_type sizeOfLinkedChildFolderList() const
Get size of linked ChildFolder list.
Definition: Folder.cpp:679
bool linkImage(const std::shared_ptr< ome::xml::model::Image > &image)
Link Image.
Definition: Folder.cpp:527
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: Folder.cpp:215
Private implementation details of Folder model object.
Definition: Folder.cpp:77
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: Folder.cpp:307
void setName(std::shared_ptr< std::string > &name)
Set the Name property.
Definition: Folder.cpp:413
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:84
static std::shared_ptr< Folder > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Folder model object from DOM element.
Definition: Folder.cpp:193
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Folder.cpp:619
void setID(const std::string &id)
Set the ID property.
Definition: Folder.cpp:392
std::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: Folder.cpp:420
Open Microscopy Environment C++ implementation.
void setDescription(std::shared_ptr< std::string > &description)
Set the Description property.
Definition: Folder.cpp:434
OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type getLinkedFolderList() const
Get the linked Folder list.
Definition: Folder.cpp:447
OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type getLinkedChildFolderList() const
Get the linked ChildFolder list.
Definition: Folder.cpp:685
bool unlinkROI(const std::shared_ptr< ome::xml::model::ROI > &roi)
Unlink ROI.
Definition: Folder.cpp:601
bool linkROI(const std::shared_ptr< ome::xml::model::ROI > &roi)
Link ROI.
Definition: Folder.cpp:587
const std::weak_ptr< ome::xml::model::ROI > & setLinkedROI(OMEModelObject::indexed_container< ome::xml::model::ROI, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::ROI > &roi)
Set linked ROI.
Definition: Folder.cpp:577
const std::string & elementName() const
Get the element name of this model object.
Definition: Folder.cpp:202
bool unlinkImage(const std::shared_ptr< ome::xml::model::Image > &image)
Unlink Image.
Definition: Folder.cpp:541
std::shared_ptr< std::string > getName()
Get the Name property.
Definition: Folder.cpp:399
bool unlinkChildFolder(const std::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Unlink ChildFolder.
Definition: Folder.cpp:720
const std::weak_ptr< ome::xml::model::Image > & getLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type index) const
Get linked Image.
Definition: Folder.cpp:511
bool linkChildFolder(const std::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Link ChildFolder.
Definition: Folder.cpp:707
Folder()
Default constructor.
Definition: Folder.cpp:169
OMEModelObject::indexed_container< ome::xml::model::ROI, std::weak_ptr >::type getLinkedROIList() const
Get the linked ROI list.
Definition: Folder.cpp:565
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Folder.cpp:209
const std::weak_ptr< ome::xml::model::Folder > & setLinkedFolder(OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Folder > &folder)
Set linked Folder.
Definition: Folder.cpp:459
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: Folder.cpp:736