Methods Summary |
---|
boolean | advance(javax.swing.text.html.parser.Element elem)Advance the state by reducing the given element.
Returns false if the element is not legal and the
state is not advanced.
if ((exclusions != null) && exclusions.get(elem.getIndex())) {
return false;
}
if (state != null) {
ContentModelState newState = state.advance(elem);
if (newState != null) {
state = newState;
return true;
}
} else if (this.elem.getType() == ANY) {
return true;
}
return (inclusions != null) && inclusions.get(elem.getIndex());
|
public javax.swing.text.html.parser.ContentModel | contentModel()Return the ContentModel that must be satisfied by
what comes next in the input stream.
if (state == null) {
return null;
} else {
return state.getModel();
}
|
boolean | excluded(int elemIndex)Return true if the element that is contained at
the index specified by the parameter is part of
the exclusions specified in the DTD for the element
currently on the TagStack.
return (exclusions != null) && exclusions.get(elem.getIndex());
|
public javax.swing.text.html.parser.Element | first()Return the element that must come next in the
input stream.
return (state != null) ? state.first() : null;
|
boolean | included(java.util.Vector elemVec, javax.swing.text.html.parser.DTD dtd)Update the Vector elemVec with all the elements that
are part of the inclusions listed in DTD for the element
currently on the TagStack.
for (int i = 0 ; i < inclusions.size(); i++) {
if (inclusions.get(i)) {
elemVec.addElement(dtd.getElement(i));
System.out.println("Element add thru' inclusions: " + dtd.getElement(i).getName());
}
}
return (!elemVec.isEmpty());
|
boolean | terminate()Return true if the current state can be terminated.
return (state == null) || state.terminate();
|
public java.lang.String | toString()Convert to a string.
return (next == null) ?
"<" + tag.getElement().getName() + ">" :
next + " <" + tag.getElement().getName() + ">";
|