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

Quick Search    Search Deep

org.merlotxml.util.xml.xml4j
Class DTDDocumentImpl  view DTDDocumentImpl download DTDDocumentImpl.java

java.lang.Object
  extended byorg.merlotxml.util.xml.xml4j.DTDDocumentImpl
All Implemented Interfaces:
org.merlotxml.util.xml.DTDDocument

public class DTDDocumentImpl
extends java.lang.Object
implements org.merlotxml.util.xml.DTDDocument

A DTDDocument based on the XML 4j package

Version:
$Id: DTDDocumentImpl.java,v 1.1.1.1 2001/07/02 15:41:28 flament Exp $

Field Summary
private  DTD _doc
           
private  java.util.Hashtable _elements
           
private  boolean _initialized
           
private  java.lang.String _publicId
           
private  java.lang.String _systemId
           
 
Constructor Summary
DTDDocumentImpl(DTD doc, java.lang.String publicId, java.lang.String systemId)
           
 
Method Summary
 boolean elementIsValid(org.w3c.dom.Element el, boolean checkChildren)
          Returns whether or not an element (with or without its children) is valid according to its DTD definition.
protected  org.merlotxml.util.xml.DTDElement fetchElement(java.lang.String name)
           
 java.util.Enumeration getElements()
          Returns the list of declared elements from the document.
 java.lang.String getExternalID()
          Returns the external identifier or null if there is none.
 java.util.Enumeration getInsertableElements(org.w3c.dom.Element el, int index)
          Returns the list of the possible elements that can be inserted as a child in an element.
 java.lang.String getName()
          Returns the name of the DTD
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_doc

private DTD _doc

_elements

private java.util.Hashtable _elements

_initialized

private boolean _initialized

_publicId

private java.lang.String _publicId

_systemId

private java.lang.String _systemId
Constructor Detail

DTDDocumentImpl

public DTDDocumentImpl(DTD doc,
                       java.lang.String publicId,
                       java.lang.String systemId)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: org.merlotxml.util.xml.DTDDocument
Returns the name of the DTD

Specified by:
getName in interface org.merlotxml.util.xml.DTDDocument

getElements

public java.util.Enumeration getElements()
Description copied from interface: org.merlotxml.util.xml.DTDDocument
Returns the list of declared elements from the document.

Specified by:
getElements in interface org.merlotxml.util.xml.DTDDocument

fetchElement

protected org.merlotxml.util.xml.DTDElement fetchElement(java.lang.String name)

getInsertableElements

public java.util.Enumeration getInsertableElements(org.w3c.dom.Element el,
                                                   int index)
Description copied from interface: org.merlotxml.util.xml.DTDDocument
Returns the list of the possible elements that can be inserted as a child in an element.

Specified by:
getInsertableElements in interface org.merlotxml.util.xml.DTDDocument

elementIsValid

public boolean elementIsValid(org.w3c.dom.Element el,
                              boolean checkChildren)
Description copied from interface: org.merlotxml.util.xml.DTDDocument
Returns whether or not an element (with or without its children) is valid according to its DTD definition.

Specified by:
elementIsValid in interface org.merlotxml.util.xml.DTDDocument

getExternalID

public java.lang.String getExternalID()
Returns the external identifier or null if there is none.

The string should include PUBLIC and SYSTEM identifiers if they are available.

Specified by:
getExternalID in interface org.merlotxml.util.xml.DTDDocument