/** * @param theNodeConstructor constructs new tree nodes. */ @SuppressWarnings("unchecked") public DependencyPathsFromTreeSnow(AbstractNodeConstructor<T, S> theNodeConstructor) { super(theNodeConstructor); oneBranchDPFT = new DependencyPathsFromTree<T,S>(theNodeConstructor, /* start (root) */ new NounPredicate<T>(), /* end (leaf) */ new NounPredicate<T>(), /* stop */ new VerbRelativeClausePredicate<T>(), // TODO: limit by length (4) /* createDependencyPathsWithTwoBranches */ false, /* theFilterPathsWithOnlyStopwords */true); twoBranchDPFT = new DependencyPathsFromTree<T,S>(theNodeConstructor, /* start (root) */ TruePredicate.INSTANCE, /* end (leaf) */ new NounPredicate<T>(), /* stop */ new VerbRelativeClausePredicate<T>(), // TODO: limit by length (4) /* createDependencyPathsWithTwoBranches */ true, /* theFilterPathsWithOnlyStopwords */true); }
/** * Quick test to allow optimization of <code>getFilteredVertices()</code>. * @return <code>true</code> if there is an active vertex filtering * mechanism for this visualization, <code>false</code> otherwise */ protected boolean verticesAreFiltered() { Predicate<Context<Graph<V,E>,V>> vertexIncludePredicate = vv.getRenderContext().getVertexIncludePredicate(); return vertexIncludePredicate != null && vertexIncludePredicate instanceof TruePredicate == false; }
/** * Quick test to allow optimization of <code>getFilteredEdges()</code>. * @return <code>true</code> if there is an active edge filtering * mechanism for this visualization, <code>false</code> otherwise */ protected boolean edgesAreFiltered() { Predicate<Context<Graph<V,E>,E>> edgeIncludePredicate = vv.getRenderContext().getEdgeIncludePredicate(); return edgeIncludePredicate != null && edgeIncludePredicate instanceof TruePredicate == false; }