Class LengthHandler

java.lang.Object
com.x2j.converter.mgr.handlers.impl.LengthHandler
All Implemented Interfaces:
X2JStringHandler

public class LengthHandler extends Object implements X2JStringHandler
The handler for the X2JStringHandler interface for the LEN keyword. This handler will resolve the XPATH as provided in the schema and returns length of the String value.
  • Constructor Details

    • LengthHandler

      public LengthHandler()
  • Method Details

    • handleString

      public String handleString(String rawValueString, Element rootElement) throws X2JException
      Returns the length of resolved XPATH value string.
      Specified by:
      handleString in interface X2JStringHandler
      Parameters:
      rawValueString - the raw JSON value string
      rootElement - the root element in the input XML
      Returns:
      the length of the resolved XPATH value string
      Throws:
      X2JException - X2JException