Inheritance: Document
Esempio n. 1
0
        public new static AudioBook GetObjectFromFindDocXmlBsMarc(string xml)
        {
            var audioBook = new AudioBook();
            base.FillProperties(xml);
            var xmlDoc = XDocument.Parse(xml);
            if (xmlDoc.Root != null)
            {
                var nodes = xmlDoc.Root.Descendants();
                audioBook.ClassificationNumber = MarcUtils.GetVarfield(nodes, "090", "c");
                audioBook.Numbering = MarcUtils.GetVarfield(nodes, "245", "n");

                audioBook.PartTitle = MarcUtils.GetVarfield(nodes, "245", "p");
                audioBook.Edition = MarcUtils.GetVarfield(nodes, "250", "a");
                audioBook.TypeAndNumberOfDiscs = MarcUtils.GetVarfield(nodes, "300", "a");
                audioBook.ReferredPersons = GeneratePersonsFromXml(nodes, "600");
                audioBook.ReferredOrganizations = GenerateOrganizationsFromXml(nodes, "610");
                audioBook.Subject = MarcUtils.GetVarfield(nodes, "650", "a");
                audioBook.ReferencedPlaces = MarcUtils.GetVarfieldAsList(nodes, "651", "a");
                audioBook.Genre = MarcUtils.GetVarfieldAsList(nodes, "655", "a");
                audioBook.InvolvedPersons = GeneratePersonsFromXml(nodes, "700");
                audioBook.InvolvedOrganizations = GenerateOrganizationsFromXml(nodes, "710");
            }
            return audioBook;
        }
Esempio n. 2
0
 public new static AudioBook GetObjectFromFindDocXmlBsMarcLight(string xml)
 {
     var audioBook = new AudioBook();
     audioBook.FillPropertiesLight(xml);
     return audioBook;
 }
Esempio n. 3
0
        private string GetExternalAudioBookImageUri(AudioBook abook, bool fetchThumbnail)
        {
            var isbn = abook.Isbn;
            var xmlBook = new BokBasenBook();

            xmlBook.FillProperties(_xmluri + "&ISBN=" + isbn);

            if (fetchThumbnail)
                return !string.IsNullOrEmpty(xmlBook.Thumb_Cover_Picture) ? xmlBook.Thumb_Cover_Picture : string.Empty;

            return !string.IsNullOrEmpty(xmlBook.Large_Cover_Picture) ? xmlBook.Large_Cover_Picture : string.Empty;
        }