use of org.freeplane.plugin.workspace.nodes.FolderFileNode in project freeplane by freeplane.
the class ProjectModel method getAllNodesFiltered.
public List<URI> getAllNodesFiltered(String filter) {
HashSet<URI> set = new HashSet<URI>();
Collection<AWorkspaceTreeNode> values = hashStringKeyIndex.values();
for (AWorkspaceTreeNode node : values) {
if (node instanceof AFolderNode || node instanceof FolderFileNode) {
continue;
}
if (node instanceof DefaultFileNode) {
File file = ((DefaultFileNode) node).getFile();
if (file.getName().endsWith(filter)) {
set.add(file.toURI());
}
} else if (node instanceof ALinkNode) {
URI uri = ((ALinkNode) node).getLinkURI();
if (uri.getPath().endsWith(filter)) {
URI absUri = URIUtils.getAbsoluteURI(uri);
if (absUri == null) {
continue;
}
set.add(absUri);
}
}
}
return Arrays.asList(set.toArray(new URI[] {}));
}
Aggregations