1 /**
2 * Copyright 2005-2013 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.rice.krms.impl.repository.language;
17
18 import org.kuali.rice.core.api.exception.RiceIllegalStateException;
19 import org.kuali.rice.krms.api.repository.proposition.PropositionDefinitionContract;
20
21 /**
22 * This class translates requirement components and statements into
23 * natural language.
24 */
25 public interface NaturalLanguageTranslator {
26 /**
27 * Translates a requirement component for a specific natural language
28 * usuage type (context) into natural language.
29 *
30 * @param proposition Proposition to be translated
31 * @param nlUsageTypeKey Natural language usage type key (context)
32 * @return Natural language requirement translation
33 * @throws org.kuali.student.r2.common.exceptions.DoesNotExistException Requirement component id does not exists
34 * @throws org.kuali.student.r2.common.exceptions.OperationFailedException
35 */
36 public String translateProposition(PropositionDefinitionContract proposition, String nlUsageTypeKey) throws RiceIllegalStateException;
37
38 /**
39 * Translates a requirement component for a specific natural language
40 * usuage type (context) and language locale (e.g. 'en' for English,
41 * 'de' for German) into natural language.
42 *
43 * @param proposition Proposition to be translated
44 * @param nlUsageTypeKey Natural language usage type key (context)
45 * @param language Translation language
46 * @return
47 * @throws org.kuali.student.r2.common.exceptions.DoesNotExistException
48 * @throws org.kuali.student.r2.common.exceptions.OperationFailedException
49 */
50 public String translateProposition(PropositionDefinitionContract proposition, String nlUsageTypeKey, String language) throws RiceIllegalStateException;
51
52
53 }