edu.wpi.cs.DSRG.xmldb.DTDWrapper
Class DTDWrapper

java.lang.Object
  |
  +--edu.wpi.cs.DSRG.xmldb.DTDWrapper.DTDWrapper

public class DTDWrapper
extends java.lang.Object

It is a wrapper for the XML Schema DOM tree and output an DTD interface.


Field Summary
(package private)  java.lang.String system_id
          The System Id of the DTD Being Wrapped.
(package private)  edu.wpi.cs.DSRG.xmldb.DTDWrapper.Element XML_schema
          The root of the XML_schema.
 
Constructor Summary
DTDWrapper(java.lang.String URI)
          Get the root of the DOMParser's XML Schema DOM Tree.
 
Method Summary
 ElementTypeDeclaration getElementTypeDeclarationAt(int Index)
          Get the Element Type Declaration with specific index.
 int getNumberOfElementTypeDeclarations()
          Iterate through the XML Schema DOM Tree to count the number of Element Types.
 java.lang.String getSystemId()
          Get the System Id of the current DTD.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

XML_schema

edu.wpi.cs.DSRG.xmldb.DTDWrapper.Element XML_schema
The root of the XML_schema. XQL: /DocumentType[1]/schema[1] This XQL will be used as the "." in the following methods.

system_id

java.lang.String system_id
The System Id of the DTD Being Wrapped. In the XML is the string right after
Constructor Detail

DTDWrapper

public DTDWrapper(java.lang.String URI)
           throws java.lang.Exception
Get the root of the DOMParser's XML Schema DOM Tree. XQL: /DocumentType[1]/schema[1]
Method Detail

getSystemId

public java.lang.String getSystemId()
Get the System Id of the current DTD.

getNumberOfElementTypeDeclarations

public int getNumberOfElementTypeDeclarations()
Iterate through the XML Schema DOM Tree to count the number of Element Types. XQL: count(./element)

getElementTypeDeclarationAt

public ElementTypeDeclaration getElementTypeDeclarationAt(int Index)
Get the Element Type Declaration with specific index.
Parameters:
Index - Index start from 0. XQL: ./element[Index]