/*
 * #%L
 * OME-XML C++ library for working with OME-XML metadata structures.
 * %%
 * Copyright © 2006 - 2016 Open Microscopy Environment:
 *   - Massachusetts Institute of Technology
 *   - National Institutes of Health
 *   - University of Dundee
 *   - Board of Regents of the University of Wisconsin-Madison
 *   - Glencoe Software, Inc.
 * %%
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * The views and conclusions contained in the software and documentation are
 * those of the authors and should not be interpreted as representing official
 * policies, either expressed or implied, of any organization.
 * #L%
 */

/*─────────────────────────────────────────────────────────────────────────────
 *
 * THIS IS AUTOMATICALLY GENERATED CODE.  DO NOT MODIFY.
 *
 *─────────────────────────────────────────────────────────────────────────────
 */

#ifndef OME_XML_MODEL_IMAGE_H
#define OME_XML_MODEL_IMAGE_H

#include <algorithm>
#include <list>
#include <stdexcept>
#include <string>
#include <vector>

#include <ome/common/log.h>

#include <ome/common/xml/dom/Document.h>
#include <ome/common/xml/dom/Element.h>
#include <ome/common/xml/dom/Node.h>
#include <ome/common/xml/dom/NodeList.h>

#include <ome/xml/model/Experiment.h>
#include <ome/xml/model/Experimenter.h>
#include <ome/xml/model/ExperimenterGroup.h>
#include <ome/xml/model/ImagingEnvironment.h>
#include <ome/xml/model/Instrument.h>
#include <ome/xml/model/ObjectiveSettings.h>
#include <ome/xml/model/Pixels.h>
#include <ome/xml/model/StageLabel.h>
#include <ome/xml/model/detail/OMEModelObject.h>
#include <ome/xml/model/primitives/Timestamp.h>

namespace ome
{
  namespace xml
  {
    namespace model
    {

      // Forward declarations.
      class Annotation;
      class Dataset;
      class MicrobeamManipulation;
      class OMEModel;
      class ROI;
      class WellSample;

      /**
       * Image model object.
       */
      class Image : public detail::OMEModelObject
      {
      private:
        class Impl;
        /// Private implementation details.
        ome::compat::shared_ptr<Impl> impl;

      public:
        /// Default constructor.
        Image();

        /**
         * Copy constructor.
         *
         * @param copy the Image to copy.
         */
        Image (const Image& copy);

        /// Destructor.
        virtual
        ~Image ();

        /**
         * Create a Image model object from DOM element.
         *
         * @param element root of the XML DOM tree to from which to
         * construct the model object graph.
         * @param model handler for the OME model used to track
         * instances and references seen during the update.
         * @throws EnumerationException if there is an error
         * instantiating an enumeration during model object creation,
         * or ModelException if there are any consistency or validity
         * errors found during processing.
         *
         * @returns a new model object.
         */
        static ome::compat::shared_ptr< Image>
        create(const common::xml::dom::Element& element,
               ome::xml::model::OMEModel& model);

        // Documented in superclass.
        const std::string&
        elementName() const;

        // Documented in superclass.
        bool
        validElementName(const std::string& name) const;


        // -- OMEModelObject API methods --

        /// @copydoc ome::xml::model::OMEModelObject::update
        virtual void
        update(const common::xml::dom::Element&  element,
               ome::xml::model::OMEModel& model);

      public:
        // -- Image API methods --

        /// @copydoc ome::xml::model::OMEModelObject::link
        bool
        link (ome::compat::shared_ptr<Reference>& reference,
              ome::compat::shared_ptr< ome::xml::model::OMEModelObject>& object);

        /**
         * Get the ID property.
         *
         * @returns the ID property.
         */
        const std::string&
        getID () const;

        /**
         * Set the ID property.
         *
         * @param id the value to set.
         */
        void
        setID (const std::string& id);

        /**
         * Get the Name property.
         *
         * @returns the Name property.
         */
        ome::compat::shared_ptr<std::string>
        getName ();

        /**
         * Get the Name property.
         *
         * @returns the Name property.
         */
        const ome::compat::shared_ptr<std::string>
        getName () const;

