Class XMLDTDDescription
- java.lang.Object
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.util.XMLResourceIdentifierImpl
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.dtd.XMLDTDDescription
-
- All Implemented Interfaces:
XMLDTDDescription
,XMLGrammarDescription
,XMLResourceIdentifier
public class XMLDTDDescription extends XMLResourceIdentifierImpl implements XMLDTDDescription
All information specific to DTD grammars.- Version:
- $Id$
- Author:
- Neil Graham, IBM
-
-
Field Summary
Fields Modifier and Type Field Description protected ArrayList
fPossibleRoots
protected String
fRootName
-
Fields inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xerces.util.XMLResourceIdentifierImpl
fBaseSystemId, fExpandedSystemId, fLiteralSystemId, fNamespace, fPublicId
-
Fields inherited from interface org.smooks.engine.delivery.sax.ng.org.apache.xerces.xni.grammars.XMLGrammarDescription
XML_DTD, XML_SCHEMA
-
-
Constructor Summary
Constructors Constructor Description XMLDTDDescription(String publicId, String literalId, String baseId, String expandedId, String rootName)
XMLDTDDescription(XMLInputSource source)
XMLDTDDescription(XMLResourceIdentifier id, String rootName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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(ArrayList possibleRoots)
Set possible rootsvoid
setPossibleRoots(Vector possibleRoots)
Set possible rootsvoid
setRootName(String rootName)
Set the root name-
Methods inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xerces.util.XMLResourceIdentifierImpl
clear, getBaseSystemId, getExpandedSystemId, getLiteralSystemId, getNamespace, getPublicId, setBaseSystemId, setExpandedSystemId, setLiteralSystemId, setNamespace, setPublicId, setValues, setValues, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.smooks.engine.delivery.sax.ng.org.apache.xerces.xni.XMLResourceIdentifier
getBaseSystemId, getExpandedSystemId, getLiteralSystemId, getNamespace, getPublicId, setBaseSystemId, setExpandedSystemId, setLiteralSystemId, setNamespace, setPublicId
-
-
-
-
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()
Description copied from interface:XMLGrammarDescription
Return the type of this grammar.- Specified by:
getGrammarType
in interfaceXMLGrammarDescription
- Returns:
- the type of this grammar
-
getRootName
public String getRootName()
Description copied from interface:XMLDTDDescription
Return the root name of this DTD.- Specified by:
getRootName
in interfaceXMLDTDDescription
- Returns:
- the root name of this DTD or null if root name is unknown
-
setRootName
public void setRootName(String rootName)
Set the root name
-
setPossibleRoots
public void setPossibleRoots(ArrayList possibleRoots)
Set possible roots
-
setPossibleRoots
public void setPossibleRoots(Vector possibleRoots)
Set possible roots
-
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
-
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 classXMLResourceIdentifierImpl
- Returns:
- The hash code
-
-