C# Class SobekCM.Resource_Object.SobekCM_Item

Inheritance: SobekCM.Resource_Object.MetadataDescribableBase
Show file Open project: MarkVSullivan/SobekCM-Web-Application Class Usage Examples

Public Methods

Method Description
Create_Serial_Hierarchy ( ) : void

Creates the serial hierarchy if this is a newspaper or serial item

Directory_From_Bib_VID ( string BaseDirectory, string BibID, string VID ) : string

Get the pairtree folder structure from a provided BibID / VID pair

Finalize_METS ( bool calculateAllChecksums ) : bool

Finalize this METS file for the lsat writing before loading to SobekCM

General_Cleanup ( ) : void

Performs some general clean-up functions while finalizing METS files

Get_MARC_HTML ( object>.Dictionary Options ) : string

Writes all the data about this item in MARC-ish HTML for display online

Get_MARC_HTML ( object>.Dictionary Options, string Width ) : string

Writes all the data about this item in MARC-ish HTML for display online

Name_All_Pages ( ) : void

Ensure that each page has a name. If no pages were named, they are just named from 'Page 1' up. If some pages are named, any missing pages are named by the division type in which they reside.

Read ( string fileName ) : void

Read from an existing metadata file into the current object

The generic reader attempts to determine which form of metadata the file is currently using, and selects the appropriate reader

Read_Directory ( string directory ) : SobekCM_Item

Read from an existing metadata file and returns a new object

The generic reader attempts to determine which form of metadata the file is currently using, and selects the appropriate reader

Read_Divisions_From_INFO ( string fileName ) : bool

Reads the divisions from an existing INFO file into the current object

Read_File ( string fileName ) : SobekCM_Item

Read from an existing metadata file and returns a new object

The generic reader attempts to determine which form of metadata the file is currently using, and selects the appropriate reader

Read_From_MARC_XML ( string fileName ) : bool

Reads the bibliographic information from an existing MARC XML file into the current object

Read_From_METS ( string fileName ) : void

Read from an existing METS file into the current object

Read_From_MXF ( string fileName ) : bool

Read from an existing MXF file into the current object

Read_INFO ( string fileName ) : SobekCM_Item

Reads an existing INFO file and returns a new object

Read_MARC_XML ( string fileName ) : SobekCM_Item

Reads the bibliographic information from an existing MARC XML file and returns a new object

Read_METS ( string fileName ) : SobekCM_Item

Read from an existing METS file and returns a new object

Read_MXF ( string fileName ) : SobekCM_Item

Read from an existing MXF file and returns a new object

Save_Bib_Level_METS ( string directory ) : void

Save this resource as a bib_level METS file

This is used to save the Bib level mets file from a volume level mets file

Save_Citation_Only_METS ( ) : void

Save this resource as a bib_level METS file

This is used to save the Bib level mets file from a volume level mets file

Save_FCLA_METS ( string Destination_File ) : void

Save this resource as a METS file destined for FCLA's Florida Digital Archive

Save_METS ( ) : void

Save this resource as a METS file

Will use either the default namespace, or the same namespace which was used in any previously read METS files.

Save_METS ( bool include_daitss ) : void

Save this resource as a METS file

Will use either the default namespace, or the same namespace which was used in any previously read METS files.

Save_METS ( string Destination_File ) : void

Save this resource as a METS file

Will use either the default namespace, or the same namespace which was used in any previously read METS files.

Save_SobekCM_METS ( ) : void

Saves this resource as a SobekCM Service METS file

The SobekCM Service METS file tries to keep the file size as small as possible and also includes service information (image properties) that the standard SobekCM METS file does not include

Set_License ( string License ) : void

Adds the license information, used for the dLOC Toolkit which uses license codes to control the source information in the METS file and allow FTP

Set_PURL ( string SobekCM_URL ) : void

Sets the (P)URL to be included in the METS file

