1
package com.thaiopensource.xml.dtd.parse;
3
import java.util.Vector;
5
import com.thaiopensource.xml.dtd.om.Dtd;
6
import com.thaiopensource.xml.dtd.om.TopLevel;
7
import com.thaiopensource.xml.dtd.om.TopLevelVisitor;
9
class DtdImpl implements Dtd {
10
private final Vector topLevel;
11
private final String encoding;
12
private final String uri;
14
DtdImpl(Vector topLevel, String uri, String encoding) {
15
this.topLevel = topLevel;
17
this.encoding = encoding;
20
public String getUri() {
24
public String getEncoding() {
28
public TopLevel[] getAllTopLevel() {
29
TopLevel[] tem = new TopLevel[topLevel.size()];
30
for (int i = 0; i < tem.length; i++)
31
tem[i] = (TopLevel)topLevel.elementAt(i);
35
public void accept(TopLevelVisitor visitor) throws Exception {
36
int n = topLevel.size();
37
for (int i = 0; i < n; i++)
38
((TopLevel)topLevel.elementAt(i)).accept(visitor);