- // すでに同じnodeidのNodeが存在している場合はundefinedを返しデータベースへの変更は行われない。
- var t, s, r;
- if(!ident){
- return undefined;
- }
- if(!tid){
- tid = this.UUID_Null;
- }
- if(!nid){
- nid = this.createUUID();
- }
- // 存在確認
- t = this.getNodeFromUUID(nid);
- if(t){
- return undefined;
- }
- t = new MemoryDBNodeTag(nid, tid, ident);
-
- if(this.isEnabledNetDB){
- s = this.syncPHPURL + "?action=addnode";
- s += "&nid=" + encodeURIComponent(nid);
- s += "&tid=" + encodeURIComponent(tid);
- s += "&ident=" + encodeURIComponent(ident);
- r = this.sendRequestSync("GET", s, null);
- console.log(r);
- }
+ // エラー発生時はundefinedを返す。
+ this.refreshNodeInternal(ident, tid, nid, true);