Path: blob/master/src/java.xml/share/classes/javax/xml/stream/events/DTD.java
40955 views
/*1* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.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 it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* 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 WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 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 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.xml.stream.events;2627import java.util.List;2829/**30* This is the top level interface for events dealing with DTDs31*32* @version 1.033* @author Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.34* @since 1.635*/36public interface DTD extends XMLEvent {3738/**39* Returns the entire Document Type Declaration as a string, including the40* internal DTD subset. This may be null if there is not an internal subset.41* If it is not null it must return the entire Document Type Declaration42* which matches the doctypedecl production in the XML 1.0 specification43*44* @return the Document Type Declaration45*/46String getDocumentTypeDeclaration();4748/**49* Returns an implementation defined representation of the DTD. This method50* may return null if no representation is available.51*52* @return the representation of the DTD53*/54Object getProcessedDTD();5556/**57* Return a List containing the notations declared in the DTD. This list58* must contain NotationDeclaration events.59*60* @see NotationDeclaration61* @return an unordered list of NotationDeclaration events62*/63List<NotationDeclaration> getNotations();6465/**66* Return a List containing the general entities, both external and67* internal, declared in the DTD. This list must contain EntityDeclaration68* events.69*70* @see EntityDeclaration71* @return an unordered list of EntityDeclaration events72*/73List<EntityDeclaration> getEntities();74}757677