Top Description Fields Constructors Methods
org.apache.xerces.impl.validation

public final Class ConfigurableValidationState

extends ValidationState
Class Inheritance
Imports
java.util.Iterator

An extension of ValidationState which can be configured to turn off checking for ID/IDREF errors and unparsed entity errors.

Author
Peter McCracken, IBM
Version
$Id: ConfigurableValidationState.java 1380445 2012-09-04 04:43:34Z mrglavas $

Field Summary

Modifier and TypeField and Description
private boolean
fIdIdrefChecking

Whether to check for ID/IDREF errors

private boolean
fUnparsedEntityChecking

Whether to check for unparsed entity errors

Constructor Summary

AccessConstructor and Description
public
ConfigurableValidationState()

Creates a new ConfigurableValidationState.

Method Summary

Modifier and TypeMethod and Description
public void
addId(String
the ID to add
name
)

Overrides org.apache.xerces.impl.validation.ValidationState.addId.

Implements org.apache.xerces.impl.dv.ValidationContext.addId.

Adds the ID, if ID/IDREF checking is enabled.
public void
addIdRef(String
the IDREF to add
name
)

Overrides org.apache.xerces.impl.validation.ValidationState.addIdRef.

Implements org.apache.xerces.impl.dv.ValidationContext.addIdRef.

Adds the IDREF, if ID/IDREF checking is enabled.
public Iterator<E>

Returns:

null, if ID/IDREF checking is turned off otherwise, returns the value of the super implementation
checkIDRefID
()

Overrides org.apache.xerces.impl.validation.ValidationState.checkIDRefID.

Checks if all IDREFs have a corresponding ID.
public boolean

Returns:

true, if unparsed entity checking is turned off otherwise, returns the value of the super implementation
isEntityDeclared
(String name)

Overrides org.apache.xerces.impl.validation.ValidationState.isEntityDeclared.

Implements org.apache.xerces.impl.dv.ValidationContext.isEntityDeclared.

Checks if an entity is declared.
public boolean

Returns:

true, if unparsed entity checking is turned off otherwise, returns the value of the super implementation
isEntityUnparsed
(String name)

Overrides org.apache.xerces.impl.validation.ValidationState.isEntityUnparsed.

Implements org.apache.xerces.impl.dv.ValidationContext.isEntityUnparsed.

Checks if an entity is unparsed.
public boolean

Returns:

false, if ID/IDREF checking is turned off otherwise, returns the value of the super implementation
isIdDeclared
(String name)

Overrides org.apache.xerces.impl.validation.ValidationState.isIdDeclared.

Implements org.apache.xerces.impl.dv.ValidationContext.isIdDeclared.

Checks if an ID has already been declared.
public void
setIdIdrefChecking(boolean
true to turn on error checking, false to turn off error checking
setting
)

Turns checking for ID/IDREF errors on and off.

public void
setUnparsedEntityChecking(boolean
true to turn on error checking, false to turn off error checking
setting
)

Turns checking for unparsed entity errors on and off.

Inherited from org.apache.xerces.impl.validation.ValidationState:
getLocalegetSymbolgetURIneedExtraCheckingneedFacetCheckingneedToNormalizeresetresetIDTablessetEntityStatesetExtraCheckingsetFacetCheckingsetLocalesetNamespaceSupportsetNormalizationRequiredsetSymbolTablesetUsingNamespacesuseNamespaces

Field Detail

fIdIdrefCheckingback to summary
private boolean fIdIdrefChecking

Whether to check for ID/IDREF errors

fUnparsedEntityCheckingback to summary
private boolean fUnparsedEntityChecking

Whether to check for unparsed entity errors

Constructor Detail

ConfigurableValidationStateback to summary
public ConfigurableValidationState()

Creates a new ConfigurableValidationState. By default, error checking for both ID/IDREFs and unparsed entities are turned on.

Method Detail

addIdback to summary
public void addId(String name)

Overrides org.apache.xerces.impl.validation.ValidationState.addId.

Implements org.apache.xerces.impl.dv.ValidationContext.addId.

Adds the ID, if ID/IDREF checking is enabled.

Parameters
name:String

the ID to add

addIdRefback to summary
public void addIdRef(String name)

Overrides org.apache.xerces.impl.validation.ValidationState.addIdRef.

Implements org.apache.xerces.impl.dv.ValidationContext.addIdRef.

Adds the IDREF, if ID/IDREF checking is enabled.

Parameters
name:String

the IDREF to add

checkIDRefIDback to summary
public Iterator<E> checkIDRefID()

Overrides org.apache.xerces.impl.validation.ValidationState.checkIDRefID.

Checks if all IDREFs have a corresponding ID.

Returns:Iterator<E>

null, if ID/IDREF checking is turned off otherwise, returns the value of the super implementation

isEntityDeclaredback to summary
public boolean isEntityDeclared(String name)

Overrides org.apache.xerces.impl.validation.ValidationState.isEntityDeclared.

Implements org.apache.xerces.impl.dv.ValidationContext.isEntityDeclared.

Checks if an entity is declared.

Returns:boolean

true, if unparsed entity checking is turned off otherwise, returns the value of the super implementation

isEntityUnparsedback to summary
public boolean isEntityUnparsed(String name)

Overrides org.apache.xerces.impl.validation.ValidationState.isEntityUnparsed.

Implements org.apache.xerces.impl.dv.ValidationContext.isEntityUnparsed.

Checks if an entity is unparsed.

Returns:boolean

true, if unparsed entity checking is turned off otherwise, returns the value of the super implementation

isIdDeclaredback to summary
public boolean isIdDeclared(String name)

Overrides org.apache.xerces.impl.validation.ValidationState.isIdDeclared.

Implements org.apache.xerces.impl.dv.ValidationContext.isIdDeclared.

Checks if an ID has already been declared.

Returns:boolean

false, if ID/IDREF checking is turned off otherwise, returns the value of the super implementation

setIdIdrefCheckingback to summary
public void setIdIdrefChecking(boolean setting)

Turns checking for ID/IDREF errors on and off.

Parameters
setting:boolean

true to turn on error checking, false to turn off error checking

setUnparsedEntityCheckingback to summary
public void setUnparsedEntityChecking(boolean setting)

Turns checking for unparsed entity errors on and off.

Parameters
setting:boolean

true to turn on error checking, false to turn off error checking