Interface TreeResolver

  • All Known Implementing Classes:
    DOMTreeResolver

    public interface TreeResolver
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NO_NAMESPACE  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getElementName​(java.lang.Object element)
      returns the name of the element so that it may match against the selectors
      java.lang.Object getParentElement​(java.lang.Object element)
      returns the parent element of an element, or null if this was the root element
      int getPositionOfElement​(java.lang.Object element)
      Returns the index of the position of the submitted element among its element node siblings.
      java.lang.Object getPreviousSiblingElement​(java.lang.Object node)
      The previous sibling element, or null if none exists
      boolean isFirstChildElement​(java.lang.Object element)
      returns true if this element is the first child element of its parent
      boolean isLastChildElement​(java.lang.Object element)
      returns true if this element is the last child element of its parent
      boolean matchesElement​(java.lang.Object element, java.lang.String namespaceURI, java.lang.String name)
      Returns true if element has the local name name and namespace URI namespaceURI.
    • Method Detail

      • getParentElement

        java.lang.Object getParentElement​(java.lang.Object element)
        returns the parent element of an element, or null if this was the root element
      • getElementName

        java.lang.String getElementName​(java.lang.Object element)
        returns the name of the element so that it may match against the selectors
      • getPreviousSiblingElement

        java.lang.Object getPreviousSiblingElement​(java.lang.Object node)
        The previous sibling element, or null if none exists
      • isFirstChildElement

        boolean isFirstChildElement​(java.lang.Object element)
        returns true if this element is the first child element of its parent
      • isLastChildElement

        boolean isLastChildElement​(java.lang.Object element)
        returns true if this element is the last child element of its parent
      • getPositionOfElement

        int getPositionOfElement​(java.lang.Object element)
        Returns the index of the position of the submitted element among its element node siblings.
        Parameters:
        element -
        Returns:
        -1 in case of error, 0 indexed position otherwise
      • matchesElement

        boolean matchesElement​(java.lang.Object element,
                               java.lang.String namespaceURI,
                               java.lang.String name)
        Returns true if element has the local name name and namespace URI namespaceURI.
        Parameters:
        element -
        namespaceURI - The namespace to match, may be null to signify any namespace. Use NO_NAMESPACE to signify that name should only match when there is no namespace defined on element.
        name - The name to match, may not be null