コード例 #1
0
 public string GetBookPagesByName(string bookId, string versionId, string startPageName, string endPageName,
                                  string transformationName, OutputFormatEnumContract outputFormat,
                                  ResourceLevelEnumContract transformationLevel)
 {
     return(m_searchServiceManager.GetBookPagesByName(bookId, versionId, startPageName, endPageName,
                                                      transformationName, outputFormat, transformationLevel));
 }
コード例 #2
0
 public string GetDictionaryEntryByXmlId(string bookId, string versionId, string xmlEntryId,
                                         string transformationName, OutputFormatEnumContract outputFormat,
                                         ResourceLevelEnumContract transformationLevel)
 {
     return(m_existManager.GetDictionaryEntryByXmlId(bookId, versionId, xmlEntryId, transformationName, outputFormat,
                                                     transformationLevel));
 }
コード例 #3
0
 public string GetDictionaryEntryFromSearch(List <SearchCriteriaContract> searchCriterias, string bookId,
                                            string versionId, string xmlEntryId, string transformationName, OutputFormatEnumContract outputFormat,
                                            ResourceLevelEnumContract transformationLevel)
 {
     return(m_existManager.GetDictionaryEntryFromSearch(searchCriterias, bookId, versionId, xmlEntryId,
                                                        transformationName, outputFormat,
                                                        transformationLevel));
 }
コード例 #4
0
        public string GetPageByXmlId(string bookId, string versionId, string pageXmlId, string transformationName,
                                     OutputFormatEnumContract outputFormat, ResourceLevelEnumContract transformationLevel)
        {
            var xslPath = m_existResourceManager.GetTransformationUri(transformationName, outputFormat,
                                                                      transformationLevel, bookId, versionId);

            return(m_communicationManager.GetPageByXmlId(bookId, versionId, pageXmlId,
                                                         Enum.GetName(typeof(OutputFormatEnumContract), outputFormat), xslPath));
        }
コード例 #5
0
 public string GetBookPageByXmlId(string bookId, string versionId, string pageXmlId, string transformationName,
                                  OutputFormatEnumContract outputFormat, ResourceLevelEnumContract transformationLevel)
 {
     if (m_log.IsDebugEnabled)
     {
         m_log.DebugFormat("SearchService request recieved...");
     }
     return(m_searchServiceManager.GetBookPageByXmlId(bookId, versionId, pageXmlId, transformationName,
                                                      outputFormat, transformationLevel));
 }
コード例 #6
0
        public string GetResourceUriTemplate(ResourceLevelEnumContract type)
        {
            switch (type)
            {
            case ResourceLevelEnumContract.Book:
                return(GetBookResourceUriTemplate());

            case ResourceLevelEnumContract.Shared:
                return(GetSharedResourceUriTemplate());

            case ResourceLevelEnumContract.Bibliography:
                return(GetBibliographyResourceUriTemplate());

            default:
                return(GetVersionResourceUriTemplate());
            }
        }
コード例 #7
0
        public string GetTransformationUri(string transformationName, OutputFormatEnumContract outputFormat, ResourceLevelEnumContract transformationLevel,
                                           string bookGuid, string bookVersion)
        {
            switch (transformationLevel)
            {
            case ResourceLevelEnumContract.Book:
                return(string.Format("{0}{1}/{2}", m_existSettings.BooksRelativeUri, Uri.EscapeUriString(bookGuid), transformationName));

            case ResourceLevelEnumContract.Version:
                return(string.Format("{0}{1}/{2}/{3}", m_existSettings.BooksRelativeUri, Uri.EscapeUriString(bookGuid), bookVersion,
                                     transformationName));

            case ResourceLevelEnumContract.Shared:
                return(string.Format("{0}/{1}", m_existSettings.TransformationRelativeUri, transformationName));

            default:
                return("");
            }
        }
コード例 #8
0
 public string GetEditionPageFromSearch(IList <SearchCriteriaContract> searchCriterias, string bookId, string versionId, string pageXmlId,
                                        string transformationName, OutputFormatEnumContract outputFormat, ResourceLevelEnumContract transformationLevel)
 {
     return(m_searchServiceManager.GetEditionPageFromSearch(searchCriterias, bookId, versionId, pageXmlId, transformationName, outputFormat, transformationLevel));
 }
