code: Document createDocument(String id) throws RepositoryException
     {
        ItemData data = handler.getContext().getItemStateManager().getItemData(id);
        if (data == null)
        {
           throw new ItemNotFoundException("Item id=" + id + " not found");
        }
        if (!data.isNode())
        {
           throw new RepositoryException("Item with id " + id + " is not a node");
        }
        return createDocument((NodeData)data);
  
     }
docs: Returns a lucene Document for the Node with <code>id</code>.
  
  @param id
  the id of the node to index.
  @return the index document.
  @throws RepositoryException
  if an error occurs while reading from the workspace or if
  there is no node with <code>id</code>.