1 9 package org.ozoneDB.core.xml; 10 11 import org.xml.sax.*; 12 import org.ozoneDB.OzoneProxy; 13 14 20 public class ValueObjElement implements Consts { 21 22 26 29 private String type; 30 31 34 private String id; 35 36 38 private Object obj; 39 40 44 47 public ValueObjElement () { 48 } 49 50 56 public ValueObjElement (OzoneProxy proxy) { 57 this.obj = proxy; 58 this.type = proxy.getClass().getName(); 59 } 60 61 66 public ValueObjElement (Attributes atts) 67 throws ClassNotFoundException , InstantiationException , IllegalAccessException { 68 type = atts.getValue(ATTR_TYPE); 69 id = atts.getValue(ATTR_ID); 70 71 Class objClass = Thread.currentThread().getContextClassLoader().loadClass(type); 72 obj = objClass.newInstance(); 73 } 74 75 79 81 public String getType() { 82 return type; 83 } 84 85 87 public String getId() { 88 return id; 89 } 90 91 93 public Object getObject() { 94 return obj; 95 } 96 97 99 public String toString() { 100 return ("ValueObjElement: " + type); 101 } 102 } 103 104 | Popular Tags |