Set_Serial_Info ( SobekCM.Resource_Object.Bib_Info.Part_Info serialHierarchyObject, SobekCM.Resource_Object.Behaviors.Serial_Info SerialInfo ) : void

Saves the data stored in this instance of the element to the provided bibliographic object

SobekCM_Item ( ) : System

Constructor for a new instance of the SobekCM_Item class

SobekCM_Item ( SobekCM.Resource_Object.OAI.Reader.OAI_Repository_DublinCore_Record OAI_Record ) : System

Constructor for a new instance of the SobekCM_Item class, which imports values from a OAI record

To_MARC_Record ( ) : SobekCM.Resource_Object.MARC.MARC_Record

Gets the collection of MARC tags to be written for this digital resource

To_MARC_Record ( string CatalogingSourceCode, string LocationCode, string ReproductionAgency, string ReproductionPlace, string SystemName, string SystemAbbreviation, string ThumbnailBase ) : SobekCM.Resource_Object.MARC.MARC_Record

Gets the collection of MARC tags to be written for this digital resource

Validate_Against_Schema ( ) : bool

Validates this METS file against the XML Schema

This sets the Validation_Errors property of this object

Validate_Against_Schema ( SobekCM_Item thisPackage ) : bool

Validates this METS file against the XML Schema

Validate_Files ( SobekCM_Item thisPackage, bool matchCheckSums ) : bool

Checks that each file in the package is present in the directory.

Validate_Files ( bool matchCheckSums ) : bool

Checks that each file in the package is present in the directory.

This sets the Validation_Errors property of this object

is_bibid_format ( string TestString ) : bool

Gets a flag indicating if the provided string appears to be in bib id format

is_vids_format ( string TestString ) : bool

Static method to set if a string is a vid VIDS format

Private Methods

Method Description
Copy_Chronology_To_Serial_Info ( ) : bool
Copy_Enumeration_To_Serial_Info ( ) : bool
File_Name_Sans_Extension ( string systemname ) : string
MARC_Leader ( ) : string

Gets the MARC leader to be written for this digital resource

add_value ( bool add, char char_to_add, int &current_count, int max_count, StringBuilder builder ) : void
recursively_add_page_names ( SobekCM.Resource_Object.Divisions.abstract_TreeNode thisNode, string parentType, int Order, int Sibling_Count, List visitedNodes ) : void

Method Details

Create_Serial_Hierarchy() public method

Creates the serial hierarchy if this is a newspaper or serial item
public Create_Serial_Hierarchy ( ) : void
return void

Directory_From_Bib_VID() public static method

Get the pairtree folder structure from a provided BibID / VID pair
public static Directory_From_Bib_VID ( string BaseDirectory, string BibID, string VID ) : string
BaseDirectory string Base directory
BibID string Provided BibID to use for creating the folder structure
VID string Provided VID to use for creating the folder structure
return string

Finalize_METS() public method

Finalize this METS file for the lsat writing before loading to SobekCM
public Finalize_METS ( bool calculateAllChecksums ) : bool
calculateAllChecksums bool Flag indicates if all checksums should be recalculated
return bool

General_Cleanup() public method

Performs some general clean-up functions while finalizing METS files
public General_Cleanup ( ) : void
return void

Get_MARC_HTML() public method

Writes all the data about this item in MARC-ish HTML for display online
public Get_MARC_HTML ( object>.Dictionary Options ) : string
Options object>.Dictionary Dictionary of any options which this metadata reader/writer may utilize
return string

Get_MARC_HTML() public method

Writes all the data about this item in MARC-ish HTML for display online
public Get_MARC_HTML ( object>.Dictionary Options, string Width ) : string
Options object>.Dictionary Dictionary of any options which this metadata reader/writer may utilize
Width string Width value for use within the rendered tables
return string

Name_All_Pages() public method

Ensure that each page has a name. If no pages were named, they are just named from 'Page 1' up. If some pages are named, any missing pages are named by the division type in which they reside.
public Name_All_Pages ( ) : void
return void

