1 22 23 package org.xquark.mapper.metadata; 24 25 29 public class Node implements Cloneable 30 { 31 private static final String RCSRevision = "$Revision: 1.1 $"; 32 private static final String RCSName = "$Name: $"; 33 34 public long oid = -1; 35 public long last = -1; 36 public short path = -2; 38 39 public short type = -1; 40 41 43 public Node() 44 {} 45 46 public Node(long oid, short path, short type) 47 { 48 set(oid, path, type); 49 } 50 51 public Node(long oid, long last, short path, short type) 52 { 53 set(oid, last, path, type); 54 } 55 56 public void setNodeType(short lt) 57 { 58 this.type = lt; 59 } 60 61 public int getNodeType() 62 { 63 return type; 64 } 65 66 69 public void set(long oid, short path, short type) 70 { 71 this.oid = oid; 72 this.path = path; 73 this.type = type; 74 } 75 76 public void set(long oid, long last, short path, short type) 77 { 78 set(oid, path , type); 79 this.last = last; 80 } 81 82 public void clear() 83 { 84 set( -1, -1, (short)-2,(short)-1); } 86 87 public String toString() 88 { 89 return "[" + oid + ", " + last + ", " + path+ ", " + type + "]"; 90 } 91 92 public Object clone() 93 { 94 Object o = null; 95 try { 96 o = super.clone(); 97 } 98 catch (CloneNotSupportedException e) { 99 } 100 return o; 101 } 102 } 103 | Popular Tags |