示例#1
0
 public MagazineManager CreateMagazine
 (
     MagazineInfo magazine
 )
 {
     return(this);
 }
        /// <summary>
        /// Разбор записи.
        /// </summary>
        public static MagazineInfo Parse
        (
            IrbisRecord record
        )
        {
            if (ReferenceEquals(record, null))
            {
                throw new ArgumentNullException("record");
            }

            MagazineInfo result = new MagazineInfo
            {
                Index        = record.FM("903"),
                Title        = record.FM("200", 'a'),
                SubTitle     = record.FM("200", 'e'),
                Cumulation   = MagazineCumulation.Parse(record),
                SeriesNumber = record.FM("923", 'h'),
                SeriesTitle  = record.FM("923", 'i'),
                Mfn          = record.Mfn
            };

            if (string.IsNullOrEmpty(result.Title) ||
                string.IsNullOrEmpty(result.Index)
                //|| string.IsNullOrEmpty(result.MagazineKind)
                //|| string.IsNullOrEmpty(result.MagazineType)
                )
            {
                return(null);
            }

            return(result);
        }
示例#3
0
 public MagazineIssueInfo[] GetIssues
 (
     MagazineInfo magazine
 )
 {
     if (ReferenceEquals(magazine, null))
     {
         throw new ArgumentNullException("magazine");
     }
     return(null);
 }
示例#4
0
        /// <summary>
        /// Создание журнала в базе по описанию.
        /// </summary>
        public MagazineManager CreateMagazine
        (
            MagazineInfo magazine
        )
        {
            if (ReferenceEquals(magazine, null))
            {
                throw new ArgumentNullException("magazine");
            }

            return(this);
        }
示例#5
0
        public static MagazineInfo Parse
        (
            IrbisRecord record
        )
        {
            if (ReferenceEquals(record, null))
            {
                throw new ArgumentNullException("record");
            }

            MagazineInfo result = new MagazineInfo();

            return(result);
        }
示例#6
0
        public MagazineInfo[] GetAllMagazines()
        {
            List <MagazineInfo> result = new List <MagazineInfo>();

            BatchRecordReader batch = new BatchRecordReader
                                      (
                Client,
                String.Concat(Newspaper, " + ", Magazine)
                                      );

            foreach (IrbisRecord record in batch)
            {
                if (!ReferenceEquals(record, null))
                {
                    MagazineInfo magazine = MagazineInfo.Parse(record);
                    if (!ReferenceEquals(magazine, null))
                    {
                        result.Add(magazine);
                    }
                }
            }

            return(result.ToArray());
        }
示例#7
0
        /// <summary>
        /// Получение списка выпусков данного журнала.
        /// </summary>
        public MagazineIssueInfo[] GetIssues
        (
            MagazineInfo magazine
        )
        {
            if (ReferenceEquals(magazine, null))
            {
                throw new ArgumentNullException("magazine");
            }

            IrbisRecord[] records = Client.SearchRead
                                    (
                "\"I={0}/$\"",
                magazine.Index
                                    );

            MagazineIssueInfo[] result = records
                                         .NonNullItems()
                                         .Select(MagazineIssueInfo.Parse)
                                         .NonNullItems()
                                         .ToArray();

            return(result);
        }