Statistics
| Revision:

root / trunk / libraries / libGPE / src / org / gvsig / xmlschema / som / impl / XSNodeImpl.java @ 12175

History | View | Annotate | Download (2.76 KB)

1
package org.gvsig.xmlschema.som.impl;
2

    
3
import org.gvsig.xmlschema.som.IXSNode;
4
import org.gvsig.xmlschema.utils.DOMObjectsFactory;
5
import org.w3c.dom.Element;
6

    
7
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
8
 *
9
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
10
 *
11
 * This program is free software; you can redistribute it and/or
12
 * modify it under the terms of the GNU General Public License
13
 * as published by the Free Software Foundation; either version 2
14
 * of the License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program; if not, write to the Free Software
23
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
24
 *
25
 * For more information, contact:
26
 *
27
 *  Generalitat Valenciana
28
 *   Conselleria d'Infraestructures i Transport
29
 *   Av. Blasco Ib??ez, 50
30
 *   46010 VALENCIA
31
 *   SPAIN
32
 *
33
 *      +34 963862235
34
 *   gvsig@gva.es
35
 *      www.gvsig.gva.es
36
 *
37
 *    or
38
 *
39
 *   IVER T.I. S.A
40
 *   Salamanca 50
41
 *   46005 Valencia
42
 *   Spain
43
 *
44
 *   +34 963163400
45
 *   dac@iver.es
46
 */
47
/* CVS MESSAGES:
48
 *
49
 * $Id: XSNodeImpl.java 12175 2007-06-14 16:15:05Z jorpiell $
50
 * $Log$
51
 * Revision 1.1  2007-06-14 16:15:03  jorpiell
52
 * builds to create the jars generated and add the schema code to the libGPEProject
53
 *
54
 * Revision 1.1  2007/06/14 13:50:07  jorpiell
55
 * The schema jar name has been changed
56
 *
57
 * Revision 1.3  2007/06/07 14:54:13  jorpiell
58
 * Add the schema support
59
 *
60
 * Revision 1.2  2007/05/30 12:25:48  jorpiell
61
 * Add the element collection
62
 *
63
 * Revision 1.1  2007/05/25 11:55:00  jorpiell
64
 * First update
65
 *
66
 *
67
 */
68
/**
69
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
70
 */
71
public abstract class XSNodeImpl implements IXSNode{
72
        private Element element = null;
73
        private DOMObjectsFactory elementsFactory = null;        
74

    
75
        public XSNodeImpl() {
76
                super();                                        
77
        }        
78

    
79
        /*
80
         * (non-Javadoc)
81
         * @see org.gvsig.gpe.schema.som.IXSNode#getElement()
82
         */
83
        public Element getElement() {
84
                return element;
85
        }
86

    
87
        /*
88
         * (non-Javadoc)
89
         * @see org.gvsig.gpe.schema.som.IXSNode#setElement(org.w3c.dom.Element)
90
         */
91
        public void setElement(Element element) {
92
                this.element = element;                
93
        }
94

    
95
        /*
96
         * (non-Javadoc)
97
         * @see org.gvsig.gpe.schema.som.IXSNode#addChildElement(org.w3c.dom.Element)
98
         */
99
        public void addChildElement(Element element) {
100
                getElement().appendChild(element);                
101
        }        
102
        
103
        /**
104
         * @return the factory
105
         */
106
        protected DOMObjectsFactory getElementsFactory() {
107
                if (elementsFactory == null){
108
                        elementsFactory = DOMObjectsFactory.getInstance();
109
                }
110
                return elementsFactory;
111
        }
112
}