public override FilterStateResult traverse(FilterEnv in_env) { FilterStateResult result = new FilterStateResult(); current_env = in_env.advance(); if (in_features.Count > 0) { out_nodes = filter.process(in_features, current_env); } else if (in_fragments.Count > 0) { out_nodes = filter.process(in_fragments, current_env); } else if (in_nodes.Count > 0) { out_nodes = filter.process(in_nodes, current_env); } FilterState next = getNextState(); if (next != null) { if (out_nodes.Count > 0) { if (next is NodeFilterState) { NodeFilterState state = (NodeFilterState)next; state.push(out_nodes); } else if (next is CollectionFilterState) { CollectionFilterState state = (CollectionFilterState)next; state.push(out_nodes); } out_nodes.Clear(); result = next.traverse(current_env); } else { result.set(FilterStateResult.Status.STATUS_NODATA, filter); } } in_features.Clear(); in_fragments.Clear(); in_nodes.Clear(); return(result); }
/** * Instructs this state's Filter to process its input. * * @param env * Runtime processing environment */ public override FilterStateResult traverse(FilterEnv in_env) { FilterStateResult result = new FilterStateResult(); // clone a new environment: current_env = in_env.advance(); FeatureList output = filter.process(in_features, current_env); FilterState next = getNextState(); if (next != null) { if (output.Count > 0) { if (next is FeatureFilterState) { FeatureFilterState state = (FeatureFilterState)next; state.push(output); } else if (next is FragmentFilterState) { FragmentFilterState state = (FragmentFilterState)next; state.push(output); } else if (next is NodeFilterState) { NodeFilterState state = (NodeFilterState)next; state.push(output); } else if (next is CollectionFilterState) { CollectionFilterState state = (CollectionFilterState)next; state.push(output); } result = next.traverse(current_env); } else { result.set(FilterStateResult.Status.STATUS_NODATA, filter); } } // clean up in_features.Clear(); return(result); }
/** * Instructs this state's Filter to process its input. * * @param env * Runtime processing environment */ public override FilterStateResult traverse(FilterEnv in_env) { FilterStateResult result = new FilterStateResult(); // clone a new environment: current_env = in_env.advance(); FeatureList output = filter.process(in_features, current_env); FilterState next = getNextState(); if (next != null) { if (output.Count > 0) { if (next is FeatureFilterState) { FeatureFilterState state = (FeatureFilterState)next; state.push(output); } else if (next is FragmentFilterState) { FragmentFilterState state = (FragmentFilterState)next; state.push(output); } else if (next is NodeFilterState) { NodeFilterState state = (NodeFilterState)next; state.push(output); } else if (next is CollectionFilterState) { CollectionFilterState state = (CollectionFilterState)next; state.push(output); } result = next.traverse(current_env); } else { result.set(FilterStateResult.Status.STATUS_NODATA, filter); } } // clean up in_features.Clear(); return result; }
public override FilterStateResult traverse(FilterEnv in_env) { FilterStateResult result = new FilterStateResult(); current_env = in_env.advance(); if (in_features.Count > 0) { out_nodes = filter.process(in_features, current_env); } else if (in_fragments.Count > 0) { out_nodes = filter.process(in_fragments, current_env); } else if (in_nodes.Count > 0) { out_nodes = filter.process(in_nodes, current_env); } FilterState next = getNextState(); if (next != null) { if (out_nodes.Count > 0) { if (next is NodeFilterState) { NodeFilterState state = (NodeFilterState)next; state.push(out_nodes); } else if (next is CollectionFilterState) { CollectionFilterState state = (CollectionFilterState)next; state.push(out_nodes); } out_nodes.Clear(); result = next.traverse(current_env); } else { result.set(FilterStateResult.Status.STATUS_NODATA, filter); } } in_features.Clear(); in_fragments.Clear(); in_nodes.Clear(); return result; }
public FilterStateResult(FilterStateResult rhs) { this.status = rhs.status; this.filter = rhs.filter; this.msg = rhs.msg; }