public void EditHyperCanonicalForm(long hyperCanonicalFormId, string text, HyperCanonicalFormTypeContract type, string description)
 {
     try
     {
         Channel.EditHyperCanonicalForm(hyperCanonicalFormId, text, type, description);
     }
     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;
     }
 }
 public long CreateHyperCanonicalForm(long canonicalFormId, HyperCanonicalFormTypeContract type, string text, string description)
 {
     try
     {
         return(Channel.CreateHyperCanonicalForm(canonicalFormId, type, text, description));
     }
     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;
     }
 }
 public IList <HyperCanonicalFormContract> GetTypeaheadHyperCanonicalForm(HyperCanonicalFormTypeContract type, string query)
 {
     try
     {
         return(Channel.GetTypeaheadHyperCanonicalForm(type, query));
     }
     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;
     }
 }
Пример #4
0
        public IList <HyperCanonicalFormContract> GetTypeaheadHyperCannonicalForm(HyperCanonicalFormTypeContract type, string query)
        {
            query = EscapeQuery(query);
            var formType = m_mapper.Map <HyperCanonicalFormType>(type);
            var result   = m_repository.InvokeUnitOfWork(x => x.GetTypeaheadHyperCannonicalForm(formType, query, PrefetchRecordCount));

            return(m_mapper.Map <IList <HyperCanonicalFormContract> >(result));
        }
Пример #5
0
 public ActionResult GetTypeaheadHyperCanonicalForm(HyperCanonicalFormTypeContract type, string query)
 {
     using (var client = GetLemmationzationServiceClient())
     {
         var result = client.GetTypeaheadHyperCanonicalForm(type, query);
         return(Json(result));
     }
 }
Пример #6
0
        public void EditHyperCanonicalForm(long hyperCanonicalFormId, string text, HyperCanonicalFormTypeContract type, string description)
        {
            var hyperCanonicalFormType = Mapper.Map <HyperCanonicalFormType>(type);
            var hyperCanonicalForm     = m_repository.FindById <HyperCanonicalForm>(hyperCanonicalFormId);

            hyperCanonicalForm.Text        = text;
            hyperCanonicalForm.Type        = hyperCanonicalFormType;
            hyperCanonicalForm.Description = description;

            m_repository.Update(hyperCanonicalForm);
        }
Пример #7
0
        public long CreateHyperCanonicalForm(long canonicalFormId, HyperCanonicalFormTypeContract type, string text, string description)
        {
            var canonicalForm          = m_repository.Load <CanonicalForm>(canonicalFormId);
            var hyperCanonicalFormType = Mapper.Map <HyperCanonicalFormType>(type);
            var hyperCanonicalForm     = new HyperCanonicalForm
            {
                Type           = hyperCanonicalFormType,
                Text           = text,
                Description    = description,
                CanonicalForms = new List <CanonicalForm> {
                    canonicalForm
                }
            };

            var id = m_repository.Create(hyperCanonicalForm);

            return((long)id);
        }
Пример #8
0
        public long CreateHyperCanonicalForm(long canonicalFormId, HyperCanonicalFormTypeContract type, string text, string description)
        {
            var hyperCanonicalFormType = m_mapper.Map <HyperCanonicalFormType>(type);

            return(new CreateHyperCanonicalFormWork(m_repository, canonicalFormId, hyperCanonicalFormType, text, description).Execute());
        }
Пример #9
0
        public void EditHyperCanonicalForm(long hyperCanonicalFormId, string text, HyperCanonicalFormTypeContract type, string description)
        {
            var hyperCanonicalFormType = m_mapper.Map <HyperCanonicalFormType>(type);

            new EditHyperCanonicalFormWork(m_repository, hyperCanonicalFormId, text, hyperCanonicalFormType, description).Execute();
        }
Пример #10
0
 public void EditHyperCanonicalForm(long hyperCanonicalFormId, string text, HyperCanonicalFormTypeContract type,
                                    string description)
 {
     m_lemmatizationManager.EditHyperCanonicalForm(hyperCanonicalFormId, text, type, description);
 }
Пример #11
0
 public IList <HyperCanonicalFormContract> GetTypeaheadHyperCanonicalForm(HyperCanonicalFormTypeContract type, string query)
 {
     return(m_lemmatizationManager.GetTypeaheadHyperCannonicalForm(type, query));
 }
Пример #12
0
 public long CreateHyperCanonicalForm(long canonicalFormId, HyperCanonicalFormTypeContract type, string text, string description)
 {
     return(m_lemmatizationManager.CreateHyperCanonicalForm(canonicalFormId, type, text, description));
 }