01: /*
02: * Created on Dec 8, 2003
03: *
04: * To change the template for this generated file go to
05: * Window>Preferences>Java>Code Generation>Code and Comments
06: */
07: package org.xdev.base.xssl.text.xml;
08:
09: import java.util.HashMap;
10:
11: import org.jaxen.jdom.JDOMXPath;
12: import org.jdom.Element;
13:
14: /**
15: * @author AYegorov
16: *
17: * To change the template for this generated type comment go to
18: * Window>Preferences>Java>Code Generation>Code and Comments
19: */
20: public abstract class AbstractXmlSearch extends AbstractXmlElement {
21:
22: public final static String XPATH_PROP = "expression";
23:
24: /**
25: * @param id
26: */
27: public AbstractXmlSearch(String id) {
28: super (id);
29: // TODO Auto-generated constructor stub
30: }
31:
32: /**
33: * @param id
34: * @param properties
35: */
36: public AbstractXmlSearch(String id, HashMap properties) {
37: super (id, properties);
38: // TODO Auto-generated constructor stub
39: }
40:
41: /* (non-Javadoc)
42: * @see org.xdev.base.transaction.xml.AbstractXmlElement#doXmlTransaction(org.jdom.Element)
43: */
44: protected Object doXmlTransaction(Element elm) throws Exception {
45: JDOMXPath xpath = new JDOMXPath(this
46: .getProperty(AbstractXmlSearch.XPATH_PROP));
47:
48: return this .searchXml(xpath, elm);
49: }
50:
51: protected abstract Object searchXml(JDOMXPath xpath, Element elm)
52: throws Exception;
53:
54: }
|