|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.harvard.hul.ois.jhove.module.html.JHElement | +--edu.harvard.hul.ois.jhove.module.html.JHOpenTag
Representation of a parsed HTML open tag, including its attributes. This arguable would better be called an element, but JHElement is the name of the abstract superclass.
Field Summary | |
java.util.List |
_attributes
List of element attributes. |
java.lang.String |
_name
Element name. |
Fields inherited from class edu.harvard.hul.ois.jhove.module.html.JHElement |
_column, _line |
Constructor Summary | |
JHOpenTag(java.util.List elements,
java.lang.String name,
java.util.List attrs,
int line,
int column)
Constructor. |
|
JHOpenTag(java.util.List elements,
java.lang.String name,
java.util.List attrs,
int line,
int column,
java.lang.String message)
Constructor with error message. |
|
JHOpenTag(java.lang.String name)
Constructor for a stub attribute. |
Method Summary | |
protected void |
advanceIndex()
Increments the value of _contentIdx |
protected boolean |
allowsTag(java.lang.String tag,
HtmlDocDesc doc)
Returns true if the tag given in the parameter is
allowable in our context. |
protected boolean |
canAdvance()
Reports whether it's legal to advance to the next content index. |
protected boolean |
canGetMore()
Checks if we can accept another element at the current content index. |
protected void |
countComponent()
Counts off a component at the current index. |
java.util.List |
getAttributes()
Returns the tag's attributes. |
HtmlTagDesc |
getElement()
Returns the element definition which has been associated with this tag. |
protected java.lang.String |
getErrorMessage()
Returns the error message associated with this element. |
java.lang.String |
getName()
Returns the tag's name. |
protected void |
processElement(HtmlMetadata mdata)
Process the element to extract any available metadata. |
void |
setElement(HtmlTagDesc element)
Associates an the tag with an element definition. |
Methods inherited from class edu.harvard.hul.ois.jhove.module.html.JHElement |
getColumn, getEntities, getLine |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.lang.String _name
public java.util.List _attributes
Constructor Detail |
public JHOpenTag(java.util.List elements, java.lang.String name, java.util.List attrs, int line, int column)
elements
- The list of parsed elements, to which
this gets added. May be null for a stub
element not generated by the parser.name
- The name of the tagattrs
- A List of attributes, representing
the parsed attributes of the tag. Each
attributes is an array of two strings, the
name and the value. If no explicit value
was given, attribute[1] is null. If the
attribute was in quotes, the quotes are still there.line
- Line number, for information reportingcolumn
- Line number, for information reportingpublic JHOpenTag(java.util.List elements, java.lang.String name, java.util.List attrs, int line, int column, java.lang.String message)
elements
- The list of parsed elements, to which
this gets added. May be null for a stub
element not generated by the parser.name
- The name of the tagattrs
- A List of attributes, representing
the parsed attributes of the tag. Each
attributes is an array of two strings, the
name and the value. If no explicit value
was given, attribute[1] is null. If the
attribute was in quotes, the quotes are still there.message
- An error message indicating that this element
isn't well-formed, but we'll take it anyway.public JHOpenTag(java.lang.String name)
Method Detail |
public void setElement(HtmlTagDesc element)
public HtmlTagDesc getElement()
public java.lang.String getName()
public java.util.List getAttributes()
protected void processElement(HtmlMetadata mdata)
protected boolean allowsTag(java.lang.String tag, HtmlDocDesc doc)
true
if the tag given in the parameter is
allowable in our context.
protected boolean canGetMore()
protected void countComponent()
protected void advanceIndex()
protected boolean canAdvance()
protected java.lang.String getErrorMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |