Class OLinkUtils

java.lang.Object
org.forgerock.doc.maven.utils.OLinkUtils

public final class OLinkUtils extends Object
Build olink target database files.
O(utside)links are a DocBook convention for describing links between XML documents. For background, read Bob Stayton's explanation of Olinking between documents.
The olink resolution mechanism described therein and used here depends on the relative locations of output files.
  • Method Details

    • createTargetDatabase

      public static void createTargetDatabase(File file, String format, AbstractDocbkxMojo mojo) throws IOException, org.apache.maven.plugin.MojoExecutionException
      Construct an olink target database document, except for chunked HTML.
      The document is an XML file that wraps target data documents. On a first pass, the docbkx-tools plugin applies the DocBook stylesheets with settings to generate such target data documents for each top-level DocBook document in a build. On a second pass, the docbkx-tools plugin applies the DocBook stylesheets with settings to resolve olinks in output documents. During the second pass, the docbkx-tools plugin requires this wrapper document to handle the target data documents with the correct relative locations.
      You pass the path to the target database document to docbkx-tools as the value of the <targetDatabaseDocument> parameter.
      Parameters:
      file - The file in which to write the target database.
      format - Output format such as pdf, html.
      mojo - Mojo with configuration information about the project.
      Throws:
      IOException - Failed to write to the target database file.
      org.apache.maven.plugin.MojoExecutionException - Failed to read document names from the mojo.
    • createTargetDatabase

      public static void createTargetDatabase(File file, String format, AbstractDocbkxMojo mojo, boolean isChunkedHtml) throws IOException, org.apache.maven.plugin.MojoExecutionException
      Construct an olink target database document for chunked HTML.
      The document is an XML file that wraps target data documents. On a first pass, the docbkx-tools plugin applies the DocBook stylesheets with settings to generate such target data documents for each top-level DocBook document in a build. On a second pass, the docbkx-tools plugin applies the DocBook stylesheets with settings to resolve olinks in output documents. During the second pass, the docbkx-tools plugin requires this wrapper document to handle the target data documents with the correct relative locations.
      You pass the path to the target database document to docbkx-tools as the value of the <targetDatabaseDocument> parameter.
      Parameters:
      file - The file in which to write the target database.
      format - Output format such as pdf, html.
      mojo - Mojo with configuration information about the project.
      isChunkedHtml - Set true for chunked HTML.
      Throws:
      IOException - Failed to write to the target database file.
      org.apache.maven.plugin.MojoExecutionException - Failed to read document names from the mojo.