code: public NodeData[] getAggregatedNodeStates(NodeData nodeState) throws RepositoryException
     {
        if (nodeState.getPrimaryTypeName().equals(nodeTypeName))
        {
           List<NodeData> nodeStates = new ArrayList<NodeData>();
           for (int i = 0; i < nodeIncludes.length; i++)
           {
              nodeStates.addAll(Arrays.asList(nodeIncludes[i].resolve(nodeState)));
           }
           if (nodeStates.size() > 0)
           {
              return (NodeData[])nodeStates.toArray(new NodeData[nodeStates.size()]);
           }
        }
        return null;
     }
docs: Returns the node states that are part of the indexing aggregate of the
  <code>nodeState</code>.
  
  @param nodeState a node state
  @return the node states that are part of the indexing aggregate of
  <code>nodeState</code>. Returns <code>null</code> if this
  aggregate does not apply to <code>nodeState</code>.
  @throws RepositoryException
  @throws ItemStateException  if an error occurs.