Class XPathPanel

    • Constructor Detail

      • XPathPanel

        public XPathPanel()
    • Method Detail

      • setDefaultValues

        public void setDefaultValues()
        Set default values on this component
      • getXPath

        public String getXPath()
        Get the XPath String
        Returns:
        String
      • setXPath

        public void setXPath​(String xpath)
        Set the string that will be used in the xpath evaluation
        Parameters:
        xpath - The string representing the xpath expression
      • isNegated

        public boolean isNegated()
        Does this negate the xpath results
        Returns:
        boolean
      • setNegated

        public void setNegated​(boolean negated)
        Set this to true, if you want success when the xpath does not match.
        Parameters:
        negated - Flag whether xpath match should be negated
      • getNegatedCheckBox

        public JCheckBox getNegatedCheckBox()
        Negated chechbox
        Returns:
        JCheckBox
      • getCheckXPathButton

        public JButton getCheckXPathButton()
        Check XPath button
        Returns:
        JButton
      • isShowNegated

        public boolean isShowNegated()
        Returns:
        Returns the showNegate.
      • setShowNegated

        public void setShowNegated​(boolean showNegate)
        Parameters:
        showNegate - The showNegate to set.
      • validXPath

        public static boolean validXPath​(String xpathString,
                                         boolean showDialog)
        Test whether an XPath is valid. It seems the Xalan has no easy way to check, so this creates a dummy test document, then tries to evaluate the xpath against it.
        Parameters:
        xpathString - XPath String to validate
        showDialog - weather to show a dialog
        Returns:
        returns true if valid, valse otherwise.