SourceForge.net Logo
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PmtXmlAccessor Class Reference

Provides access to metadata stored as XML in text files. More...

#include <PmtXmlAccessor.h>

Inheritance diagram for PmtXmlAccessor:

[legend]
Collaboration diagram for PmtXmlAccessor:
[legend]
List of all members.

Public Methods

 PmtXmlAccessor ()
 Default constructor. More...

virtual ~PmtXmlAccessor ()
 destructor. More...

virtual bool open (const char *name, PmtOpenMode mode=PMT_READONLY)
 Opens a XML text file for reading / writing (depending on the mode). More...

virtual PmtMetadataPtr readMetadata (const SPmtString &nsURI="")
 Read all existing metadata and return a root metadata. More...

virtual PmtMetadataPtr readMetadata (PmtMetadataPtr &md)
 Read the specified metadata from the storage format. More...

virtual void writeMetadata (const PmtMetadataPtr &md, bool bWriteValid=false)
virtual void close ()
 Close the file. More...

virtual PmtAccessorPtr clone () const
 This method returns a copy of the accessor. More...

bool setNSPrefix (const SPmtString &nsPrefix)

Protected Methods

virtual bool recognize (const SPmtString &name) const
 Used by the getAccessor() method to determine the file type. More...

virtual void getMdValue (PmtMetadataPtr &md)
virtual void setMdValue (const PmtMetadataPtr &md)

Protected Attributes

PmtLogicalInstanceInterpreter interpreter

Detailed Description

Provides access to metadata stored as XML in text files.

One should never have to include this header file, nor use this interface directly. All access to this class' functionality should be through the PmtAccessor base class interface.


Constructor & Destructor Documentation

PmtXmlAccessor::PmtXmlAccessor   [inline]
 

Default constructor.

virtual PmtXmlAccessor::~PmtXmlAccessor   [virtual]
 

destructor.


Member Function Documentation

virtual PmtAccessorPtr PmtXmlAccessor::clone   const [inline, virtual]
 

This method returns a copy of the accessor.

Implements PmtAccessor.

void PmtXmlAccessor::close   [virtual]
 

Close the file.

This is a pure virtual function that is to be implemented by the derived classes.

Reimplemented from PmtAccessor.

virtual void PmtXmlAccessor::getMdValue PmtMetadataPtr   md [inline, protected, virtual]
 

Implements PmtAccessor.

bool PmtXmlAccessor::open const char *    name,
PmtOpenMode    mode = PMT_READONLY
[virtual]
 

Opens a XML text file for reading / writing (depending on the mode).

Implements PmtAccessor.

PmtMetadataPtr PmtXmlAccessor::readMetadata PmtMetadataPtr   md [virtual]
 

Read the specified metadata from the storage format.

Reimplemented from PmtAccessor.

PmtMetadataPtr PmtXmlAccessor::readMetadata const SPmtString   nsURI = "" [virtual]
 

Read all existing metadata and return a root metadata.

Reimplemented from PmtAccessor.

bool PmtXmlAccessor::recognize const SPmtString   name const [protected, virtual]
 

Used by the getAccessor() method to determine the file type.

The derived accessor classes that want to be created from the getAccessor() method should provide an implementation for this method.

Implements PmtAccessor.

virtual void PmtXmlAccessor::setMdValue const PmtMetadataPtr   md [inline, protected, virtual]
 

Implements PmtAccessor.

bool PmtXmlAccessor::setNSPrefix const SPmtString   nsPrefix
 

void PmtXmlAccessor::writeMetadata const PmtMetadataPtr   md,
bool    bWriteValid = false
[virtual]
 

Request the accessor to write the given metadata to the storage media.

The argument is a pointer to an instance of either an PmtMetadata (for a single metadata item) or an PmtCompositeMetadata (for multiple metadata items). If throwErrors() is set to false and an error occurs, one of two things will happen. First, if the write is for a single metadata, then the write will just be aborted. Second, if the write is for a composite, then the write of the current metadatum is aborted and the writing of the composite contiues with the next element. If throwErrors() is set to true, then the write operation is always aborted by throwing the error. If bWriteValid is false then only the given metadata (including its childern) will be written; otherwise, the whole metadata tree starting from the out-most parent will be written.

Reimplemented from PmtAccessor.


Member Data Documentation

PmtLogicalInstanceInterpreter PmtXmlAccessor::interpreter [protected]
 


The documentation for this class was generated from the following files:
Last Updated: March 12, 2003 (rlr)
Copyright © 2003 Eastman Kodak Company All Rights Reserved.