Class DOMConfigurationImpl

java.lang.Object
org.apache.harmony.xml.dom.DOMConfigurationImpl
All Implemented Interfaces:
DOMConfiguration

public final class DOMConfigurationImpl
extends Object
implements DOMConfiguration
A minimal implementation of DOMConfiguration. This implementation uses inner parameter instances to centralize each parameter's behavior.
  • Constructor Details

    • DOMConfigurationImpl

      public DOMConfigurationImpl()
  • Method Details

    • canSetParameter

      public boolean canSetParameter​(String name, Object value)
      Description copied from interface: DOMConfiguration
      Check if setting a parameter to a specific value is supported.
      Specified by:
      canSetParameter in interface DOMConfiguration
      Parameters:
      name - The name of the parameter to check.
      value - An object. if null, the returned value is true.
      Returns:
      true if the parameter could be successfully set to the specified value, or false if the parameter is not recognized or the requested value is not supported. This does not change the current value of the parameter itself.
    • setParameter

      public void setParameter​(String name, Object value) throws DOMException
      Description copied from interface: DOMConfiguration
      Set the value of a parameter.
      Specified by:
      setParameter in interface DOMConfiguration
      Parameters:
      name - The name of the parameter to set.
      value - The new value or null if the user wishes to unset the parameter. While the type of the value parameter is defined as DOMUserData, the object type must match the type defined by the definition of the parameter. For example, if the parameter is "error-handler", the value must be of type DOMErrorHandler.
      Throws:
      DOMException - NOT_FOUND_ERR: Raised when the parameter name is not recognized.
      NOT_SUPPORTED_ERR: Raised when the parameter name is recognized but the requested value cannot be set.
      TYPE_MISMATCH_ERR: Raised if the value type for this parameter name is incompatible with the expected value type.
    • getParameter

      public Object getParameter​(String name) throws DOMException
      Description copied from interface: DOMConfiguration
      Return the value of a parameter if known.
      Specified by:
      getParameter in interface DOMConfiguration
      Parameters:
      name - The name of the parameter.
      Returns:
      The current object associated with the specified parameter or null if no object has been associated or if the parameter is not supported.
      Throws:
      DOMException - NOT_FOUND_ERR: Raised when the parameter name is not recognized.
    • getParameterNames

      public DOMStringList getParameterNames()
      Description copied from interface: DOMConfiguration
      The list of the parameters supported by this DOMConfiguration object and for which at least one value can be set by the application. Note that this list can also contain parameter names defined outside this specification.
      Specified by:
      getParameterNames in interface DOMConfiguration
    • normalize

      public void normalize​(Node node)