1 /*
   2  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   3  *
   4  * This code is free software; you can redistribute it and/or modify it
   5  * under the terms of the GNU General Public License version 2 only, as
   6  * published by the Free Software Foundation.  Oracle designates this
   7  * particular file as subject to the "Classpath" exception as provided
   8  * by Oracle in the LICENSE file that accompanied this code.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  */
  24 
  25 /*
  26  * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
  27  */
  28 
  29 package javax.xml.stream.events;
  30 
  31 import java.util.List;
  32 
  33 /**
  34  * This is the top level interface for events dealing with DTDs
  35  *
  36  * @version 1.0
  37  * @author Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
  38  * @since 1.6
  39  */
  40 public interface DTD extends XMLEvent {
  41 
  42   /**
  43    * Returns the entire Document Type Declaration as a string, including
  44    * the internal DTD subset.
  45    * This may be null if there is not an internal subset.
  46    * If it is not null it must return the entire
  47    * Document Type Declaration which matches the doctypedecl
  48    * production in the XML 1.0 specification
  49    */
  50   String getDocumentTypeDeclaration();
  51 
  52   /**
  53    * Returns an implementation defined representation of the DTD.
  54    * This method may return null if no representation is available.
  55    */
  56   Object getProcessedDTD();
  57 
  58   /**
  59    * Return a List containing the notations declared in the DTD.
  60    * This list must contain NotationDeclaration events.
  61    * @see NotationDeclaration
  62    * @return an unordered list of NotationDeclaration events
  63    */
  64   List getNotations();
  65 
  66   /**
  67    * Return a List containing the general entities,
  68    * both external and internal, declared in the DTD.
  69    * This list must contain EntityDeclaration events.
  70    * @see EntityDeclaration
  71    * @return an unordered list of EntityDeclaration events
  72    */
  73   List getEntities();
  74 }