Metadata Class Reference

Holds data relating to a single partition. More...

#include <metadata.h>

Inheritance diagram for Metadata:

ObjectInterface RefCount IRefCount List of all members.

Public Member Functions

 Metadata ()
 Construct a basic Metadata object with current timestamp.
 Metadata (std::string TimeStamp)
 Construct a basic Metadata object with specified timestamp.
void Init (void)
 Common part of constructor.
void SetTime (void)
void SetTime (std::string TimeStamp)
void AddDMScheme (ULPtr Scheme)
 Add a DMScheme to the listed schemes.
void AddEssenceType (ULPtr ECType)
 Add an essence type UL to the listed essence types.
void AddEssenceType (const UL &ECType)
 Add an essence type UL to the listed essence types.
void SetOP (const UL &OP)
 Set the operational pattern property of the preface.
void SetOP (ULPtr OP)
 Set the operational pattern property of the preface.
PackagePtr AddMaterialPackage (UMIDPtr PackageUMID)
PackagePtr AddMaterialPackage (std::string PackageName="", UMIDPtr PackageUMID=NULL)
PackagePtr AddFilePackage (UInt32 BodySID, UMIDPtr PackageUMID)
PackagePtr AddFilePackage (UInt32 BodySID, std::string PackageName="", UMIDPtr PackageUMID=NULL)
PackagePtr AddSourcePackage (UInt32 BodySID, UMIDPtr PackageUMID)
PackagePtr AddSourcePackage (UInt32 BodySID, std::string PackageName="", UMIDPtr PackageUMID=NULL)
bool AddEssenceContainerData (UMIDPtr TheUMID, UInt32 BodySID, UInt32 IndexSID=0)
 Add an entry into the essence container data set for a given essence stream.
void SetPrimaryPackage (PackagePtr Package)
 Set the primary package property of the preface.
void SetPrimaryPackage (MDObjectPtr Package)
 Set the primary package property of the preface.
PackagePtr GetPrimaryPackage (void)
 Get a pointer to the primary package.
bool UpdateGenerations (MDObjectPtr Ident, std::string UpdateTime="")
 Update the Generation UID of all modified sets and add the specified Ident set.

Static Public Member Functions

static MetadataPtr GetMetadata (MDObjectPtr Object)
 Return the containing "Metadata" object for this MDObject.
static MetadataPtr Parse (MDObjectPtr BaseObject)
 Parse an existing MDObject into a Metadata object.

Public Attributes

PackageList Packages
 Each package in this metadata.

Protected Member Functions

 Metadata (MDObjectPtr BaseObject)
 Protected constructor used to create from an existing MDObject.

Protected Attributes

std::string ModificationTime
 Creation or modification time for this metadata, used for package times.

Private Member Functions

PackagePtr AddPackage (const UL &PackageType, std::string PackageName, UMIDPtr PackageUMID, UInt32 BidySID=0)
 Add a package of the specified type to the matadata.
bool UpdateGenerations_Internal (MDObjectPtr Obj, UUIDPtr ThisGeneration)
 Update the Generation UID of a set if modified - then iterate through strongly linked sets.
void ClearModified_Internal (MDObjectPtr Obj)
 Clear all modified flags for this set and strongly linked sets - used when adding initial Identification set.

Detailed Description

Holds data relating to a single partition.


Constructor & Destructor Documentation

Metadata ( MDObjectPtr  BaseObject  )  [inline, protected]

Protected constructor used to create from an existing MDObject.

Metadata (  ) 

Construct a basic Metadata object with current timestamp.

Metadata ( std::string  TimeStamp  ) 

Construct a basic Metadata object with specified timestamp.


Member Function Documentation

void Init ( void   ) 

Common part of constructor.

void SetTime ( void   )  [inline]

void SetTime ( std::string  TimeStamp  )  [inline]

void AddDMScheme ( ULPtr  Scheme  )  [inline]

Add a DMScheme to the listed schemes.

void AddEssenceType ( ULPtr  ECType  )  [inline]

Add an essence type UL to the listed essence types.

Only added if it does not already appear in the list

void AddEssenceType ( const UL ECType  )  [inline]

Add an essence type UL to the listed essence types.

Only added if it does not already appear in the list

void SetOP ( const UL OP  )  [inline]

Set the operational pattern property of the preface.

void SetOP ( ULPtr  OP  )  [inline]

Set the operational pattern property of the preface.

PackagePtr AddMaterialPackage ( UMIDPtr  PackageUMID  )  [inline]

PackagePtr AddMaterialPackage ( std::string  PackageName = "",
UMIDPtr  PackageUMID = NULL 
) [inline]

PackagePtr AddFilePackage ( UInt32  BodySID,
UMIDPtr  PackageUMID 
) [inline]

PackagePtr AddFilePackage ( UInt32  BodySID,
std::string  PackageName = "",
UMIDPtr  PackageUMID = NULL 
) [inline]

PackagePtr AddSourcePackage ( UInt32  BodySID,
UMIDPtr  PackageUMID 
) [inline]

PackagePtr AddSourcePackage ( UInt32  BodySID,
std::string  PackageName = "",
UMIDPtr  PackageUMID = NULL 
) [inline]

bool AddEssenceContainerData ( UMIDPtr  TheUMID,
UInt32  BodySID,
UInt32  IndexSID = 0 
)

Add an entry into the essence container data set for a given essence stream.

void SetPrimaryPackage ( PackagePtr  Package  )  [inline]

Set the primary package property of the preface.

void SetPrimaryPackage ( MDObjectPtr  Package  )  [inline]

Set the primary package property of the preface.

PackagePtr GetPrimaryPackage ( void   ) 

Get a pointer to the primary package.

bool UpdateGenerations ( MDObjectPtr  Ident,
std::string  UpdateTime = "" 
)

Update the Generation UID of all modified sets and add the specified Ident set.

Returns:
true if one or more sets updated, false if none updated (and hence Ident not added)
Note:
The preface does not get modified simply to add the new identification set

The identification set added to the file is a copy of Ident

If the identification set has no ModificationDate property it is set to UpdateTime (if specified) else the packages ModificationTime

MetadataPtr GetMetadata ( MDObjectPtr  Object  )  [static]

Return the containing "Metadata" object for this MDObject.

Returns:
NULL if MDObject is not contained in a Metadata object

MetadataPtr Parse ( MDObjectPtr  BaseObject  )  [static]

Parse an existing MDObject into a Metadata object.

PackagePtr AddPackage ( const UL PackageType,
std::string  PackageName,
UMIDPtr  PackageUMID,
UInt32  BidySID = 0 
) [private]

Add a package of the specified type to the matadata.

bool UpdateGenerations_Internal ( MDObjectPtr  Obj,
UUIDPtr  ThisGeneration 
) [private]

Update the Generation UID of a set if modified - then iterate through strongly linked sets.

Returns:
true if any of the sets have been modified, else false
Note:
true is returned even if a set has been modified but doesn't support GenerationUID this will force an Identification set to be added to show something was updated

void ClearModified_Internal ( MDObjectPtr  Obj  )  [private]

Clear all modified flags for this set and strongly linked sets - used when adding initial Identification set.


Member Data Documentation

PackageList Packages

Each package in this metadata.

std::string ModificationTime [protected]

Creation or modification time for this metadata, used for package times.


The documentation for this class was generated from the following files:
Generated on Mon Apr 2 15:21:01 2007 for MXFLib by  doxygen 1.5.1-p1