bioformats  5.1.3
Public Member Functions | List of all members
ome::common::xml::dom::Element Class Reference

DOM Element wrapper. More...

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

+ Inheritance diagram for ome::common::xml::dom::Element:
+ Collaboration diagram for ome::common::xml::dom::Element:

Public Member Functions

 Element ()
 Construct a NULL Element.
 
 Element (const Element &element)
 Copy construct an Element. More...
 
 Element (const Wrapper< xercesc::DOMElement, Node >::base_type &base)
 Copy construct an Element. More...
 
 Element (xercesc::DOMElement *element, bool managed)
 Construct an Element from a xercesc::DOMElement *. More...
 
 Element (Wrapper< xercesc::DOMElement, Node >::base_element_type *base, bool managed)
 Construct an Element from a xercesc::DOMNode *. More...
 
 ~Element ()
 Destructor.
 
String getTagName () const
 Get Element tag name. More...
 
NodeList getElementsByTagName (const std::string &name)
 Get child elements with a given tag name. More...
 
bool hasAttribute (const std::string &attr) const
 Check if the Element has the specified attribute. More...
 
String getAttribute (const std::string &attr) const
 Get the specified attribute value. More...
 
void setAttribute (const std::string &attr, const std::string &val)
 Set the specified attribute value. More...
 
String getTextContent () const
 Get Element text content. More...
 
void setTextContent (const std::string &val)
 Set Element text content. More...
 
- Public Member Functions inherited from ome::common::xml::dom::Wrapper< xercesc::DOMElement, Node >
 Wrapper ()
 Constructor.
 
 Wrapper (const base_type &base)
 Copy construct a Wrapper. More...
 
 Wrapper (typename parent_type::base_element_type *base, Deleter del)
 Construct a Wrapper from a base_element_type * (managed). More...
 
 Wrapper (typename parent_type::base_element_type *base)
 Construct a Wrapper from a base_element_type * (unmanaged). More...
 
 ~Wrapper ()
 Destructor.
 
element_typeget ()
 Get wrapped element_type *. More...
 
const element_typeget () const
 Get wrapped element_type *. More...
 
Wrapperoperator= (const Wrapper &wrapped)
 Assign a Wrapper. More...
 
element_typeoperator* () noexcept
 Dereference to element_type. More...
 
const element_typeoperator* () const noexcept
 Dereference to const element_type. More...
 
element_typeoperator-> () noexcept
 Dereference to element_type. More...
 
const element_typeoperator-> () const noexcept
 Dereference to const element_type. More...
 
- Public Member Functions inherited from ome::common::xml::dom::Node
 Node ()
 Construct a NULL Node.
 
 Node (const Node &node)
 Copy construct a Node. More...
 
 Node (xercesc::DOMNode *node, bool managed)
 Construct a Node from a xercesc::DOMNode *. More...
 
 ~Node ()
 Destructor.
 
Node appendChild (Node &node)
 Append a child Node. More...
 
node_type getNodeType ()
 Get the object type of this node. More...
 
NodeList getChildNodes ()
 Get child nodes. More...
 
NamedNodeMap getAttributes ()
 Get node attributes. More...
 
std::string getNodeValue ()
 Get node value. More...
 
std::string getTextContent ()
 Get node text content. More...
 
- Public Member Functions inherited from ome::common::xml::dom::Wrapper< xercesc::DOMNode, Base< xercesc::DOMNode > >
 Wrapper ()
 Constructor.
 
 Wrapper (const base_type &base)
 Copy construct a Wrapper. More...
 
 Wrapper (typename parent_type::base_element_type *base, Deleter del)
 Construct a Wrapper from a base_element_type * (managed). More...
 
 Wrapper (typename parent_type::base_element_type *base)
 Construct a Wrapper from a base_element_type * (unmanaged). More...
 
 ~Wrapper ()
 Destructor.
 
element_typeget ()
 Get wrapped element_type *. More...
 
const element_typeget () const
 Get wrapped element_type *. More...
 
Wrapperoperator= (const Wrapper &wrapped)
 Assign a Wrapper. More...
 
element_typeoperator* () noexcept
 Dereference to element_type. More...
 
