1 package fr.in2p3.jsaga.adaptor.language; 2 3 import org.ogf.saga.error.BadParameterException; 4 import org.ogf.saga.error.NoSuccessException; 5 import org.w3c.dom.Document; 6 7 import java.io.InputStream; 8 9 /* *************************************************** 10 * *** Centre de Calcul de l'IN2P3 - Lyon (France) *** 11 * *** http://cc.in2p3.fr/ *** 12 * *************************************************** 13 * File: LanguageAdaptor 14 * Author: Sylvain Reynaud (sreynaud@in2p3.fr) 15 * Date: 14 juin 2007 16 * *************************************************** 17 * Description: */ 18 /** 19 * 20 */ 21 public interface LanguageAdaptor { 22 /** 23 * @return the name of the language 24 */ 25 public String getName(); 26 27 /** 28 * Initialize the job description parser (expl: load language definition resources) 29 */ 30 public void initParser() throws Exception; 31 32 /** 33 * Parse the job description 34 * @param jobDescStream the job description 35 * @return the job description as an XML document 36 * @throws BadParameterException if a syntax error occured 37 * @throws NoSuccessException if another error occured 38 */ 39 public Document parseJobDescription(InputStream jobDescStream) throws BadParameterException, NoSuccessException; 40 41 /** 42 * @return the path to the stylesheet to transform the XML job description to JSDL 43 */ 44 public String getTranslator(); 45 }