code: public boolean accept(ItemData item)
     {
        if (getAllItems)
        {
           return true;
        }
  
        if (expressionNamePatterns == null)
        {
           initializePatterns();
        }
  
        try
        {
           // check exact names for first
           QPathEntry itemEntry = item.getQPath().getEntries()[item.getQPath().getDepth()];
  
           for (QPathEntry entry : exactNames)
           {
              if (entry.equals(itemEntry))
              {
                 return true;
              }
           }
  
           JCRPath.PathElement[] pathElements = session.getLocationFactory().createRelPath(new QPathEntry[]{itemEntry});
           // prefix:name[index]
           String name = pathElements[0].getAsString(true);
  
           for (Pattern pattern : expressionNamePatterns)
           {
              if (pattern.matcher(name).matches())
              {
                 return true;
              }
           }
        }
        catch (RepositoryException e)
        {
           // if error - just log and don't accept it
           LOG.error("Cannot parse JCR name for " + item.getQPath().getAsString(), e);
        }
  
        return false;
     }
docs: {@inheritDoc}