const element_typeoperator* () const noexcept
 Dereference to const element_type. More...
 
element_typeoperator-> () noexcept
 Dereference to element_type. More...
 
const element_typeoperator-> () const noexcept
 Dereference to const element_type. More...
 
- Public Member Functions inherited from ome::common::xml::dom::Base< xercesc::DOMNode >
 Base ()
 Constructor.
 
 Base (base_element_type *wrapped, Deleter del)
 Construct with initial wrapped value (managed). More...
 
 Base (base_element_type *wrapped)
 Construct with initial wrapped value (unmanaged). More...
 
virtual ~Base ()
 Destructor.
 
base_element_typeget ()
 Get wrapped base_element_type *. More...
 
const base_element_typeget () const
 Get wrapped base_element_type *. More...
 
 operator bool () const
 Check if the wrapped type is NULL. More...
 
void reset ()
 Free the managed resource. More...
 

Additional Inherited Members

- Public Types inherited from ome::common::xml::dom::Wrapper< xercesc::DOMElement, Node >
typedef Node parent_type
 Parent type.
 
typedef parent_type::base_type base_type
 Base type.
 
typedef parent_type::base_element_type base_element_type
 Base element type.
 
typedef xercesc::DOMElement element_type
 Wrapped Xerces element type.
 
- Public Types inherited from ome::common::xml::dom::Node
typedef xercesc::DOMNode::NodeType node_type
 The derived object type of a node.
 
- Public Types inherited from ome::common::xml::dom::Wrapper< xercesc::DOMNode, Base< xercesc::DOMNode > >
typedef Base< xercesc::DOMNode > parent_type
 Parent type.
 
typedef parent_type::base_type base_type
 Base type.
 
typedef parent_type::base_element_type base_element_type
 Base element type.
 
typedef xercesc::DOMNode element_type
 Wrapped Xerces element type.
 
- Public Types inherited from ome::common::xml::dom::Base< xercesc::DOMNode >
typedef Base base_type
 Base type.
 
typedef xercesc::DOMNode base_element_type
 Base element type (root type of the wrapped type).
 
- Protected Member Functions inherited from ome::common::xml::dom::Wrapper< xercesc::DOMElement, Node >
virtual void assign (const base_type &wrapped)
 Assign a new wrapped value. More...
 
virtual void assign (ome::compat::shared_ptr< base_element_type > &wrapped)
 Assign a new wrapped value. More...
 
- Protected Member Functions inherited from ome::common::xml::dom::Base< xercesc::DOMNode >
virtual void null_check () const
 Check if the wrapped type is NULL. More...
 
D * assign_check (base_element_type *newbase)
 Check that a new wrapped value is of the correct derived type. More...
 

Detailed Description

DOM Element wrapper.

The wrapper behaves as though is the wrapped DOMElement; it can be dereferenced using the "*" or "->" operators to obtain a reference or pointer to the wrapped object. It can also be cast to a pointer to the wrapped object, so can substitute for it directly.

Constructor & Destructor Documentation

ome::common::xml::dom::Element::Element ( const Element element)
inline

Copy construct an Element.

Parameters
elementthe Element to copy.
ome::common::xml::dom::Element::Element ( const Wrapper< xercesc::DOMElement, Node >::base_type base)
inline

Copy construct an Element.

Parameters
basethe base type to copy (must be an Element).
ome::common::xml::dom::Element::Element ( xercesc::DOMElement *  element,
bool  managed 
)
inline

Construct an Element from a xercesc::DOMElement *.

Parameters
elementthe Element to wrap.
managedis the value to be managed?
ome::common::xml::dom::Element::Element ( Wrapper< xercesc::DOMElement, Node >::base_element_type base,
bool  managed 
)
inline

Construct an Element from a xercesc::DOMNode *.

Parameters
basethe DOMNode to wrap.
managedis the value to be managed?

Member Function Documentation

String ome::common::xml::dom::Element::getAttribute ( const std::string &  attr) const
inline

Get the specified attribute value.

Parameters
attrthe attribute to get.
Returns
the attribute value.

Referenced by ome::xml::model::ManufacturerSpec::update(), ome::xml::model::LightSource::update(), ome::xml::model::ChannelRef::update(), ome::xml::model::InstrumentRef::update(), ome::xml::model::WellSampleRef::update(), ome::xml::model::AnnotationRef::update(), ome::xml::model::DatasetRef::update(), ome::xml::model::ExperimenterGroupRef::update(), ome::xml::model::ExperimenterRef::update(), ome::xml::model::MicrobeamManipulationRef::update(), ome::xml::model::ExperimentRef::update(), ome::xml::model::DichroicRef::update(), ome::xml::model::FilterRef::update(), ome::xml::model::PlateRef::update(), ome::xml::model::Polygon::update(), ome::xml::model::FilterSetRef::update(), ome::xml::model::ProjectRef::update(), ome::xml::model::ImageRef::update(), ome::xml::model::ReagentRef::update(), ome::xml::model::ROIRef::update(), ome::xml::model::Arc::update(), ome::xml::model::Microscope::update(), ome::xml::model::Filament::update(), ome::xml::model::Label::update(), ome::xml::model::UUID::update(), ome::xml::model::Point::update(), ome::xml::model::BinaryOnly::update(), ome::xml::model::Leader::update(), ome::xml::model::Pump::update(), ome::xml::model::External::update(), ome::xml::model::Polyline::update(), ome::xml::model::Ellipse::update(), ome::xml::model::StageLabel::update(), ome::xml::model::Rectangle::update(), ome::xml::model::ImagingEnvironment::update(), ome::xml::model::Mask::update(), ome::xml::model::Dichroic::update(), ome::xml::model::ObjectiveSettings::update(), ome::xml::model::AffineTransform::update(), ome::xml::model::TransmittanceRange::update(), ome::xml::model::Line::update(), ome::xml::model::BinaryFile::update(), ome::xml::model::LightSourceSettings::update(), ome::xml::model::BinData::update(), ome::xml::model::Experiment::update(), ome::xml::model::FilterSet::update(), ome::xml::model::TiffData::update(), ome::xml::model::Reagent::update(), ome::xml::model::Detector::update(), ome::xml::model::Project::update(), ome::xml::model::ROI::update(), ome::xml::model::DetectorSettings::update(), ome::xml::model::Dataset::update(), ome::xml::model::Objective::update(), ome::xml::model::MicrobeamManipulation::update(), ome::xml::model::Laser::update(), ome::xml::model::ExperimenterGroup::update(), ome::xml::model::Filter::update(), ome::xml::model::PlateAcquisition::update(), ome::xml::model::WellSample::update(), ome::xml::model::Screen::update(), ome::xml::model::Plane::update(), ome::xml::model::Instrument::update(), ome::xml::model::Well::update(), ome::xml::model::Shape::update(), ome::xml::model::Annotation::update(), ome::xml::model::Experimenter::update(), ome::xml::model::Plate::update(), ome::xml::model::OME::update(), ome::xml::model::Image::update(), ome::xml::model::Channel::update(), and ome::xml::model::Pixels::update().

+ Here is the caller graph for this function:

NodeList ome::common::xml::dom::Element::getElementsByTagName ( const std::string &  name)
inline

Get child elements with a given tag name.

Parameters
namethe element name to use.
Returns
the child nodes (if any).
String ome::common::xml::dom::Element::getTagName ( ) const
inline

Get Element tag name.

Returns
the tag name.

