de.lmu.ifi.dbs.elki.application.internal
Class DocumentParameters

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.application.internal.DocumentParameters

public class DocumentParameters
extends Object

Class to generate HTML parameter descriptions for all classes implementing the Parameterizable interface. Used in documentation generation only.


Nested Class Summary
protected static class DocumentParameters.SortByOption
          Sort parameters by their option
 
Field Summary
private static String CSSFILE
           
private static String HEADER_CLASS_RESTRICTION
           
private static String HEADER_CLASS_RESTRICTION_EXTENDING
           
private static String HEADER_CLASS_RESTRICTION_IMPLEMENTING
           
private static String HEADER_DEFAULT_VALUE
           
private static String HEADER_KNOWN_IMPLEMENTATIONS
           
private static String HEADER_PARAMETER_FOR
           
(package private) static Logging logger
           
private static String MODIFICATION_WARNING
           
private static String NO_CLASS_RESTRICTION
           
private static String NO_DEFAULT_VALUE
           
 
Constructor Summary
DocumentParameters()
           
 
Method Summary
private static void appendClassRestriction(Document htmldoc, Class<?> restriction, Element elemdd)
           
private static void appendDefaultClassLink(Document htmldoc, Parameter<?,?> opt, Element p)
           
private static void appendDefaultValueIfSet(Document htmldoc, Parameter<?,?> par, Element optdd)
          Append string containing the default value.
private static void appendKnownImplementationsIfNonempty(Document htmldoc, ClassParameter<?> opt, Element elemdd)
           
private static void appendNoClassRestriction(Document htmldoc, Element elemdd)
           
private static void appendNoDefaultValue(Document htmldoc, Element optdd)
          Append string that there is not default value.
private static void buildParameterIndex(HashMapList<Class<?>,Parameter<?,?>> byclass, HashMapList<OptionID,Pair<Parameter<?,?>,Class<?>>> byopt)
           
protected static Constructor<?> getConstructor(Class<?> cls)
           
private static String linkForClassName(String name)
          Return a link for the class name
static void main(String[] args)
           
private static Document makeByClassOverview(HashMapList<Class<?>,Parameter<?,?>> byclass)
           
private static Document makeByOptOverview(HashMapList<OptionID,Pair<Parameter<?,?>,Class<?>>> byopt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

static final Logging logger

HEADER_PARAMETER_FOR

private static final String HEADER_PARAMETER_FOR
See Also:
Constant Field Values

HEADER_DEFAULT_VALUE

private static final String HEADER_DEFAULT_VALUE
See Also:
Constant Field Values

NO_DEFAULT_VALUE

private static final String NO_DEFAULT_VALUE
See Also:
Constant Field Values

HEADER_CLASS_RESTRICTION

private static final String HEADER_CLASS_RESTRICTION
See Also:
Constant Field Values

HEADER_CLASS_RESTRICTION_IMPLEMENTING

private static final String HEADER_CLASS_RESTRICTION_IMPLEMENTING
See Also:
Constant Field Values

HEADER_CLASS_RESTRICTION_EXTENDING

private static final String HEADER_CLASS_RESTRICTION_EXTENDING
See Also:
Constant Field Values

NO_CLASS_RESTRICTION

private static final String NO_CLASS_RESTRICTION
See Also:
Constant Field Values

CSSFILE

private static final String CSSFILE
See Also:
Constant Field Values

MODIFICATION_WARNING

private static final String MODIFICATION_WARNING
See Also:
Constant Field Values

HEADER_KNOWN_IMPLEMENTATIONS

private static final String HEADER_KNOWN_IMPLEMENTATIONS
See Also:
Constant Field Values
Constructor Detail

DocumentParameters

public DocumentParameters()
Method Detail

main

public static void main(String[] args)
Parameters:
args - Command line arguments

buildParameterIndex

private static void buildParameterIndex(HashMapList<Class<?>,Parameter<?,?>> byclass,
                                        HashMapList<OptionID,Pair<Parameter<?,?>,Class<?>>> byopt)

getConstructor

protected static Constructor<?> getConstructor(Class<?> cls)

makeByClassOverview

private static Document makeByClassOverview(HashMapList<Class<?>,Parameter<?,?>> byclass)

makeByOptOverview

private static Document makeByOptOverview(HashMapList<OptionID,Pair<Parameter<?,?>,Class<?>>> byopt)

appendDefaultClassLink

private static void appendDefaultClassLink(Document htmldoc,
                                           Parameter<?,?> opt,
                                           Element p)

appendClassRestriction

private static void appendClassRestriction(Document htmldoc,
                                           Class<?> restriction,
                                           Element elemdd)

appendNoClassRestriction

private static void appendNoClassRestriction(Document htmldoc,
                                             Element elemdd)

appendKnownImplementationsIfNonempty

private static void appendKnownImplementationsIfNonempty(Document htmldoc,
                                                         ClassParameter<?> opt,
                                                         Element elemdd)

appendDefaultValueIfSet

private static void appendDefaultValueIfSet(Document htmldoc,
                                            Parameter<?,?> par,
                                            Element optdd)
Append string containing the default value.

Parameters:
htmldoc - Document
par - Parameter
optdd - HTML Element

appendNoDefaultValue

private static void appendNoDefaultValue(Document htmldoc,
                                         Element optdd)
Append string that there is not default value.

Parameters:
htmldoc - Document
optdd - HTML Element

linkForClassName

private static String linkForClassName(String name)
Return a link for the class name

Parameters:
name - Class name
Returns:
(relative) link destination

Release 0.4.0 (2011-09-20_1324)