public void EditCanonicalForm(long canonicalFormId, string text, CanonicalFormTypeContract type, string description)
 {
     try
     {
         Channel.EditCanonicalForm(canonicalFormId, 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 CreateCanonicalForm(long tokenCharacteristicId, CanonicalFormTypeContract type, string text, string description)
 {
     try
     {
         return(Channel.CreateCanonicalForm(tokenCharacteristicId, 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 <CanonicalFormTypeaheadContract> GetTypeaheadCanonicalForm(CanonicalFormTypeContract type, string query)
 {
     try
     {
         return(Channel.GetTypeaheadCanonicalForm(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;
     }
 }
Esempio n. 4
0
        public IList <CanonicalFormTypeaheadContract> GetTypeaheadCannonicalForm(CanonicalFormTypeContract type, string query)
        {
            query = EscapeQuery(query);
            var canonicalFormType = m_mapper.Map <CanonicalFormType>(type);
            var result            = m_repository.InvokeUnitOfWork(x => x.GetTypeaheadCannonicalForm(canonicalFormType, query, PrefetchRecordCount));

            return(m_mapper.Map <IList <CanonicalFormTypeaheadContract> >(result));
        }
Esempio n. 5
0
 public ActionResult GetTypeaheadCanonicalForm(CanonicalFormTypeContract type, string query)
 {
     using (var client = GetLemmationzationServiceClient())
     {
         var result = client.GetTypeaheadCanonicalForm(type, query);
         return(Json(result));
     }
 }
Esempio n. 6
0
        public void EditCanonicalForm(long canonicalFormId, string text, CanonicalFormTypeContract type, string description)
        {
            var canonicalFormType = Mapper.Map <CanonicalFormType>(type);
            var canonicalForm     = m_repository.FindById <CanonicalForm>(canonicalFormId);

            canonicalForm.Text        = text;
            canonicalForm.Type        = canonicalFormType;
            canonicalForm.Description = description;

            m_repository.Update(canonicalForm);
        }
Esempio n. 7
0
        public long CreateCanonicalForm(long tokenCharacteristicId, CanonicalFormTypeContract type, string text, string description)
        {
            var tokenCharacteristic = m_repository.Load <TokenCharacteristic>(tokenCharacteristicId);
            var canonicalFormType   = Mapper.Map <CanonicalFormType>(type);
            var newCanonicalForm    = new CanonicalForm
            {
                Type             = canonicalFormType,
                Text             = text,
                Description      = description,
                CanonicalFormFor = new List <TokenCharacteristic> {
                    tokenCharacteristic
                }
            };

            var id = m_repository.Create(newCanonicalForm);

            return((long)id);
        }
Esempio n. 8
0
        public long CreateCanonicalForm(long tokenCharacteristicId, CanonicalFormTypeContract type, string text, string description)
        {
            var canonicalFormType = m_mapper.Map <CanonicalFormType>(type);

            return(new CreateCanonicalFormWork(m_repository, tokenCharacteristicId, canonicalFormType, text, description).Execute());
        }
Esempio n. 9
0
        public void EditCanonicalForm(long canonicalFormId, string text, CanonicalFormTypeContract type, string description)
        {
            var canonicalFormType = m_mapper.Map <CanonicalFormType>(type);

            new EditCanonicalFormWork(m_repository, canonicalFormId, text, canonicalFormType, description).Execute();
        }
Esempio n. 10
0
 public void EditCanonicalForm(long canonicalFormId, string text, CanonicalFormTypeContract type, string description)
 {
     m_lemmatizationManager.EditCanonicalForm(canonicalFormId, text, type, description);
 }
Esempio n. 11
0
 public IList <CanonicalFormTypeaheadContract> GetTypeaheadCanonicalForm(CanonicalFormTypeContract type, string query)
 {
     return(m_lemmatizationManager.GetTypeaheadCannonicalForm(type, query));
 }
Esempio n. 12
0
 public long CreateCanonicalForm(long tokenCharacteristicId, CanonicalFormTypeContract type, string text, string description)
 {
     return(m_lemmatizationManager.CreateCanonicalForm(tokenCharacteristicId, type, text, description));
 }