1 /*
2 (C) Copyright IBM Corp. 2006, 2013
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 * 1720707 2007-05-17 ebak Conventional Node factory for CIM-XML SAX parser
17 * 1820763 2007-10-29 ebak Supporting the EmbeddedInstance qualifier
18 * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL
19 * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1)
20 * 2705 2013-11-11 blaschke-oss PARAMETER.ARRAY does not require TYPE attribute
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.EmbObjHandler;
47 import org.xml.sax.Attributes;
48 import org.xml.sax.SAXException;
49
50 /**
51 * <pre>
52 * ELEMENT PARAMETER.ARRAY (QUALIFIER*)
53 * ATTLIST PARAMETER.ARRAY
54 * %CIMName;
55 * %CIMType; #REQUIRED
56 * %ArraySize;
57 * </pre>
58 */
59 public class ParameterArrayNode extends AbstractParameterNode {
60 private CIMDataType iType;
61
62 private EmbObjHandler iEmbObjHandler;
63
64 /**
65 * Ctor.
66 */
67 public ParameterArrayNode() {
68 super(PARAMETER_ARRAY);
69 }
70
71 @Override
72 protected void specificInit(Attributes pAttribs) throws SAXException {
73 if (getCIMType(pAttribs, true) == null) throw new SAXException("PARAMETER.ARRAY element missing TYPE attribute!");
74 this.iEmbObjHandler =
75 EmbObjHandler.init(this.iEmbObjHandler, getNodeName(), pAttribs, this.iSession, this.iQualiHandler, true);
76 }
77
78 @Override
79 public void testCompletness() throws SAXException {
80 this.iType = this.iEmbObjHandler.getArrayType();
81 }
82
83 public CIMDataType getType() {
84 return this.iType;
85 }
86 }