01: // Copyright 1997-1999 by softwarebuero m&b (SMB). All rights reserved.
02: //
03: // You can redistribute this software and/or modify it under the terms of
04: // the Ozone Library License version 1 published by softwarebuero m&b (SMB).
05: //
06: // $Id: XObjectImpl.java,v 1.1 2002/05/10 08:59:12 per_nyfelt Exp $
07:
08: package org.infozone.tools.xml.queries.xalan;
09:
10: import org.w3c.dom.DocumentFragment;
11: import org.w3c.dom.NodeList;
12:
13: import org.xml.sax.SAXException;
14:
15: import org.infozone.tools.xml.queries.XObject;
16:
17: /**
18: * Wrapper for the Xalan XObject and maybe other XPath implementation
19: * specific things.
20: * @version $Revision: 1.1 $ $Date: 2002/05/10 08:59:12 $
21: * @author <a href="http://www.softwarebuero.de">SMB</a>
22: */
23: public final class XObjectImpl implements XObject {
24:
25: //
26: // Data
27: //
28:
29: private org.apache.xalan.xpath.XObject _xobj = null;
30:
31: /**
32: * Creates a new XalanXObject.
33: * @param xobj Xalans native XObject that should be wrapped.
34: * @exception IllegalArgumentException If the given XObject was null.
35: */
36: public XObjectImpl(org.apache.xalan.xpath.XObject xobj)
37: throws IllegalArgumentException {
38: if (xobj == null)
39: throw new IllegalArgumentException(
40: "XalanXObject(): Argument was null!");
41: _xobj = xobj;
42: }
43:
44: public int getType() {
45: return _xobj.getType();
46: }
47:
48: public boolean bool() throws org.xml.sax.SAXException {
49: return _xobj.bool();
50: }
51:
52: public double num() throws org.xml.sax.SAXException {
53: return _xobj.num();
54: }
55:
56: public String str() {
57: return _xobj.str();
58: }
59:
60: public NodeList nodeset() throws org.xml.sax.SAXException {
61: return _xobj.nodeset();
62: }
63:
64: public DocumentFragment rtree() {
65: return _xobj.rtree();
66: }
67:
68: }
|