org.apache.xerces.impl.validation
Class ConfigurableValidationState

java.lang.Object
  |
  +--org.apache.xerces.impl.validation.ValidationState
        |
        +--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.

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
ConfigurableValidationState()
          Creates a new ConfigurableValidationState.
 
Method Summary
 void addId(java.lang.String name)
          Adds the ID, if ID/IDREF checking is enabled.
 void addIdRef(java.lang.String name)
          Adds the IDREF, if ID/IDREF checking is enabled.
 java.util.Iterator checkIDRefID()
          Checks if all IDREFs have a corresponding ID.
 boolean isEntityDeclared(java.lang.String name)
          Checks if an entity is declared.
 boolean isEntityUnparsed(java.lang.String name)
          Checks if an entity is unparsed.
 boolean isIdDeclared(java.lang.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.apache.xerces.impl.validation.ValidationState
getLocale, getSymbol, getURI, needExtraChecking, needFacetChecking, needToNormalize, reset, resetIDTables, setEntityState, setExtraChecking, setFacetChecking, setLocale, setNamespaceSupport, setNormalizationRequired, setSymbolTable, setUsingNamespaces, useNamespaces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurableValidationState

public ConfigurableValidationState()
Creates a new ConfigurableValidationState. By default, error checking for both ID/IDREFs and unparsed entities are turned on.
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 java.util.Iterator checkIDRefID()
Checks if all IDREFs have a corresponding ID.
Overrides:
checkIDRefID in class ValidationState
Returns:
null, if ID/IDREF checking is turned off otherwise, returns the value of the super implementation

isIdDeclared

public boolean isIdDeclared(java.lang.String name)
Checks if an ID has already been declared.
Overrides:
isIdDeclared in class ValidationState
Returns:
false, if ID/IDREF checking is turned off otherwise, returns the value of the super implementation

isEntityDeclared

public boolean isEntityDeclared(java.lang.String name)
Checks if an entity is declared.
Overrides:
isEntityDeclared in class ValidationState
Returns:
true, if unparsed entity checking is turned off otherwise, returns the value of the super implementation

isEntityUnparsed

public boolean isEntityUnparsed(java.lang.String name)
Checks if an entity is unparsed.
Overrides:
isEntityUnparsed in class ValidationState
Returns:
true, if unparsed entity checking is turned off otherwise, returns the value of the super implementation

addId

public void addId(java.lang.String name)
Adds the ID, if ID/IDREF checking is enabled.
Overrides:
addId in class ValidationState
Parameters:
name - the ID to add

addIdRef

public void addIdRef(java.lang.String name)
Adds the IDREF, if ID/IDREF checking is enabled.
Overrides:
addIdRef in class ValidationState
Parameters:
name - the IDREF to add


Copyright 1999-2018 The Apache Software Foundation. All Rights Reserved.