Package com.ctc.wstx.dtd
Class DTDSubset
- java.lang.Object
-
- com.ctc.wstx.dtd.DTDSubset
-
- All Implemented Interfaces:
DTDValidationSchema,XMLValidationSchema
- Direct Known Subclasses:
DTDSubsetImpl
public abstract class DTDSubset extends Object implements DTDValidationSchema
This is the abstract base class that implements the standard Stax2 validation schema base class (XMLValidationSchema, as well as specifies extended Woodstox-specific interface for accessing DTD-specific things like entity expansions and notation properties.API is separated from its implementation to reduce coupling; for example, it is possible to have DTD subset implementations that do not implement validation logics, just entity expansion.
-
-
Field Summary
-
Fields inherited from interface org.codehaus.stax2.validation.XMLValidationSchema
SCHEMA_ID_DTD, SCHEMA_ID_RELAXNG, SCHEMA_ID_TREX, SCHEMA_ID_W3C_SCHEMA
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDTDSubset()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract DTDSubsetcombineWithExternalSubset(InputProblemReporter rep, DTDSubset extSubset)Method that will combine definitions from this internal subset with definitions from passed-in external subset, producing a new combined DTDSubset instance.abstract XMLValidatorcreateValidator(ValidationContext ctxt)abstract HashMap<PrefixedName,DTDElement>getElementMap()abstract intgetEntityCount()abstract List<EntityDecl>getGeneralEntityList()abstract HashMap<String,EntityDecl>getGeneralEntityMap()abstract intgetNotationCount()abstract List<NotationDeclaration>getNotationList()abstract HashMap<String,NotationDeclaration>getNotationMap()abstract HashMap<String,EntityDecl>getParameterEntityMap()StringgetSchemaType()Returns type of this schema.abstract booleanisCachable()abstract booleanisReusableWith(DTDSubset intSubset)Method used in determining whether cached external subset instance can be used with specified internal subset.
-
-
-
Method Detail
-
combineWithExternalSubset
public abstract DTDSubset combineWithExternalSubset(InputProblemReporter rep, DTDSubset extSubset) throws XMLStreamException
Method that will combine definitions from this internal subset with definitions from passed-in external subset, producing a new combined DTDSubset instance.- Throws:
XMLStreamException
-
createValidator
public abstract XMLValidator createValidator(ValidationContext ctxt) throws XMLStreamException
- Specified by:
createValidatorin interfaceXMLValidationSchema- Throws:
XMLStreamException
-
getSchemaType
public String getSchemaType()
Description copied from interface:XMLValidationSchemaReturns type of this schema.- Specified by:
getSchemaTypein interfaceXMLValidationSchema- Returns:
- One of external schema identifier values (such as
XMLValidationSchema.SCHEMA_ID_DTD).
-
getEntityCount
public abstract int getEntityCount()
- Specified by:
getEntityCountin interfaceDTDValidationSchema- Returns:
- Number of general (non-parameter) entities (of all types) declared in this DTD schema (in subsets [internal, external] included)
-
getNotationCount
public abstract int getNotationCount()
- Specified by:
getNotationCountin interfaceDTDValidationSchema- Returns:
- Number of notations declared in this DTD schema (in subsets [internal, external] included)
-
isCachable
public abstract boolean isCachable()
-
isReusableWith
public abstract 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 entities int subset (re-)defines, it can not; otherwise it can be used.- Returns:
- True if this (external) subset refers to a parameter entity defined in passed-in internal subset.
-
getGeneralEntityMap
public abstract HashMap<String,EntityDecl> getGeneralEntityMap()
-
getGeneralEntityList
public abstract List<EntityDecl> getGeneralEntityList()
-
getParameterEntityMap
public abstract HashMap<String,EntityDecl> getParameterEntityMap()
-
getNotationMap
public abstract HashMap<String,NotationDeclaration> getNotationMap()
-
getNotationList
public abstract List<NotationDeclaration> getNotationList()
-
getElementMap
public abstract HashMap<PrefixedName,DTDElement> getElementMap()
-
-