コード例 #9
0
 public string GetBookPageByPosition(string bookId, string versionId, int pagePosition, string transformationName, OutputFormatEnumContract outputFormat, ResourceLevelEnumContract transformationLevel)
 {
     return(m_searchServiceManager.GetBookPageByPosition(bookId, versionId, pagePosition, transformationName, outputFormat, transformationLevel));
 }
コード例 #10
0
 public string GetBookEditionNote(string bookId, string versionId, string transformationName,
                                  OutputFormatEnumContract outputFormat, ResourceLevelEnumContract transformationLevel)
 {
     return(m_searchServiceManager.GetBookEditionNote(bookId, versionId, transformationName, outputFormat, transformationLevel));
 }
コード例 #11
0
 public string GetBookPageByXmlId(string bookId, string versionId, string pageXmlId, string transformationName,
                                  OutputFormatEnumContract outputFormat, ResourceLevelEnumContract transformationLevel)
 {
     return(m_existManager.GetPageByXmlId(bookId, versionId, pageXmlId, transformationName, outputFormat,
                                          transformationLevel));
 }
コード例 #12
0
        public string GetDictionaryEntryFromSearch(List <SearchCriteriaContract> searchCriterias, string bookId, string versionId, string xmlEntryId, string transformationName, OutputFormatEnumContract outputFormat, ResourceLevelEnumContract transformationLevel)
        {
            var resultSearchConjunctions = new ResultConjunctionsCriteriaContract
            {
                ConjunctionSearchCriterias = GetFilteredResultSearchCriterias(searchCriterias).ConjunctionSearchCriterias
            };

            var xslPath = m_existResourceManager.GetTransformationUri(transformationName, outputFormat,
                                                                      transformationLevel, bookId, versionId);

            return(m_communicationManager.GetDictionaryEntryFromSearch(resultSearchConjunctions.ToXml(), bookId, versionId, xmlEntryId,
                                                                       Enum.GetName(typeof(OutputFormatEnumContract), outputFormat), xslPath));
        }
コード例 #13
0
 public string GetBookEditionNote(string bookGuid, string versionId, string transformationName, OutputFormatEnumContract outputFormat, ResourceLevelEnumContract transformationLevel)
 {
     try
     {
         return(Channel.GetBookEditionNote(bookGuid, versionId, transformationName, outputFormat, transformationLevel));
     }
     catch (CommunicationException ex)
     {
         if (m_log.IsErrorEnabled)
         {
             m_log.ErrorFormat("{0} failed with: {1}", GetCurrentMethod(), ex);
         }
         throw;
     }
     catch (TimeoutException ex)
     {
         if (m_log.IsErrorEnabled)
         {
             m_log.ErrorFormat("{0} failed with: {1}", GetCurrentMethod(), ex);
         }
         throw;
     }
     catch (ObjectDisposedException ex)
     {
         if (m_log.IsErrorEnabled)
         {
             m_log.ErrorFormat("{0} failed with: {1}", GetCurrentMethod(), ex);
         }
         throw;
     }
 }
コード例 #14
0
 public string GetEditionPageFromSearch(IList <SearchCriteriaContract> searchCriterias, string bookXmlId, string versionId, string pageXmlId,
                                        string transformationName, OutputFormatEnumContract outputFormat, ResourceLevelEnumContract transformationLevel)
 {
     try
     {
         return(Channel.GetEditionPageFromSearch(searchCriterias, bookXmlId, versionId, pageXmlId, transformationName, outputFormat, transformationLevel));
     }
     catch (CommunicationException ex)
     {
         if (m_log.IsErrorEnabled)
         {
             m_log.ErrorFormat("{0} failed with: {1}", GetCurrentMethod(), ex);
         }
         throw;
     }
     catch (TimeoutException ex)
     {
         if (m_log.IsErrorEnabled)
         {
             m_log.ErrorFormat("{0} failed with: {1}", GetCurrentMethod(), ex);
         }
         throw;
     }
     catch (ObjectDisposedException ex)
     {
         if (m_log.IsErrorEnabled)
         {
             m_log.ErrorFormat("{0} failed with: {1}", GetCurrentMethod(), ex);
         }
         throw;
     }
 }