Referenced by ome::xml::model::LightSource::asXMLElementInternal(), ome::xml::model::Shape::asXMLElementInternal(), ome::xml::model::BasicAnnotation::update(), ome::xml::model::Settings::update(), ome::xml::model::TextAnnotation::update(), ome::xml::model::TypeAnnotation::update(), ome::xml::model::NumericAnnotation::update(), ome::xml::model::ManufacturerSpec::update(), ome::xml::model::LightSource::update(), ome::xml::model::MapPairs::update(), ome::xml::model::EmissionFilterRef::update(), ome::xml::model::ExcitationFilterRef::update(), ome::xml::model::LightEmittingDiode::update(), ome::xml::model::MetadataOnly::update(), ome::xml::model::Reference::update(), ome::xml::model::FilterRef::update(), ome::xml::model::PlateRef::update(), ome::xml::model::FilterSetRef::update(), ome::xml::model::Polygon::update(), ome::xml::model::ProjectRef::update(), ome::xml::model::DichroicRef::update(), ome::xml::model::ReagentRef::update(), ome::xml::model::ImageRef::update(), ome::xml::model::ROIRef::update(), ome::xml::model::InstrumentRef::update(), ome::xml::model::ChannelRef::update(), ome::xml::model::AnnotationRef::update(), ome::xml::model::WellSampleRef::update(), ome::xml::model::DatasetRef::update(), ome::xml::model::ExperimenterRef::update(), ome::xml::model::ExperimenterGroupRef::update(), ome::xml::model::ExperimentRef::update(), ome::xml::model::MicrobeamManipulationRef::update(), ome::xml::model::Arc::update(), ome::xml::model::Union::update(), ome::xml::model::ListAnnotation::update(), ome::xml::model::Microscope::update(), ome::xml::model::Filament::update(), ome::xml::model::Point::update(), ome::xml::model::Rights::update(), ome::xml::model::Label::update(), ome::xml::model::UUID::update(), ome::xml::model::BinaryOnly::update(), ome::xml::model::Pump::update(), ome::xml::model::BooleanAnnotation::update(), ome::xml::model::DoubleAnnotation::update(), ome::xml::model::XMLAnnotation::update(), ome::xml::model::Leader::update(), ome::xml::model::TagAnnotation::update(), ome::xml::model::LongAnnotation::update(), ome::xml::model::TermAnnotation::update(), ome::xml::model::CommentAnnotation::update(), ome::xml::model::TimestampAnnotation::update(), ome::xml::model::FileAnnotation::update(), ome::xml::model::Polyline::update(), ome::xml::model::External::update(), ome::xml::model::Ellipse::update(), ome::xml::model::StageLabel::update(), ome::xml::model::LightPath::update(), ome::xml::model::Rectangle::update(), ome::xml::model::ImagingEnvironment::update(), ome::xml::model::Dichroic::update(), ome::xml::model::Mask::update(), ome::xml::model::AffineTransform::update(), ome::xml::model::ObjectiveSettings::update(), ome::xml::model::TransmittanceRange::update(), ome::xml::model::Line::update(), ome::xml::model::BinaryFile::update(), ome::xml::model::BinData::update(), ome::xml::model::LightSourceSettings::update(), ome::xml::model::FilterSet::update(), ome::xml::model::Experiment::update(), ome::xml::model::Reagent::update(), ome::xml::model::TiffData::update(), ome::xml::model::Project::update(), ome::xml::model::Detector::update(), ome::xml::model::ROI::update(), ome::xml::model::DetectorSettings::update(), ome::xml::model::Dataset::update(), ome::xml::model::Objective::update(), ome::xml::model::Laser::update(), ome::xml::model::MicrobeamManipulation::update(), ome::xml::model::PlateAcquisition::update(), ome::xml::model::ExperimenterGroup::update(), ome::xml::model::Filter::update(), ome::xml::model::WellSample::update(), ome::xml::model::Screen::update(), ome::xml::model::Plane::update(), ome::xml::model::Instrument::update(), ome::xml::model::Well::update(), ome::xml::model::StructuredAnnotations::update(), ome::xml::model::Shape::update(), ome::xml::model::Annotation::update(), ome::xml::model::Experimenter::update(), ome::xml::model::Plate::update(), ome::xml::model::OME::update(), ome::xml::model::Image::update(), ome::xml::model::Channel::update(), and ome::xml::model::Pixels::update().

+ Here is the caller graph for this function:

String ome::common::xml::dom::Element::getTextContent ( ) const
inline

Get Element text content.

Returns
the text content.

Referenced by ome::xml::model::UUID::update().

+ Here is the caller graph for this function:

bool ome::common::xml::dom::Element::hasAttribute ( const std::string &  attr) const
inline

Check if the Element has the specified attribute.

Parameters
attrthe attribute to check.
Returns
true if the Element has the attribute, otherwise false.

