Examples of DocumenterException


Examples of opennlp.ccg.grammardoc.DocumenterException

              "problem transforming output: "
                  + te.getMessageAndLocation(), te,
                  sourceFile);
        }
        catch(IOException ioe) {
          throw new DocumenterException(ioe);
        }
      }
    }
  }
View Full Code Here

Examples of opennlp.ccg.grammardoc.DocumenterException

      try { // cache for later
        templateCache.put(templateName,
            factory.newTemplates(new StreamSource(is)));
      }
      catch(TransformerConfigurationException tce) {
        throw new DocumenterException("problem loading template "
            + templateName.toString() + ": "
              + tce.getMessageAndLocation(), tce);
      }
    }
   
View Full Code Here

Examples of opennlp.ccg.grammardoc.DocumenterException

  private void doCopyFile(FileName fileName, File destDir)
      throws DocumenterException {
    InputStream in = getResource(fileName.name);

    if(in == null) {
      throw new DocumenterException("Could not find " + fileName.name);
    }

    File f = new File(destDir, fileName.name);
    documenterContext.log("Writing " + f.getAbsolutePath());

    try {
      FileOutputStream fileOut = new FileOutputStream(f);
      byte[] buffer = new byte[HTMLDocumenter.FILE_BUFFER_SIZE];

      int i;
      while((i = in.read(buffer)) != -1) {
        fileOut.write(buffer, 0, i);
      }

      in.close();
      fileOut.close();
    }
    catch(IOException ioe) {
      throw new DocumenterException("problem copying file: "
          + ioe.getMessage(), ioe);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.