Class ConfigurableValidationState
- java.lang.Object
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.validation.ValidationState
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.validation.ConfigurableValidationState
-
- All Implemented Interfaces:
ValidationContext
public final class ConfigurableValidationState extends ValidationState
An extension of ValidationState which can be configured to turn off checking for ID/IDREF errors and unparsed entity errors.
- Version:
- $Id$
- Author:
- Peter McCracken, IBM
-
-
Constructor Summary
Constructors Constructor Description ConfigurableValidationState()
Creates a new ConfigurableValidationState.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addId(String name)
Adds the ID, if ID/IDREF checking is enabled.void
addIdRef(String name)
Adds the IDREF, if ID/IDREF checking is enabled.Iterator
checkIDRefID()
Checks if all IDREFs have a corresponding ID.boolean
isEntityDeclared(String name)
Checks if an entity is declared.boolean
isEntityUnparsed(String name)
Checks if an entity is unparsed.boolean
isIdDeclared(String name)
Checks if an ID has already been declared.void
setIdIdrefChecking(boolean setting)
Turns checking for ID/IDREF errors on and off.void
setUnparsedEntityChecking(boolean setting)
Turns checking for unparsed entity errors on and off.-
Methods inherited from class org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.validation.ValidationState
getLocale, getSymbol, getURI, needExtraChecking, needFacetChecking, needToNormalize, reset, resetIDTables, setEntityState, setExtraChecking, setFacetChecking, setLocale, setNamespaceSupport, setNormalizationRequired, setSymbolTable, setUsingNamespaces, useNamespaces
-
-
-
-
Method Detail
-
setIdIdrefChecking
public void setIdIdrefChecking(boolean setting)
Turns checking for ID/IDREF errors on and off.- Parameters:
setting
- true to turn on error checking, false to turn off error checking
-
setUnparsedEntityChecking
public void setUnparsedEntityChecking(boolean setting)
Turns checking for unparsed entity errors on and off.- Parameters:
setting
- true to turn on error checking, false to turn off error checking
-
checkIDRefID
public Iterator checkIDRefID()
Checks if all IDREFs have a corresponding ID.- Overrides:
checkIDRefID
in classValidationState
- Returns:
- null, if ID/IDREF checking is turned off otherwise, returns the value of the super implementation
-
isIdDeclared
public boolean isIdDeclared(String name)
Checks if an ID has already been declared.- Specified by:
isIdDeclared
in interfaceValidationContext
- Overrides:
isIdDeclared
in classValidationState
- Returns:
- false, if ID/IDREF checking is turned off otherwise, returns the value of the super implementation
-
isEntityDeclared
public boolean isEntityDeclared(String name)
Checks if an entity is declared.- Specified by:
isEntityDeclared
in interfaceValidationContext
- Overrides:
isEntityDeclared
in classValidationState
- Returns:
- true, if unparsed entity checking is turned off otherwise, returns the value of the super implementation
-
isEntityUnparsed
public boolean isEntityUnparsed(String name)
Checks if an entity is unparsed.- Specified by:
isEntityUnparsed
in interfaceValidationContext
- Overrides:
isEntityUnparsed
in classValidationState
- Returns:
- true, if unparsed entity checking is turned off otherwise, returns the value of the super implementation
-
addId
public void addId(String name)
Adds the ID, if ID/IDREF checking is enabled.- Specified by:
addId
in interfaceValidationContext
- Overrides:
addId
in classValidationState
- Parameters:
name
- the ID to add
-
addIdRef
public void addIdRef(String name)
Adds the IDREF, if ID/IDREF checking is enabled.- Specified by:
addIdRef
in interfaceValidationContext
- Overrides:
addIdRef
in classValidationState
- Parameters:
name
- the IDREF to add
-
-