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

PmtMetadata Class Reference

PmtMetadata is the base class for all potental metadata specializations. More...

#include <PmtMetadata.h>

Inheritance diagram for PmtMetadata:

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

Public Methods

 PmtMetadata ()
 This is the default constructor. More...

 PmtMetadata (const PmtKeyType &mdKey, const SPmtString &_type, const SPmtString &trueType)
 Constructor ... the class is abstract so these are protected. More...

 PmtMetadata (const PmtKeyType &mdKey, const SPmtString &_type, const SPmtString &trueType, const SPmtString &nillable)
 Constructor ... the class is abstract so these are protected. More...

 PmtMetadata (const PmtMetadata &orig)
 Copy Constructor ... don't copy parent. More...

 PmtMetadata (const PmtMetadata &orig, PmtCompositeMetadata *theParent)
 Copy Constructor. More...

virtual ~PmtMetadata ()
 Base class virtual destructor, does nothing. More...

PmtMetadata & operator= (const PmtMetadata &orig)
 This is an assignment operator. More...

const PmtKeyType key (bool includeOccurrence=true) const
 Returns the metadata's key. More...

const PmtKeyType fullKey (bool includeOccurrence=true) const
 Returns the metadata's fully qualified key. More...

const unsigned int & occurrence () const
const PmtKeyType & type () const
 Returns the metadata's value type as specified in the MDL file. More...

const SPmtString & trueType () const
 Returns the string representation of the C++ type (double, int, etc.). More...

virtual const SPmtString & getNameSpace (void) const
const PmtCompositeMetadata * parent () const
 Return a pointer to the parent composite metadata. More...

virtual PmtMetadataFactory * getMdFactory () const
virtual PmtAttrFactory * getAttrFactory () const
virtual PmtAttributePtr getAttribute (PmtKeyType name, bool createIfNotExists=true)
 Get the metadata attribute with the attribute name. More...

virtual void setAttribute (PmtKeyType name, PmtAttributePtr pmtAttrPtr)
 set the attribute value, if not already there in the attribute map. More...

virtual const PmtAttributeMap getAttributes (bool createIfNotExists=true)
 Get the metadata attributes. More...

virtual void deleteAttribute (PmtKeyType name)
 Delete the specified attribute. More...

virtual void deleteAllAttributes (void)
 Delete all attribute. More...

virtual PmtMetadataPtr getMetadatum (const PmtKeyType &key, bool createMetadataIfNotExists=true)
 Get a handle to a single metadatum instance with the given key. More...

virtual PmtMetadataIterator getMetadata (const PmtKeyType &key, bool createMetadataIfNotExists=true, const PmtEntryTypeEnum entryToSearch=PMT_ALL_KEYS)
 Get a PmtIterator instance referencing the requested metadata. More...

virtual PmtMetadataIterator getMetadata (const PmtKeyList &keyList, bool createMetadataIfNotExists=true, const PmtEntryTypeEnum entryToSearch=PMT_ALL_KEYS)
 Get a PmtIterator instance referencing the requested metadata. More...

virtual void deleteMetadata (const PmtKeyType &key, const PmtEntryTypeEnum entryToSearch=PMT_ALL_KEYS)
 Delete the metadata instances with the keys comprising the alias. More...

virtual void deleteMetadata (const PmtKeyList &keyList, const PmtEntryTypeEnum entryToSearch=PMT_ALL_KEYS)
 Delete the metadata instances with the keys comprising the list. More...

virtual EkString getValueStr () const
 This method returns the value of the metadata. More...

virtual void setValueStr (const EkString &valStr)
 This method sets the value of the metadata. More...

virtual PmtMetadata * clone (void) const=0
 return: A "deep" copy of the object. More...

virtual PmtMetadataPtr clone (PmtCompositeMetadata *parent) const=0
 This method clones a PMTMetadataPtr. More...

virtual ostream & print (ostream &c=cout, bool bFullKey=false) const
 DEPRECIATED METHOD - Write metadata variables to a stream. More...

virtual bool isComposite () const
 Returns true if the current class is a composite. More...

virtual void accept (PmtMetadataVisitor *)
 Support for visitor pattern. More...

virtual void accept (PmtMdVisitorImpl *)
virtual void show (bool showObjectMemoryPointers=false, int level=0, bool showModelGroups=false)
virtual bool validate () const
virtual PmtRootMetadata * getRootMetadata (void) const
void setParent (const PmtCompositeMetadata *p)
 This method sets the parent. More...

unsigned int & occurrence ()
bool & multipleOccurrence ()
virtual void addFacet (const PmtKeyType &facetName, const vector< SPmtString > &value, bool fixed)
const SPmtString & getNillable ()
virtual bool isChanged ()
virtual ostream & printDerived (ostream &c) const=0
 DEPRECIATED - Write derived class values. More...


Static Public Methods

PmtMetadataFactory * getFactory (const SPmtString &nameSpace)
PmtMetadataFactories & getFactories (void)
PmtAliases & getAliases (void)
 Get a handle to the currently available aliases. More...

