Package org.eclipse.help.internal.dynamic

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


          .getValue();

      // create a toc for site
      URL fileUrl = Activator.getInstance().getBundle().getEntry(
          "toc_template.xml");
      DocumentReader reader = new DocumentReader();
      try {
        InputStream in = fileUrl.openStream();
        if (in != null) {
          Toc toc = (Toc) reader.read(in);
          toc.setLabel(siteDiplayName);
          SiteToc siteToc = new SiteToc(toc, versionMap);
          TocContribution contribution = new TocContribution();
          contribution.setCategoryId(siteName);
          contribution.setContributorId(Activator.getInstance()
View Full Code Here


  }

  @SuppressWarnings("restriction")
  private TocContribution parse(TocFile tocFile) {
    try {
      DocumentReader reader = new DocumentReader();
      InputStream in = tocFile.getInputStream();
      if (in != null) {
        Toc toc = (Toc) reader.read(in);
        in.close();
        TocContribution contribution = new TocContribution();

        // Wrap the parsed toc to modify the href path with some prefix.
        contribution.setToc(new TocWrapper(tocFile.getID(), toc));
View Full Code Here

    if (!processedContributions.contains(contribution)) {
      if (processor == null) {
        processor = new DocumentProcessor();
      }
      if (handlers == null) {
        DocumentReader reader = new DocumentReader();
        handlers = new ProcessorHandler[] {
          new NormalizeHandler(),
          new LinkHandler(),
          new AnchorHandler(),
          new IncludeHandler(reader, contribution.getLocale()),
View Full Code Here

  private DocumentReader reader;

  public TocContribution parse(TocFile tocFile) throws IOException, SAXException, ParserConfigurationException {
    if (reader == null) {
      reader = new DocumentReader();
    }
    InputStream in = tocFile.getInputStream();
      if (in != null) {
      Toc toc = (Toc)reader.read(in);
      TocContribution contribution = new TocContribution();
View Full Code Here

    try {
      // load the file
      InputStream in = ResourceLocator.openFromPlugin(descriptor.getBundleId(), descriptor.getFile(), locale);
        if (in != null) {
        if (reader == null) {
          reader = new DocumentReader();
        }
        UAElement root = reader.read(in);
        if ("contexts".equals(root.getElementName())) { //$NON-NLS-1$
          // process dynamic content
          if (processor == null) {
View Full Code Here

    }
  }
 
  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

  /*
   * Parses the specified content extension XML file into model elements.
   */
    public ContentExtension[] parse(Bundle bundle, String path) throws IOException, SAXException, ParserConfigurationException {
      if (reader == null) {
        reader = new DocumentReader();
      }
    URL url = bundle.getEntry(path);
    if (url != null) {
      InputStream in = url.openStream();
      UAElement extension = (UAElement)reader.read(in);
View Full Code Here

  private DocumentReader reader;
 
    public IndexContribution parse(IndexFile indexFile) throws IOException, SAXException, ParserConfigurationException {
    if (reader == null) {
      reader = new DocumentReader();
    }
    InputStream in = indexFile.getInputStream();
    if (in != null) {
      Index index = (Index)reader.read(in);
      IndexContribution contrib = new IndexContribution();
View Full Code Here

      }
    }

    // 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

TOP

Related Classes of org.eclipse.help.internal.dynamic.DocumentReader

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.