Referenced by ome::xml::model::ManufacturerSpec::update(), ome::xml::model::LightSource::update(), ome::xml::model::ChannelRef::update(), ome::xml::model::InstrumentRef::update(), ome::xml::model::WellSampleRef::update(), ome::xml::model::AnnotationRef::update(), ome::xml::model::DatasetRef::update(), ome::xml::model::ExperimenterGroupRef::update(), ome::xml::model::ExperimenterRef::update(), ome::xml::model::MicrobeamManipulationRef::update(), ome::xml::model::ExperimentRef::update(), ome::xml::model::DichroicRef::update(), ome::xml::model::FilterRef::update(), ome::xml::model::PlateRef::update(), ome::xml::model::Polygon::update(), ome::xml::model::FilterSetRef::update(), ome::xml::model::ProjectRef::update(), ome::xml::model::ImageRef::update(), ome::xml::model::ReagentRef::update(), ome::xml::model::ROIRef::update(), ome::xml::model::Arc::update(), ome::xml::model::Microscope::update(), ome::xml::model::Filament::update(), ome::xml::model::Label::update(), ome::xml::model::UUID::update(), ome::xml::model::Point::update(), ome::xml::model::BinaryOnly::update(), ome::xml::model::Leader::update(), ome::xml::model::Pump::update(), ome::xml::model::External::update(), ome::xml::model::Polyline::update(), ome::xml::model::Ellipse::update(), ome::xml::model::StageLabel::update(), ome::xml::model::Rectangle::update(), ome::xml::model::ImagingEnvironment::update(), ome::xml::model::Mask::update(), ome::xml::model::Dichroic::update(), ome::xml::model::ObjectiveSettings::update(), ome::xml::model::AffineTransform::update(), ome::xml::model::TransmittanceRange::update(), ome::xml::model::Line::update(), ome::xml::model::BinaryFile::update(), ome::xml::model::LightSourceSettings::update(), ome::xml::model::BinData::update(), ome::xml::model::Experiment::update(), ome::xml::model::FilterSet::update(), ome::xml::model::TiffData::update(), ome::xml::model::Reagent::update(), ome::xml::model::Detector::update(), ome::xml::model::Project::update(), ome::xml::model::ROI::update(), ome::xml::model::DetectorSettings::update(), ome::xml::model::Dataset::update(), ome::xml::model::Objective::update(), ome::xml::model::MicrobeamManipulation::update(), ome::xml::model::Laser::update(), ome::xml::model::ExperimenterGroup::update(), ome::xml::model::Filter::update(), ome::xml::model::PlateAcquisition::update(), ome::xml::model::WellSample::update(), ome::xml::model::Screen::update(), ome::xml::model::Plane::update(), ome::xml::model::Instrument::update(), ome::xml::model::Well::update(), ome::xml::model::Shape::update(), ome::xml::model::Annotation::update(), ome::xml::model::Experimenter::update(), ome::xml::model::Plate::update(), ome::xml::model::OME::update(), ome::xml::model::Image::update(), ome::xml::model::Channel::update(), and ome::xml::model::Pixels::update().

+ Here is the caller graph for this function:

void ome::common::xml::dom::Element::setAttribute ( const std::string &  attr,
const std::string &  val 
)
inline

Set the specified attribute value.

Parameters
attrthe attribute to set.
valthe value to set.

