View Javadoc

1   /*   Copyright 2004 BEA Systems, Inc.
2    *
3    *   Licensed under the Apache License, Version 2.0 (the "License");
4    *   you may not use this file except in compliance with the License.
5    *   You may obtain a copy of the License at
6    *
7    *       http://www.apache.org/licenses/LICENSE-2.0
8    *
9    *   Unless required by applicable law or agreed to in writing, software
10   *   distributed under the License is distributed on an "AS IS" BASIS,
11   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   *   See the License for the specific language governing permissions and
13   *   limitations under the License.
14   */
15  package com.bea.xml.stream.events;
16  
17  import java.util.List;
18  import javax.xml.stream.events.XMLEvent;
19  import javax.xml.stream.XMLEventReader;
20  import javax.xml.stream.events.DTD;
21  
22  public class DTDEvent 
23    extends BaseEvent
24    implements DTD
25  {
26    private List notations;
27    private List entities;
28    private String dtd;
29    public DTDEvent(){}
30    public DTDEvent(String dtd) {
31      init();
32      setDTD(dtd);
33    }
34  
35    protected void init() {setEventType(XMLEvent.DTD); }
36    public void setDTD(String dtd) {
37      this.dtd=dtd;
38    }
39  
40    public Object getProcessedDTD() {
41      return null;
42    }
43    public String getDocumentTypeDeclaration() {
44      return dtd;
45    }
46    public String toString() {
47      return dtd;
48    }
49    public List getEntities() {
50      return entities;
51    }
52    public List getNotations() {
53      return notations;
54    }
55  }