io.nosqlbench.nb.api.markdown.providers.DocsRootDirectory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of driver-cql-shaded Show documentation
Show all versions of driver-cql-shaded Show documentation
A Shaded CQL ActivityType driver for http://nosqlbench.io/
package io.nosqlbench.nb.api.markdown.providers;
import io.nosqlbench.nb.api.content.Content;
import io.nosqlbench.nb.api.content.NBIO;
import io.nosqlbench.nb.api.content.NBIOWalker;
import io.nosqlbench.nb.api.content.PathContent;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
public abstract class DocsRootDirectory implements RawMarkdownSource {
@Override
public List> getMarkdownInfo() {
List> list = NBIO.local().name(getRootPathName()).list();
NBIOWalker.CollectVisitor capture = new NBIOWalker.CollectVisitor(true, false);
NBIOWalker.RegexFilter filter = new NBIOWalker.RegexFilter("\\.md",true);
for (Content> content : list) {
Path path = content.asPath();
NBIOWalker.walkFullPath(path,capture,filter);
}
List> content = new ArrayList<>();
for (Path path : capture.get()) {
content.add(new PathContent(path));
}
return content;
}
protected abstract String getRootPathName();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy