Name

dbdoclet — Javadoc to DocBook converter

Synopsis

dbdoclet [OPTIONS]

Description

The reuse of javadoc content in presentation-neutral form is a frequent problem. One possible solution is to convert javadoc to DocBook XML, because DocBook is a semantic markup language for documentation, which enables its users to create document content that captures the logical structure of the content.

The command line tool dbdoclet can be used to convert javadoc to DocBook. Because javadoc is written as HTML tags and HTML elements are often used not as intended, the possibilities for such a transformation are somewhat limited.

dbdoclet is part of the dbdoclet suite of tools. For more information visit http://www.dbdoclet.org.

Options

-d

Specifies the DocBook XML destination directory.

-profile, -p

A profile file with predefined settings.

-title

The title of the generated documentation. The default title is the name of the first java package.

Configuration

The details of a transformation are controlled by a profile file. A profile file offers a lot of possibilities to influence the transformation. The following example shows a typical profile file:

Syntax

A profile file consists mainly of sections. Sections are used to group parameters which share the same context. Every section must start with the keyword section followed by the name of the section. After the name comes the block of parameters, which is surrounded by curly braces. Parameters can be of type String, Number, Boolean or Array. Strings must be framed with double quotes. If the String contains newlines, use three double quotes instead of one. Arrays are framed with square brackets. Inside an array, the elements must be comma separated. Every assignment must be finished by a semicolon. Multi line comments have the form /* my comment */ , single line comments look like // my comment\n.

Mandatory Elements

A profile for dbdoclet must start with the line transformation dbdoclet;.

Section dbdoclet

The section dbdoclet controls what kind of documentation should be created, e.g. which sections and which information should be contained in the resulting media.

chunk-docbook

Split the output into multiple files. If this parameter is set to true, a separate file for every class will be created.

class-diagram-font-size

Defines the size of the class diagram font in points (pt). This parameter indirectly influences the size of the generated diagrams.

class-diagram-width

Defines the maximum width of the generated class diagrams. The default value is 700.

create-appendix

If set to true, additional sections such as "Constants values" or "Statistics" will generated inside an appendix. Otherwise they will be appended as ordinary chapters. The default value is true.

create-author-info

If set to true, the javadoc tag @author will be processed. This parameter depends on the create-meta-info. The default value is true.

create-class-diagram

If set to true, an inheritance class diagram is created for every class. The default value is true.

create-deprecated-info

If set to true, @deprecated javadoc tags and annotations will be processed. A warning element will be created for each. The default value is true.

create-deprecated-list

If set to true, a section is created at the end of the document, which contains a list of all deprecated elements. The default value is true.

create-exception-info

If set to true, the javadoc tag @exception will be processed. The default value is true.

create-field-info

If set to true, the field comments are processed. The default value is true.

create-fully-qualified-names

If set to true, full qualified names of classes, fields, methods and parameters are used. The default is false.

create-inheritance-info

If set to true, an inheritance

create-inherited-from-info

If set to true, a section with all inherited methods is created. The default is true.

create-meta-info

If set to true, a section with all meta javadoc tags is created. Meta tags are all tags but @deprecated, @param, @return, @serialField and @throws. If this parameter is set to false, tags like @author will be suppresed

create-method-info

If set to true, the method comments are processed. The default value is true.

create-parameter-info

If set to true, the javadoc tag @param will be processed. The default value is true.

create-section-constant-values

If set to true, a section containing all constant values will be created at the end of the document. The default value is true.

create-see-also-info

If set to true, the javadoc tag @see will be processed. The default value is true.

create-serial-field-info

If set to true, the javadoc tag @serialField will be processed. The default value is true.

create-since-info

If set true, the javadoc tag @since will be processed. The default value is true.

create-statistics

If set to true, a section with statistical information will be created at the end of the document. The default value is false.

create-synopsis

If set to true, the synopsis section will be created. The default value is true.

create-version-info

If set to true, the javadoc tag @version will be processed. The default value is true.

document-style

This parameter influences the structure of the generated DocBook XML. You can choose between style "table" and style "variablelist". The default is "table".

force-annotation-documentation

If set to true, annotation are being processed, regardless of the annotation @Documented being present or not. The default value is false.

id-style

This parameter influences the generation of id values. You can choose between "numbered" and "java". The default is "numbered".

list-presentation

This parameter is used for generated variablelist elements. If the parameter is set, its value will be used as attribute "list-presentation" of the a dbfo processing instruction. For more information have look at the DocBook XSL documentation.

logo-path

This parameter defines a logo image, which will be inserted as mediaobject in the info section.

overview-title

The content of this parameter will be used as title for the overview section, if no title can be extracted from the overview file.

Section DocBook

abstract

The text for the abstract element of the info section. If the text is structured with newlines, use three double quotes as delimiters. If the text starts with a "<" character, it is embedded into an abstract element, otherwise the text is embedded into an para element inside of an abstract element. The text will parsed and can contain DocBook elements.

add-index

If true, an index element is appended to the end of the document.

author-email

The email address of the author. If this parameter is set, it is used to create an info section at the beginning of the document.

author-firstname

The firstname of the author. If this parameter is set, it is used to create an info section at the beginning of the document.

author-surname

The surname of the author. If this parameter is set, it is used to create an info section at the beginning of the document.

Example

transformation dbdoclet;

section dbdoclet {
  create-appendix = true;
  class-diagram-font-size = 10;
  class-diagram-width = 800;
  create-author-info = true;
  create-class-diagram = true;
  create-deprecated-info = true;
  create-deprecated-list = true;
  create-exception-info = true;
  create-fully-qualified-names = false;
  create-inherited-from-info = true;
} 

section DocBook {
  abstract = """ 
Der <emphasis>Largo</emphasis>-Editor dient der Erzeugung
von Notenpapier in historischen Formaten. Er
ermöglicht vielfältige Einstellungesmöglichkeiten.
""";
  add-index = true;  
  author-email = "michael.fuchs@dbdoclet.org";
  author-firstname = "Michael";
  author-surname = "Fuchs";
  title = "Musikeditor";
  document-element = "book";
  corporation = "Ingenieurbüro Michael Fuchs";
} 

Copyright

Copyright 2001-2013 Michael Fuchs. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.