org.apache.xerces.impl.dtd

Class XMLDTDDescription

public class XMLDTDDescription extends XMLResourceIdentifierImpl implements XMLDTDDescription

All information specific to DTD grammars.

Version: $Id: XMLDTDDescription.java,v 1.9 2004/10/04 21:57:30 mrglavas Exp $

Author: Neil Graham, IBM

UNKNOWN:

Field Summary
protected VectorfPossibleRoots
protected StringfRootName
Constructor Summary
XMLDTDDescription(XMLResourceIdentifier id, String rootName)
XMLDTDDescription(String publicId, String literalId, String baseId, String expandedId, String rootName)
XMLDTDDescription(XMLInputSource source)
Method Summary
booleanequals(Object desc)
Compares this grammar with the given grammar.
StringgetGrammarType()
StringgetRootName()
inthashCode()
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...
voidsetPossibleRoots(Vector possibleRoots)
Set possible roots *
voidsetRootName(String rootName)
Set the root name *

Field Detail

fPossibleRoots

protected Vector fPossibleRoots

fRootName

protected String fRootName

Constructor Detail

XMLDTDDescription

public XMLDTDDescription(XMLResourceIdentifier id, String rootName)

XMLDTDDescription

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

XMLDTDDescription

public XMLDTDDescription(XMLInputSource source)

Method Detail

equals

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

getGrammarType

public String getGrammarType()

getRootName

public String getRootName()

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

hashCode

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

setPossibleRoots

public void setPossibleRoots(Vector possibleRoots)
Set possible roots *

setRootName

public void setRootName(String rootName)
Set the root name *
Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.