code: private NodeInclude[] getNodeIncludes(Node config) throws IllegalNameException, RepositoryException
     {
        List<NodeInclude> includes = new ArrayList<NodeInclude>();
        NodeList childNodes = config.getChildNodes();
        for (int i = 0; i < childNodes.getLength(); i++)
        {
           Node n = childNodes.item(i);
           if (n.getNodeName().equals("include"))
           {
              InternalQName ntName = null;
              Node ntAttr = n.getAttributes().getNamedItem("primaryType");
              if (ntAttr != null)
              {
                 ntName = resolver.parseJCRName(ntAttr.getNodeValue()).getInternalName();
              }
              String[] elements = Text.explode(getTextContent(n), '/');
  
              QPathEntry[] path = new QPathEntry[elements.length];
              for (int j = 0; j < elements.length; j++)
              {
                 if (elements[j].equals("*"))
                 {
                    path[j] = new QPathEntry(Constants.JCR_ANY_NAME, 0);
                 }
                 else
                 {
                    path[j] = new QPathEntry(resolver.parseJCRName(elements[j]).getInternalName(), 0);
                 }
              }
  
              includes.add(new NodeInclude(new QPath(path), ntName));
           }
        }
        return (NodeInclude[])includes.toArray(new NodeInclude[includes.size()]);
     }
docs: Creates node includes defined in the <code>config</code>.
  
  @param config the indexing aggregate configuration.
  @return the node includes defined in the <code>config</code>.
  @throws MalformedPathException if a path in the configuration is
  malformed.
  @throws IllegalNameException   if the node type name contains illegal
  characters.
  @throws RepositoryException