01: // You can redistribute this software and/or modify it under the terms of
02: // the Infozone Software License version 2 published by the Infozone Group
03: // (http://www.infozone-group.org).
04: //
05: // Copyright (C) @year@ by The Infozone Group. All rights reserved.
06: //
07: // $Id: XObjectImpl.java,v 1.1 2002/05/10 08:59:12 per_nyfelt Exp $
08:
09: package org.infozone.tools.xml.queries.xt;
10:
11: import java.util.*;
12:
13: import org.w3c.dom.DocumentFragment;
14: import org.w3c.dom.NodeList;
15: import org.w3c.dom.Node;
16:
17: import org.xml.sax.SAXException;
18:
19: import org.infozone.tools.xml.queries.XObject;
20:
21: /**
22: * @version $Revision: 1.1 $ $Date: 2002/05/10 08:59:12 $
23: * @author <a href="http://www.softwarebuero.de">SMB</a>
24: */
25: public final class XObjectImpl implements XObject {
26:
27: //
28: // Constants
29: //
30:
31: final static long serialVersionUID = 1;
32:
33: //
34: // Data
35: //
36:
37: private NodeList nodeList;
38:
39: public XObjectImpl(Enumeration e) throws IllegalArgumentException {
40: if (e == null) {
41: throw new IllegalArgumentException(
42: "XtXObject(): Argument was null!");
43: }
44: nodeList = new NodeListImpl(e);
45: }
46:
47: public int getType() throws Exception {
48: return XObject.CLASS_NODESET;
49: }
50:
51: public boolean bool() throws Exception {
52: throw new UnsupportedOperationException();
53: }
54:
55: public double num() throws Exception {
56: throw new UnsupportedOperationException();
57: }
58:
59: public String str() throws Exception {
60: return null;
61: }
62:
63: public NodeList nodeset() throws Exception {
64: return nodeList;
65: }
66:
67: public DocumentFragment rtree() {
68: return null;
69: }
70:
71: }
|