Package org.wymiwyg.knobot

Examples of org.wymiwyg.knobot.RelationPattern


   */
  private void process(ResIterator iter, PrintWriter out) {
    Map patternRelationsMap = new HashMap();
    while (iter.hasNext()) {
      Resource currentRelationRes = iter.nextResource();
      RelationPattern pattern = new RelationPattern(currentRelationRes
          .getProperty(KNOBOT.source).getResource(),
          currentRelationRes.getProperty(KNOBOT.target).getResource());
      Collection relations = (Collection) patternRelationsMap
          .get(pattern);
      if (relations == null) {
        relations = new ArrayList();
      }
      relations.add(currentRelationRes);
      patternRelationsMap.put(pattern, relations);
    }
    iter.close();
    for (Iterator iterator = patternRelationsMap.keySet().iterator(); iterator
        .hasNext();) {
      RelationPattern current = (RelationPattern) iterator.next();
      deleteAllButBest((Collection) patternRelationsMap.get(current), out);
    }
  }
View Full Code Here

TOP

Related Classes of org.wymiwyg.knobot.RelationPattern

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.