Class ConfigurableValidationState
java.lang.Object
org.apache.xerces.impl.validation.ValidationState
org.apache.xerces.impl.validation.ConfigurableValidationState
- All Implemented Interfaces:
ValidationContext
An extension of ValidationState which can be configured to turn off checking for ID/IDREF errors and unparsed entity errors.
INTERNAL:
- Usage of this class is not supported. It may be altered or removed at any time.
- Version:
- $Id: ConfigurableValidationState.java 1380445 2012-09-04 04:43:34Z mrglavas $
- Author:
- Peter McCracken, IBM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the ID, if ID/IDREF checking is enabled.voidAdds the IDREF, if ID/IDREF checking is enabled.Checks if all IDREFs have a corresponding ID.booleanisEntityDeclared(String name) Checks if an entity is declared.booleanisEntityUnparsed(String name) Checks if an entity is unparsed.booleanisIdDeclared(String name) Checks if an ID has already been declared.voidsetIdIdrefChecking(boolean setting) Turns checking for ID/IDREF errors on and off.voidsetUnparsedEntityChecking(boolean setting) Turns checking for unparsed entity errors on and off.Methods inherited from class org.apache.xerces.impl.validation.ValidationState
getLocale, getSymbol, getURI, needExtraChecking, needFacetChecking, needToNormalize, reset, resetIDTables, setEntityState, setExtraChecking, setFacetChecking, setLocale, setNamespaceSupport, setNormalizationRequired, setSymbolTable, setUsingNamespaces, useNamespaces
-
Constructor Details
-
ConfigurableValidationState
public ConfigurableValidationState()Creates a new ConfigurableValidationState. By default, error checking for both ID/IDREFs and unparsed entities are turned on.
-
-
Method Details
-
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
Checks if all IDREFs have a corresponding ID.- Overrides:
checkIDRefIDin classValidationState- Returns:
- null, if ID/IDREF checking is turned off otherwise, returns the value of the super implementation
-
isIdDeclared
Checks if an ID has already been declared.- Specified by:
isIdDeclaredin interfaceValidationContext- Overrides:
isIdDeclaredin classValidationState- Returns:
- false, if ID/IDREF checking is turned off otherwise, returns the value of the super implementation
-
isEntityDeclared
Checks if an entity is declared.- Specified by:
isEntityDeclaredin interfaceValidationContext- Overrides:
isEntityDeclaredin classValidationState- Returns:
- true, if unparsed entity checking is turned off otherwise, returns the value of the super implementation
-
isEntityUnparsed
Checks if an entity is unparsed.- Specified by:
isEntityUnparsedin interfaceValidationContext- Overrides:
isEntityUnparsedin classValidationState- Returns:
- true, if unparsed entity checking is turned off otherwise, returns the value of the super implementation
-
addId
Adds the ID, if ID/IDREF checking is enabled.- Specified by:
addIdin interfaceValidationContext- Overrides:
addIdin classValidationState- Parameters:
name- the ID to add
-
addIdRef
Adds the IDREF, if ID/IDREF checking is enabled.- Specified by:
addIdRefin interfaceValidationContext- Overrides:
addIdRefin classValidationState- Parameters:
name- the IDREF to add
-