public class

XMLDTDDescription

extends XMLResourceIdentifierImpl
implements XMLDTDDescription
java.lang.Object
   ↳ org.apache.xerces.util.XMLResourceIdentifierImpl
     ↳ org.apache.xerces.impl.dtd.XMLDTDDescription

Class Overview

All information specific to DTD grammars. @xerces.internal

Summary

[Expand]
Inherited Constants
From interface org.apache.xerces.xni.grammars.XMLGrammarDescription
Fields
protected Vector fPossibleRoots
protected String fRootName
[Expand]
Inherited Fields
From class org.apache.xerces.util.XMLResourceIdentifierImpl
Public Constructors
XMLDTDDescription(XMLResourceIdentifier id, String rootName)
XMLDTDDescription(String publicId, String literalId, String baseId, String expandedId, String rootName)
XMLDTDDescription(XMLInputSource source)
Public Methods
boolean equals(Object desc)
Compares this grammar with the given grammar.
String getGrammarType()
Return the type of this grammar.
String getRootName()
Return the root name of this DTD.
int hashCode()
Returns the hash code of this grammar Because our .equals method is so complex, we just return a very simple hash that might avoid calls to the equals method a bit...
void setPossibleRoots(Vector possibleRoots)
Set possible roots
void setRootName(String rootName)
Set the root name
[Expand]
Inherited Methods
From class org.apache.xerces.util.XMLResourceIdentifierImpl
From class java.lang.Object
From interface org.apache.xerces.xni.XMLResourceIdentifier
From interface org.apache.xerces.xni.grammars.XMLDTDDescription
From interface org.apache.xerces.xni.grammars.XMLGrammarDescription

Fields

protected Vector fPossibleRoots

protected String fRootName

Public Constructors

public XMLDTDDescription (XMLResourceIdentifier id, String rootName)

public XMLDTDDescription (String publicId, String literalId, String baseId, String expandedId, String rootName)

public XMLDTDDescription (XMLInputSource source)

Public Methods

public boolean equals (Object desc)

Compares this grammar with the given grammar. Currently, we compare as follows: - if grammar type not equal return false immediately - try and find a common root name: - if both have roots, use them - else if one has a root, examine other's possible root's for a match; - else try all combinations - test fExpandedSystemId and fPublicId as above

Parameters
desc The description of the grammar to be compared with
Returns
  • True if they are equal, else false

public String getGrammarType ()

Return the type of this grammar.

Returns
  • the type of this grammar

public String getRootName ()

Return the root name of this DTD.

Returns
  • the root name of this DTD or null if root name is unknown

public int hashCode ()

Returns the hash code of this grammar Because our .equals method is so complex, we just return a very simple hash that might avoid calls to the equals method a bit...

Returns
  • The hash code

public void setPossibleRoots (Vector possibleRoots)

Set possible roots

public void setRootName (String rootName)

Set the root name