MetaFile Object Reference
This object represents the physical metadata file and is used to
load and save the metadata from and to the file system. It also
publishes the MetaJob object, which is the root node of the metadata
structure.
Empty metadata objects can be created
using CreateObject("MetadataLib.MetaFile")
in any script
program, even outside of Watch, or the {145E89F9-C2DF-4604-821A-9BD6C4B468DA}
CLSID with CoCreateInstance
. The file name of the current
job's metadata can be obtained with the IWatchJob::MetadataFilename
method when developing a plugin or with Watch.GetMetadataFilename
when using the Script task in PlanetPress Watch.
Methods
|
MetaJob |
Job
() |
|
Returns the Job node, which is the root of
the metadata structure.
|
|
LoadFromFile
(const String Filename) |
|
Loads a metadata file from the file
system.
|
|
SaveToFile
(const String Filename) |
|
Saves a metadata file to the file system.
|
|
Export (const String
Filename; TExportFormat Format) |
|
Exports the metadata in a non-native
format.
|
Bool |
Validate
([out] String Message) |
|
Checks that the current metadata structure
is valid.
|
Method Documentation
Returns the MetaJob object that sits at the top of the metadata tree
structure.
LoadFromFile |
( |
const String |
Filename |
) |
|
Loads a metadata file from the file system.
- Parameters:
-
|
Filename |
Name of the file to load. |
- Exceptions:
-
|
EOleException |
Invalid metadata file or other error while loading. |
SaveToFile |
( |
const String |
Filename |
) |
|
Saves the current metadata structure in a file.
- Parameters:
-
|
Filename |
Name of the file to save into. If the file already
exists, the file is overwritten and its current contents is lost. |
Export |
( |
const String |
Filename, |
|
|
TExportFormat |
Format |
|
|
) |
|
|
|
Exports the metadata in a non-native format.
- Parameters:
-
|
Filename |
Name of the file to save into. If the file already
exists, the file is overwritten and its current contents is lost. |
|
Format
|
Format in which to save the file. The only value
currently supported is efXml21 (value = 0), which is an
XML format corresponding to the former metadata native file format. |
- Exceptions:
-
|
EOleException |
The specified export format is invalid. |
Bool Validate |
( |
[out] String
|
Message |
) |
|
NOT IMPLEMENTED YET. Checks that the current metadata structure is
valid.
- Parameters:
-
|
Message |
If the return value is false, Message contains the reason
why; otherwise, it is set to an empty string. |
- Returns:
- True if the structure is valid, false otherwise.