docs: @JRubyMethod
      public static IRubyObject transform(IRubyObject self) {
          //             System.err.println("syck_node_transform()");
          Ruby runtime = self.getRuntime();
          ThreadContext ctx = runtime.getCurrentContext();
          org.yecht.Node orig_n = (org.yecht.Node)self.dataGetStructChecked();
          YAMLExtra x = ((Node)self).x;
          IRubyObject t = new Node(runtime, self.getType(), null, x);
          org.yecht.Node n = null;
  
          switch(orig_n.kind) {
          case Map:
              n = org.yecht.Node.allocMap();
              t.dataWrapStruct(n);
              org.yecht.Data.Map dm = (org.yecht.Data.Map)orig_n.data;
              for(int i=0; i < dm.idx; i++) {
                  IRubyObject k = ((IRubyObject)orig_n.mapRead(MapPart.Key, i)).callMethod(ctx, "transform");
                  IRubyObject v = ((IRubyObject)orig_n.mapRead(MapPart.Value, i)).callMethod(ctx, "transform");
                  n.mapAdd(k, v);
              }
              break;
          case Seq:
              n = org.yecht.Node.allocSeq();
              t.dataWrapStruct(n);
              org.yecht.Data.Seq ds = (org.yecht.Data.Seq)orig_n.data;
              for(int i=0; i < ds.idx; i++) {
                  IRubyObject itm = ((IRubyObject)orig_n.seqRead(i)).callMethod(ctx, "transform");
                  n.seqAdd(itm);
              }
              break;
          case Str:
              org.yecht.Data.Str dss = (org.yecht.Data.Str)orig_n.data;
              n = org.yecht.Node.newStr(dss.ptr, dss.len, dss.style);
              t.dataWrapStruct(n);
              break;
          }
  
          if(orig_n.type_id != null) {
              n.type_id = orig_n.type_id;
          }
  
          if(orig_n.anchor != null) {
              n.anchor = orig_n.anchor;
          }
  
          n.id = t;
          //             System.err.println("syck_node_transform(), setting id of object on: " + n);
          IRubyObject result = x.DefaultResolver.callMethod(ctx, "node_import", t);
          return result;
      }