|
Agent System POND 1.0 (1.7.2000) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--FIM.Util.WWW.Form.FormElement
An element of a HTML-form. It is connected to a HTMLDocument, has a start and end offset, a parent element, a label and a name. It can contain a number of children and attributes.
Field Summary | |
protected MutableAttributeSet |
attributes
The attributes of this element. |
protected Vector |
children
The children of this element, if any. |
Constructor Summary | |
FormElement(HTMLDocument doc,
Element parent,
int startOffs,
int endOffs,
String name)
Creates a new form element. |
Method Summary | |
AttributeSet |
getAttributes()
Fetches the collection of attributes this element contains. |
Document |
getDocument()
Fetches the document associated with this element. |
Element |
getElement(int index)
Fetches the child element at the given index. |
int |
getElementCount()
Gets the number of child elements contained by this element. |
int |
getElementIndex(int offset)
Gets the child element index closest to the given offset. |
abstract String |
getEncoded()
Returns this element in encoded ( application/x-www-form-urlencoded ) form. |
int |
getEndOffset()
Fetches the offset from the beginning of the document that this element ends at. |
String |
getLabel()
Fetch the label of this element. |
String |
getName()
Fetches the name of the element. |
Element |
getParentElement()
Fetches the parent element. |
int |
getStartOffset()
Fetches the offset from the beginning of the document that this element begins at. |
boolean |
isLeaf()
Is this element a leaf element? |
int |
match(String[] matchStr)
Matches this element against a number of strings and returns a measure for matching them. 0=no match, 100=perfect match. May be expanded to similarity-matching in the future (similar sounding words, same word-stem, etc.). |
abstract void |
reset()
Resets this element to its initial state. |
protected void |
setLabel(String label)
Set the label for this element. |
String |
toString()
Returns a string representation of the form element. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected Vector children
protected MutableAttributeSet attributes
Constructor Detail |
public FormElement(HTMLDocument doc, Element parent, int startOffs, int endOffs, String name)
doc
- the document this element belongs toparent
- the parent of this elementstartOffs
- start offset of the element in the documentendOffs
- end offset of the element in the documentname
- the name of the elementMethod Detail |
public Document getDocument()
public Element getParentElement()
public String getName()
public AttributeSet getAttributes()
public int getStartOffset()
public int getEndOffset()
public int getElementIndex(int offset)
offset
- the specified offset >= 0public int getElementCount()
public Element getElement(int index)
index
- the specified index >= 0public boolean isLeaf()
true
if a leaf element else false
public String getLabel()
null
is returned.protected void setLabel(String label)
null
as parameterlabel
- the new labelpublic abstract void reset()
public abstract String getEncoded()
application/x-www-form-urlencoded
) form.URLEncoder
public int match(String[] matchStr)
Strategy for matching:
matchStr
- an array of strings which are matched against this elementpublic String toString()
|
Agent System POND 1.0 (1.7.2000) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |