wiki:PublicationsTechSpecs

Publications Technical Specs

Publication Object

This object is more like a data holder to be stored and to be passed to the compilation engine

name: String //the description of the compilation i.e. "Java User Guide in PDF"
id: String //the unique identifier
status: String //the current status, can be "available", "queued on level [level number]", "in progress"
updated: Date //date of the last completed compilation

input: String //the uri of the input XML content
inputVersion: Integer //the version number of the input
inputFlowStat: String //the workflow status of the input

toolchain: String //the toolchain name
toolchainParams: Map<String, String> //the parameters for the toolchain

xsl: String //the uri of the XSL to be used
xslVersion: Integer //the version of the XSL
xslFlowStat: String //the workflow status of the XSL
xslParams: Map<String, String> //the parameters for the XSL

temp: Boolean //if the publication is temporary
automatic: Boolean //if the publication must be build everytime content changes
method: String //can be "file" or "dav"

output: String //the file name of the output

dav-server: String //where the file is to be stored
dav-user: String //user name to authenticate on the DAV server 
dav-pass: String //password to authenticate on the DAV server 
dav-port: Integer //the port the DAV server is listening onto

/* getters and setters */

Toolchain Object

name: String //the name of the toolchain as provided by the add-on
description: String //description of the toolchain i.e. "Convert DocBook5 to PDF"
params: Map<String, String> //the available parameters for the toolchain and their description(data type must be specified here)

/* getters and setters */

Calenco Add On Object

An add-on for Calenco is made for a specific XML schema.

String getName() //returns the name of the add-on which will be used as a property of the files supported by the add-on

List<String> getDependencies(String uri) //returns the dependencies of the file located at "uri"

boolean isSupported(String uri) //checks if the file at "uri" is supported by this add on
                                //meaning: the XML type of the file is supported AND is conform to the schema

List<Toolchain> getToolchains() //returns the Toolchain objects made available with this add-on

File transform(String xmlUri, String xslUri, String baseUri, String toolchainName,
               Map<String, String> toolchainParams,
               Map<String, String> xslParams) //performs a transformation according to the parameters provided

Add-on manager

The add-on manager searches for JAR files into a specific folder(to be defined) and then get a properties file(to be defined) from the JAR which specify the name of the add-on main class which must extend an abstract class(the above add on object) defined in calenco. When a file is imported(or updated) into Calenco, one checks if the file has an add-on supporting it, if so, the file has a property containing the name of the add-on, else an empty property(String). This allows the publications manager to provide the available toolchains for the specific XML type of the file to transform.