ome-xml  5.2.0-m5
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 #include <ome/common/xml/dom/NodeList.h>
61 
62 #include <ome/xml/model/primitives/Quantity.h>
63 
64 #include <ome/xml/model/detail/OMEModelObject.h>
65 
66 namespace ome
67 {
68  namespace xml
69  {
70  namespace model
71  {
72 
73  // Forward declarations.
74  class Annotation;
75  class Image;
76  class OMEModel;
77  class ROI;
78 
83  {
84  private:
85  class Impl;
87  ome::compat::shared_ptr<Impl> impl;
88 
89  public:
91  Folder();
92 
98  Folder (const Folder& copy);
99 
101  virtual
102  ~Folder ();
103 
118  static ome::compat::shared_ptr< Folder>
119  create(const common::xml::dom::Element& element,
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  Folder&
133  operator= (const Folder&);
134 
135  public:
136  // -- OMEModelObject API methods --
137 
139  virtual void
140  update(const common::xml::dom::Element& element,
142 
143  public:
144  // -- Folder 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  const std::string&
157  getID () const;
158 
164  void
165  setID (const std::string& id);
166 
172  ome::compat::shared_ptr<std::string>
173  getName ();
174 
180  const ome::compat::shared_ptr<std::string>
181  getName () const;
182 
188  void
189  setName (ome::compat::shared_ptr<std::string>& name);
190 
196  ome::compat::shared_ptr<std::string>
197  getDescription ();
198 
204  const ome::compat::shared_ptr<std::string>
205  getDescription () const;
206 
212  void
213  setDescription (ome::compat::shared_ptr<std::string>& description);
214 
221  sizeOfLinkedFolderList () const;
222 
229  getLinkedFolderList () const;
230 
238  const ome::compat::weak_ptr<ome::xml::model::Folder>&
240 
251  const ome::compat::weak_ptr<ome::xml::model::Folder>&
253  const ome::compat::shared_ptr<ome::xml::model::Folder>& folder);
254 
265  bool
266  linkFolder (const ome::compat::shared_ptr<ome::xml::model::Folder>& folder);
267 
283  bool
284  unlinkFolder (const ome::compat::shared_ptr<ome::xml::model::Folder>& folder);
285 
292  sizeOfLinkedImageList () const;
293 
300  getLinkedImageList () const;
301 
309  const ome::compat::weak_ptr<ome::xml::model::Image>&
311 
322  const ome::compat::weak_ptr<ome::xml::model::Image>&
324  const ome::compat::shared_ptr<ome::xml::model::Image>& image);
325 
336  bool
337  linkImage (const ome::compat::shared_ptr<ome::xml::model::Image>& image);
338 
354  bool
355  unlinkImage (const ome::compat::shared_ptr<ome::xml::model::Image>& image);
356 
363  sizeOfLinkedROIList () const;
364 
371  getLinkedROIList () const;
372 
380  const ome::compat::weak_ptr<ome::xml::model::ROI>&
382 
393  const ome::compat::weak_ptr<ome::xml::model::ROI>&
395  const ome::compat::shared_ptr<ome::xml::model::ROI>& roi);
396 
407  bool
408  linkROI (const ome::compat::shared_ptr<ome::xml::model::ROI>& roi);
409 
425  bool
426  unlinkROI (const ome::compat::shared_ptr<ome::xml::model::ROI>& roi);
427 
435 
442  getLinkedAnnotationList () const;
443 
451  const ome::compat::weak_ptr<ome::xml::model::Annotation>&
453 
464  const ome::compat::weak_ptr<ome::xml::model::Annotation>&
466  const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
467 
478  bool
479  linkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
480 
496  bool
497  unlinkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
498 
506 
513  getLinkedChildFolderList () const;
514 
522  const ome::compat::weak_ptr<ome::xml::model::Folder>&
524 
535  const ome::compat::weak_ptr<ome::xml::model::Folder>&
537  const ome::compat::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
538 
549  bool
550  linkChildFolder (const ome::compat::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
551 
567  bool
568  unlinkChildFolder (const ome::compat::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
569 
572  asXMLElement (common::xml::dom::Document& document) const;
573 
574 
575  protected:
576  // Documented in base class.
579  common::xml::dom::Element& element) const;
580 
581  public:
582  // Documented in superclass.
583  const std::string&
584  getXMLNamespace() const;
585  };
586 
587  }
588  }
589 }
590 
591 #endif // OME_XML_MODEL_FOLDER_H
592 
593 /*
594  * Local Variables:
595  * mode:C++
596  * End:
597  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:62
bool unlinkChildFolder(const ome::compat::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Unlink ChildFolder.
Definition: Folder.cpp:726
virtual ~Folder()
Destructor.
Definition: Folder.cpp:184
ome::compat::shared_ptr< Impl > impl
Private implementation details.
Definition: Folder.h:85
bool linkImage(const ome::compat::shared_ptr< ome::xml::model::Image > &image)
Link Image.
Definition: Folder.cpp:533
ome::compat::shared_ptr< std::string > getName()
Get the Name property.
Definition: Folder.cpp:405
const ome::compat::weak_ptr< ome::xml::model::ROI > & setLinkedROI(OMEModelObject::indexed_container< ome::xml::model::ROI, ome::compat::weak_ptr >::type::size_type index, const ome::compat::shared_ptr< ome::xml::model::ROI > &roi)
Set linked ROI.
Definition: Folder.cpp:583
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: Folder.cpp:637
bool linkFolder(const ome::compat::shared_ptr< ome::xml::model::Folder > &folder)
Link Folder.
Definition: Folder.cpp:475
OMEModelObject::indexed_container< ome::xml::model::ROI, ome::compat::weak_ptr >::type::size_type sizeOfLinkedROIList() const
Get size of linked ROI list.
Definition: Folder.cpp:565
void setName(ome::compat::shared_ptr< std::string > &name)
Set the Name property.
Definition: Folder.cpp:419
const ome::compat::weak_ptr< ome::xml::model::Folder > & setLinkedChildFolder(OMEModelObject::indexed_container< ome::xml::model::Folder, ome::compat::weak_ptr >::type::size_type index, const ome::compat::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Set linked ChildFolder.
Definition: Folder.cpp:703
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: Folder.cpp:313
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Folder.cpp:625
bool linkChildFolder(const ome::compat::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Link ChildFolder.
Definition: Folder.cpp:713
static ome::compat::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:189
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: Folder.cpp:749
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
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
OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: Folder.cpp:511
Folder model object.
Definition: Folder.h:82
bool unlinkFolder(const ome::compat::shared_ptr< ome::xml::model::Folder > &folder)
Unlink Folder.
Definition: Folder.cpp:488
OMEModelObject::indexed_container< ome::xml::model::Folder, ome::compat::weak_ptr >::type getLinkedChildFolderList() const
Get the linked ChildFolder list.
Definition: Folder.cpp:691
OMEModelObject::indexed_container< ome::xml::model::ROI, ome::compat::weak_ptr >::type getLinkedROIList() const
Get the linked ROI list.
Definition: Folder.cpp:571
const std::string & getID() const
Get the ID property.
Definition: Folder.cpp:391
const ome::compat::weak_ptr< ome::xml::model::Image > & getLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type::size_type index) const
Get linked Image.
Definition: Folder.cpp:517
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Folder.cpp:631
OMEModelObject::indexed_container< ome::xml::model::Folder, ome::compat::weak_ptr >::type::size_type sizeOfLinkedChildFolderList() const
Get size of linked ChildFolder list.
Definition: Folder.cpp:685
bool linkROI(const ome::compat::shared_ptr< ome::xml::model::ROI > &roi)
Link ROI.
Definition: Folder.cpp:593
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: Folder.cpp:213
Private implementation details of Folder model object.
Definition: Folder.cpp:77
const std::string & elementName() const
Get the element name of this model object.
Definition: Folder.cpp:198
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:85
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Folder.cpp:890
void setID(const std::string &id)
Set the ID property.
Definition: Folder.cpp:398
Open Microscopy Environment C++ implementation.
bool unlinkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Folder.cpp:667
const ome::compat::weak_ptr< ome::xml::model::Image > & setLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type::size_type index, const ome::compat::shared_ptr< ome::xml::model::Image > &image)
Set linked Image.
Definition: Folder.cpp:523
bool linkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Folder.cpp:653
const ome::compat::weak_ptr< ome::xml::model::ROI > & getLinkedROI(OMEModelObject::indexed_container< ome::xml::model::ROI, ome::compat::weak_ptr >::type::size_type index) const
Get linked ROI.
Definition: Folder.cpp:577
virtual common::xml::dom::Element asXMLElement(common::xml::dom::Document &document) const
Transform the object hierarchy rooted at this element to XML.
Definition: Folder.cpp:742
const ome::compat::weak_ptr< ome::xml::model::Folder > & setLinkedFolder(OMEModelObject::indexed_container< ome::xml::model::Folder, ome::compat::weak_ptr >::type::size_type index, const ome::compat::shared_ptr< ome::xml::model::Folder > &folder)
Set linked Folder.
Definition: Folder.cpp:465
const ome::compat::weak_ptr< ome::xml::model::Folder > & getLinkedChildFolder(OMEModelObject::indexed_container< ome::xml::model::Folder, ome::compat::weak_ptr >::type::size_type index) const
Get linked ChildFolder.
Definition: Folder.cpp:697
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: Folder.cpp:643
void setDescription(ome::compat::shared_ptr< std::string > &description)
Set the Description property.
Definition: Folder.cpp:440
OMEModelObject::indexed_container< ome::xml::model::Folder, ome::compat::weak_ptr >::type::size_type sizeOfLinkedFolderList() const
Get size of linked Folder list.
Definition: Folder.cpp:447
ome::compat::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: Folder.cpp:426
bool unlinkROI(const ome::compat::shared_ptr< ome::xml::model::ROI > &roi)
Unlink ROI.
Definition: Folder.cpp:607
Folder()
Default constructor.
Definition: Folder.cpp:165
OMEModelObject::indexed_container< ome::xml::model::Folder, ome::compat::weak_ptr >::type getLinkedFolderList() const
Get the linked Folder list.
Definition: Folder.cpp:453
bool unlinkImage(const ome::compat::shared_ptr< ome::xml::model::Image > &image)
Unlink Image.
Definition: Folder.cpp:547
OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type::size_type sizeOfLinkedImageList() const
Get size of linked Image list.
Definition: Folder.cpp:505
Folder & operator=(const Folder &)
Assignment operator (deleted).
const ome::compat::weak_ptr< ome::xml::model::Folder > & getLinkedFolder(OMEModelObject::indexed_container< ome::xml::model::Folder, ome::compat::weak_ptr >::type::size_type index) const
Get linked Folder.
Definition: Folder.cpp:459
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Folder.cpp:205