Class UserdocUninstantiated

java.lang.Object
eu.bandm.tools.d2d2.base.Userdoc
eu.bandm.tools.d2d2.base.UserdocUninstantiated

public class UserdocUninstantiated extends Userdoc
Create Xhtml documentation of an unresolved "raw" Module.

Usage pattern: (1) Create fresh instance
(2) call main entry method makeHtmlDoc()
(3) Then the directory (specified in (1)) will be filled with main "index.html" and many "*.png", etc.

The generated xhtml has the following structure [fileHeader] [=H1] [listOfModules] __TOC__ = anchorname_toc [preamble] // nach oben ??? //per module: [moduleHeader] [=H2] __MODULE__[x] [moduleDocText] [generics Warning] [homonymTags] [importTable] [=H3] [importItem] __IMPORTITEM__[x.z] [definitionList] [=H3] (NOT "taglist" !) //per definition: [defHeader] [=H3] __DEFINITION__[x.y] [defDocText] [syntaxGraph] [defSrcText] [defUsedIn] // ??? [defHomonyms] // ??? [defFooter] //=source and xml repr. [docuTable] [=H2] __TOC__docEntries

  • Field Details

    • topModule

      protected final Module topModule
    • topModuleName

      protected final String topModuleName
    • allModules

      protected final Set<Module> allModules
    • ref2jump

      protected final SortedMap<String,@Opt Element_a> ref2jump
      The jump for rendering a reference. The stored value is ==null iff not found. Must be global because it is read by theallback method {@link #getHrefTooltipAlt].
    • ref2longName

      protected final SortedMap<String,String> ref2longName
      Tooltip text, explains the "tag"-text as a reference to a definition. Must be global because it is read by theallback method {@link #getHrefTooltipAlt].
    • importOccurence

      protected final Multimap<String,XRegExp> importOccurence
      Maps import prefices to the definitions which make use of it.
    • defs2tag

      protected final PreimageMap<Definition,String> defs2tag
      Maps every found definition to its tag String. Used to detect homonyms.
    • defs2tag_global

      protected final PreimageMap<Definition,String> defs2tag_global
      Sum of defs2tag over all modules.
  • Constructor Details

    • UserdocUninstantiated

      public UserdocUninstantiated(MessageReceiver<SimpleMessage<XMLDocumentIdentifier>> msg, int debuglevel, File generatedDir, int lineWidth, ModuleRegistry moduleRegistry, Module mod, String targetcode, String generationString, NamespaceName2String stylesheetParams)
      Only constructor
      Parameters:
      msg - MessageReceiver
      debuglevel - from 0 to 100, see ModuleRegistry#setTracelevel().
      generatedDir - must exist as a directory, but should be empty.
      lineWidth - for the printing of the re-constructed definition fragments
      generationString - . Should contain the date of creation extractable by Formats.extractDate(String) All HTML mark-up will be removed when the generation string is inserted in an XML comment.
  • Method Details

    • getHrefTooltipAlt

      protected void getHrefTooltipAlt(Reference ref, String[] result)
      Callback method to deliver these three values for the graphic rendering of the given reference.
      Specified by:
      getHrefTooltipAlt in class Userdoc
    • renderImportList

      protected void renderImportList(Module module)
    • renderOneModule

      protected void renderOneModule(Module module)
      Analyze data and generate html output for one module. Find for all reference texts the link target for syntax graph rendering. Detect "undef reference" errors, possible since this module is not instantiated. The sequence of html output is
      1. Print a header,
      2. print the module-related docu text, iff present in the selected language,
      3. call #renderOneDefinition(Definition) for all definitions contained.
      4. Print a table of all import items.
    • renderOneDef

      protected void renderOneDef(Module module, String modulename, Definition def)
      Generate all text for one particular definition in the main text body.
    • makeHtmlDoc

      public void makeHtmlDoc()
      Description copied from class: Userdoc
      Service Access Point callable by client.
      Specified by:
      makeHtmlDoc in class Userdoc