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

DOM Document wrapper. More...

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

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

Public Member Functions

 Document ()
 Construct a NULL Document.
 
 Document (const Document &document)
 Copy construct a Document. More...
 
 Document (const Wrapper< xercesc::DOMDocument, Node >::base_type &base)
 Copy construct a Document. More...
 
 Document (Wrapper< xercesc::DOMDocument, Node >::element_type *document, bool managed)
 Construct a Document from a xercesc::DOMDocument *. More...
 
 Document (Wrapper< xercesc::DOMDocument, Node >::base_element_type *base, bool managed)
 Construct a Document from a xercesc::DOMNode *. More...
 
 ~Document ()
 Destructor.
 
Documentoperator= (const Document &wrapped)
 Assign a Document. More...
 
Element createElementNS (const std::string &ns, const std::string &name)
 Create Element with namespace. More...
 
Node createComment (const std::string &comment)
 Create Comment. More...
 
Element createElement (const std::string &name)
 Create Element without namespace. More...
 
Element getDocumentElement ()
 Get the root element of this document. More...
 
NodeList getElementsByTagName (const std::string &name)
 Get child elements with a given tag name. More...
 
- Public Member Functions inherited from ome::common::xml::dom::Wrapper< xercesc::DOMDocument, 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::DOMDocument, 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::DOMDocument 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::DOMDocument, 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 Document wrapper.

The wrapper behaves as though is the wrapped DOMDocument; 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::Document::Document ( const Document document)
inline

Copy construct a Document.

Parameters
documentthe Document to copy.
ome::common::xml::dom::Document::Document ( const Wrapper< xercesc::DOMDocument, Node >::base_type base)
inline

Copy construct a Document.

Parameters
basethe base type to copy (must be a Document).
ome::common::xml::dom::Document::Document ( Wrapper< xercesc::DOMDocument, Node >::element_type document,
bool  managed 
)
inline

Construct a Document from a xercesc::DOMDocument *.

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

Construct a Document from a xercesc::DOMNode *.

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

Member Function Documentation

Node ome::common::xml::dom::Document::createComment ( const std::string &  comment)
inline

Create Comment.

Parameters
commentthe comment text.
Returns
the created Node.

References ome::common::xml::dom::Node::Node().

Referenced by ome::xml::meta::OMEXMLMetadata::dumpXML().

+ Here is the caller graph for this function:

Element ome::common::xml::dom::Document::createElement ( const std::string &  name)
inline

Create Element without namespace.

Parameters
namethe element name.
Returns
the created Element.

Referenced by ome::xml::model::OriginalMetadataAnnotation::setMetadata().

+ Here is the caller graph for this function:

Element ome::common::xml::dom::Document::createElementNS ( const std::string &  ns,
const std::string &  name 
)
inline

Create Element with namespace.

Parameters
nsthe namespace.
namethe element name.
Returns
the created Element.

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

+ Here is the caller graph for this function:

Element ome::common::xml::dom::Document::getDocumentElement ( )
inline

Get the root element of this document.

Returns
the root element.

Referenced by ome::xml::model::OME::asXMLElement(), ome::xml::model::XMLAnnotation::asXMLElementInternal(), ome::bioformats::createOMEXMLMetadata(), ome::xml::meta::OMEXMLMetadata::dumpXML(), ome::bioformats::getModelVersion(), ome::bioformats::getOriginalMetadata(), ome::common::xml::EntityResolver::registerCatalog(), and ome::xml::model::OriginalMetadataAnnotation::setMetadata().

+ Here is the caller graph for this function:

NodeList ome::common::xml::dom::Document::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).

Referenced by ome::bioformats::getModulo().

+ Here is the caller graph for this function:

Document& ome::common::xml::dom::Document::operator= ( const Document wrapped)
inline

Assign a Document.

Parameters
wrappedthe Document to assign.
Returns
the Document.

References ome::common::xml::dom::Wrapper< WrappedType, Parent >::operator=().


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