Пример #1
0
 internal static DM.Chapter Build(SM.Chapter chapter)
 {
     if (chapter != null)
     {
         List <DM.Creator> creators = new List <DM.Creator>();
         creators.AddRange(chapter.Authors != null ? chapter.Authors.Select(x => Build(x, DE.CreatorType.Author)).ToList() : new List <DM.Creator>());
         creators.AddRange(chapter.Translators != null ? chapter.Translators.Select(x => Build(x, DE.CreatorType.Translator)).ToList() : new List <DM.Creator>());
         creators.AddRange(chapter.Editors != null ? chapter.Editors.Select(x => Build(x, DE.CreatorType.Editor)).ToList() : new List <DM.Creator>());
         creators.AddRange(chapter.CollectionEditors != null ? chapter.CollectionEditors.Select(x => Build(x, DE.CreatorType.CollectionEditor)).ToList() : new List <DM.Creator>());
         creators.AddRange(chapter.ContainerAuthors != null ? chapter.ContainerAuthors.Select(x => Build(x, DE.CreatorType.ContainerAuthor)).ToList() : new List <DM.Creator>());
         return(new DM.Chapter()
         {
             TitleFull = chapter.TitleFull,
             TitleShort = chapter.TitleShort,
             Creators = creators,
             AccessedDate = Build(chapter.AccessedDate),
             IssuedDate = Build(chapter.IssuedDate),
             Abstract = chapter.Abstract,
             Language = chapter.Language,
             Note = chapter.Note,
             URL = chapter.URL,
             PublisherName = chapter.PublisherName,
             PublisherLocation = chapter.PublisherLocation,
             ISBN = chapter.ISBN,
             CallNumber = chapter.CallNumber,
             ArchiveName = chapter.ArchiveName,
             ArchiveLocation = chapter.ArchiveLocation,
             CollectionTitle = chapter.CollectionTitle,
             CollectionNumber = chapter.CollectionNumber,
             Edition = chapter.Edition,
             VolumeNumber = chapter.VolumeNumber,
             VolumeCount = chapter.VolumeCount,
             Source = chapter.Source,
             EventPlace = chapter.EventPlace,
             ContainerTitle = chapter.ContainerTitle,
             PageNumber = chapter.PageNumber
         });
     }
     else
     {
         return(null);
     }
 }
Пример #2
0
 public SM.Citation Chapter(SE.Style style, SE.Format format, [FromBody] SM.Chapter chapter)
 {
     return(_citationManager.CreateCitationChapter(style, format, chapter));
 }
Пример #3
0
 internal SM.Citation CreateCitationChapter(SE.Style style, SE.Format format, SM.Chapter chapter)
 {
     return(ContentItemFactory.Build(_citationProcessor.CreateCitationChapter(ContentItemFactory.Build(style),
                                                                              ContentItemFactory.Build(format),
                                                                              ContentItemFactory.Build(chapter))));
 }