PmtMetadataPtr create (const SPmtString &nameSpace="")
 This method creates a PmtMetadataPtr. More...


Protected Methods

void showAttr (int level) const
void setNillable (const SPmtString &nillable)

Static Protected Methods

void getKeyList (const PmtKeyType &key, PmtKeyList &returnKeyList)
 This method gets a list of keys. More...


Protected Attributes

const PmtCompositeMetadata * mParent
PmtKeyType mMetadataKey
SPmtString mType
SPmtString mTrueType
SPmtString mNillable
bool mIsChanged
PmtAttributeMap mAttributeMap

Detailed Description

PmtMetadata is the base class for all potental metadata specializations.

PmtMetadata is the base metadata representation class. The common metadata functionality is contained in this class. A metadata object primarily contains two pieces of information: a key and a value.

The metadata key is an ASCII, case sensitive character string that provides unique identification of the metadata. When instantiating a metadata object, an application may choose a metadata key that is defined in the PmtDefaultDefinitions.xsd file int the DefaultDefintions directory.

The metadata value is stored in a derived metadata class (PmtMetadataT), but may be accessed from the base class (with some limitations).


Constructor & Destructor Documentation

PmtMetadata::PmtMetadata (    )  [inline]
 

This is the default constructor.

PmtMetadata::PmtMetadata (  const PmtKeyType &    mdKey,
const SPmtString &    _type,
const SPmtString &    trueType
)  [inline]
 

Constructor ... the class is abstract so these are protected.

PmtMetadata::PmtMetadata (  const PmtKeyType &    mdKey,
const SPmtString &    _type,
const SPmtString &    trueType,
const SPmtString &    nillable
)  [inline]
 

Constructor ... the class is abstract so these are protected.

PmtMetadata::PmtMetadata (  const PmtMetadata &    orig )  [inline]
 

Copy Constructor ... don't copy parent.

PmtMetadata::PmtMetadata (  const PmtMetadata &    orig,
PmtCompositeMetadata *    theParent
)  [inline]
 

Copy Constructor.

virtual PmtMetadata::~PmtMetadata (    )  [inline, virtual]
 

Base class virtual destructor, does nothing.


Member Function Documentation

virtual void PmtMetadata::accept (  PmtMdVisitorImpl *    )  [inline, virtual]
 

Reimplemented in PmtCompositeMetadata.

virtual void PmtMetadata::accept (  PmtMetadataVisitor *    )  [inline, virtual]
 

Support for visitor pattern.

Reimplemented in PmtCompositeMetadata.

virtual void PmtMetadata::addFacet (  const PmtKeyType &    facetName,
const vector< SPmtString > &    value,
bool    fixed
)  [inline, virtual]
 

Reimplemented in PmtMetadataT.

virtual PmtMetadataPtr PmtMetadata::clone (  PmtCompositeMetadata *    parent )  const [pure virtual]
 

This method clones a PMTMetadataPtr.

Implemented in PmtCompositeMetadata.

virtual PmtMetadata* PmtMetadata::clone (  void    )  const [pure virtual]
 

return: A "deep" copy of the object.

Implemented in PmtCompositeMetadata.

PmtMetadataPtr PmtMetadata::create (  const SPmtString &    nameSpace = "" )  [static]
 

This method creates a PmtMetadataPtr.

virtual void PmtMetadata::deleteAllAttributes (  void    )  [inline, virtual]
 

Delete all attribute.

virtual void PmtMetadata::deleteAttribute (  PmtKeyType    name )  [inline, virtual]
 

Delete the specified attribute.

virtual void PmtMetadata::deleteMetadata (  const PmtKeyList &    keyList,
const PmtEntryTypeEnum    entryToSearch = PMT_ALL_KEYS
)  [inline, virtual]
 

Delete the metadata instances with the keys comprising the list.

Reimplemented in PmtCompositeMetadata.

virtual void PmtMetadata::deleteMetadata (  const PmtKeyType &    key,
const PmtEntryTypeEnum    entryToSearch = PMT_ALL_KEYS
)  [inline, virtual]
 

Delete the metadata instances with the keys comprising the alias.

Reimplemented in PmtCompositeMetadata.

const PmtKeyType PmtMetadata::fullKey (  bool    includeOccurrence = true )  const
 

Returns the metadata's fully qualified key.

PmtAliases & PmtMetadata::getAliases (  void    )  [static]
 

Get a handle to the currently available aliases.

PmtAttrFactory * PmtMetadata::getAttrFactory (    )  const [virtual]
 

Reimplemented in PmtRootMetadata.

PmtAttributePtr PmtMetadata::getAttribute (  PmtKeyType    name,
bool    createIfNotExists = true
)  [virtual]
 

Get the metadata attribute with the attribute name.

const PmtAttributeMap PmtMetadata::getAttributes (  bool    createIfNotExists = true )  [virtual]
 

Get the metadata attributes.

PmtMetadataFactories & PmtMetadata::getFactories (  void    )  [static]
 

PmtMetadataFactory * PmtMetadata::getFactory (  const SPmtString &    nameSpace )  [static]
 

