Class XMLTableDefinition

  • All Implemented Interfaces:
    Serializable, org.jaxen.VariableContext

    public class XMLTableDefinition
    extends Object
    implements Serializable, org.jaxen.VariableContext

    XMLTableDefinition represents a table definition based on XPath expression evaluated on an XML document.

    See Also:
    Serialized Form
    • Constructor Detail

      • XMLTableDefinition

        public XMLTableDefinition()
    • Method Detail

      • load

        public static XMLTableDefinition load​(Document definition)
        Loads an XML table definition from an XML definition document
        Parameters:
        definition - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • load

        public static XMLTableDefinition load​(Element definition)
        Loads an XML table definition from an XML definition document
        Parameters:
        definition - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • getColumnClass

        public Class<?> getColumnClass​(int columnIndex)
      • getColumnCount

        public int getColumnCount()
      • getColumnName

        public String getColumnName​(int columnIndex)
        DOCUMENT ME!
        Parameters:
        columnIndex - DOCUMENT ME!
        Returns:
        the static column name. This is used if there is no columnNameXPath
      • getColumnXPath

        public XPath getColumnXPath​(int columnIndex)
        DOCUMENT ME!
        Parameters:
        columnIndex - DOCUMENT ME!
        Returns:
        the XPath expression used to evaluate the value of cells in this column
      • getColumnNameXPath

        public XPath getColumnNameXPath​(int columnIndex)
        DOCUMENT ME!
        Parameters:
        columnIndex - DOCUMENT ME!
        Returns:
        the XPath expresssion used to create the column name, if there is one or null if there is no XPath expression to name the column.
      • getValueAt

        public Object getValueAt​(Object row,
                                 int columnIndex)
      • addColumn

        public void addColumn​(String name,
                              String expression)
      • addColumn

        public void addColumn​(String name,
                              String expression,
                              int type)
      • addColumnWithXPathName

        public void addColumnWithXPathName​(String columnNameXPathExpression,
                                           String expression,
                                           int type)
      • addStringColumn

        public void addStringColumn​(String name,
                                    String expression)
      • addNumberColumn

        public void addNumberColumn​(String name,
                                    String expression)
      • clear

        public void clear()
      • getRowXPath

        public XPath getRowXPath()
        Getter for property rowXPath.
        Returns:
        Value of property rowXPath.
      • setRowXPath

        public void setRowXPath​(XPath rowXPath)
        Setter for property rowXPath.
        Parameters:
        rowXPath - New value of property rowXPath.
      • setRowExpression

        public void setRowExpression​(String xpath)
      • getVariableValue

        public Object getVariableValue​(String namespaceURI,
                                       String prefix,
                                       String localName)
        Specified by:
        getVariableValue in interface org.jaxen.VariableContext
      • createXPath

        protected XPath createXPath​(String expression)
      • createColumnXPath

        protected XPath createColumnXPath​(String expression)
      • clearCaches

        protected void clearCaches()
      • handleException

        protected void handleException​(Exception e)