1 9 package org.ozoneDB.core.xml; 10 11 import org.xml.sax.*; 12 13 19 public class ObjElement implements Consts { 20 21 25 28 private String className; 29 30 33 private String id; 34 35 38 private Object obj; 39 40 43 private String ozoneObjectName; 44 45 48 private String ozoneObjectId; 49 50 54 56 public ObjElement () { 57 } 58 59 64 public ObjElement (Attributes atts) 65 throws ClassNotFoundException , InstantiationException , IllegalAccessException { 66 67 className = atts.getValue(ATTR_TYPE); 68 id = atts.getValue(ATTR_ID); 69 70 ozoneObjectName = atts.getValue(OzoneObjAttsFactory.ATTR_OBJNAME); 71 ozoneObjectId = atts.getValue(OzoneObjAttsFactory.ATTR_OBJID); 72 73 Class objClass = Thread.currentThread().getContextClassLoader().loadClass(className); 74 obj = objClass.newInstance(); 75 76 } 77 78 82 84 public String getClassName() { 85 return className; 86 } 87 88 90 public String getId() { 91 return id; 92 } 93 94 96 public Object getObject() { 97 return obj; 98 } 99 100 102 public Object getOzoneObjectName() { 103 return ozoneObjectName; 104 } 105 106 108 public Object getOzoneObjectId() { 109 return ozoneObjectId; 110 } 111 112 114 public String toString() { 115 return ("ObjElement: " + className); 116 } 117 } 118 119 | Popular Tags |