Package eu.bandm.tools.d2d2.base
Class Userdoc
java.lang.Object
eu.bandm.tools.d2d2.base.Userdoc
- Direct Known Subclasses:
UserdocInstantiated,UserdocUninstantiated
Common superclass for user documentation, instantiated or uninstantiated.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassPlug in class for painting expression terms of "reference" type. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Element_imgBig Logo to include it into the generated text.protected final List<Element_block_content> static final Stringstatic final Stringstatic final Stringstatic final StringHow to render the type ("chars" "tags", etc) in a header linestatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String(package private) static final Color(package private) static final Colorprotected final Stringprotected DocTextsTranslations of standard text components.(package private) @Opt TransformationIs != null after succesful loading.(package private) booleanIndicates whether loading ofdocTextXsltTransformationhas been tried.protected static final Text2Udom.ErrorStrategyFor parsing the docu_prefix text fragments.protected static final StringPrefix to each documentation text fragment, to get it parsed and rendered.protected Element_imgCache for the re-usable graphic representation of an un-mixed pcdata-only contents definition.(package private) static final StringGenerated file structure.(package private) static final StringGenerated file structure.(package private) FunctionLibrary<Node> Needed for Transfomation (once) and Application (multiple times).protected final Fileprotected final Stringprotected String[]The html text for an element to be defined with empty content.static final Stringstatic final Stringprotected final Element_prestatic final StringText separator to encode the two anchorpoint which are connected by a line in the "uses" SVG graphics.protected final Stringprotected final intstatic final StringName of the local file into which the default css resource will be copied into the generated directory.static final StringName of the local file into which the default java script resource will be copied into the generated directory.static final String(package private) static final StringGenerated file structure.protected final ModuleRegistryprotected MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> Evidentprotected MessageReceiver<SimpleMessage<String>> With location<String>, for MemString addressing.static final Stringstatic final Stringstatic final Stringstatic final StringPosition of the resource (relative to classDocTypes) which will be copied into the generated directory.protected StringPosition of the resource (relative to classDocTypes) which will be copied into the generated directory.protected final NamespaceName2String(package private) static final StringFor d2d/xslt conversion of the documentation text fragments.(package private) static final StringFor d2d/xslt conversion of the documentation text fragments.protected final Stringprotected final List<Element_li> static final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUserdoc(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, int debuglevel, File generatedDir, int lineWidth, ModuleRegistry moduleRegistry, String languagecode, String generationString, String dateAndTime, NamespaceName2String stylesheetParams) Only constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidInsert a jump back to the table of contents into the growing html body.(package private) Element_aanchor(Definition def) (package private) Element_aanchor(ImportItem x) (package private) Element_a(package private) Element_aGenerate an anchor without any visible content and with the given id.protected voidcopyResource(String resourceFileName, String localFileName) protected @Opt Element_block_content[]do_renderDocu(String docu_text, String docu_ident) Translate the d2d-encoded documentation text collected for one element to udom and then by standard xslt rules to xhtml.protected voiderror(Location<XMLDocumentIdentifier> loc, String s, Object... args) Evidentprotected voidEvidentprotected voidEvidentprotected Element_block_content @Opt []f_renderDocu(@Opt CheckedList<LocString> in, String docu_ident) Translate the d2d-encoded documentation text collected for one element to udom and then by standard xslt rules to xhtml.protected voidEvidentprotected abstract voidgetHrefTooltipAlt(Reference ref, String[] out) Callback method to deliver these three values for the graphic rendering of the given reference.protected Element_block_content @Opt []getRenderedDocu(SourceItem item) static String(package private) Element_ajump(Definition def, Element_a.Content... contents) (package private) Element_ajump(ImportItem x, Element_a.Content... contents) (package private) Element_ajump(Module mod, Element_a.Content... contents) (package private) Element_a(package private) Element_ajumpName(Definition def) protected voidPrepare the txsl Application.(package private) Element_h2make_h2_with_aname(String t, String Xname) (package private) voidmake_li_text_localhref(List<Element_li> v, String t, String href) protected @Opt Element_tablemakeDocuTable(Set<Module> modules, Predicate<Definition> filter) Show for which raw definitions which documentation and transformation entries exist.protected voidmakeEnumTable(Enumeration def) Generates a tabular visualisation of an enum, following the numerical values.protected abstract voidService Access Point callable by client.voidmakePngAndMap(XRegExp def0, String modname, Color backgroundColor) Call the syntax graph creation with standard parameters.voidmakePngAndMap(XRegExp def0, String modName, Color backgroundColor, SyntaxGraph.LayoutParameters layoutParams) Create one single graphic file containing the graphic representation of the syntax of one single definition.(package private) StringTranslate a text fragment of pre-defined infrastructure text.(package private) StringTranslate and format a text fragment of pre-defined infrastructure text.protected Element_tr.Choice_1_Alt_2protected Element_tr.Choice_1_Alt_2protected voidrenderDocu(SourceItem item) Convert the docu text for the given item, selected by the value oftargetcodefrom d2d source into xhtml.protected Stringprotected static StringShort text = the keyword in the d2d definition format, which gives the kind of a definition.(package private) List<Element_p.Content> splitWithAlerts(String text) Render into paragraph contents, printing marked segments in warning color.protected voidEvident
-
Field Details
-
local_copy_js
Name of the local file into which the default java script resource will be copied into the generated directory. Exactly this file name is included by the generated "usage survey" SVG file directly.- See Also:
-
resource_position_ddfdoc_js
Position of the resource (relative to classDocTypes) which will be copied into the generated directory. @see #local_copy_js Can be overwritten by subclasses. -
local_copy_css
Name of the local file into which the default css resource will be copied into the generated directory. If the user stylesheet parameters are empty at the positionConstants.stylesheet_param_cssUrls, then this file name is used as a default for inclusion. (Implemented in "Tasks"!) Otherwise it must appear explicitly in the user's stylesheet parameters.- See Also:
-
bigLogo
Big Logo to include it into the generated text. -
resource_position_ddfdoc_css
Position of the resource (relative to classDocTypes) which will be copied into the generated directory. @see #local_copy_css- See Also:
-
item_in_line_separator
Text separator to encode the two anchorpoint which are connected by a line in the "uses" SVG graphics. Attention, this value must be in in sync with ddfDoc.js- See Also:
-
target_module_name
For d2d/xslt conversion of the documentation text fragments.- See Also:
-
target_top_tag
For d2d/xslt conversion of the documentation text fragments.- See Also:
-
filename_xhtmldoc
Generated file structure.- See Also:
-
filename_contentGraph
Generated file structure.- See Also:
-
mapname_contentGraph
Generated file structure.- See Also:
-
classname_alert
- See Also:
-
classname_defcategory_in_header
How to render the type ("chars" "tags", etc) in a header line- See Also:
-
classname_defname_in_header
- See Also:
-
classname_modulename_in_header
- See Also:
-
classname_modulename_as_header_in_list
- See Also:
-
classname_contextpath_in_header
- See Also:
-
classname_text_generic
- See Also:
-
classname_syntaxgraph_image
- See Also:
-
classname_enum_intconst
- See Also:
-
classname_enumtable
- See Also:
-
classname_nestedModuleTable
- See Also:
-
classname_docuSurveyTable
- See Also:
-
classname_import_relevant
- See Also:
-
classname_import_repeat
- See Also:
-
classname_import_recursive
- See Also:
-
classname_creationcommand
- See Also:
-
imageFormat
- See Also:
-
image_file_suffix
- See Also:
-
map_prefix
- See Also:
-
anchorname_toc
- See Also:
-
anchorname_listOfHomonyms
- See Also:
-
prefix_anchor_module
- See Also:
-
prefix_anchor_definition
- See Also:
-
prefix_anchor_importitem
- See Also:
-
color_syntaxGraph_background_dynamic
-
color_syntaxGraph_background_static
-
docu_prefix
Prefix to each documentation text fragment, to get it parsed and rendered.- See Also:
-
docu_errorstrategy
For parsing the docu_prefix text fragments. -
docTexts
Translations of standard text components. -
msg
Evident -
msgMEMSTRING
With location<String>, for MemString addressing. -
generatedDir
-
lineWidth
protected final int lineWidth -
moduleRegistry
-
languagecode
-
targetcode
-
generationString
-
dateAndTime
-
stylesheetParams
-
xml_lineWidth
public static final int xml_lineWidth- See Also:
-
bodysubs
-
toctoclist
-
el_img_pcdata
Cache for the re-usable graphic representation of an un-mixed pcdata-only contents definition. -
indicateGENERIC
-
warnGeneric
-
docTextXsltTransformation
Is != null after succesful loading. -
docTextXsltTransformationLoaded
boolean docTextXsltTransformationLoadedIndicates whether loading ofdocTextXsltTransformationhas been tried. -
functionLibrary
FunctionLibrary<Node> functionLibraryNeeded for Transfomation (once) and Application (multiple times). -
hrefTooltipAlt
-
html_repr_empty
The html text for an element to be defined with empty content. -
jumpToToc
-
-
Constructor Details
-
Userdoc
protected Userdoc(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, int debuglevel, File generatedDir, int lineWidth, ModuleRegistry moduleRegistry, String languagecode, String generationString, String dateAndTime, NamespaceName2String stylesheetParams) Only constructor- Parameters:
msg- MessageReceiverdebuglevel- from 0 to 100, seeModuleRegistry.setTracelevel(int).generatedDir- must exist as a directory, but should be empty.lineWidth- for the printing of the re-constructed definition fragments
-
-
Method Details
-
makeHtmlDoc
protected abstract void makeHtmlDoc()Service Access Point callable by client. -
error
Evident -
warning
Evident -
error
Evident -
error
Evident -
failure
Evident -
copyResource
-
anchor
Generate an anchor without any visible content and with the given id. -
anchor
-
anchor
-
anchor
-
jump
-
jumpName
-
jump
-
jump
-
jump
-
packTd
-
packTd
-
mtext
Translate a text fragment of pre-defined infrastructure text. -
mtext
Translate and format a text fragment of pre-defined infrastructure text. -
joinAllDocStrings
-
splitWithAlerts
Render into paragraph contents, printing marked segments in warning color. -
loadDocTextXsltTransformation
protected void loadDocTextXsltTransformation()Prepare the txsl Application. Load the xslt code for ddf:meta_model to targget=xhtml_1_0, using the default built-in function library. -
renderDocu
Convert the docu text for the given item, selected by the value oftargetcodefrom d2d source into xhtml. Append the latter to the growing listbodysubs. -
getRenderedDocu
-
f_renderDocu
protected Element_block_content @Opt [] f_renderDocu(@Opt @Opt CheckedList<LocString> in, String docu_ident) Translate the d2d-encoded documentation text collected for one element to udom and then by standard xslt rules to xhtml. -
do_renderDocu
Translate the d2d-encoded documentation text collected for one element to udom and then by standard xslt rules to xhtml. -
getHrefTooltipAlt
Callback method to deliver these three values for the graphic rendering of the given reference. -
makePngAndMap
Call the syntax graph creation with standard parameters. Uses the default constructor ofSyntaxGraph.LayoutParameters -
makePngAndMap
public void makePngAndMap(XRegExp def0, String modName, Color backgroundColor, SyntaxGraph.LayoutParameters layoutParams) Create one single graphic file containing the graphic representation of the syntax of one single definition.
Calls layouter and painter, and let the latter paint to a buffered image and writes this into a PNG file the name of which is generated from the path of the definition.
Add corresponding html:img and html:map Elements to the global register bodysubs. The map makes mouse clicks to the references jump to the corresponding definitions.- Parameters:
modName- used to generated file names. Attention: iff def0 is rewritten, then its "fullpath()" is not usable as an XML-ident due to "$"
-
showCategory_short
Short text = the keyword in the d2d definition format, which gives the kind of a definition. -
showCategory_long
-
makeEnumTable
Generates a tabular visualisation of an enum, following the numerical values. (This because doc texts are stored with the numeric value.) Representation can be "asis", "numeric", or "first name". -
makeDocuTable
Show for which raw definitions which documentation and transformation entries exist. (This table is not clickable, because there is not alwayas a one-to-one relations between source text and instantiations.) -
addJumpToToc
protected void addJumpToToc()Insert a jump back to the table of contents into the growing html body. -
make_li_text_localhref
-
make_h2_with_aname
-