org.sandev.generator
Class PackageHTMLGenerator

java.lang.Object
  extended byorg.sandev.generator.GeneratorCommon
      extended byorg.sandev.generator.FileGeneratorBase
          extended byorg.sandev.generator.PackageHTMLGenerator
All Implemented Interfaces:
org.sandev.sandbuild.SandGenerator

public class PackageHTMLGenerator
extends FileGeneratorBase
implements org.sandev.sandbuild.SandGenerator

Create a package summary a node declaration. This creates and input and output summary for each node declaration.


Field Summary
 
Fields inherited from class org.sandev.generator.GeneratorCommon
CONTEXT_CONFIGURATION, CONTEXT_CONTROL, CONTEXT_FRAMEWORK, CONTEXT_MESSAGING, CONTEXT_PERSISTENCE, CONTEXT_UI, DEFAULT_LINE_LENGTH, MESSAGE_INTERFACES
 
Constructor Summary
PackageHTMLGenerator()
           
 
Method Summary
 void delete(org.sandev.sandbuild.SandDecl sd, java.io.File baseDir, java.lang.String extra)
          Delete the package summary file
protected static java.lang.String linkFor(java.lang.String messageName)
          Return a hyperlink for this fully qualified message name.
protected static java.lang.String sourceToURL(java.io.File src)
          Given a sourcefile specification, return something valid to use as a hyperlink.
protected static java.lang.String structNameForMessage(java.lang.String messageName)
          Given a fully qualified message name, return the source fully qualified struct name.
 void write(org.sandev.sandbuild.SandDecl sd, java.io.File baseDir, java.lang.String extra)
          Write the package summary file
protected  void writeClass(java.io.PrintStream out, com.sun.javadoc.ClassDoc cd)
          Write the summary package.html file
protected  void writeIOTable(java.io.PrintStream out, com.sun.javadoc.ClassDoc cd)
          Write the input/output summary table.
 
Methods inherited from class org.sandev.generator.FileGeneratorBase
cleanup, generate, trackFileWrite
 
Methods inherited from class org.sandev.generator.GeneratorCommon
capitalize, copyfile, deletefile, filterHTMLLine, getDeclaredFields, getFields, getInheritanceHierarchy, getLastAppProject, getLastUtilDir, getLongInstanceName, getPrintStream, getSandProject, getShortInstanceName, getUtilPackage, getVisibleFields, isBasic, isLongReferenceArray, isMessageInterface, isParentAbstract, isPrimitive, isRootStruct, isVowel, log, nextToken, pluralize, rangeEscape, removePlatformDecls, trackFileDelete, uncapitalize, writeDefaultCtor, writeDescription, writeHTMLContents, writeMessageImports, writeSectionName, writeStandardCommentID, writeXHTMLFooter, writeXHTMLFooter, writeXHTMLHeader, writeXHTMLHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sandev.sandbuild.SandGenerator
cleanup, generate
 

Constructor Detail

PackageHTMLGenerator

public PackageHTMLGenerator()
Method Detail

write

public void write(org.sandev.sandbuild.SandDecl sd,
                  java.io.File baseDir,
                  java.lang.String extra)
           throws org.sandev.sandbuild.SandGeneratorException
Write the package summary file

Overrides:
write in class FileGeneratorBase
Throws:
org.sandev.sandbuild.SandGeneratorException

delete

public void delete(org.sandev.sandbuild.SandDecl sd,
                   java.io.File baseDir,
                   java.lang.String extra)
            throws org.sandev.sandbuild.SandGeneratorException
Delete the package summary file

Overrides:
delete in class FileGeneratorBase
Throws:
org.sandev.sandbuild.SandGeneratorException

writeClass

protected void writeClass(java.io.PrintStream out,
                          com.sun.javadoc.ClassDoc cd)
                   throws org.sandev.sandbuild.SandGeneratorException
Write the summary package.html file

Throws:
org.sandev.sandbuild.SandGeneratorException

writeIOTable

protected void writeIOTable(java.io.PrintStream out,
                            com.sun.javadoc.ClassDoc cd)
                     throws org.sandev.sandbuild.SandGeneratorException
Write the input/output summary table. Subscribe, call, receive, send. Input on left, output on right, configurable stuff on top, passive capabilities below.

Throws:
org.sandev.sandbuild.SandGeneratorException

linkFor

protected static java.lang.String linkFor(java.lang.String messageName)
Return a hyperlink for this fully qualified message name. This could be made public or factored elsewhere as needed. An AggregateUpdate is a message, but it has no source struct so we have to fake out a link for it by looking up BaseUserStruct and substituting appropriately.


structNameForMessage

protected static java.lang.String structNameForMessage(java.lang.String messageName)
Given a fully qualified message name, return the source fully qualified struct name.


sourceToURL

protected static java.lang.String sourceToURL(java.io.File src)
Given a sourcefile specification, return something valid to use as a hyperlink. The input to this method is a source file specification, and we want to return a relative URL to where we currently are. To do this, we make a few assumptions:
  1. We are in the package-summary.html file for a node definition. This has the format SAND_HOME/apps/SOMEAPP/docs/javadoc/DOMAINCLASS/DOMAIN/APPNAME/NODENAME/package-summary.html so ../../../../../../../.. is the relative path to SAND_HOME
  2. Everything after and including the first occurrence of "/apps/" in the target docfile can be appended to the relative path for SAND_HOME to form a relative link URL.