Package org.apache.sis.internal.book
Class Assembler
java.lang.Object
org.apache.sis.internal.book.Assembler
Generates the developer guide from the given input file.
This class performs the following processing:
- Replace elements of the form
<xi:include href="introduction.html"/>by content of the<body>element in the file given by thehrefattribute. - Complete
<abbr>elements withouttitleattribute by reusing the last title used for the same abbreviation. This automatic insertion is performed only for the first occurrence of that abbreviation after ah?element. - Replace the
<!-- TOC -->comment by a table of content generated from all<h1>,<h2>, etc. found in the document.
- Since:
- 0.7
- Version:
- 1.3
- Author:
- Martin Desruisseaux (Geomatys)
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Assembler
public Assembler(File input) throws ParserConfigurationException, IOException, SAXException, BookException Creates a new assembler for the given input and output files.- Parameters:
input- the input file (e.g."sis-site/main/source/developer-guide/index.html").- Throws:
ParserConfigurationException- if this constructor cannot build the XML document.IOException- if an error occurred while reading the file.SAXException- if an error occurred while parsing the XML.BookException- if a logical error occurred while initializing the assembler.
-
-
Method Details
-
run
Assembles the document and writes to the destination.- Parameters:
output- the output file (e.g."site/content/en/developer-guide.html").- Throws:
IOException- if an error occurred while reading or writing file.SAXException- if an error occurred while parsing an input XML.BookException- if an error was found in the content of the XML file.TransformerException- if an error occurred while formatting the output XML.
-
main
Generates the"static/book/en|fr/developer-guide.html"files from"source/developer-guide/[fr/]index.html"files. The only argument expected by this method is the root ofsis-siteproject.- Parameters:
args- command-line arguments. Should contain exactly on value, which is the site root directory.- Throws:
Exception- if an I/O error, a XML parsing error or other kinds of error occurred.- Since:
- 0.8
-