        /**
         * Set the Name property.
         *
         * @param name the value to set.
         */
        void
        setName (ome::compat::shared_ptr<std::string>& name);

        /**
         * Get the AcquisitionDate property.
         *
         * @returns the AcquisitionDate property.
         */
        ome::compat::shared_ptr<ome::xml::model::primitives::Timestamp>
        getAcquisitionDate ();

        /**
         * Get the AcquisitionDate property.
         *
         * @returns the AcquisitionDate property.
         */
        const ome::compat::shared_ptr<ome::xml::model::primitives::Timestamp>
        getAcquisitionDate () const;

        /**
         * Set the AcquisitionDate property.
         *
         * @param acquisitionDate the value to set.
         */
        void
        setAcquisitionDate (ome::compat::shared_ptr<ome::xml::model::primitives::Timestamp>& acquisitionDate);

        /**
         * Get linked Experimenter.
         *
         * @returns the linked Experimenter.  The pointer may be
         * null.
         */
        ome::compat::weak_ptr<ome::xml::model::Experimenter>
        getLinkedExperimenter ();

        /**
         * Get linked Experimenter.
         *
         * @returns the linked Experimenter.  The pointer may be
         * null.
         */
        const ome::compat::weak_ptr<ome::xml::model::Experimenter>
        getLinkedExperimenter () const;

        /**
         * Link Experimenter.
         *
         * @param experimenter the Experimenter to link.
         */
        void
        linkExperimenter (ome::compat::shared_ptr<ome::xml::model::Experimenter>& experimenter);

        /**
         * Unlink Experimenter.
         *
         * @param experimenter the Experimenter to unlink.
         *
         * @todo This method is fairly pointless since it's equivalent
         * to linking a null pointer.  It could call @c link(0)
         * internally.
         */
        void
        unlinkExperimenter (ome::compat::shared_ptr<ome::xml::model::Experimenter>& experimenter);

        /**
         * Get the Description property.
         *
         * @returns the Description property.
         */
        ome::compat::shared_ptr<std::string>
        getDescription ();

        /**
         * Get the Description property.
         *
         * @returns the Description property.
         */
        const ome::compat::shared_ptr<std::string>
        getDescription () const;

        /**
         * Set the Description property.
         *
         * @param description the value to set.
         */
        void
        setDescription (ome::compat::shared_ptr<std::string>& description);

        /**
         * Get linked Experiment.
         *
         * @returns the linked Experiment.  The pointer may be
         * null.
         */
        ome::compat::weak_ptr<ome::xml::model::Experiment>
        getLinkedExperiment ();

        /**
         * Get linked Experiment.
         *
         * @returns the linked Experiment.  The pointer may be
         * null.
         */
        const ome::compat::weak_ptr<ome::xml::model::Experiment>
        getLinkedExperiment () const;

        /**
         * Link Experiment.
         *
         * @param experiment the Experiment to link.
         */
        void
        linkExperiment (ome::compat::shared_ptr<ome::xml::model::Experiment>& experiment);

        /**
         * Unlink Experiment.
         *
         * @param experiment the Experiment to unlink.
         *
         * @todo This method is fairly pointless since it's equivalent
         * to linking a null pointer.  It could call @c link(0)
         * internally.
         */
        void
        unlinkExperiment (ome::compat::shared_ptr<ome::xml::model::Experiment>& experiment);

        /**
         * Get linked ExperimenterGroup.
         *
         * @returns the linked ExperimenterGroup.  The pointer may be
         * null.
         */
        ome::compat::weak_ptr<ome::xml::model::ExperimenterGroup>
        getLinkedExperimenterGroup ();

        /**
         * Get linked ExperimenterGroup.
         *
         * @returns the linked ExperimenterGroup.  The pointer may be
         * null.
         */
        const ome::compat::weak_ptr<ome::xml::model::ExperimenterGroup>
        getLinkedExperimenterGroup () const;

