com.metamatrix.connector.xml.streaming
Class ElementProcessor

java.lang.Object
  extended by com.metamatrix.connector.xml.streaming.ElementProcessor

public class ElementProcessor
extends java.lang.Object

The ElementProcessor extracts data from a Node based upon XPaths defined in an ExecutionInfo (aka columns in a query request) ro build a single result row. In this context Node is equivalent to a table in the model. The processor is also responsible putting the cacheKey in the response row, inserting projected parameters, and applying = criteria.


Constructor Summary
ElementProcessor(ExecutionInfo info)
           
 
Method Summary
static boolean evaluate(java.lang.String currentValue, CriteriaDesc criteria)
           
 void insertResponseId(Document xml, java.util.List<java.lang.Object[]> result)
          Iterate over the result and insert the ResponseId in the correct column
 java.lang.Object[] process(nu.xom.Node element)
          Iterate down the element getting column data from the matching paths.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementProcessor

public ElementProcessor(ExecutionInfo info)
                 throws ConnectorException
Throws:
ConnectorException
Method Detail

process

public java.lang.Object[] process(nu.xom.Node element)
Iterate down the element getting column data from the matching paths.

Parameters:
element - the Node representing the Table in the model.
Returns:
a single result row

insertResponseId

public void insertResponseId(Document xml,
                             java.util.List<java.lang.Object[]> result)
Iterate over the result and insert the ResponseId in the correct column

Parameters:
xml - the XML Document
result - the result batch for the query

evaluate

public static boolean evaluate(java.lang.String currentValue,
                               CriteriaDesc criteria)


Copyright © 2009. All Rights Reserved.