ome-xml  5.5.1
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 
129  private:
131  Folder&
132  operator= (const Folder&);
133 
134  public:
135  // -- OMEModelObject API methods --
136 
138  virtual void
139  update(const common::xml::dom::Element& element,
141 
142  public:
143  // -- Folder API methods --
144 
146  bool
147  link (std::shared_ptr<Reference>& reference,
148  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
149 
155  const std::string&
156  getID () const;
157 
163  void
164  setID (const std::string& id);
165 
171  std::shared_ptr<std::string>
172  getName ();
173 
179  const std::shared_ptr<std::string>
180  getName () const;
181 
187  void
188  setName (std::shared_ptr<std::string>& name);
189 
195  std::shared_ptr<std::string>
196  getDescription ();
197 
203  const std::shared_ptr<std::string>
204  getDescription () const;
205 
211  void
212  setDescription (std::shared_ptr<std::string>& description);
213 
220  sizeOfLinkedFolderList () const;
221 
228  getLinkedFolderList () const;
229 
237  const std::weak_ptr<ome::xml::model::Folder>&
239 
250  const std::weak_ptr<ome::xml::model::Folder>&
252  const std::shared_ptr<ome::xml::model::Folder>& folder);
253 
264  bool
265  linkFolder (const std::shared_ptr<ome::xml::model::Folder>& folder);
266 
282  bool
283  unlinkFolder (const std::shared_ptr<ome::xml::model::Folder>& folder);
284 
291  sizeOfLinkedImageList () const;
292 
299  getLinkedImageList () const;
300 
308  const std::weak_ptr<ome::xml::model::Image>&
310 
321  const std::weak_ptr<ome::xml::model::Image>&
323  const std::shared_ptr<ome::xml::model::Image>& image);
324 
335  bool
336  linkImage (const std::shared_ptr<ome::xml::model::Image>& image);
337 
353  bool
354  unlinkImage (const std::shared_ptr<ome::xml::model::Image>& image);
355 
362  sizeOfLinkedROIList () const;
363 
370  getLinkedROIList () const;
371 
379  const std::weak_ptr<ome::xml::model::ROI>&
381 
392  const std::weak_ptr<ome::xml::model::ROI>&
394  const std::shared_ptr<ome::xml::model::ROI>& roi);
395 
406  bool
407  linkROI (const std::shared_ptr<ome::xml::model::ROI>& roi);
408 
424  bool
425  unlinkROI (const std::shared_ptr<ome::xml::model::ROI>& roi);
426 
434 
441  getLinkedAnnotationList () const;
442 
450  const std::weak_ptr<ome::xml::model::Annotation>&
452 
463  const std::weak_ptr<ome::xml::model::Annotation>&
465  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
466 
477  bool
478  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
479 
495  bool
496  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
497 
505 
512  getLinkedChildFolderList () const;
513 
521  const std::weak_ptr<ome::xml::model::Folder>&
523 
534  const std::weak_ptr<ome::xml::model::Folder>&
536  const std::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
537 
548  bool
549  linkChildFolder (const std::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
550 
566  bool
567  unlinkChildFolder (const std::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
568 
569  protected:
570  // Documented in base class.
571  virtual void
573  common::xml::dom::Element& element) const;
574 
575  public:
576  // Documented in superclass.
577  const std::string&
578  getXMLNamespace() const;
579  };
580 
581  }
582  }
583 }
584 
585 #endif // OME_XML_MODEL_FOLDER_H
586 
587 /*
588  * Local Variables:
589  * mode:C++
590  * End:
591  */
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:617
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:445
OMEModelObject::indexed_container< ome::xml::model::ROI, std::weak_ptr >::type::size_type sizeOfLinkedROIList() const
Get size of linked ROI list.
Definition: Folder.cpp:551
bool unlinkFolder(const std::shared_ptr< ome::xml::model::Folder > &folder)
Unlink Folder.
Definition: Folder.cpp:474
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Folder.cpp:639
virtual ~Folder()
Destructor.
Definition: Folder.cpp:180
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:509
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Folder.cpp:851
bool linkFolder(const std::shared_ptr< ome::xml::model::Folder > &folder)
Link Folder.
Definition: Folder.cpp:461
const std::string & getID() const
Get the ID property.
Definition: Folder.cpp:377
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: Folder.cpp:497
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Folder.cpp:653
OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type::size_type sizeOfLinkedFolderList() const
Get size of linked Folder list.
Definition: Folder.cpp:433
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type sizeOfLinkedImageList() const
Get size of linked Image list.
Definition: Folder.cpp:491
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:689
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:683
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:629
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:563
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:623
OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type::size_type sizeOfLinkedChildFolderList() const
Get size of linked ChildFolder list.
Definition: Folder.cpp:671
bool linkImage(const std::shared_ptr< ome::xml::model::Image > &image)
Link Image.
Definition: Folder.cpp:519
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:207
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:299
void setName(std::shared_ptr< std::string > &name)
Set the Name property.
Definition: Folder.cpp:405
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:185
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Folder.cpp:611
void setID(const std::string &id)
Set the ID property.
Definition: Folder.cpp:384
std::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: Folder.cpp:412
Open Microscopy Environment C++ implementation.
void setDescription(std::shared_ptr< std::string > &description)
Set the Description property.
Definition: Folder.cpp:426
OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type getLinkedFolderList() const
Get the linked Folder list.
Definition: Folder.cpp:439
OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type getLinkedChildFolderList() const
Get the linked ChildFolder list.
Definition: Folder.cpp:677
bool unlinkROI(const std::shared_ptr< ome::xml::model::ROI > &roi)
Unlink ROI.
Definition: Folder.cpp:593
bool linkROI(const std::shared_ptr< ome::xml::model::ROI > &roi)
Link ROI.
Definition: Folder.cpp:579
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:569
const std::string & elementName() const
Get the element name of this model object.
Definition: Folder.cpp:194
bool unlinkImage(const std::shared_ptr< ome::xml::model::Image > &image)
Unlink Image.
Definition: Folder.cpp:533
std::shared_ptr< std::string > getName()
Get the Name property.
Definition: Folder.cpp:391
bool unlinkChildFolder(const std::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Unlink ChildFolder.
Definition: Folder.cpp:712
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:503
bool linkChildFolder(const std::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Link ChildFolder.
Definition: Folder.cpp:699
Folder()
Default constructor.
Definition: Folder.cpp:165
OMEModelObject::indexed_container< ome::xml::model::ROI, std::weak_ptr >::type getLinkedROIList() const
Get the linked ROI list.
Definition: Folder.cpp:557
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Folder.cpp:201
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:451
Folder & operator=(const Folder &)
Assignment operator (deleted).
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:728