Coverage Report - org.kuali.student.core.statement.naturallanguage.NaturalLanguageTranslator
 
Classes in this File Line Coverage Branch Coverage Complexity
NaturalLanguageTranslator
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.core.statement.naturallanguage;
 17  
 
 18  
 import org.kuali.student.core.exceptions.DoesNotExistException;
 19  
 import org.kuali.student.core.exceptions.OperationFailedException;
 20  
 import org.kuali.student.core.statement.entity.ReqComponent;
 21  
 import org.kuali.student.core.statement.entity.Statement;
 22  
 
 23  
 /**
 24  
  * This class translates requirement components and statements into 
 25  
  * natural language.
 26  
  */
 27  
 public interface NaturalLanguageTranslator {
 28  
         /**
 29  
          * Translates a requirement component for a specific natural language 
 30  
          * usuage type (context) into natural language.
 31  
          * 
 32  
          * @param reqComponent Requirement component to be translated
 33  
          * @param nlUsageTypeKey Natural language usage type key (context)
 34  
          * @return Natural language requirement translation
 35  
          * @throws DoesNotExistException Requirement component id does not exists
 36  
          * @throws OperationFailedException
 37  
          */
 38  
         public String translateReqComponent(ReqComponent reqComponent, String nlUsageTypeKey) throws DoesNotExistException, OperationFailedException;
 39  
 
 40  
         /**
 41  
          * Translates a requirement component for a specific natural language 
 42  
          * usuage type (context) and language locale (e.g. 'en' for English, 
 43  
          * 'de' for German) into natural language.
 44  
          * 
 45  
          * @param reqComponent Requirement component to be translated
 46  
          * @param nlUsageTypeKey Natural language usage type key (context)
 47  
          * @param language Translation language
 48  
          * @return
 49  
          * @throws DoesNotExistException
 50  
          * @throws OperationFailedException
 51  
          */
 52  
         public String translateReqComponent(ReqComponent reqComponent, String nlUsageTypeKey, String language) throws DoesNotExistException, OperationFailedException;
 53  
 
 54  
         /**
 55  
          * Translates a statement in the default language locale for a specific 
 56  
          * natural language usuage type (context) into natural language.
 57  
          * 
 58  
          * @param statement Statement to be translated 
 59  
          * @param nlUsageTypeKey Natural language usage type key (context)
 60  
          * @return Natural language statement translation
 61  
          * @throws DoesNotExistException CLU id does not exists
 62  
          * @throws OperationFailedException Translation fails
 63  
          */
 64  
         public String translateStatement(Statement statement, String nlUsageTypeKey) throws DoesNotExistException, OperationFailedException;
 65  
 
 66  
         /**
 67  
          * Translates a statement for a specific natural language 
 68  
          * usuage type (context) and language locale into natural language.
 69  
          * 
 70  
          * @param statement Statement to be translated 
 71  
          * @param nlUsageTypeKey Natural language usage type key (context)
 72  
          * @param language Translation language
 73  
          * @return Natural language statement translation
 74  
          * @throws DoesNotExistException CLU id does not exists
 75  
          * @throws OperationFailedException Translation fails
 76  
          */
 77  
         public String translateStatement(Statement statement, String nlUsageTypeKey, String language) throws DoesNotExistException, OperationFailedException;
 78  
 }