01: /*
02:
03: This software is OSI Certified Open Source Software.
04: OSI Certified is a certification mark of the Open Source Initiative.
05:
06: The license (Mozilla version 1.0) can be read at the MMBase site.
07: See http://www.MMBase.org/license
08:
09: */
10: package org.mmbase.storage.search.implementation.database.informix.excalibur;
11:
12: import java.util.*;
13: import org.mmbase.util.xml.DocumentReader;
14: import org.w3c.dom.*;
15: import org.xml.sax.*;
16:
17: /**
18: *
19: * @author Rob van Maris
20: * @version $Id: XmlEtxIndicesReader.java,v 1.5 2007/02/24 21:57:51 nklasens Exp $
21: * @since MMBase-1.7
22: */
23: public class XmlEtxIndicesReader extends DocumentReader {
24:
25: /** Creates a new instance of XmlEtxIndicesReader */
26: public XmlEtxIndicesReader(InputSource source) {
27: super (source, true, XmlEtxIndicesReader.class);
28: }
29:
30: /**
31: * Gets <code>sbspace</code> elements.
32: *
33: * @return <code>sbspace<code> elements.
34: */
35: public Iterator<Element> getSbspaceElements() {
36: return getChildElements("etxindices", "sbspace").iterator();
37: }
38:
39: /**
40: * Gets value of <code>name</code> attribute of <code>sbspace</code> element.
41: *
42: * @param sbspace The <code>sbspace</code> element.
43: * @return Value of <code>name</code> attribute.
44: */
45: public String getSbspaceName(Element sbspace) {
46: return getElementAttributeValue(sbspace, "name");
47: }
48:
49: /**
50: * Gets <code>etxindex</code> child elements of <code>sbspace</code> element.
51: *
52: * @param sbspace The <code>sbspace</element>
53: * @return <code>etxindex</code> elements.
54: */
55: public Iterator<Element> getEtxindexElements(Element sbspace) {
56: return getChildElements(sbspace, "etxindex").iterator();
57: }
58:
59: /**
60: * Gets value of <code>table</code> attribute of <code>etxindex</code> element.
61: *
62: * @param etxindex The <code>etxindex</code> element.
63: * @return Value of <code>table</code> attribute.
64: */
65: public String getEtxindexTable(Element etxindex) {
66: return getElementAttributeValue(etxindex, "table");
67: }
68:
69: /**
70: * Gets value of <code>field</code> attribute of <code>etxindex</code> element.
71: *
72: * @param etxindex The <code>etxindex</code> element.
73: * @return Value of <code>field</code> attribute.
74: */
75: public String getEtxindexField(Element etxindex) {
76: return getElementAttributeValue(etxindex, "field");
77: }
78:
79: /**
80: * Gets name of <code>etxindex</code> element.
81: *
82: * @param etxindex The <code>etxindex</code> element.
83: * @return Value of <code>etxindex</code> element.
84: */
85: public String getEtxindexValue(Element etxindex) {
86: return getElementValue(etxindex);
87: }
88: }
|