edu.harvard.hul.ois.jhove.module.html
Class JHElement

java.lang.Object
  extended by edu.harvard.hul.ois.jhove.module.html.JHElement
Direct Known Subclasses:
JHCloseTag, JHComment, JHDoctype, JHErrorElement, JHOpenTag, JHPCData, JHXmlDecl

public abstract class JHElement
extends java.lang.Object

Abstract superclass for the representation of portions of an HTML file. This is not the same usage of "element" as the SGML definition, but refers to a parsed unit, such as an opening tag, closing tag, or PCDATA.

Author:
Gary McGath

Field Summary
 int _column
           
 int _line
           
 
Constructor Summary
JHElement(java.util.List elements)
          Constructor.
 
Method Summary
 int getColumn()
          Returns the column number for the start of the element.
protected  java.util.List getEntities(java.lang.String text)
          Extracts entities from a text string and returns them as a List of Strings.
 int getLine()
          Returns the line number for the start of the element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_column

public int _column

_line

public int _line
Constructor Detail

JHElement

public JHElement(java.util.List elements)
Constructor.

Parameters:
elements - List of elements representing the document. May be null for a stub element which is implied rather than being generated by the parser.
Method Detail

getLine

public int getLine()
Returns the line number for the start of the element.


getColumn

public int getColumn()
Returns the column number for the start of the element.


getEntities

protected java.util.List getEntities(java.lang.String text)
Extracts entities from a text string and returns them as a List of Strings. If there are no entities, returns an empty List.