Interface CharacterDataEditVAL

All Superinterfaces:
NodeEditVAL
All Known Implementing Classes:
CDATASectionImpl, CharacterDataImpl, CommentImpl, TextImpl

public interface CharacterDataEditVAL extends NodeEditVAL
This interface extends the NodeEditVAL interface with additional methods for document editing. An object implementing this interface must also implement CharacterData interface. When validating CharacterData nodes, the NodeEditVAL.nodeValidity operation must find the nearest parent node in order to do this; if no parent node is found, VAL_UNKNOWN is returned. In addition, when VAL_INCOMPLETE is passed in as an argument to the NodeEditVAL.nodeValidity operation to operate on such nodes, the operation considers all the text and not just some of it.

See also the Document Object Model (DOM) Level 3 Validation Specification.

  • Method Details

    • isWhitespaceOnly

      short isWhitespaceOnly()
      Determines if character data is only whitespace.
      Returns:
      A validation state constant.
    • canSetData

      short canSetData(String arg)
      Determines if character data can be set.
      Parameters:
      arg - Argument to be set.
      Returns:
      A validation state constant.
    • canAppendData

      short canAppendData(String arg)
      Determines if character data can be appended.
      Parameters:
      arg - Data to be appended.
      Returns:
      A validation state constant.
    • canReplaceData

      short canReplaceData(int offset, int count, String arg) throws DOMException
      Determines if character data can be replaced.
      Parameters:
      offset - Offset.
      count - Replacement.
      arg - Argument to be set.
      Returns:
      A validation state constant.
      Throws:
      DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data, or if the specified count is negative.
    • canInsertData

      short canInsertData(int offset, String arg) throws DOMException
      Determines if character data can be inserted.
      Parameters:
      offset - Offset.
      arg - Argument to be set.
      Returns:
      A validation state constant.
      Throws:
      DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data.
    • canDeleteData

      short canDeleteData(int offset, int count) throws DOMException
      Determines if character data can be deleted.
      Parameters:
      offset - Offset.
      count - Number of 16-bit units to delete.
      Returns:
      A validation state constant.
      Throws:
      DOMException - INDEX_SIZE_ERR: Raised if the specified offset is negative or greater than the number of 16-bit units in data, or if the specified count is negative.