Module org.apache.jena.core
Class ConfigurableValidationState
java.lang.Object
org.apache.jena.ext.xerces.impl.validation.ValidationState
org.apache.jena.ext.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.
@xerces.internal- Version:
- $Id: ConfigurableValidationState.java 449320 2006-09-23 22:37:56Z mrglavas $
- Author:
- Peter McCracken, IBM
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the ID, if ID/IDREF checking is enabled.void
Adds the IDREF, if ID/IDREF checking is enabled.Checks if all IDREFs have a corresponding ID.boolean
isEntityDeclared
(String name) Checks if an entity is declared.boolean
isEntityUnparsed
(String name) Checks if an entity is unparsed.boolean
isIdDeclared
(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.jena.ext.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:
checkIDRefID
in 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:
isIdDeclared
in interfaceValidationContext
- Overrides:
isIdDeclared
in 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:
isEntityDeclared
in interfaceValidationContext
- Overrides:
isEntityDeclared
in 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:
isEntityUnparsed
in interfaceValidationContext
- Overrides:
isEntityUnparsed
in 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:
addId
in interfaceValidationContext
- Overrides:
addId
in classValidationState
- Parameters:
name
- the ID to add
-
addIdRef
Adds the IDREF, if ID/IDREF checking is enabled.- Specified by:
addIdRef
in interfaceValidationContext
- Overrides:
addIdRef
in classValidationState
- Parameters:
name
- the IDREF to add
-