Package org.chiba.tools.schemabuilder

Examples of org.chiba.tools.schemabuilder.Schema2XForms


   * @param specID
   */
  private void buildForm(String schema, String instance, String form, String root,
      String workItemID, String sessionHandle, String userID, String specID){
   
    Schema2XForms builder = new Schema2XForms();
   
      ServletContext RP = getServletConfig().getServletContext();
      String filePath = RP.getRealPath(File.separator+"forms");  
   
    try{
      builder.setInputURI(filePath+File.separator+schema);
    }
    catch(IOException e){
      logger.debug("YAWLServlet IOException: "+e.toString());
    }
   
    File f = new File(filePath+File.separator+form+".xhtml");
   
    try{
      builder.setInstanceFile(filePath+File.separator+instance);
    }
    catch(IOException e){
      logger.debug("IOException: "+e.toString());
    }
   
    builder.setInstanceHref("http://www.w3.org/2001/XMLSchema-instance");
   
    // EG: YAWL = "http://localhost:8080/worklist/yawlFormServlet";
    builder.setAction(RP.getInitParameter("YAWL")+"?userID="+userID+
        "&sessionHandle="+sessionHandle+"&specID="+specID+
        "&workItemID="+workItemID+"&submit=submit");
   
    // EG: FormBase = "http://localhost:8080/YAWLXForms/"
    builder.setBase(RP.getInitParameter("FormBase"));
    builder.setOutputFile(f); // goes in chiba forms directory
    builder.setRootTagName(root);
    builder.setStylesheet("html4yawl.xsl");
    builder.setSubmitMethod("post");
    builder.setWrapperType("XHTML");
    builder.execute();
   
    deleteTempFile(filePath+File.separator+schema);
    deleteTempFile(filePath+File.separator+instance);
   
    fixFormParams(f);
View Full Code Here

TOP

Related Classes of org.chiba.tools.schemabuilder.Schema2XForms

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.