View Javadoc
1   /*
2     (C) Copyright IBM Corp. 2006, 2009
3   
4     THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE
5     ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
6     CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
7   
8     You can obtain a current copy of the Eclipse Public License from
9     http://www.opensource.org/licenses/eclipse-1.0.php
10  
11    @author : Endre Bak, ebak@de.ibm.com
12   * 
13   * Flag       Date        Prog         Description
14   * -------------------------------------------------------------------------------
15   * 1565892    2006-12-04  ebak         Make SBLIM client JSR48 compliant
16   * 1663270    2007-02-19  ebak         Minor performance problems
17   * 1660756    2007-02-22  ebak         Embedded object support
18   * 1720707    2007-05-17  ebak         Conventional Node factory for CIM-XML SAX parser
19   * 2003590    2008-06-30  blaschke-oss Change licensing from CPL to EPL
20   * 2524131    2009-01-21  raman_arora  Upgrade client to JDK 1.5 (Phase 1)
21   */
22  
23  package org.metricshub.wbem.sblim.cimclient.internal.cimxml.sax.node;
24  
25  /*-
26   * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲
27   * WBEM Java Client
28   * ჻჻჻჻჻჻
29   * Copyright 2023 - 2025 MetricsHub
30   * ჻჻჻჻჻჻
31   * Licensed under the Apache License, Version 2.0 (the "License");
32   * you may not use this file except in compliance with the License.
33   * You may obtain a copy of the License at
34   *
35   *      http://www.apache.org/licenses/LICENSE-2.0
36   *
37   * Unless required by applicable law or agreed to in writing, software
38   * distributed under the License is distributed on an "AS IS" BASIS,
39   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
40   * See the License for the specific language governing permissions and
41   * limitations under the License.
42   * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱
43   */
44  
45  import org.metricshub.wbem.javax.cim.CIMDataType;
46  import org.metricshub.wbem.sblim.cimclient.internal.cimxml.sax.SAXSession;
47  import org.xml.sax.Attributes;
48  import org.xml.sax.SAXException;
49  
50  /**
51   * ELEMENT VALUE.NULL EMPTY
52   */
53  public class ValueNullNode extends AbstractScalarValueNode {
54  
55  	/**
56  	 * Ctor.
57  	 */
58  	public ValueNullNode() {
59  		super(VALUE_NULL);
60  	}
61  
62  	/**
63  	 * @param pAttribs
64  	 * @param pSession
65  	 */
66  	@Override
67  	public void init(Attributes pAttribs, SAXSession pSession) {
68  		// no attributes
69  	}
70  
71  	/**
72  	 * @param pData
73  	 */
74  	@Override
75  	public void parseData(String pData) {
76  		// no data
77  	}
78  
79  	/**
80  	 * @param pNodeNameEnum
81  	 */
82  	@Override
83  	public void testChild(String pNodeNameEnum) throws SAXException {
84  		throw new SAXException("VALUE.NULL node cannot have any child node!");
85  	}
86  
87  	/**
88  	 * @param pChild
89  	 */
90  	@Override
91  	public void childParsed(Node pChild) {
92  		// no child
93  	}
94  
95  	@Override
96  	public void testCompletness() {
97  		// nothing to test
98  	}
99  
100 	/**
101 	 * @see ValueIf#getValue()
102 	 * @return null
103 	 */
104 	public Object getValue() {
105 		return null;
106 	}
107 
108 	public CIMDataType getType() {
109 		// type is unknown
110 		return null;
111 	}
112 }