Example #1
0
  public boolean dropOn(Object dropOnObject) {
    if (dropOnObject instanceof Keyword) {
      Keyword parentKeyword = null;
      Keyword newParentKeyword = (Keyword) dropOnObject;
      // Add child to new parent
      newParentKeyword.addChild(this);
      // Add new parent to child
      setPar(newParentKeyword);
      update();
      newParentKeyword.update();
      return true;
    } else if (dropOnObject instanceof PersistibleWithKeywords) {
      // 						System.out.println("droping a keyword on " + dropOnObject);
      // THis seems to cause a duplicate entry
      addDescribedInstance((PersistibleWithKeywords) dropOnObject);
      update();

      ((PersistibleWithKeywords) dropOnObject).link(this);
      ((PersistibleWithKeywords) dropOnObject).update();
      return true;
    }
    return false;
  }
Example #2
0
 public static void main(String[] args) {
   Keyword t = new Keyword("TEST KEYWORD");
   t.update();
   oncotcap.Oncotcap.getDataSource().commit();
 }