        /**
         * Link ExperimenterGroup.
         *
         * @param experimenterGroup the ExperimenterGroup to link.
         */
        void
        linkExperimenterGroup (ome::compat::shared_ptr<ome::xml::model::ExperimenterGroup>& experimenterGroup);

        /**
         * Unlink ExperimenterGroup.
         *
         * @param experimenterGroup the ExperimenterGroup to unlink.
         *
         * @todo This method is fairly pointless since it's equivalent
         * to linking a null pointer.  It could call @c link(0)
         * internally.
         */
        void
        unlinkExperimenterGroup (ome::compat::shared_ptr<ome::xml::model::ExperimenterGroup>& experimenterGroup);

        /**
         * Get linked Instrument.
         *
         * @returns the linked Instrument.  The pointer may be
         * null.
         */
        ome::compat::weak_ptr<ome::xml::model::Instrument>
        getLinkedInstrument ();

        /**
         * Get linked Instrument.
         *
         * @returns the linked Instrument.  The pointer may be
         * null.
         */
        const ome::compat::weak_ptr<ome::xml::model::Instrument>
        getLinkedInstrument () const;

        /**
         * Link Instrument.
         *
         * @param instrument the Instrument to link.
         */
        void
        linkInstrument (ome::compat::shared_ptr<ome::xml::model::Instrument>& instrument);

        /**
         * Unlink Instrument.
         *
         * @param instrument the Instrument to unlink.
         *
         * @todo This method is fairly pointless since it's equivalent
         * to linking a null pointer.  It could call @c link(0)
         * internally.
         */
        void
        unlinkInstrument (ome::compat::shared_ptr<ome::xml::model::Instrument>& instrument);

        /**
         * Get the ObjectiveSettings property.
         *
         * @returns the ObjectiveSettings property.
         */
        ome::compat::shared_ptr<ome::xml::model::ObjectiveSettings>
        getObjectiveSettings ();

        /**
         * Get the ObjectiveSettings property.
         *
         * @returns the ObjectiveSettings property.
         */
        const ome::compat::shared_ptr<ome::xml::model::ObjectiveSettings>
        getObjectiveSettings () const;

        /**
         * Set the ObjectiveSettings property.
         *
         * @param objectiveSettings the value to set.
         */
        void
        setObjectiveSettings (ome::compat::shared_ptr<ome::xml::model::ObjectiveSettings>& objectiveSettings);

        /**
         * Get the ImagingEnvironment property.
         *
         * @returns the ImagingEnvironment property.
         */
        ome::compat::shared_ptr<ome::xml::model::ImagingEnvironment>
        getImagingEnvironment ();

        /**
         * Get the ImagingEnvironment property.
         *
         * @returns the ImagingEnvironment property.
         */
        const ome::compat::shared_ptr<ome::xml::model::ImagingEnvironment>
        getImagingEnvironment () const;

        /**
         * Set the ImagingEnvironment property.
         *
         * @param imagingEnvironment the value to set.
         */
        void
        setImagingEnvironment (ome::compat::shared_ptr<ome::xml::model::ImagingEnvironment>& imagingEnvironment);

        /**
         * Get the StageLabel property.
         *
         * @returns the StageLabel property.
         */
        ome::compat::shared_ptr<ome::xml::model::StageLabel>
        getStageLabel ();

        /**
         * Get the StageLabel property.
         *
         * @returns the StageLabel property.
         */
        const ome::compat::shared_ptr<ome::xml::model::StageLabel>
        getStageLabel () const;

        /**
         * Set the StageLabel property.
         *
         * @param stageLabel the value to set.
         */
        void
        setStageLabel (ome::compat::shared_ptr<ome::xml::model::StageLabel>& stageLabel);

        /**
         * Get the Pixels property.
         *
         * @returns the Pixels property.
         */
        ome::compat::shared_ptr<ome::xml::model::Pixels>
        getPixels ();

        /**
         * Get the Pixels property.
         *
         * @returns the Pixels property.
         */
        const ome::compat::shared_ptr<ome::xml::model::Pixels>
        getPixels () const;

        /**
         * Set the Pixels property.
         *
         * @param pixels the value to set.
         */
        void
        setPixels (ome::compat::shared_ptr<ome::xml::model::Pixels>& pixels);