Read() public method

Read from an existing metadata file into the current object
The generic reader attempts to determine which form of metadata the file is currently using, and selects the appropriate reader
public Read ( string fileName ) : void
fileName string Name of the file
return void

Read_Directory() public static method

Read from an existing metadata file and returns a new object
The generic reader attempts to determine which form of metadata the file is currently using, and selects the appropriate reader
public static Read_Directory ( string directory ) : SobekCM_Item
directory string Directory of the resource package
return SobekCM_Item

Read_Divisions_From_INFO() public method

Reads the divisions from an existing INFO file into the current object
public Read_Divisions_From_INFO ( string fileName ) : bool
fileName string Name of the INFO file
return bool

Read_File() public static method

Read from an existing metadata file and returns a new object
The generic reader attempts to determine which form of metadata the file is currently using, and selects the appropriate reader
public static Read_File ( string fileName ) : SobekCM_Item
fileName string Name of the file
return SobekCM_Item

Read_From_MARC_XML() public method

Reads the bibliographic information from an existing MARC XML file into the current object
public Read_From_MARC_XML ( string fileName ) : bool
fileName string Name of the MARC XML file
return bool

Read_From_METS() public method

Read from an existing METS file into the current object
public Read_From_METS ( string fileName ) : void
fileName string Name of the METS file
return void

Read_From_MXF() public method

Read from an existing MXF file into the current object
public Read_From_MXF ( string fileName ) : bool
fileName string Name of the MXF file
return bool

Read_INFO() public static method

Reads an existing INFO file and returns a new object
public static Read_INFO ( string fileName ) : SobekCM_Item
fileName string Name of the INFO file
return SobekCM_Item

Read_MARC_XML() public static method

Reads the bibliographic information from an existing MARC XML file and returns a new object
public static Read_MARC_XML ( string fileName ) : SobekCM_Item
fileName string Name of the MARC XML file
return SobekCM_Item

Read_METS() public static method

Read from an existing METS file and returns a new object
public static Read_METS ( string fileName ) : SobekCM_Item
fileName string Name of the METS file
return SobekCM_Item

Read_MXF() public static method

Read from an existing MXF file and returns a new object
public static Read_MXF ( string fileName ) : SobekCM_Item
fileName string Name of the MXF file
return SobekCM_Item

Save_Bib_Level_METS() public method

Save this resource as a bib_level METS file
This is used to save the Bib level mets file from a volume level mets file
public Save_Bib_Level_METS ( string directory ) : void
directory string
return void

Save_Citation_Only_METS() public method

Save this resource as a bib_level METS file
This is used to save the Bib level mets file from a volume level mets file
public Save_Citation_Only_METS ( ) : void
return void

Save_FCLA_METS() public method

Save this resource as a METS file destined for FCLA's Florida Digital Archive
public Save_FCLA_METS ( string Destination_File ) : void
Destination_File string Name of the resultant METS file
return void

Save_METS() public method

Save this resource as a METS file
Will use either the default namespace, or the same namespace which was used in any previously read METS files.
public Save_METS ( ) : void
return void

Save_METS() public method

Save this resource as a METS file
Will use either the default namespace, or the same namespace which was used in any previously read METS files.
public Save_METS ( bool include_daitss ) : void
include_daitss bool
return void

Save_METS() public method

Save this resource as a METS file
Will use either the default namespace, or the same namespace which was used in any previously read METS files.
public Save_METS ( string Destination_File ) : void
Destination_File string
return void

Save_SobekCM_METS() public method

Saves this resource as a SobekCM Service METS file
The SobekCM Service METS file tries to keep the file size as small as possible and also includes service information (image properties) that the standard SobekCM METS file does not include
public Save_SobekCM_METS ( ) : void
return void

Set_License() public method

Adds the license information, used for the dLOC Toolkit which uses license codes to control the source information in the METS file and allow FTP
public Set_License ( string License ) : void
License string License key
return void

