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
Modifier and TypeClassDescriptionclass
Plug in class for painting expression terms of "reference" type. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final Element_img
Big Logo to include it into the generated text.protected final List<Element_block_content>
static final String
static final String
static final String
static final String
How to render the type ("chars" "tags", etc) in a header linestatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
(package private) static final Color
(package private) static final Color
protected DocTexts
Translations of standard text components.(package private) @Opt Transformation
Is != null after succesful loading.(package private) boolean
Indicates whether loading ofdocTextXsltTransformation
has been tried.protected static final Text2Udom.ErrorStrategy
For parsing the docu_prefix text fragments.protected static final String
Prefix to each documentation text fragment, to get it parsed and rendered.protected Element_img
cache for the re-usable graphic represenation of an un-mixed pcdata-only contents definition.(package private) static final String
Generated file structure.(package private) static final String
Generated file structure.(package private) FunctionLibrary<Node>
Needed for Transfomation (once) and Application (multiple times).protected final File
protected final String
protected String[]
The html text for an element to be defined with empty content.static final String
static final String
protected final Element_pre
static final String
Text separator to encode the two anchorpoint which are connected by a line in the "uses" SVG graphics.protected final String
protected final int
static final String
Name of the local file into which the default css resource will be copied into the generated directory.static final String
Name 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 String
Generated file structure.protected final ModuleRegistry
protected MessageReceiver<SimpleMessage<XMLDocumentIdentifier>>
Evidentprotected MessageReceiver<SimpleMessage<String>>
With location<String>, for MemString addressing.static final String
static final String
static final String
static final String
Position of the resource (relative to classDocTypes
) which will be copied into the generated directory.protected String
Position of the resource (relative to classDocTypes
) which will be copied into the generated directory.protected final NamespaceName2String
(package private) static final String
For d2d/xslt conversion of the documentation text fragments.(package private) static final String
For d2d/xslt conversion of the documentation text fragments.protected final String
protected final List<Element_li>
static final int
-
Constructor Summary
ModifierConstructorDescriptionprotected
Userdoc
(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, int debuglevel, File generatedDir, int lineWidth, ModuleRegistry moduleRegistry, String languagecode, String generationString, NamespaceName2String stylesheetParams) Only constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Insert a jump back to the table of contents into the growing html body.(package private) Element_a
anchor
(Definition def) (package private) Element_a
anchor
(ImportItem x) (package private) Element_a
(package private) Element_a
Generate an anchor without any visible content and with the given id.protected void
copyResource
(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 void
error
(Location<XMLDocumentIdentifier> loc, String s, Object... args) Evidentprotected void
Evidentprotected void
Evidentprotected 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 void
Evidentprotected abstract void
getHrefTooltipAlt
(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_a
jump
(Definition def, Element_a.Content... contents) (package private) Element_a
jump
(ImportItem x, Element_a.Content... contents) (package private) Element_a
jump
(Module mod, Element_a.Content... contents) (package private) Element_a
(package private) Element_a
jumpName
(Definition def) protected void
Prepare the txsl Application.(package private) Element_h2
make_h2_with_aname
(String t, String Xname) (package private) void
make_li_text_localhref
(List<Element_li> v, String t, String href) protected @Opt Element_table
makeDocuTable
(Set<Module> modules, Predicate<Definition> filter) Show for which raw definitions which documentation and transformation entries exist.protected void
makeEnumTable
(Enumeration def) Generates a tabular visualisation of an enum, following the numerical values.protected abstract void
Service Access Point callable by client.void
makePngAndMap
(XRegExp def0, String modname, Color backgroundColor) Call the syntax graph creation with standard parameters.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.(package private) String
Translate a text fragment of pre-defined infrastructure text.(package private) String
Translate and format a text fragment of pre-defined infrastructure text.protected Element_tr.Choice_1_Alt_2
protected Element_tr.Choice_1_Alt_2
protected void
renderDocu
(SourceItem item) Convert the docu text for the given item, selected by the value oftargetcode
from d2d source into xhtml.protected String
protected static String
Short 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 void
Evident
-
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_htmldoc
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
-
stylesheetParams
-
xml_lineWidth
public static final int xml_lineWidth- See Also:
-
bodysubs
-
toctoclist
-
el_img_pcdata
cache for the re-usable graphic represenation of an un-mixed pcdata-only contents definition. -
indicateGENERIC
-
warnGeneric
-
docTextXsltTransformation
Is != null after succesful loading. -
docTextXsltTransformationLoaded
boolean docTextXsltTransformationLoadedIndicates whether loading ofdocTextXsltTransformation
has 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, 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 oftargetcode
from 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
-