        /**
         * Get size of linked ROI list.
         *
         * @returns the size of the list.
         */
        OMEModelObject::indexed_container<ome::xml::model::ROI, ome::compat::weak_ptr>::type::size_type
        sizeOfLinkedROIList () const;

        /**
         * Get the linked ROI list.
         *
         * @returns a reference to the list.
         */
        OMEModelObject::indexed_container<ome::xml::model::ROI, ome::compat::weak_ptr>::type
        getLinkedROIList () const;

        /**
         * Get linked ROI.
         *
         * @param index the index number of the ROI.
         * @returns a weak pointer to the ROI.
         * @throws std::out_of_range if the index is invalid.
         */
        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;

        /**
         * Set linked ROI.
         *
         * @note The index must be valid.
         *
         * @param index the index number of the ROI.
         * @param roi the ROI to set.
         * @returns a weak pointer to the ROI.
         * @throws std::out_of_range if the index is invalid.
         */
        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);

        /**
         * Link ROI.
         *
         * @param roi the ROI to link.
         * @returns @c true if the object was added to the internal
         * roiLinks list, otherwise @c false.
         *
         * @todo Why have a return value here; what is it used for?
         * Is this an artifact of the Java API?
         */
        bool
        linkROI (const ome::compat::shared_ptr<ome::xml::model::ROI>& roi);

        /**
         * Unlink ROI.
         *
         * @param roi the ROI to unlink.
         *
         * @returns @c true if the ROI was unlinked, otherwise
         * @c false if the ROI was not linked and could hence not be
         * unlinked.
         *
         * @todo Does the return value serve any useful purpose?  Is
         * this also inherited Java API?
         * @todo Doesn't the removal break the indexing?
         * @todo Does the removal deal with multiple instances; we
         * aren't preventing duplicates on insertion.
         */
        bool
        unlinkROI (const ome::compat::shared_ptr<ome::xml::model::ROI>& roi);

        /**
         * Get size of linked MicrobeamManipulation list.
         *
         * @returns the size of the list.
         */
        OMEModelObject::indexed_container<ome::xml::model::MicrobeamManipulation, ome::compat::weak_ptr>::type::size_type
        sizeOfLinkedMicrobeamManipulationList () const;

        /**
         * Get the linked MicrobeamManipulation list.
         *
         * @returns a reference to the list.
         */
        OMEModelObject::indexed_container<ome::xml::model::MicrobeamManipulation, ome::compat::weak_ptr>::type
        getLinkedMicrobeamManipulationList () const;

        /**
         * Get linked MicrobeamManipulation.
         *
         * @param index the index number of the MicrobeamManipulation.
         * @returns a weak pointer to the MicrobeamManipulation.
         * @throws std::out_of_range if the index is invalid.
         */
        const ome::compat::weak_ptr<ome::xml::model::MicrobeamManipulation>&
        getLinkedMicrobeamManipulation (OMEModelObject::indexed_container<ome::xml::model::MicrobeamManipulation, ome::compat::weak_ptr>::type::size_type index) const;

        /**
         * Set linked MicrobeamManipulation.
         *
         * @note The index must be valid.
         *
         * @param index the index number of the MicrobeamManipulation.
         * @param microbeamManipulation the MicrobeamManipulation to set.
         * @returns a weak pointer to the MicrobeamManipulation.
         * @throws std::out_of_range if the index is invalid.
         */
        const ome::compat::weak_ptr<ome::xml::model::MicrobeamManipulation>&
        setLinkedMicrobeamManipulation (OMEModelObject::indexed_container<ome::xml::model::MicrobeamManipulation, ome::compat::weak_ptr>::type::size_type index,
                                     const ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation);

        /**
         * Link MicrobeamManipulation.
         *
         * @param microbeamManipulation the MicrobeamManipulation to link.
         * @returns @c true if the object was added to the internal
         * microbeamManipulationLinks list, otherwise @c false.
         *
         * @todo Why have a return value here; what is it used for?
         * Is this an artifact of the Java API?
         */
        bool
        linkMicrobeamManipulation (const ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation);

