Пример #1
0
  /**
   * @param cutoff int , < 0 if no cutoff, >=0 the cutoff depth
   * @param from DBTreeNode
   * @since 2005-03-11
   */
  protected void buildTree(TypedTree tree, int cutoff, PackageNode from) {
    // if it's a null node
    if (from == null) {
      return;
    }
    if (cutoff != 0) {
      String ids = (String) from.getOid();
      Vector children = OntologyQuerier.getChildrenPackage(db, ids);

      System.out.println(ids + " -> " + children);
      for (int i = 0; i < children.size(); i++) {
        String kid = (String) children.elementAt(i);
        PackageNode node = createNode(kid);
        from.add(node);

        buildTree(tree, cutoff - 1, node);
      }
    }
    return;
  }
Пример #2
0
 public String getRootOid() {
   return OntologyQuerier.getPackageOid(db, Package.GlobalPkg);
 }