Node Director
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sfi.director.application.autodoc.DocPHTML Class Reference

Parses phtml documents, adjusts their title levels and adds anchors. More...

Inheritance diagram for sfi.director.application.autodoc.DocPHTML:
sfi.director.application.autodoc.DocXHTML

Public Member Functions

 DocPHTML () throws DirectorException
void parse (File file) throws DirectorException
void parse (String xml) throws DirectorException
String text ()
 returns the resulting document.
Vector anchors ()
 returns a Vector of anchor names in the parsed text.
Vector headings ()
 returns a Vector of headings.
Vector headingLevels ()
 returns a Vector of headingLevels (Integer objects).
void startDocument ()
void startElement (String uri, String name, String qName, Attributes atts)
void endElement (String uri, String name, String qName)
void characters (char ch[], int start, int length)
void fatalError (SAXParseException exception)
String anchorPrefix ()
 Accessor for attribute anchorPrefix.
String anchorPrefix (String anchorPrefix)
 Mutator for attribute anchorPrefix.
int headingLevel ()
 Accessor for attribute headingLevel.
int headingLevel (int headingLevel)
 Mutator for attribute headingLevel.
Vector subheadings ()
 returns a Vector of subheadings.
Vector references ()
 returns a Vector of references (href) that were found in the parsed document.
Hashtable refReplace ()
 Accessor for attribute refReplace.
Hashtable refReplace (Hashtable refReplace)
 Mutator for attribute refReplace.
void injectInline () throws DirectorException
- Public Member Functions inherited from sfi.director.application.autodoc.DocXHTML
XMLReader getXMLReader () throws DirectorException
 Try to find an appropriate XMLReader.
void endDocument () throws SAXException
boolean isHeading (String name)
 check if an element with the given name is actually a HTML heading.
void endPrefixMapping (java.lang.String prefix)
void ignorableWhitespace (char[] ch, int start, int length)
void processingInstruction (java.lang.String target, java.lang.String data)
void setDocumentLocator (Locator locator)
void skippedEntity (java.lang.String name)
void startPrefixMapping (java.lang.String prefix, java.lang.String uri)
void warning (SAXParseException exception)
void error (SAXParseException exception)

Protected Member Functions

int adjustedLevel (String name)

Protected Attributes

XMLReader reader
XmlCreator text
Vector anchors = new Vector()
Vector headings = new Vector()
Vector headingLevels = new Vector()
Vector subheadings = new Vector()
Hashtable referencesSeen = new Hashtable()
Vector references = new Vector()
boolean inInline = false
int errorLine = 0
int errorColumn = 0
int topHeadNode = 6
String anchorPrefix = ""
 The string that is prepended to every anchor inserted for title elements.
int headingLevel = 0
 If set, the heading tags are adjusted, so that the top level heading of the parsed document is below the headingLevel.
Hashtable refReplace = null
 replace hrefs by those

Additional Inherited Members

