Class SubStringHandler

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

public class SubStringHandler extends Object implements X2JStringHandler
The handler for the X2JStringHandler interface for the SUBSTR keyword.
If the given string is an XPath expression, this will resolve the same and the extract the sub-string as per the given input.
If the given string is not an XPath expression, then the sub-string will be extracted directly from the string.
  • Constructor Details

    • SubStringHandler

      public SubStringHandler()
  • Method Details

    • handleString

      public String handleString(String rawValueString, Element rootElement) throws X2JException
      Returns the sub-string as per the given input.
      Specified by:
      handleString in interface X2JStringHandler
      Parameters:
      rawValueString - the raw JSON value string
      rootElement - the root element in the input XML
      Returns:
      the sub-string value
      Throws:
      X2JException - X2JException