C# Class SobekCM.Resource_Object.Metadata_File_ReaderWriters.METS_File_ReaderWriter

Reader/Writer for reading metadata stored in METS files
This relies heavily upon the METS Sec ReaderWriters to read the dmdSec and amdSec portions of the METS file.
Inheritance: XML_Writing_Base_Type, iMetadata_File_ReaderWriter
Show file Open project: MarkVSullivan/SobekCM-Web-Application Class Usage Examples

Public Methods

Method Description
Read_Metadata ( Stream Input_Stream, SobekCM_Item Return_Package, object>.Dictionary Options, string &Error_Message ) : bool

Reads metadata from an open stream and saves to the provided item/package

Accepts two options: (1) 'METS_File_ReaderWriter:Minimize_File_Info' which tells whether the reader should just skip the file reading portion completely, and just read the bibliographic data ( Default is FALSE). (2) 'METS_File_ReaderWriter:Support_Divisional_dmdSec_amdSec'

Read_Metadata ( string MetadataFilePathName, SobekCM_Item Return_Package, object>.Dictionary Options, string &Error_Message ) : bool

Reads metadata from an existing metadata file and saves to the provided item/package

Write_Metadata ( TextWriter Output_Stream, SobekCM_Item Item_To_Save, object>.Dictionary Options, string &Error_Message ) : bool

Writes the formatted metadata from the provided item to a TextWriter (usually to an output stream)

OPTIONS: Accepts 'METS_File_ReaderWriter:METS_Writing_Profile', otherwise the default METS writing profile is utilized.

Write_Metadata ( string MetadataFilePathName, SobekCM_Item Item_To_Save, object>.Dictionary Options, string &Error_Message ) : bool

Writes the formatted metadata from the provided item to a file

Private Methods

Method Description
read_behavior_sec ( XmlReader R, SobekCM_Item Package ) : void
read_file_sec ( XmlReader R, bool Minimize_File_Info, SobekCM_File_Info>.Dictionary FilesByFileid ) : void
read_mets_header ( XmlReader R, SobekCM_Item Package ) : void
read_struct_map ( XmlReader R, SobekCM_Item Package, SobekCM_File_Info>.Dictionary FilesByFileid, abstract_TreeNode>.Dictionary DivisionDmdids, abstract_TreeNode>.Dictionary DivisionAmdids ) : void
recursively_add_div_info ( SobekCM.Resource_Object.Divisions.abstract_TreeNode ThisNode, TextWriter Results, int>.Dictionary PagesToAppearances, int Order ) : void
store_amd_sec ( XmlReader R ) : Unanalyzed_METS_Section
store_dmd_sec ( XmlReader R ) : Unanalyzed_METS_Section

Reads the descriptive metadata section from a valid METS file

Method Details

Read_Metadata() public method

Reads metadata from an open stream and saves to the provided item/package
Accepts two options: (1) 'METS_File_ReaderWriter:Minimize_File_Info' which tells whether the reader should just skip the file reading portion completely, and just read the bibliographic data ( Default is FALSE). (2) 'METS_File_ReaderWriter:Support_Divisional_dmdSec_amdSec'
public Read_Metadata ( Stream Input_Stream, SobekCM_Item Return_Package, object>.Dictionary Options, string &Error_Message ) : bool
Input_Stream Stream Open stream to read metadata from
Return_Package SobekCM_Item Package into which to read the metadata
Options object>.Dictionary Dictionary of any options which this metadata reader/writer may utilize
Error_Message string [OUTPUT] Explanation of the error, if an error occurs during reading
return bool

Read_Metadata() public method

Reads metadata from an existing metadata file and saves to the provided item/package
public Read_Metadata ( string MetadataFilePathName, SobekCM_Item Return_Package, object>.Dictionary Options, string &Error_Message ) : bool
MetadataFilePathName string Path and name of the metadata file to read
Return_Package SobekCM_Item Package into which to read the metadata
Options object>.Dictionary Dictionary of any options which this metadata reader/writer may utilize
Error_Message string [OUTPUT] Explanation of the error, if an error occurs during reading
return bool

Write_Metadata() public method

Writes the formatted metadata from the provided item to a TextWriter (usually to an output stream)
OPTIONS: Accepts 'METS_File_ReaderWriter:METS_Writing_Profile', otherwise the default METS writing profile is utilized.
public Write_Metadata ( TextWriter Output_Stream, SobekCM_Item Item_To_Save, object>.Dictionary Options, string &Error_Message ) : bool
Output_Stream System.IO.TextWriter
Item_To_Save SobekCM_Item Package with all the metadata to save
Options object>.Dictionary Dictionary of any options which this metadata reader/writer may utilize
Error_Message string [OUTPUT] Explanation of the error, if an error occurs during write
return bool

Write_Metadata() public method

Writes the formatted metadata from the provided item to a file
public Write_Metadata ( string MetadataFilePathName, SobekCM_Item Item_To_Save, object>.Dictionary Options, string &Error_Message ) : bool
MetadataFilePathName string Path and name of the metadata file to write
Item_To_Save SobekCM_Item Package with all the metadata to save
Options object>.Dictionary Dictionary of any options which this metadata reader/writer may utilize
Error_Message string [OUTPUT] Explanation of the error, if an error occurs during write
return bool