Referenced by ome::xml::model::MapPairs::asXMLElementInternal(), ome::xml::model::AnnotationRef::asXMLElementInternal(), ome::xml::model::ChannelRef::asXMLElementInternal(), ome::xml::model::InstrumentRef::asXMLElementInternal(), ome::xml::model::WellSampleRef::asXMLElementInternal(), ome::xml::model::DatasetRef::asXMLElementInternal(), ome::xml::model::ExperimenterGroupRef::asXMLElementInternal(), ome::xml::model::ExperimenterRef::asXMLElementInternal(), ome::xml::model::MicrobeamManipulationRef::asXMLElementInternal(), ome::xml::model::ExperimentRef::asXMLElementInternal(), ome::xml::model::DichroicRef::asXMLElementInternal(), ome::xml::model::FilterRef::asXMLElementInternal(), ome::xml::model::PlateRef::asXMLElementInternal(), ome::xml::model::FilterSetRef::asXMLElementInternal(), ome::xml::model::ProjectRef::asXMLElementInternal(), ome::xml::model::ImageRef::asXMLElementInternal(), ome::xml::model::ReagentRef::asXMLElementInternal(), ome::xml::model::ROIRef::asXMLElementInternal(), ome::xml::model::Polygon::asXMLElementInternal(), ome::xml::model::Microscope::asXMLElementInternal(), ome::xml::model::Arc::asXMLElementInternal(), ome::xml::model::Filament::asXMLElementInternal(), ome::xml::model::BinaryOnly::asXMLElementInternal(), ome::xml::model::Label::asXMLElementInternal(), ome::xml::model::Point::asXMLElementInternal(), ome::xml::model::UUID::asXMLElementInternal(), ome::xml::model::LightSource::asXMLElementInternal(), ome::xml::model::External::asXMLElementInternal(), ome::xml::model::Polyline::asXMLElementInternal(), ome::xml::model::Ellipse::asXMLElementInternal(), ome::xml::model::Rectangle::asXMLElementInternal(), ome::xml::model::ManufacturerSpec::asXMLElementInternal(), ome::xml::model::Leader::asXMLElementInternal(), ome::xml::model::Pump::asXMLElementInternal(), ome::xml::model::StageLabel::asXMLElementInternal(), ome::xml::model::ImagingEnvironment::asXMLElementInternal(), ome::xml::model::AffineTransform::asXMLElementInternal(), ome::xml::model::BinaryFile::asXMLElementInternal(), ome::xml::model::BinData::asXMLElementInternal(), ome::xml::model::ObjectiveSettings::asXMLElementInternal(), ome::xml::model::LightSourceSettings::asXMLElementInternal(), ome::xml::model::Line::asXMLElementInternal(), ome::xml::model::TransmittanceRange::asXMLElementInternal(), ome::xml::model::Mask::asXMLElementInternal(), ome::xml::model::TiffData::asXMLElementInternal(), ome::xml::model::Dichroic::asXMLElementInternal(), ome::xml::model::Detector::asXMLElementInternal(), ome::xml::model::Objective::asXMLElementInternal(), ome::xml::model::DetectorSettings::asXMLElementInternal(), ome::xml::model::Laser::asXMLElementInternal(), ome::xml::model::Experiment::asXMLElementInternal(), ome::xml::model::Reagent::asXMLElementInternal(), ome::xml::model::Project::asXMLElementInternal(), ome::xml::model::FilterSet::asXMLElementInternal(), ome::xml::model::Plane::asXMLElementInternal(), ome::xml::model::PlateAcquisition::asXMLElementInternal(), ome::xml::model::WellSample::asXMLElementInternal(), ome::xml::model::ROI::asXMLElementInternal(), ome::xml::model::MicrobeamManipulation::asXMLElementInternal(), ome::xml::model::Dataset::asXMLElementInternal(), ome::xml::model::Well::asXMLElementInternal(), ome::xml::model::Filter::asXMLElementInternal(), ome::xml::model::Screen::asXMLElementInternal(), ome::xml::model::Shape::asXMLElementInternal(), ome::xml::model::ExperimenterGroup::asXMLElementInternal(), ome::xml::model::Channel::asXMLElementInternal(), ome::xml::model::Instrument::asXMLElementInternal(), ome::xml::model::Plate::asXMLElementInternal(), ome::xml::model::Experimenter::asXMLElementInternal(), ome::xml::model::Image::asXMLElementInternal(), ome::xml::model::Pixels::asXMLElementInternal(), ome::xml::model::OME::asXMLElementInternal(), and ome::xml::model::Annotation::asXMLElementInternal().

+ Here is the caller graph for this function:

void ome::common::xml::dom::Element::setTextContent ( const std::string &  val)
inline

Set Element text content.

Parameters
valthe text content to set.

Referenced by ome::xml::model::MapPairs::asXMLElementInternal(), ome::xml::model::UUID::asXMLElementInternal(), and ome::xml::model::OriginalMetadataAnnotation::setMetadata().

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: