1 package org.ozoneDB.xml.dom4j.xpath; 9 10 import org.dom4j.InvalidXPathException; 11 import org.dom4j.xpath.DefaultXPath; 12 import org.ozoneDB.OzoneCompatible; 13 import org.ozoneDB.OzoneInterface; 14 import org.ozoneDB.OzoneObject; 15 import org.ozoneDB.OzoneProxy; 16 import org.ozoneDB.core.ObjectContainer; 17 import org.ozoneDB.core.ObjectID; 18 import org.ozoneDB.xml.dom4j.OzoneXPath; 19 import org.xml.sax.ContentHandler ; 20 import org.xml.sax.SAXException ; 21 22 23 27 public class OzoneXPathImpl extends DefaultXPath implements OzoneXPath, OzoneCompatible { 28 29 final static long serialVersionUID = 1L; 30 31 private OzoneObject ozoneObject; 32 33 private void init() { 34 ozoneObject = new OzoneObject(); 35 } 36 37 public static OzoneXPath create(OzoneInterface db, String xpathExpression) { 38 return (OzoneXPath) db.createObject(OzoneXPathImpl.class, 39 new Class [] {String .class}, 40 new Object []{xpathExpression}); 41 } 42 43 45 public OzoneXPathImpl(String xpathExpression) throws InvalidXPathException { 46 super(xpathExpression); 47 init(); 48 } 49 50 public ObjectID getObjectID() { 51 return ozoneObject.getObjectID(); 52 } 53 54 public void setContainer(ObjectContainer _container) { 55 ozoneObject.setContainer(_container); 56 } 57 58 public ObjectContainer container() { 59 return ozoneObject.container(); 60 } 61 62 public OzoneProxy self() { 63 return ozoneObject.self(); 64 } 65 66 public OzoneInterface database() { 67 return ozoneObject.database(); 68 } 69 70 public boolean toXML(ContentHandler ch) throws SAXException { 71 return ozoneObject.toXML(ch); 72 } 73 74 public void onCreate() { 75 } 76 77 public void onActivate() { 78 } 79 80 public void onPassivate() { 81 } 82 83 public void onDelete() { 84 } 85 } 86 | Popular Tags |