Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/merlotxml/util/xml/DTDDocument.java


1   /*
2   ====================================================================
3   Copyright (c) 1999-2000 ChannelPoint, Inc..  All rights reserved.
4   ====================================================================
5   
6   Redistribution and use in source and binary forms, with or without 
7   modification, are permitted provided that the following conditions 
8   are met:
9   
10  1. Redistribution of source code must retain the above copyright 
11  notice, this list of conditions and the following disclaimer. 
12  
13  2. Redistribution in binary form must reproduce the above copyright
14  notice, this list of conditions and the following disclaimer in the 
15  documentation and/or other materials provided with the distribution.
16  
17  3. All advertising materials mentioning features or use of this 
18  software must display the following acknowledgment:  "This product 
19  includes software developed by ChannelPoint, Inc. for use in the 
20  Merlot XML Editor (http://www.channelpoint.com/merlot/)."
21   
22  4. Any names trademarked by ChannelPoint, Inc. must not be used to 
23  endorse or promote products derived from this software without prior
24  written permission. For written permission, please contact
25  legal@channelpoint.com.
26  
27  5.  Products derived from this software may not be called "Merlot"
28  nor may "Merlot" appear in their names without prior written
29  permission of ChannelPoint, Inc.
30  
31  6. Redistribution of any form whatsoever must retain the following
32  acknowledgment:  "This product includes software developed by 
33  ChannelPoint, Inc. for use in the Merlot XML Editor 
34  (http://www.channelpoint.com/merlot/)."
35  
36  THIS SOFTWARE IS PROVIDED BY CHANNELPOINT, INC. "AS IS" AND ANY EXPRESSED OR 
37  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
38  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO 
39  EVENT SHALL CHANNELPOINT, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
40  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
41  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
42  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 
43  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
44  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
45  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46   ====================================================================
47  
48  For more information on ChannelPoint, Inc. please see http://www.channelpoint.com.  
49  For information on the Merlot project, please see 
50  http://www.channelpoint.com/merlot.
51  */
52  
53  
54  // Copyright 1999 ChannelPoint, Inc., All Rights Reserved.
55  
56  package org.merlotxml.util.xml;
57  
58  import java.io.*;
59  import java.util.*;
60  
61  import org.w3c.dom.Element;
62  
63  /**
64   * This interface provides means to access the DTD definitions in a manner
65   * that can be independent of whatever third party underlying structures
66   * are used for the implementation.
67   * <P>
68   * 
69   * 
70   *
71   * @author Kelly A. Campbell
72   * @version $Id: DTDDocument.java,v 1.1.1.1 2001/07/02 15:41:28 flament Exp $
73   */
74  
75  public interface DTDDocument
76  {
77  
78    /**
79     * Returns the name of the DTD 
80     */
81    public String getName();
82    
83  
84    /**
85     * Returns the list of declared elements from the document.
86     * @return Enumeration consisting of DTDElement objects or null
87     */
88    public Enumeration getElements();
89    
90    /**
91     * Returns a list of the possible elements that can be inserted or appended
92     * on this element.
93     *
94     * @param el A DOM element
95     * @return vector containing DTDElement objects
96     */
97      //  public Enumeration    getAppendableElements(Element el);
98    
99    /**
100    * Returns the list of the possible elements that can be inserted
101    * as a child in an element.
102    * 
103    * @param el a DOM element (future parent element)
104    * @param index index where the returned elements should be insertable
105    * 
106    * @return Enumeration of the insertable DTDElements objects
107    */
108   public Enumeration getInsertableElements(Element el, int index);
109     
110   /**
111    * Returns whether or not an element (with or without its children)
112    * is valid according to its DTD definition.
113    */
114   public boolean elementIsValid (Element el, boolean checkChildren);
115   
116   /**
117    * Returns the SYSTEM identifier for a dtd
118    */
119   public String getExternalID();
120   
121 }