APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.impl.dtd

public Class XMLDTDDescription

extends XMLResourceIdentifierImpl
implements XMLDTDDescription
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xerces.internal.xni.grammars.XMLDTDDescription, com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription, com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier
Imports
com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl, com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier, com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription, com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource, java.util.List

All information specific to DTD grammars.
Author
Neil Graham, IBM

Field Summary

Modifier and TypeField and Description
protected List<String>
protected String
Inherited from com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl:
fBaseSystemIdfExpandedSystemIdfLiteralSystemIdfNamespacefPublicId

Constructor Summary

AccessConstructor and Description
public
public
XMLDTDDescription(String publicId, String literalId, String baseId, String expandedId, String rootName)

public

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

True if they are equal, else false
equals
(Object
The description of the grammar to be compared with
desc
)

Overrides java.lang.Object.equals.

Compares this grammar with the given grammar.

public String
public String

Returns:

the root name of this DTD or null if root name is unknown
getRootName
()

Implements com.sun.org.apache.xerces.internal.xni.grammars.XMLDTDDescription.getRootName.

Return the root name of this DTD.

public int

Returns:

The hash code
hashCode
()

Overrides com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl.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...

public void
setPossibleRoots(List<String> possibleRoots)

Set possible roots

public void
setRootName(String rootName)

Set the root name

Inherited from com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl:
cleargetBaseSystemIdgetExpandedSystemIdgetLiteralSystemIdgetNamespacegetPublicIdsetBaseSystemIdsetExpandedSystemIdsetLiteralSystemIdsetNamespacesetPublicIdsetValuessetValuestoString

Field Detail

fPossibleRootsback to summary
protected List<String> fPossibleRoots
fRootNameback to summary
protected String fRootName

Constructor Detail

XMLDTDDescriptionback to summary
public XMLDTDDescription(XMLResourceIdentifier id, String rootName)
XMLDTDDescriptionback to summary
public XMLDTDDescription(String publicId, String literalId, String baseId, String expandedId, String rootName)
XMLDTDDescriptionback to summary
public XMLDTDDescription(XMLInputSource source)

Method Detail

equalsback to summary
public boolean equals(Object desc)

Overrides java.lang.Object.equals.

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:Object

The description of the grammar to be compared with

Returns:boolean

True if they are equal, else false

getGrammarTypeback to summary
public String getGrammarType()

Implements com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription.getGrammarType.

Doc from com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription.getGrammarType.

Return the type of this grammar.

getRootNameback to summary
public String getRootName()

Implements com.sun.org.apache.xerces.internal.xni.grammars.XMLDTDDescription.getRootName.

Doc from com.sun.org.apache.xerces.internal.xni.grammars.XMLDTDDescription.getRootName.

Return the root name of this DTD.

Returns:String

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

hashCodeback to summary
public int hashCode()

Overrides com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl.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:int

The hash code

setPossibleRootsback to summary
public void setPossibleRoots(List<String> possibleRoots)

Set possible roots

setRootNameback to summary
public void setRootName(String rootName)

Set the root name