Package kameleon.document

Examples of kameleon.document.Document


   *       if there is an error while reading
   */
  private static Document readFromFile(InputStream is) throws IOException {
    ObjectInputStream in = new ObjectInputStream(is) ;
    try {
      Document doc = (Document) in.readObject() ;
      in.close() ;
      return doc ;
    } catch (ClassNotFoundException e) {
      //TODO Find better solution ?
      // Throw an IOException to trigger a throw of a FileReadingException
View Full Code Here


      String outputFile   = args[2] ;

      /* Read Document from file */
      System.out.printf("~~ DokuWiki Generator ~~\n") ;
      System.out.printf("Generating file '%s' ...\n", args[2]) ;
      Document source = IODocument.readFromFile(documentPath) ;

      /* Generate result file */
      Generator g = new Generator(new File(outputFile), source) ;
      g.generate() ;
      g.close() ;
View Full Code Here

      String[] genIds = this.message.getTargetFormatId() ;
      boolean fileNotGenerated = false ;
      try {
        PlugInInfo analyzer = this.model.getAnalyzer(
            this.message.getIdFormat()) ;
        Document document = GenerationModel.launchAnalyzer(
            analyzer, this.message.getPath()) ;

        this.message.setState(GenerationState.GENERATING) ;
        this.model.updateMessage(this.message) ;
       
View Full Code Here

      /* Analyze file */
      System.out.printf("~~ Word Analyzer ~~\n") ;
      System.out.printf("Analyzing file '%s'.\n",
          analyzedFile) ;
      Document d = Main.analyzeFile(analyzedFile) ;

      /* Correct analyze flaws */
      Main.refactorTitles(d) ;
      Main.refactorParagraphs(d) ;
      Main.refactorTables(d) ;
View Full Code Here

   *
   */
  @Override
  public Document analyze(String filePath, SupportedOptions options) throws KameleonException {
    /* Analyze file */
    Document d = Main.analyzeFile(filePath) ;

    /* Correct analyze flaws */
    Main.refactorTitles(d) ;
    Main.refactorParagraphs(d) ;
    Main.refactorTables(d) ;
View Full Code Here

      SyntaxAnalyzer a = new SyntaxAnalyzer(
          new LexicalAnalyzer(new InputStreamReader(
              new FileInputStream(cheminFichier), charset))) ;
      System.out.printf("Analyzing file '%s'.\n", cheminFichier) ;
      Symbol result = a.parse() ;
      Document d = (Document) result.value ;

      /* Write the analyse's result into a file */
      System.out.print("Saving result ....\n") ;
      IODocument.writeToFile(d, cheminEcriture);
      System.out.print("File successfully analyzed.\n") ;
View Full Code Here

TOP

Related Classes of kameleon.document.Document

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.