Set_PURL() public method

Sets the (P)URL to be included in the METS file
public Set_PURL ( string SobekCM_URL ) : void
SobekCM_URL string SobekCM URL for this material
return void

Set_Serial_Info() public method

Saves the data stored in this instance of the element to the provided bibliographic object
public Set_Serial_Info ( SobekCM.Resource_Object.Bib_Info.Part_Info serialHierarchyObject, SobekCM.Resource_Object.Behaviors.Serial_Info SerialInfo ) : void
serialHierarchyObject SobekCM.Resource_Object.Bib_Info.Part_Info Serial hierarchy object to set to this object
SerialInfo SobekCM.Resource_Object.Behaviors.Serial_Info Serial information to set to this object
return void

SobekCM_Item() public method

Constructor for a new instance of the SobekCM_Item class
public SobekCM_Item ( ) : System
return System

SobekCM_Item() public method

Constructor for a new instance of the SobekCM_Item class, which imports values from a OAI record
public SobekCM_Item ( SobekCM.Resource_Object.OAI.Reader.OAI_Repository_DublinCore_Record OAI_Record ) : System
OAI_Record SobekCM.Resource_Object.OAI.Reader.OAI_Repository_DublinCore_Record
return System

To_MARC_Record() public method

Gets the collection of MARC tags to be written for this digital resource
public To_MARC_Record ( ) : SobekCM.Resource_Object.MARC.MARC_Record
return SobekCM.Resource_Object.MARC.MARC_Record

To_MARC_Record() public method

Gets the collection of MARC tags to be written for this digital resource
public To_MARC_Record ( string CatalogingSourceCode, string LocationCode, string ReproductionAgency, string ReproductionPlace, string SystemName, string SystemAbbreviation, string ThumbnailBase ) : SobekCM.Resource_Object.MARC.MARC_Record
CatalogingSourceCode string Cataloging source code for the 040 field, ( for example FUG for University of Florida )
LocationCode string Location code for the 852 |a - if none is given the system abbreviation will be used. Otherwise, the system abbreviation will be put in the 852 |b field.
ReproductionAgency string Agency responsible for reproduction, or primary agency associated with the SobekCM instance ( for the added 533 |c field )
ReproductionPlace string Place of reproduction, or primary location associated with the SobekCM instance ( for the added 533 |b field )
SystemName string Name used for this SobekCM (or otherwise) digital repository system
SystemAbbreviation string Abbrevation used for this SobekCM (or otherwise) digital repository system
ThumbnailBase string Base URL for the thumbnail to be included
return SobekCM.Resource_Object.MARC.MARC_Record

Validate_Against_Schema() public method

Validates this METS file against the XML Schema
This sets the Validation_Errors property of this object
public Validate_Against_Schema ( ) : bool
return bool

Validate_Against_Schema() public static method

Validates this METS file against the XML Schema
public static Validate_Against_Schema ( SobekCM_Item thisPackage ) : bool
thisPackage SobekCM_Item Package to validate
return bool

Validate_Files() public static method

Checks that each file in the package is present in the directory.
public static Validate_Files ( SobekCM_Item thisPackage, bool matchCheckSums ) : bool
thisPackage SobekCM_Item Package to check
matchCheckSums bool Flag indicates whether to match checksums
return bool

Validate_Files() public method

Checks that each file in the package is present in the directory.
This sets the Validation_Errors property of this object
public Validate_Files ( bool matchCheckSums ) : bool
matchCheckSums bool Flag indicates whether to match checksums
return bool

is_bibid_format() public static method

Gets a flag indicating if the provided string appears to be in bib id format
public static is_bibid_format ( string TestString ) : bool
TestString string string to check for bib id format
return bool

is_vids_format() public static method

Static method to set if a string is a vid VIDS format
public static is_vids_format ( string TestString ) : bool
TestString string string to check for vid VIDS format
return bool