ome-xml 5.2.3

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
82 class Folder : public detail::OMEModelObject
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,
120 ome::xml::model::OMEModel& model);
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,
141 ome::xml::model::OMEModel& model);
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
220 OMEModelObject::indexed_container<ome::xml::model::Folder, ome::compat::weak_ptr>::type::size_type
221 sizeOfLinkedFolderList () const;
222
228 OMEModelObject::indexed_container<ome::xml::model::Folder, ome::compat::weak_ptr>::type
229 getLinkedFolderList () const;
230
238 const ome::compat::weak_ptr<ome::xml::model::Folder>&
239 getLinkedFolder (OMEModelObject::indexed_container<ome::xml::model::Folder, ome::compat::weak_ptr>::type::size_type index) const;
240
251 const ome::compat::weak_ptr<ome::xml::model::Folder>&
252 setLinkedFolder (OMEModelObject::indexed_container<ome::xml::model::Folder, ome::compat::weak_ptr>::type::size_type index,
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
291 OMEModelObject::indexed_container<ome::xml::model::Image, ome::compat::weak_ptr>::type::size_type
292 sizeOfLinkedImageList () const;
293
299 OMEModelObject::indexed_container<ome::xml::model::Image, ome::compat::weak_ptr>::type
300 getLinkedImageList () const;
301
309 const ome::compat::weak_ptr<ome::xml::model::Image>&
310 getLinkedImage (OMEModelObject::indexed_container<ome::xml::model::Image, ome::compat::weak_ptr>::type::size_type index) const;
311
322 const ome::compat::weak_ptr<ome::xml::model::Image>&
323 setLinkedImage (OMEModelObject::indexed_container<ome::xml::model::Image, ome::compat::weak_ptr>::type::size_type index,
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
362 OMEModelObject::indexed_container<ome::xml::model::ROI, ome::compat::weak_ptr>::type::size_type
363 sizeOfLinkedROIList () const;
364
370 OMEModelObject::indexed_container<ome::xml::model::ROI, ome::compat::weak_ptr>::type
371 getLinkedROIList () const;
372
380 const ome::compat::weak_ptr<ome::xml::model::ROI>&
381 getLinkedROI (OMEModelObject::indexed_container<ome::xml::model::ROI, ome::compat::weak_ptr>::type::size_type index) const;
382
393 const ome::compat::weak_ptr<ome::xml::model::ROI>&
394 setLinkedROI (OMEModelObject::indexed_container<ome::xml::model::ROI, ome::compat::weak_ptr>::type::size_type index,
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
433 OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type
434 sizeOfLinkedAnnotationList () const;
435
441 OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type
442 getLinkedAnnotationList () const;
443
451 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
452 getLinkedAnnotation (OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type index) const;
453
464 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
465 setLinkedAnnotation (OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type index,
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
504 OMEModelObject::indexed_container<ome::xml::model::Folder, ome::compat::weak_ptr>::type::size_type
505 sizeOfLinkedChildFolderList () const;
506
512 OMEModelObject::indexed_container<ome::xml::model::Folder, ome::compat::weak_ptr>::type
513 getLinkedChildFolderList () const;
514
522 const ome::compat::weak_ptr<ome::xml::model::Folder>&
523 getLinkedChildFolder (OMEModelObject::indexed_container<ome::xml::model::Folder, ome::compat::weak_ptr>::type::size_type index) const;
524
535 const ome::compat::weak_ptr<ome::xml::model::Folder>&
536 setLinkedChildFolder (OMEModelObject::indexed_container<ome::xml::model::Folder, ome::compat::weak_ptr>::type::size_type index,
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
571 virtual common::xml::dom::Element
572 asXMLElement (common::xml::dom::Document& document) const;
573
574
575 protected:
576 // Documented in base class.
577 virtual common::xml::dom::Element
578 asXMLElementInternal (common::xml::dom::Document& document,
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::xml::model::OMEModel
OME model interface (abstract top-level container)
Definition: OMEModel.h:62
ome::xml::model::Folder::unlinkChildFolder
bool unlinkChildFolder(const ome::compat::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Unlink ChildFolder.
Definition: Folder.cpp:722
ome::xml::model::Folder::getLinkedChildFolder
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:693
ome::xml::model::Folder::getLinkedROI
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:573
ome::xml::model::Folder::~Folder
virtual ~Folder()
Destructor.
Definition: Folder.cpp:180
ome::xml::model::Folder::impl
ome::compat::shared_ptr< Impl > impl
Private implementation details.
Definition: Folder.h:85
ome::xml::model::Folder::linkImage
bool linkImage(const ome::compat::shared_ptr< ome::xml::model::Image > &image)
Link Image.
Definition: Folder.cpp:529
ome::xml::model::Folder::getName
ome::compat::shared_ptr< std::string > getName()
Get the Name property.
Definition: Folder.cpp:401
ome::xml::model::Folder::setLinkedROI
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:579
ome::xml::model::Folder::getXMLNamespace
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Folder.cpp:886
ome::xml::model::Folder::sizeOfLinkedROIList
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:561
ome::xml::model::Folder::linkFolder
bool linkFolder(const ome::compat::shared_ptr< ome::xml::model::Folder > &folder)
Link Folder.
Definition: Folder.cpp:471
ome::xml::model::Folder::getLinkedFolderList
OMEModelObject::indexed_container< ome::xml::model::Folder, ome::compat::weak_ptr >::type getLinkedFolderList() const
Get the linked Folder list.
Definition: Folder.cpp:449
ome::xml::model::Folder::setName
void setName(ome::compat::shared_ptr< std::string > &name)
Set the Name property.
Definition: Folder.cpp:415
ome::xml::model::Folder::setLinkedChildFolder
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:699
ome::xml::model::Folder::link
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:309
ome::xml::model::Folder::getID
const std::string & getID() const
Get the ID property.
Definition: Folder.cpp:387
ome::xml::model::Folder::getLinkedAnnotation
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:633
ome::xml::model::Folder::linkChildFolder
bool linkChildFolder(const ome::compat::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Link ChildFolder.
Definition: Folder.cpp:709
ome::common::xml::dom::Document
ome::xml::model::Folder::create
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:185
ome::common::xml::dom::Element
ome::xml::model::detail::OMEModelObject
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
ome::xml::model::OMEModelObject::indexed_container::type
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
ome::xml::model::Folder
Folder model object.
Definition: Folder.h:82
ome::xml::model::Folder::unlinkFolder
bool unlinkFolder(const ome::compat::shared_ptr< ome::xml::model::Folder > &folder)
Unlink Folder.
Definition: Folder.cpp:484
ome::xml::model::Folder::asXMLElementInternal
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:745
ome::xml::model::Folder::sizeOfLinkedChildFolderList
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:681
ome::xml::model::Folder::getLinkedAnnotationList
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Folder.cpp:627
ome::xml::model::Folder::linkROI
bool linkROI(const ome::compat::shared_ptr< ome::xml::model::ROI > &roi)
Link ROI.
Definition: Folder.cpp:589
ome::xml::model::Folder::update
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:209
ome::xml::model::Folder::Impl
Private implementation details of Folder model object.
Definition: Folder.cpp:77
ome::xml::model::Folder::getLinkedImageList
OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: Folder.cpp:507
ome::xml::model::OMEModelObject::indexed_container
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:85
ome::xml::model::Folder::setID
void setID(const std::string &id)
Set the ID property.
Definition: Folder.cpp:394
ome
Open Microscopy Environment C++ implementation.
ome::xml::model::Folder::sizeOfLinkedImageList
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:501
ome::xml::model::Folder::sizeOfLinkedFolderList
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:443
ome::xml::model::Folder::unlinkAnnotation
bool unlinkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Folder.cpp:663
ome::xml::model::Folder::setLinkedImage
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:519
ome::xml::model::Folder::linkAnnotation
bool linkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Folder.cpp:649
ome::xml::model::Folder::elementName
const std::string & elementName() const
Get the element name of this model object.
Definition: Folder.cpp:194
ome::xml::model::Folder::getLinkedImage
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:513
ome::xml::model::Folder::asXMLElement
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:738
ome::xml::model::Folder::getLinkedChildFolderList
OMEModelObject::indexed_container< ome::xml::model::Folder, ome::compat::weak_ptr >::type getLinkedChildFolderList() const
Get the linked ChildFolder list.
Definition: Folder.cpp:687
ome::xml::model::Folder::setLinkedFolder
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:461
ome::xml::model::Folder::sizeOfLinkedAnnotationList
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:621
ome::xml::model::Folder::setLinkedAnnotation
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:639
ome::xml::model::Folder::setDescription
void setDescription(ome::compat::shared_ptr< std::string > &description)
Set the Description property.
Definition: Folder.cpp:436
ome::xml::model::Folder::getDescription
ome::compat::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: Folder.cpp:422
ome::xml::model::Folder::unlinkROI
bool unlinkROI(const ome::compat::shared_ptr< ome::xml::model::ROI > &roi)
Unlink ROI.
Definition: Folder.cpp:603
ome::xml::model::Folder::getLinkedROIList
OMEModelObject::indexed_container< ome::xml::model::ROI, ome::compat::weak_ptr >::type getLinkedROIList() const
Get the linked ROI list.
Definition: Folder.cpp:567
ome::xml::model::Folder::Folder
Folder()
Default constructor.
Definition: Folder.cpp:165
ome::xml::model::Folder::validElementName
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
ome::xml::model::Folder::unlinkImage
bool unlinkImage(const ome::compat::shared_ptr< ome::xml::model::Image > &image)
Unlink Image.
Definition: Folder.cpp:543
log.h
ome::xml::model::Folder::operator=
Folder & operator=(const Folder &)
Assignment operator (deleted).
ome::xml::model::Folder::getLinkedFolder
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:455