01: /*
02: * $Id: DOMSource.java,v 1.3 2001/11/02 22:07:45 db Exp $
03: * Copyright (C) 2001 Andrew Selkirk
04: *
05: * This file is part of GNU JAXP, a library.
06: *
07: * GNU JAXP is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU General Public License as published by
09: * the Free Software Foundation; either version 2 of the License, or
10: * (at your option) any later version.
11: *
12: * GNU JAXP is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with this program; if not, write to the Free Software
19: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: *
21: * As a special exception, if you link this library with other files to
22: * produce an executable, this library does not by itself cause the
23: * resulting executable to be covered by the GNU General Public License.
24: * This exception does not however invalidate any other reasons why the
25: * executable file might be covered by the GNU General Public License.
26: */
27: package javax.xml.transform.dom;
28:
29: // Imports
30: import org.w3c.dom.Node;
31: import javax.xml.transform.Source;
32:
33: /**
34: * DOM Source
35: * @author Andrew Selkirk
36: * @version 1.0
37: */
38: public class DOMSource implements Source {
39:
40: //-------------------------------------------------------------
41: // Variables --------------------------------------------------
42: //-------------------------------------------------------------
43:
44: public static final String FEATURE = "http://javax.xml.transform.dom.DOMSource/feature";
45:
46: private Node node = null;
47: String baseID = null;
48:
49: //-------------------------------------------------------------
50: // Initialization ---------------------------------------------
51: //-------------------------------------------------------------
52:
53: public DOMSource() {
54: } // DOMSource()
55:
56: public DOMSource(Node node) {
57: this .node = node;
58: } // DOMSource()
59:
60: public DOMSource(Node node, String systemID) {
61: this .node = node;
62: this .baseID = systemID;
63: } // DOMSource()
64:
65: //-------------------------------------------------------------
66: // Methods ----------------------------------------------------
67: //-------------------------------------------------------------
68:
69: public void setNode(Node node) {
70: this .node = node;
71: } // setNode()
72:
73: public Node getNode() {
74: return node;
75: } // getNode()
76:
77: public void setSystemId(String systemID) {
78: baseID = systemID;
79: } // setSystemId()
80:
81: public String getSystemId() {
82: return baseID;
83: } // getSystemId()
84:
85: } // DOMSource
|