Top Description Fields Constructors Methods
org.apache.xerces.impl.dtd

public Class XMLDTDDescription

extends XMLResourceIdentifierImpl
implements XMLDTDDescription
Class Inheritance
All Implemented Interfaces
org.apache.xerces.xni.grammars.XMLDTDDescription, org.apache.xerces.xni.grammars.XMLGrammarDescription, org.apache.xerces.xni.XMLResourceIdentifier
Imports
java.util.ArrayList, .Vector, org.apache.xerces.util.XMLResourceIdentifierImpl, org.apache.xerces.xni.XMLResourceIdentifier, org.apache.xerces.xni.grammars.XMLGrammarDescription, org.apache.xerces.xni.parser.XMLInputSource

All information specific to DTD grammars.
Author
Neil Graham, IBM
Version
$Id: XMLDTDDescription.java 699892 2008-09-28 21:08:27Z mrglavas $

Field Summary

Modifier and TypeField and Description
protected ArrayList<E>
protected String
Inherited from org.apache.xerces.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 org.apache.xerces.xni.grammars.XMLDTDDescription.getRootName.

Return the root name of this DTD.
public int

Returns:

The hash code
hashCode
()

Overrides org.apache.xerces.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(ArrayList<E> possibleRoots)

Set possible roots

public void
setPossibleRoots(Vector<E> possibleRoots)

Set possible roots

public void
setRootName(String rootName)

Set the root name

Inherited from org.apache.xerces.util.XMLResourceIdentifierImpl:
cleargetBaseSystemIdgetExpandedSystemIdgetLiteralSystemIdgetNamespacegetPublicIdsetBaseSystemIdsetExpandedSystemIdsetLiteralSystemIdsetNamespacesetPublicIdsetValuessetValuestoString

Field Detail

fPossibleRootsback to summary
protected ArrayList<E> 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 org.apache.xerces.xni.grammars.XMLGrammarDescription.getGrammarType.

Doc from org.apache.xerces.xni.grammars.XMLGrammarDescription.getGrammarType.

Return the type of this grammar.

Returns:String

the type of this grammar

getRootNameback to summary
public String getRootName()

Implements org.apache.xerces.xni.grammars.XMLDTDDescription.getRootName.

Doc from org.apache.xerces.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 org.apache.xerces.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(ArrayList<E> possibleRoots)

Set possible roots

setPossibleRootsback to summary
public void setPossibleRoots(Vector<E> possibleRoots)

Set possible roots

setRootNameback to summary
public void setRootName(String rootName)

Set the root name