void PmtMetadata::getKeyList (  const PmtKeyType &    key,
PmtKeyList &    returnKeyList
)  [static, protected]
 

This method gets a list of keys.

PmtMetadataFactory * PmtMetadata::getMdFactory (    )  const [virtual]
 

Reimplemented in PmtRootMetadata.

virtual PmtMetadataIterator PmtMetadata::getMetadata (  const PmtKeyList &    keyList,
bool    createMetadataIfNotExists = true,
const PmtEntryTypeEnum    entryToSearch = PMT_ALL_KEYS
)  [inline, virtual]
 

Get a PmtIterator instance referencing the requested metadata.

The base class implementation just returns an empty iterator. The PmtCompositeMetadata class provides the real implementation.

Reimplemented in PmtCompositeMetadata.

virtual PmtMetadataIterator PmtMetadata::getMetadata (  const PmtKeyType &    key,
bool    createMetadataIfNotExists = true,
const PmtEntryTypeEnum    entryToSearch = PMT_ALL_KEYS
)  [inline, virtual]
 

Get a PmtIterator instance referencing the requested metadata.

The base class implementation just returns an empty iterator. The PmtCompositeMetadata class provides the real implementation.

Reimplemented in PmtCompositeMetadata.

virtual PmtMetadataPtr PmtMetadata::getMetadatum (  const PmtKeyType &    key,
bool    createMetadataIfNotExists = true
)  [inline, virtual]
 

Get a handle to a single metadatum instance with the given key.

The base class implementation just returns a NULL. The PmtCompositeMetadata class provides the real implementation.

Reimplemented in PmtCompositeMetadata.

const SPmtString & PmtMetadata::getNameSpace (  void    )  const [virtual]
 

Reimplemented in PmtRootMetadata.

const SPmtString& PmtMetadata::getNillable (    )  [inline]
 

PmtRootMetadata * PmtMetadata::getRootMetadata (  void    )  const [virtual]
 

virtual EkString PmtMetadata::getValueStr (    )  const [inline, virtual]
 

This method returns the value of the metadata.

Reimplemented in PmtMetadataT.

virtual bool PmtMetadata::isChanged (    )  [inline, virtual]
 

virtual bool PmtMetadata::isComposite (    )  const [inline, virtual]
 

Returns true if the current class is a composite.

Reimplemented in PmtCompositeMetadata.

const PmtKeyType PmtMetadata::key (  bool    includeOccurrence = true )  const
 

Returns the metadata's key.

bool& PmtMetadata::multipleOccurrence (    )  [inline]
 

unsigned int& PmtMetadata::occurrence (    )  [inline]
 

const unsigned int& PmtMetadata::occurrence (    )  const [inline]
 

PmtMetadata & PmtMetadata::operator= (  const PmtMetadata &    orig ) 
 

This is an assignment operator.

const PmtCompositeMetadata* PmtMetadata::parent (    )  const [inline]
 

Return a pointer to the parent composite metadata.

ostream & PmtMetadata::print (  ostream &    c = cout,
bool    bFullKey = false
)  const [virtual]
 

DEPRECIATED METHOD - Write metadata variables to a stream.

virtual ostream& PmtMetadata::printDerived (  ostream &    c )  const [pure virtual]
 

DEPRECIATED - Write derived class values.

Implemented in PmtCompositeMetadata.

void PmtMetadata::setAttribute (  PmtKeyType    name,
PmtAttributePtr    pmtAttrPtr
)  [virtual]
 

set the attribute value, if not already there in the attribute map.

void PmtMetadata::setNillable (  const SPmtString &    nillable )  [inline, protected]
 

void PmtMetadata::setParent (  const PmtCompositeMetadata *    p )  [inline]
 

This method sets the parent.

virtual void PmtMetadata::setValueStr (  const EkString &    valStr )  [inline, virtual]
 

This method sets the value of the metadata.

Reimplemented in PmtMetadataT.

virtual void PmtMetadata::show (  bool    showObjectMemoryPointers = false,
int    level = 0,
bool    showModelGroups = false
)  [inline, virtual]
 

Reimplemented in PmtCompositeMetadata.

void PmtMetadata::showAttr (  int    level )  const [protected]
 

const SPmtString& PmtMetadata::trueType (    )  const [inline]
 

Returns the string representation of the C++ type (double, int, etc.).

const PmtKeyType& PmtMetadata::type (    )  const [inline]
 

Returns the metadata's value type as specified in the MDL file.

virtual bool PmtMetadata::validate (    )  const [inline, virtual]
 

Reimplemented in PmtMetadataT.


Member Data Documentation

PmtAttributeMap PmtMetadata::mAttributeMap [protected]
 

bool PmtMetadata::mIsChanged [protected]
 

PmtKeyType PmtMetadata::mMetadataKey [protected]
 

SPmtString PmtMetadata::mNillable [protected]
 

const PmtCompositeMetadata* PmtMetadata::mParent [protected]
 

SPmtString PmtMetadata::mTrueType [protected]
 

SPmtString PmtMetadata::mType [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.