class GitKeepFileIndexer extends AbstractFileIndexer {

    @Override
    protected IndexBuilder fillIndexBuilder(final Path path) throws Exception {
        // create indexbuilder
        final KieModule module = getModule(path);

        if (module == null) {
            logger.error("Unable to index {0}: module could not be resolved.", path.toUri().toString());
            return null;
        }

        final Package pkg = getPackage(path);
        if (pkg == null) {
            logger.error("Unable to index {0}: package could not be resolved.", path.toUri().toString());
            return null;
        }

        return new DefaultIndexBuilder(Paths.convert(path).getFileName(),
                                       module,
                                       pkg);
    }

}