Package com.yahoo.labs.taxomo.util

Examples of com.yahoo.labs.taxomo.util.State


    // Get nodes that can be merged
    HashSet<State> mergeableNodes = new HashSet<State>();
    HashSet<State> examined = new HashSet<State>();
    for (State node : allowedStates) {
      State parentNode = node.getParent();
      if (parentNode != null && !examined.contains(parentNode)) {
        examined.add(parentNode);
        if (parentNode.hasOnlyChildrenInSet(allowedStates)) {
          mergeableNodes.add(parentNode);
        }

      }
    }
View Full Code Here


  private ArrayList<String> generateCandidateStates(State mergeableNode) {
    ArrayList<String> newAllowedStates = new ArrayList<String>(states.size() + 1);
    boolean addedMergeableNode = false;
    for (String state : states) {
      State node = taxo.getNode(state);
      if (node.getParent() == mergeableNode) {
        if (!addedMergeableNode) {
          newAllowedStates.add(mergeableNode.name());
          addedMergeableNode = true;
        }
      } else {
View Full Code Here

TOP

Related Classes of com.yahoo.labs.taxomo.util.State

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.