| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.harvard.hul.ois.jhove.module.html.HtmlDocDesc
public abstract class HtmlDocDesc
This is an abstract class for processing an HTML document that has been parsed into a List of HtmlElements. It defines common behavior for all supported versions of HTML except XHTML. Subclasses modify this base as needed.
| Field Summary | |
|---|---|
| protected  HtmlTagDesc | bodyElementA representation of the BODY element. | 
| protected static java.util.HashMap | commonTagsGeneric list of supported tags. | 
| protected  HtmlTagDesc | framesetElementA representation of the FRAMESET element. | 
| protected  HtmlTagDesc | headElementA representation of the HEAD element. | 
| protected static java.lang.String[] | headingsHeader tags, which are invariant for all HTML versions. | 
| protected  HtmlTagDesc | htmlElementA representation of the HTML element. | 
| protected  java.util.Map | supportedElementsList of supported tags for this version of HTML. | 
| Constructor Summary | |
|---|---|
| HtmlDocDesc()Consructor. | |
| Method Summary | |
|---|---|
| protected static void | addRequiredAttribute(java.util.List atts,
                     java.lang.String name)Adds an attribute to a List, with unrestricted values and type REQUIRED. | 
| protected static void | addSelfAttribute(java.util.List atts,
                 java.lang.String name)Adds an attribute to a List, with the only permitted value being the name of the attribute. | 
| protected static void | addSimpleAttribute(java.util.List atts,
                   java.lang.String name)Adds an attribute to a List, with unrestricted values and type IMPLIED. | 
| protected static void | addStringsToList(java.lang.String[] names,
                 java.util.List lst)Adds all the Strings in an array to the end of a List. | 
|  HtmlMetadata | getMetadata()Returns the metadata for this document. | 
| protected  void | init()Initialization called by subclass constructors after supportedElements has been assigned. | 
| protected  void | pushElementStack(JHOpenTag tag)Pushes an element onto the element stack. | 
| protected static void | removeStringsFromList(java.util.List lst,
                      java.lang.String[] strs)Removes excluded strings from a List. | 
|  boolean | validate(java.util.List elements,
         RepInfo info)Validates the document and puts interesting properties into the RepInfo. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected static java.util.HashMap commonTags
protected java.util.Map supportedElements
protected HtmlTagDesc htmlElement
protected HtmlTagDesc headElement
protected HtmlTagDesc bodyElement
protected HtmlTagDesc framesetElement
protected static java.lang.String[] headings
| Constructor Detail | 
|---|
public HtmlDocDesc()
| Method Detail | 
|---|
public boolean validate(java.util.List elements,
                        RepInfo info)
elements - The element list constructed by the parserinfo - The RepInfo object which will be populated
                      with propertiespublic HtmlMetadata getMetadata()
protected void init()
protected static void addStringsToList(java.lang.String[] names,
                                       java.util.List lst)
protected static void addSimpleAttribute(java.util.List atts,
                                         java.lang.String name)
protected static void addRequiredAttribute(java.util.List atts,
                                           java.lang.String name)
protected static void addSelfAttribute(java.util.List atts,
                                       java.lang.String name)
protected static void removeStringsFromList(java.util.List lst,
                                            java.lang.String[] strs)
protected void pushElementStack(JHOpenTag tag)
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||