- Static Public Attributes inherited from sfi.director.application.autodoc.DocXHTML
final static String XMLHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE spec [ <!ENTITY nbsp \"&#160;\"> <!ENTITY deg \"&#176;\"> <!ENTITY copy \"&#169;\"> ] ><document>\n"
 The XML header to be used with an arbitrary, headerless xhtml fragment.
final static String XMLFooter = "</document>"
 The XML footer to be used with an arbitrary, headerless xhtml fragment.

Detailed Description

Parses phtml documents, adjusts their title levels and adds anchors.

Constructor & Destructor Documentation

sfi.director.application.autodoc.DocPHTML.DocPHTML ( ) throws DirectorException

Member Function Documentation

int sfi.director.application.autodoc.DocPHTML.adjustedLevel ( String  name)
protected
String sfi.director.application.autodoc.DocPHTML.anchorPrefix ( )

Accessor for attribute anchorPrefix.

The string that is prepended to every anchor inserted for title elements. If not set, no prefix is used.

Referenced by sfi.director.application.autodoc.DocPHTML.anchorPrefix(), and sfi.director.application.autodoc.DocPHTML.startElement().

String sfi.director.application.autodoc.DocPHTML.anchorPrefix ( String  anchorPrefix)

Mutator for attribute anchorPrefix.

The string that is prepended to every anchor inserted for title elements. If not set, no prefix is used.

References sfi.director.application.autodoc.DocPHTML.anchorPrefix().

Vector sfi.director.application.autodoc.DocPHTML.anchors ( )

returns a Vector of anchor names in the parsed text.

Each anchor name corresponds with an entry in headings().

Referenced by sfi.director.application.autodoc.DocPHTML.startDocument(), and sfi.director.application.autodoc.DocPHTML.startElement().

void sfi.director.application.autodoc.DocPHTML.characters ( char  ch[],
int  start,
int  length 
)
void sfi.director.application.autodoc.DocPHTML.endElement ( String  uri,
String  name,
String  qName 
)
void sfi.director.application.autodoc.DocPHTML.fatalError ( SAXParseException  exception)
int sfi.director.application.autodoc.DocPHTML.headingLevel ( )

Accessor for attribute headingLevel.

If set, the heading tags are adjusted, so that the top level heading of the parsed document is below the headingLevel.

Referenced by sfi.director.application.autodoc.DocPHTML.adjustedLevel(), sfi.director.application.autodoc.DocPHTML.endElement(), sfi.director.application.autodoc.DocPHTML.headingLevel(), and sfi.director.application.autodoc.DocPHTML.startElement().

int sfi.director.application.autodoc.DocPHTML.headingLevel ( int  headingLevel)

Mutator for attribute headingLevel.

If set, the heading tags are adjusted, so that the top level heading of the parsed document is below the headingLevel.

References sfi.director.application.autodoc.DocPHTML.headingLevel().

Vector sfi.director.application.autodoc.DocPHTML.headingLevels ( )

returns a Vector of headingLevels (Integer objects).

Each entry corresponds with an entry in anchors() / headings()

Referenced by sfi.director.application.autodoc.DocPHTML.startDocument(), and sfi.director.application.autodoc.DocPHTML.startElement().

Vector sfi.director.application.autodoc.DocPHTML.headings ( )

returns a Vector of headings.

Each heading corresponds with an entry in anchors().

Referenced by sfi.director.application.autodoc.DocPHTML.endElement(), and sfi.director.application.autodoc.DocPHTML.startDocument().

void sfi.director.application.autodoc.DocPHTML.injectInline ( ) throws DirectorException
void sfi.director.application.autodoc.DocPHTML.parse ( File  file) throws DirectorException
void sfi.director.application.autodoc.DocPHTML.parse ( String  xml) throws DirectorException
Vector sfi.director.application.autodoc.DocPHTML.references ( )

returns a Vector of references (href) that were found in the parsed document.

Referenced by sfi.director.application.autodoc.DocPHTML.startElement().

Hashtable sfi.director.application.autodoc.DocPHTML.refReplace ( )
Hashtable sfi.director.application.autodoc.DocPHTML.refReplace ( Hashtable  refReplace)

Mutator for attribute refReplace.

replace hrefs by those

References sfi.director.application.autodoc.DocPHTML.refReplace().

void sfi.director.application.autodoc.DocPHTML.startDocument ( )
void sfi.director.application.autodoc.DocPHTML.startElement ( String  uri,
String  name,
String  qName,
Attributes  atts 
)
Vector sfi.director.application.autodoc.DocPHTML.subheadings ( )

returns a Vector of subheadings.

Each entry corresponds with an entry

  • in anchors() / headings(). If no subheading is available at an index, an
    • empty string is stored in the list.

Referenced by sfi.director.application.autodoc.DocPHTML.startDocument(), and sfi.director.application.autodoc.DocPHTML.startElement().

String sfi.director.application.autodoc.DocPHTML.text ( )

Member Data Documentation

String sfi.director.application.autodoc.DocPHTML.anchorPrefix = ""
protected

The string that is prepended to every anchor inserted for title elements.

If not set, no prefix is used.

Referenced by sfi.director.application.autodoc.DocBuilder.slurpExternalDocs().

Vector sfi.director.application.autodoc.DocPHTML.anchors = new Vector()
protected
int sfi.director.application.autodoc.DocPHTML.errorColumn = 0
protected
int sfi.director.application.autodoc.DocPHTML.errorLine = 0
protected
int sfi.director.application.autodoc.DocPHTML.headingLevel = 0
protected

If set, the heading tags are adjusted, so that the top level heading of the parsed document is below the headingLevel.

Referenced by sfi.director.application.autodoc.DocBuilder.slurpExternalDocs().

Vector sfi.director.application.autodoc.DocPHTML.headingLevels = new Vector()
protected
Vector sfi.director.application.autodoc.DocPHTML.headings = new Vector()
protected
boolean sfi.director.application.autodoc.DocPHTML.inInline = false
protected
XMLReader sfi.director.application.autodoc.DocPHTML.reader
protected
Vector sfi.director.application.autodoc.DocPHTML.references = new Vector()
protected
Hashtable sfi.director.application.autodoc.DocPHTML.referencesSeen = new Hashtable()
protected
Hashtable sfi.director.application.autodoc.DocPHTML.refReplace = null
protected
Vector sfi.director.application.autodoc.DocPHTML.subheadings = new Vector()
protected
XmlCreator sfi.director.application.autodoc.DocPHTML.text
protected
int sfi.director.application.autodoc.DocPHTML.topHeadNode = 6
protected

The documentation for this class was generated from the following file: