com.ctc.wstx.dtd
Class DTDSubsetImpl
java.lang.Object
com.ctc.wstx.dtd.DTDSubset
com.ctc.wstx.dtd.DTDSubsetImpl
- All Implemented Interfaces:
- DTDValidationSchema, XMLValidationSchema
public final class DTDSubsetImpl
- extends DTDSubset
The default implementation of DTDSubset
Method Summary |
DTDSubset |
combineWithExternalSubset(InputProblemReporter rep,
DTDSubset extSubset)
Method that will combine definitions from internal and external subsets,
producing a single DTD set. |
static DTDSubsetImpl |
constructInstance(boolean cachable,
java.util.HashMap genEnt,
java.util.Set refdGEs,
java.util.HashMap paramEnt,
java.util.Set refdPEs,
java.util.HashMap notations,
java.util.HashMap elements,
boolean fullyValidating)
|
XMLValidator |
createValidator(ValidationContext ctxt)
|
java.util.HashMap |
getElementMap()
|
int |
getEntityCount()
|
java.util.List |
getGeneralEntityList()
|
java.util.HashMap |
getGeneralEntityMap()
|
int |
getNotationCount()
|
java.util.List |
getNotationList()
|
java.util.HashMap |
getNotationMap()
|
java.util.HashMap |
getParameterEntityMap()
|
boolean |
isCachable()
|
boolean |
isReusableWith(DTDSubset intSubset)
Method used in determining whether cached external subset instance
can be used with specified internal subset. |
static void |
throwElementException(DTDElement oldElem,
javax.xml.stream.Location loc)
|
static void |
throwNotationException(NotationDecl oldDecl,
NotationDecl newDecl)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
constructInstance
public static DTDSubsetImpl constructInstance(boolean cachable,
java.util.HashMap genEnt,
java.util.Set refdGEs,
java.util.HashMap paramEnt,
java.util.Set refdPEs,
java.util.HashMap notations,
java.util.HashMap elements,
boolean fullyValidating)
combineWithExternalSubset
public DTDSubset combineWithExternalSubset(InputProblemReporter rep,
DTDSubset extSubset)
throws WstxException
- Method that will combine definitions from internal and external subsets,
producing a single DTD set.
- Specified by:
combineWithExternalSubset
in class DTDSubset
- Throws:
WstxException
createValidator
public XMLValidator createValidator(ValidationContext ctxt)
throws javax.xml.stream.XMLStreamException
- Specified by:
createValidator
in interface XMLValidationSchema
- Specified by:
createValidator
in class DTDSubset
- Throws:
javax.xml.stream.XMLStreamException
getEntityCount
public int getEntityCount()
- Specified by:
getEntityCount
in interface DTDValidationSchema
- Specified by:
getEntityCount
in class DTDSubset
- Returns:
- Number of general (non-parameter) entities (of all types)
declared in this DTD
schema (in subsets [internal, external] included)
getNotationCount
public int getNotationCount()
- Specified by:
getNotationCount
in interface DTDValidationSchema
- Specified by:
getNotationCount
in class DTDSubset
- Returns:
- Number of notations declared in this DTD
schema (in subsets [internal, external] included)
isCachable
public boolean isCachable()
- Specified by:
isCachable
in class DTDSubset
getGeneralEntityMap
public java.util.HashMap getGeneralEntityMap()
- Specified by:
getGeneralEntityMap
in class DTDSubset
getGeneralEntityList
public java.util.List getGeneralEntityList()
- Specified by:
getGeneralEntityList
in class DTDSubset
getParameterEntityMap
public java.util.HashMap getParameterEntityMap()
- Specified by:
getParameterEntityMap
in class DTDSubset
getNotationMap
public java.util.HashMap getNotationMap()
- Specified by:
getNotationMap
in class DTDSubset
getNotationList
public java.util.List getNotationList()
- Specified by:
getNotationList
in class DTDSubset
getElementMap
public java.util.HashMap getElementMap()
- Specified by:
getElementMap
in class DTDSubset
isReusableWith
public boolean isReusableWith(DTDSubset intSubset)
- Method used in determining whether cached external subset instance
can be used with specified internal subset. If ext. subset references
any parameter/general entities int subset (re-)defines, it can not;
otherwise it can be used.
- Specified by:
isReusableWith
in class DTDSubset
- Returns:
- True if this (external) subset refers to a parameter entity
defined in passed-in internal subset.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
throwNotationException
public static void throwNotationException(NotationDecl oldDecl,
NotationDecl newDecl)
throws WstxException
- Throws:
WstxException
throwElementException
public static void throwElementException(DTDElement oldElem,
javax.xml.stream.Location loc)
throws WstxException
- Throws:
WstxException