Class 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.

    @xerces.internal
    Version:
    $Id: ConfigurableValidationState.java 449320 2006-09-23 22:37:56Z mrglavas $
    Author:
    Peter McCracken, IBM
    • 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