        /**
         * Unlink MicrobeamManipulation.
         *
         * @param microbeamManipulation the MicrobeamManipulation to unlink.
         *
         * @returns @c true if the MicrobeamManipulation was unlinked, otherwise
         * @c false if the MicrobeamManipulation was not linked and could hence not be
         * unlinked.
         *
         * @todo Does the return value serve any useful purpose?  Is
         * this also inherited Java API?
         * @todo Doesn't the removal break the indexing?
         * @todo Does the removal deal with multiple instances; we
         * aren't preventing duplicates on insertion.
         */
        bool
        unlinkMicrobeamManipulation (const ome::compat::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation);

        /**
         * Get size of linked Annotation list.
         *
         * @returns the size of the list.
         */
        OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type
        sizeOfLinkedAnnotationList () const;

        /**
         * Get the linked Annotation list.
         *
         * @returns a reference to the list.
         */
        OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type
        getLinkedAnnotationList () const;

        /**
         * Get linked Annotation.
         *
         * @param index the index number of the Annotation.
         * @returns a weak pointer to the Annotation.
         * @throws std::out_of_range if the index is invalid.
         */
        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;

        /**
         * Set linked Annotation.
         *
         * @note The index must be valid.
         *
         * @param index the index number of the Annotation.
         * @param annotation the Annotation to set.
         * @returns a weak pointer to the Annotation.
         * @throws std::out_of_range if the index is invalid.
         */
        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);

        /**
         * Link Annotation.
         *
         * @param annotation the Annotation to link.
         * @returns @c true if the object was added to the internal
         * annotationLinks list, otherwise @c false.
         *
         * @todo Why have a return value here; what is it used for?
         * Is this an artifact of the Java API?
         */
        bool
        linkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);

        /**
         * Unlink Annotation.
         *
         * @param annotation the Annotation to unlink.
         *
         * @returns @c true if the Annotation was unlinked, otherwise
         * @c false if the Annotation was not linked and could hence not be
         * unlinked.
         *
         * @todo Does the return value serve any useful purpose?  Is
         * this also inherited Java API?
         * @todo Doesn't the removal break the indexing?
         * @todo Does the removal deal with multiple instances; we
         * aren't preventing duplicates on insertion.
         */
        bool
        unlinkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);

        /**
         * Get size of linked Dataset list.
         *
         * @returns the size of the list.
         */
        OMEModelObject::indexed_container<ome::xml::model::Dataset, ome::compat::weak_ptr>::type::size_type
        sizeOfLinkedDatasetList () const;

        /**
         * Get the linked Dataset list.
         *
         * @returns a reference to the list.
         */
        OMEModelObject::indexed_container<ome::xml::model::Dataset, ome::compat::weak_ptr>::type
        getLinkedDatasetList () const;

        /**
         * Get linked Dataset.
         *
         * @param index the index number of the Dataset.
         * @returns a weak pointer to the Dataset.
         * @throws std::out_of_range if the index is invalid.
         */
        const ome::compat::weak_ptr<ome::xml::model::Dataset>&
        getLinkedDataset (OMEModelObject::indexed_container<ome::xml::model::Dataset, ome::compat::weak_ptr>::type::size_type index) const;

        /**
         * Set linked Dataset.
         *
         * @note The index must be valid.
         *
         * @param index the index number of the Dataset.
         * @param dataset_BackReference the Dataset to set.
         * @returns a weak pointer to the Dataset.
         * @throws std::out_of_range if the index is invalid.
         */
        const ome::compat::weak_ptr<ome::xml::model::Dataset>&
        setLinkedDataset (OMEModelObject::indexed_container<ome::xml::model::Dataset, ome::compat::weak_ptr>::type::size_type index,
                                     const ome::compat::shared_ptr<ome::xml::model::Dataset>& dataset_BackReference);

        /**
         * Link Dataset.
         *
         * @param dataset_BackReference the Dataset to link.
         * @returns @c true if the object was added to the internal
         * datasetLinks list, otherwise @c false.
         *
         * @todo Why have a return value here; what is it used for?
         * Is this an artifact of the Java API?
         */
        bool
        linkDataset (const ome::compat::shared_ptr<ome::xml::model::Dataset>& dataset_BackReference);

        /**
         * Unlink Dataset.
         *
         * @param dataset_BackReference the Dataset to unlink.
         *
         * @returns @c true if the Dataset was unlinked, otherwise
         * @c false if the Dataset was not linked and could hence not be
         * unlinked.
         *
         * @todo Does the return value serve any useful purpose?  Is
         * this also inherited Java API?
         * @todo Doesn't the removal break the indexing?
         * @todo Does the removal deal with multiple instances; we
         * aren't preventing duplicates on insertion.
         */
        bool
        unlinkDataset (const ome::compat::shared_ptr<ome::xml::model::Dataset>& dataset_BackReference);

        /**
         * Get size of linked WellSample list.
         *
         * @returns the size of the list.
         */
        OMEModelObject::indexed_container<ome::xml::model::WellSample, ome::compat::weak_ptr>::type::size_type
        sizeOfLinkedWellSampleList () const;

        /**
         * Get the linked WellSample list.
         *
         * @returns a reference to the list.
         */
        OMEModelObject::indexed_container<ome::xml::model::WellSample, ome::compat::weak_ptr>::type
        getLinkedWellSampleList () const;

        /**
         * Get linked WellSample.
         *
         * @param index the index number of the WellSample.
         * @returns a weak pointer to the WellSample.
         * @throws std::out_of_range if the index is invalid.
         */
        const ome::compat::weak_ptr<ome::xml::model::WellSample>&
        getLinkedWellSample (OMEModelObject::indexed_container<ome::xml::model::WellSample, ome::compat::weak_ptr>::type::size_type index) const;

        /**
         * Set linked WellSample.
         *
         * @note The index must be valid.
         *
         * @param index the index number of the WellSample.
         * @param wellSample_BackReference the WellSample to set.
         * @returns a weak pointer to the WellSample.
         * @throws std::out_of_range if the index is invalid.
         */
        const ome::compat::weak_ptr<ome::xml::model::WellSample>&
        setLinkedWellSample (OMEModelObject::indexed_container<ome::xml::model::WellSample, ome::compat::weak_ptr>::type::size_type index,
                                     const ome::compat::shared_ptr<ome::xml::model::WellSample>& wellSample_BackReference);

        /**
         * Link WellSample.
         *
         * @param wellSample_BackReference the WellSample to link.
         * @returns @c true if the object was added to the internal
         * wellSamples list, otherwise @c false.
         *
         * @todo Why have a return value here; what is it used for?
         * Is this an artifact of the Java API?
         */
        bool
        linkWellSample (const ome::compat::shared_ptr<ome::xml::model::WellSample>& wellSample_BackReference);

        /**
         * Unlink WellSample.
         *
         * @param wellSample_BackReference the WellSample to unlink.
         *
         * @returns @c true if the WellSample was unlinked, otherwise
         * @c false if the WellSample was not linked and could hence not be
         * unlinked.
         *
         * @todo Does the return value serve any useful purpose?  Is
         * this also inherited Java API?
         * @todo Doesn't the removal break the indexing?
         * @todo Does the removal deal with multiple instances; we
         * aren't preventing duplicates on insertion.
         */
        bool
        unlinkWellSample (const ome::compat::shared_ptr<ome::xml::model::WellSample>& wellSample_BackReference);


        /// @copydoc ome::xml::model::OMEModelObject::asXMLElement
        virtual common::xml::dom::Element
        asXMLElement (common::xml::dom::Document& document) const;


      protected:
        // Documented in base class.
        virtual common::xml::dom::Element
        asXMLElementInternal (common::xml::dom::Document& document,
                              common::xml::dom::Element&  element) const;

      public:
       // Documented in superclass.
       const std::string&
       getXMLNamespace() const;
      };

    }
  }
}

#endif // OME_XML_MODEL_IMAGE_H

/*
 * Local Variables:
 * mode:C++
 * End:
 */
