public Add_Spatial_Subject ( string SpatialTerm ) : SobekCM.Resource_Object.Bib_Info.Subject_Info_Standard | ||
SpatialTerm | string | Term for the spatial subject |
return | SobekCM.Resource_Object.Bib_Info.Subject_Info_Standard |
/// <summary> Reads the Dublin Core-compliant section of XML and stores the data in the provided digital resource </summary> /// <param name="R"> XmlTextReader from which to read the dublin core data </param> /// <param name="BibInfo"> Digital resource object to save the data to </param> /// <param name="Return_Package"> The return package, if this is reading a top-level section of dublin core </param> public static void Read_Simple_Dublin_Core_Info(XmlReader R, Bibliographic_Info BibInfo, SobekCM_Item Return_Package ) { while (R.Read()) { if ((R.NodeType == XmlNodeType.EndElement) && ((R.Name == "METS:mdWrap") || (R.Name == "mdWrap"))) return; if (R.NodeType == XmlNodeType.Element) { switch (R.Name) { case "dc:contributor": case "dcterms:contributor": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { BibInfo.Add_Named_Entity(R.Value.Trim(), "Contributor"); } break; case "dc:coverage": case "dcterms:spatial": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { BibInfo.Add_Spatial_Subject(R.Value.Trim()); } break; case "dc:creator": case "dcterms:creator": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { if (BibInfo.Main_Entity_Name.hasData) { BibInfo.Add_Named_Entity(R.Value.Trim()); } else { BibInfo.Main_Entity_Name.Full_Name = R.Value.Trim(); } } break; case "dc:date": case "dcterms:date": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { BibInfo.Origin_Info.Date_Issued = R.Value.Trim(); } break; case "dc:description": case "dcterms:description": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { BibInfo.Add_Note(R.Value.Trim()); } break; case "dc:format": case "dcterms:format": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { BibInfo.Original_Description.Extent = R.Value.Trim(); } break; case "dc:identifier": case "dcterms:identifier": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { BibInfo.Add_Identifier(R.Value.Trim()); } break; case "dc:language": case "dcterms:language": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { BibInfo.Add_Language(R.Value.Trim()); } break; case "dc:publisher": case "dcterms:publisher": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { BibInfo.Add_Publisher(R.Value.Trim()); } break; case "dc:relation": case "dcterms:relation": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { Related_Item_Info newRelatedItem = new Related_Item_Info(); newRelatedItem.Main_Title.Title = R.Value.Trim(); BibInfo.Add_Related_Item(newRelatedItem); } break; case "dc:rights": case "dcterms:rights": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { BibInfo.Access_Condition.Text = R.Value.Trim(); } break; case "dc:source": case "dcterms:source": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { BibInfo.Add_Note(R.Value, Note_Type_Enum.Source); } break; case "dc:subject": case "dcterms:subject": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { if (R.Value.IndexOf(";") > 0) { string[] splitter = R.Value.Split(";".ToCharArray()); foreach (string thisSplit in splitter) { BibInfo.Add_Subject(thisSplit.Trim(), String.Empty); } } else { BibInfo.Add_Subject(R.Value.Trim(), String.Empty); } } break; case "dc:title": case "dcterms:title": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { if (BibInfo.Main_Title.Title.Length == 0) { BibInfo.Main_Title.Title = R.Value.Trim(); } else { BibInfo.Add_Other_Title(R.Value.Trim(), Title_Type_Enum.Alternative); } } break; case "dcterms:alternative": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { BibInfo.Add_Other_Title(R.Value.Trim(), Title_Type_Enum.Alternative); } break; case "dc:type": case "dcterms:type": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { if (BibInfo.Type.Add_Uncontrolled_Type(R.Value.Trim()) == TypeOfResource_MODS_Enum.UNKNOWN) BibInfo.Add_Genre(R.Value.Trim()); } break; case "dc:extent": case "dcterms:extent": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { BibInfo.Original_Description.Extent = R.Value.Trim(); } break; case "dc:provenance": case "dcterms:provenance": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0)) { BibInfo.Add_Note(R.Value.Trim(), Note_Type_Enum.Ownership); } break; case "thesis.degree.name": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0) && ( Return_Package != null )) { // Ensure the thesis object exists and is added Thesis_Dissertation_Info thesisInfo = Return_Package.Get_Metadata_Module(GlobalVar.THESIS_METADATA_MODULE_KEY) as Thesis_Dissertation_Info; if (thesisInfo == null) { thesisInfo = new Thesis_Dissertation_Info(); Return_Package.Add_Metadata_Module(GlobalVar.THESIS_METADATA_MODULE_KEY, thesisInfo); } thesisInfo.Degree = R.Value.Trim(); } break; case "thesis.degree.level": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0) && (Return_Package != null)) { // Ensure the thesis object exists and is added Thesis_Dissertation_Info thesisInfo = Return_Package.Get_Metadata_Module(GlobalVar.THESIS_METADATA_MODULE_KEY) as Thesis_Dissertation_Info; if (thesisInfo == null) { thesisInfo = new Thesis_Dissertation_Info(); Return_Package.Add_Metadata_Module(GlobalVar.THESIS_METADATA_MODULE_KEY, thesisInfo); } string temp = R.Value.Trim().ToLower(); if ((temp == "doctorate") || (temp == "doctoral")) thesisInfo.Degree_Level = Thesis_Dissertation_Info.Thesis_Degree_Level_Enum.Doctorate; if ((temp == "masters") || (temp == "master's")) thesisInfo.Degree_Level = Thesis_Dissertation_Info.Thesis_Degree_Level_Enum.Masters; if ((temp == "bachelors") || (temp == "bachelor's")) thesisInfo.Degree_Level = Thesis_Dissertation_Info.Thesis_Degree_Level_Enum.Bachelors; if ((temp == "post-doctorate") || (temp == "post-doctoral")) thesisInfo.Degree_Level = Thesis_Dissertation_Info.Thesis_Degree_Level_Enum.Bachelors; } break; case "thesis.degree.discipline": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0) && (Return_Package != null)) { // Ensure the thesis object exists and is added Thesis_Dissertation_Info thesisInfo = Return_Package.Get_Metadata_Module(GlobalVar.THESIS_METADATA_MODULE_KEY) as Thesis_Dissertation_Info; if (thesisInfo == null) { thesisInfo = new Thesis_Dissertation_Info(); Return_Package.Add_Metadata_Module(GlobalVar.THESIS_METADATA_MODULE_KEY, thesisInfo); } thesisInfo.Add_Degree_Discipline(R.Value.Trim()); } break; case "thesis.degree.grantor": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0) && (Return_Package != null)) { // Ensure the thesis object exists and is added Thesis_Dissertation_Info thesisInfo = Return_Package.Get_Metadata_Module(GlobalVar.THESIS_METADATA_MODULE_KEY) as Thesis_Dissertation_Info; if (thesisInfo == null) { thesisInfo = new Thesis_Dissertation_Info(); Return_Package.Add_Metadata_Module(GlobalVar.THESIS_METADATA_MODULE_KEY, thesisInfo); } thesisInfo.Degree_Grantor = R.Value.Trim(); } break; case "duke:source_collection": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0) && (Return_Package != null)) { Return_Package.Bib_Info.Location.Holding_Name = R.Value.Trim(); } break; case "duke:print_number": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0) && (Return_Package != null)) { Return_Package.Bib_Info.Add_Identifier(R.Value.Trim(), "Print Number", "Duke Print #"); } break; case "duke:box_number": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0) && (Return_Package != null)) { Return_Package.Bib_Info.Add_Container("Box", R.Value.Trim(), 2); } break; case "duke:series": R.Read(); if ((R.NodeType == XmlNodeType.Text) && (R.Value.Trim().Length > 0) && (Return_Package != null)) { Return_Package.Bib_Info.Add_Container("Series", R.Value.Trim(), 1); } break; } } } }