BEA Systems, Inc.

weblogic.apache.xerces.impl.dtd
Class XMLDTDDescription

java.lang.Object
  extended by weblogic.apache.xerces.util.XMLResourceIdentifierImpl
      extended by weblogic.apache.xerces.impl.dtd.XMLDTDDescription
All Implemented Interfaces:
XMLGrammarDescription, XMLResourceIdentifier

public class XMLDTDDescription
extends XMLResourceIdentifierImpl
implements XMLGrammarDescription


Field Summary
protected  Vector fPossibleRoots
           
protected  String fRootName
           
 
Fields inherited from class weblogic.apache.xerces.util.XMLResourceIdentifierImpl
fBaseSystemId, fExpandedSystemId, fLiteralSystemId, fPublicId
 
Fields inherited from interface weblogic.apache.xerces.xni.grammars.XMLGrammarDescription
XML_DTD, XML_SCHEMA
 
Constructor Summary
XMLDTDDescription(String publicId, String literalId, String baseId, String expandedId, String rootName)
           
XMLDTDDescription(XMLInputSource source)
           
XMLDTDDescription(XMLResourceIdentifier id, String rootName)
           
 
Method Summary
 boolean equals(Object desc)
          Compares this grammar with the given grammar.
 String getGrammarType()
           
 String getRootName()
           
 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)
           
 void setRootName(String rootName)
           
 
Methods inherited from class weblogic.apache.xerces.util.XMLResourceIdentifierImpl
clear, getBaseSystemId, getExpandedSystemId, getLiteralSystemId, getPublicId, setBaseSystemId, setExpandedSystemId, setLiteralSystemId, setPublicId, setValues, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface weblogic.apache.xerces.xni.XMLResourceIdentifier
getBaseSystemId, getExpandedSystemId, getLiteralSystemId, getPublicId
 

Field Detail

fRootName

protected String fRootName

fPossibleRoots

protected Vector fPossibleRoots
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

getGrammarType

public String getGrammarType()
Specified by:
getGrammarType in interface XMLGrammarDescription

getRootName

public String getRootName()

setRootName

public void setRootName(String rootName)

setPossibleRoots

public void setPossibleRoots(Vector possibleRoots)

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

Overrides:
equals in class Object
Parameters:
desc - The description of the grammar to be compared with
Returns:
True if they are equal, else false

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...

Overrides:
hashCode in class XMLResourceIdentifierImpl
Returns:
The hash code

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs92
Copyright 2006 BEA Systems Inc.