Examples of DocumentProcessor


Examples of edu.pitt.dbmi.nlp.noble.coder.processor.DocumentProcessor

   * get document processor for parsing documents
   * @return
   */
  public Processor<Document> getDocumentProcessor() {
    if(documentProcessor == null)
      documentProcessor = new DocumentProcessor();
    return documentProcessor;
  }
View Full Code Here

Examples of org.eclipse.help.internal.dynamic.DocumentProcessor

            ModelUtil.insertStyle(dom, styles[i]);
        }

        // filter the content
        if (domProcessor == null) {
          domProcessor = new DocumentProcessor(new ProcessorHandler[] { new FilterHandler(IntroEvaluationContext.getContext()) });
        }
        UAElement element = UAElementFactory.newElement(dom.getDocumentElement());
        domProcessor.process(element, null);
       
        // and resolve includes.
View Full Code Here

Examples of org.eclipse.help.internal.dynamic.DocumentProcessor

   * contributions, i.e. at least one other contribution has a link element
   * pointing to it.
   */
  private Set getLinkedContributionIds(List contributions) {
    if (processor == null) {
      processor = new DocumentProcessor();
    }
    final Set linkedContributionIds = new HashSet();
    ProcessorHandler[] linkFinder = new ProcessorHandler[] {
      new ValidationHandler(getRequiredAttributes()),
      new ProcessorHandler() {
View Full Code Here

Examples of org.eclipse.help.internal.dynamic.DocumentProcessor

      processedContributions = new HashSet();
    }
    // don't process the same one twice
    if (!processedContributions.contains(contribution)) {
      if (processor == null) {
        processor = new DocumentProcessor();
      }
      if (handlers == null) {
        DocumentReader reader = new DocumentReader();
        handlers = new ProcessorHandler[] {
          new NormalizeHandler(),
View Full Code Here

Examples of org.eclipse.help.internal.dynamic.DocumentProcessor

        }
        UAElement root = reader.read(in);
        if ("contexts".equals(root.getElementName())) { //$NON-NLS-1$
          // process dynamic content
          if (processor == null) {
            processor = new DocumentProcessor(new ProcessorHandler[] {
              new ValidationHandler(getRequiredAttributes()),
              new NormalizeHandler(),
              new IncludeHandler(reader, locale),
              new ExtensionHandler(reader, locale)
            });
View Full Code Here

Examples of org.eclipse.help.internal.dynamic.DocumentProcessor

  }
 
  private void process(List contributions) {
    if (processor == null) {
      DocumentReader reader = new DocumentReader();
      processor = new DocumentProcessor(new ProcessorHandler[] {
        new NormalizeHandler(),
        new IncludeHandler(reader, locale),
        new ExtensionHandler(reader, locale),
      });
    }
View Full Code Here

Examples of org.eclipse.help.internal.dynamic.DocumentProcessor

    URL url = bundle.getEntry(path);
    if (url != null) {
      InputStream in = url.openStream();
      UAElement extension = (UAElement)reader.read(in);
      if (processor == null) {
        processor = new DocumentProcessor(new ProcessorHandler[] {
          new ValidationHandler(getRequiredAttributes(), getDeprecatedElements())
        });
      }
      processor.process(extension, '/' + bundle.getSymbolicName() + '/' + path);
      IUAElement[] children = extension.getChildren();
View Full Code Here

Examples of org.eclipse.help.internal.dynamic.DocumentProcessor

    }

    // process dynamic content, normalize paths
    if (processor == null) {
      DocumentReader reader = new DocumentReader();
      processor = new DocumentProcessor(new ProcessorHandler[] {
        new FilterHandler(CheatSheetEvaluationContext.getContext()),
        new NormalizeHandler(),
        new IncludeHandler(reader, Platform.getNL()),
        new ExtensionHandler(reader, Platform.getNL())
      });
View Full Code Here

Examples of org.iupac.goldbook.goldify.processors.DocumentProcessor

    while((charsRead = inp.read(charBuffer)) > 0) {
      sb.append(charBuffer,0,charsRead);
    }
    String[] parts = filename.split("\\.");
      String ext = parts[parts.length-1].toLowerCase();
    DocumentProcessor dp = documentProcessorManager.getProcessorForType(ext);
    // where to put the output
    OutputStream output;
      if (outputFilename != null)
        output = new BufferedOutputStream(new FileOutputStream(outputFilename));
      else
        output = System.out;
    // write it there
      output.write(dp.process(sb.toString()).getBytes(charset));
    // close if file
      if (outputFilename != null)
        output.close();
  }
View Full Code Here

Examples of org.iupac.goldbook.goldify.processors.DocumentProcessor

    out.write(String.format("%c %d\n", firstChar, message.length).getBytes(charset));
       out.write(message);
  }
 
  private String process (String format, String input) throws GoldifyException {
    DocumentProcessor dp = dpm.getProcessorForType(format);
    return dp.process(input);
  }
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.