|
MetaTF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MetaTF.Parser.DTD
The symbol table for the DTD The symbol table is a singleton
Method Summary | |
java.lang.Object |
accept(DTDVisitor visitor,
java.lang.Object data)
Accept the visitor |
(package private) void |
addField(java.lang.String o)
Append a field to the list of all named fields Duplicate names are not added. |
(package private) void |
addFields(java.util.List fs)
Append a list of field to the list of all named fields. |
(package private) void |
addSection(int sectionNumber,
Section section)
Add a new section to the symbol table |
(package private) void |
builtins()
Construct the built-ins by hand 1. |
java.lang.String |
dump(java.lang.String prefix)
Dump the symbol table |
java.util.List |
getFields()
Return a a list of all field names defined in the DTD: List |
int |
getMaxSectionNumber()
Get the number of the highest numbered section. |
int |
getNumSections()
|
Section |
getSection(int n)
Return the section |
java.util.Map |
getSections()
|
boolean |
hasSection(int n)
Does the DTD have a section of a given number |
boolean |
hasSection(java.lang.String s)
Does the DTD have a section of a given name |
static DTD |
instance()
The only way to get the symbol table |
int |
sectionNameToNumber(java.lang.String s)
Get section number from its name |
Methods inherited from class java.lang.Object |
|
Method Detail |
public static DTD instance() throws DTDException
public boolean hasSection(int n)
n
- the section numberpublic boolean hasSection(java.lang.String s)
s
- the section namepublic int getNumSections()
public int getMaxSectionNumber()
public Section getSection(int n) throws DTDException
n
- the section number WHERE hasSection(n)DTDException
- IF !hasSection(n)hasSection(int)
public java.util.Map getSections()
public int sectionNameToNumber(java.lang.String s) throws DTDException
s
- the section nameDTDException
- IF the DTD does not have section svoid addSection(int sectionNumber, Section section) throws DTDException
sectionNumber
- the section numbersection
- the sectionDTDException
- IF sectionNumber<0 || hasSection(sectionNumber)hasSection(int)
void builtins() throws DTDException
void addField(java.lang.String o)
o
- the name of the fieldvoid addFields(java.util.List fs)
fs
- the list of fields to be appendedpublic java.util.List getFields()
public java.lang.String dump(java.lang.String prefix)
prefix
- an identifying prefix to prepend to each line of the dumppublic java.lang.Object accept(DTDVisitor visitor, java.lang.Object data)
|
MetaTF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |