org.apache.xerces.impl.validation
Class ConfigurableValidationState

java.lang.Object
  extended by org.apache.xerces.impl.validation.ValidationState
      extended by 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: ConfigurableValidationState.java 449320 2006-09-23 22:37:56Z mrglavas $
Author:
Peter McCracken, IBM

INTERNAL:

Usage of this class is not supported. It may be altered or removed at any time.

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.lang.String 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.lang.String 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.

Specified by:
isIdDeclared in interface ValidationContext
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.

Specified by:
isEntityDeclared in interface ValidationContext
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.

Specified by:
isEntityUnparsed in interface ValidationContext
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.

Specified by:
addId in interface ValidationContext
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.

Specified by:
addIdRef in interface ValidationContext
Overrides:
addIdRef in class ValidationState
Parameters:
name - the IDREF to add


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