View Javadoc
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   * 1663270    2007-02-19  ebak         Minor performance problems
17   * 1660756    2007-02-22  ebak         Embedded object support
18   * 1689085    2007-04-10  ebak         Embedded object enhancements for Pegasus
19   * 1735693    2007-06-12  ebak         Empty VALUE.ARRAY elements are parsed as nulls
20   * 2003590    2008-06-30  blaschke-oss Change licensing from CPL to EPL
21   * 2524131    2009-01-21  raman_arora  Upgrade client to JDK 1.5 (Phase 1)
22   * 2531371    2009-02-10  raman_arora  Upgrade client to JDK 1.5 (Phase 2)
23   * 2763216    2009-04-14  blaschke-oss Code cleanup: visible spelling/grammar errors
24   * 2823494    2009-08-03  rgummada     Change Boolean constructor to static
25   * 3023340    2010-07-02  blaschke-oss CIMObjectFactory uses # constructor instead of valueOf
26   * 3027615    2010-07-12  blaschke-oss Use CLASS_ARRAY_T instead of new CIMDataType(CLASS,0)
27   * 3513349    2012-03-31  blaschke-oss TCK: CIMDataType must not accept null string
28   * 3572993    2012-10-01  blaschke-oss parseDouble("2.2250738585072012e-308") DoS vulnerability
29   *    2693    2013-10-21  blaschke-oss ReturnValueNode allows invalid PARAMTYPE attribute
30   */
31  
32  package org.sentrysoftware.wbem.sblim.cimclient.internal.cimxml.sax;
33  
34  /*-
35   * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲
36   * WBEM Java Client
37   * ჻჻჻჻჻჻
38   * Copyright (C) 2023 Sentry Software
39   * ჻჻჻჻჻჻
40   * This program is free software: you can redistribute it and/or modify
41   * it under the terms of the GNU Lesser General Public License as
42   * published by the Free Software Foundation, either version 3 of the
43   * License, or (at your option) any later version.
44   *
45   * This program is distributed in the hope that it will be useful,
46   * but WITHOUT ANY WARRANTY; without even the implied warranty of
47   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
48   * GNU General Lesser Public License for more details.
49   *
50   * You should have received a copy of the GNU General Lesser Public
51   * License along with this program.  If not, see
52   * <http://www.gnu.org/licenses/lgpl-3.0.html>.
53   * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱
54   */
55  
56  import java.io.ByteArrayInputStream;
57  import java.util.ArrayList;
58  import java.util.HashMap;
59  
60  import org.sentrysoftware.wbem.javax.cim.CIMClass;
61  import org.sentrysoftware.wbem.javax.cim.CIMDataType;
62  import org.sentrysoftware.wbem.javax.cim.CIMDateTime;
63  import org.sentrysoftware.wbem.javax.cim.CIMDateTimeAbsolute;
64  import org.sentrysoftware.wbem.javax.cim.CIMDateTimeInterval;
65  import org.sentrysoftware.wbem.javax.cim.CIMInstance;
66  import org.sentrysoftware.wbem.javax.cim.CIMObjectPath;
67  import org.sentrysoftware.wbem.javax.cim.UnsignedInteger16;
68  import org.sentrysoftware.wbem.javax.cim.UnsignedInteger32;
69  import org.sentrysoftware.wbem.javax.cim.UnsignedInteger64;
70  import org.sentrysoftware.wbem.javax.cim.UnsignedInteger8;
71  import javax.xml.parsers.SAXParser;
72  import javax.xml.parsers.SAXParserFactory;
73  
74  import org.sentrysoftware.wbem.sblim.cimclient.internal.cimxml.sax.node.ClassNode;
75  import org.sentrysoftware.wbem.sblim.cimclient.internal.cimxml.sax.node.InstanceNode;
76  import org.sentrysoftware.wbem.sblim.cimclient.internal.cimxml.sax.node.Node;
77  import org.sentrysoftware.wbem.sblim.cimclient.internal.cimxml.sax.node.ValueArrayNode;
78  import org.sentrysoftware.wbem.sblim.cimclient.internal.cimxml.sax.node.ValueNode;
79  import org.sentrysoftware.wbem.sblim.cimclient.internal.util.MOF;
80  import org.sentrysoftware.wbem.sblim.cimclient.internal.util.Util;
81  import org.sentrysoftware.wbem.sblim.cimclient.internal.util.WBEMConfiguration;
82  import org.xml.sax.SAXException;
83  
84  /**
85   * Class CIMObjectFactory is responsible for type String and value String
86   * parsing.
87   */
88  public class CIMObjectFactory {
89  
90  	/**
91  	 * getEmbbeddedObjectA
92  	 * 
93  	 * @param pType
94  	 * @param pValueArrayNode
95  	 * @param pSession
96  	 * @return CIMInstance[], CIMClass[], String[] or null
97  	 * @throws SAXException
98  	 */
99  	public static Object[] getEmbeddedObjA(CIMDataType pType, ValueArrayNode pValueArrayNode,
100 			SAXSession pSession) throws SAXException {
101 		if (pValueArrayNode == null) return null;
102 		return getEmbeddedObjA(pType, (String[]) pValueArrayNode.getValue(), pSession);
103 	}
104 
105 	/**
106 	 * getEmbeddedObjectA
107 	 * 
108 	 * @param pType
109 	 * @param pValueStrA
110 	 * @param pSession
111 	 * @return CIMInstance[], CIMClass[], String[] or null
112 	 * @throws SAXException
113 	 */
114 	public static Object[] getEmbeddedObjA(CIMDataType pType, String[] pValueStrA,
115 			SAXSession pSession) throws SAXException {
116 		embeddedObjTypeCheck(pType);
117 		if (pValueStrA == null || pValueStrA.length == 0) return null;
118 		CIMDataType type = null;
119 		ArrayList<Object> objAL = new ArrayList<Object>(pValueStrA.length);
120 		for (int i = 0; i < pValueStrA.length; i++) {
121 			Object obj = parseEmbeddedObj(pValueStrA[i], pSession);
122 			if (type == null) {
123 				type = getCIMObjScalarType(obj, false);
124 			} else {
125 				CIMDataType type2 = getCIMObjScalarType(obj, false);
126 				if (type2 != null && type != type2) throw new SAXException(
127 						"Embedded Object array contains both Instance and Class objects. "
128 								+ "This is not handled!");
129 			}
130 			objAL.add(obj);
131 		}
132 		if (type == CIMDataType.OBJECT_T) {
133 			return objAL.toArray(EMPTY_INST_A);
134 		} else if (type == CIMDataType.CLASS_T) { return objAL.toArray(EMPTY_CLASS_A); }
135 		return objAL.toArray(EMPTY_STR_A);
136 	}
137 
138 	/**
139 	 * getEmbeddedObject
140 	 * 
141 	 * @param pType
142 	 * @param pValueStr
143 	 * @param pSession
144 	 * @return CIMInstance, CIMClass or null
145 	 * @throws SAXException
146 	 */
147 	public static Object getEmbeddedObj(CIMDataType pType, String pValueStr, SAXSession pSession)
148 			throws SAXException {
149 		embeddedObjTypeCheck(pType);
150 		return parseEmbeddedObj(pValueStr, pSession);
151 	}
152 
153 	/**
154 	 * getEmbeddedObj
155 	 * 
156 	 * @param pType
157 	 * @param pValObj
158 	 * @param pSession
159 	 * @return Object CIMClass, CIMInstance, String, CIMClass[], CIMInstance[],
160 	 *         String[] or null
161 	 * @throws SAXException
162 	 */
163 	public static Object getEmbeddedObj(CIMDataType pType, Object pValObj, SAXSession pSession)
164 			throws SAXException {
165 		if (pValObj instanceof String) { return getEmbeddedObj(pType, (String) pValObj, pSession); }
166 		return getEmbeddedObjA(pType, (String[]) pValObj, pSession);
167 	}
168 
169 	/**
170 	 * @param pType
171 	 * @param pAL
172 	 * @return Object[]
173 	 */
174 	public static Object[] getObjectArray(CIMDataType pType, ArrayList<Object> pAL) {
175 		createValFactoryA();
176 		// if (pType==null) pType=CIMDataType.STRING_T;
177 		ValueFactory factory = cValFactoryA[pType.getType()];
178 		return factory.make(pAL);
179 	}
180 
181 	/**
182 	 * getObject
183 	 * 
184 	 * @param pType
185 	 * @param pValueStr
186 	 * @return Object
187 	 * @throws SAXException
188 	 */
189 	public static Object getObject(CIMDataType pType, String pValueStr) throws SAXException {
190 		if (pValueStr == null) return null;
191 		createValFactoryA();
192 		ValueFactory factory = cValFactoryA[pType.getType()];
193 		try {
194 			return factory.make(pValueStr);
195 		} catch (NumberFormatException e) {
196 			throw new SAXException(e);
197 		}
198 	}
199 
200 	/**
201 	 * getObject
202 	 * 
203 	 * @param pType
204 	 * @param pValueNode
205 	 * @return Object
206 	 * @throws SAXException
207 	 */
208 	public static Object getObject(CIMDataType pType, ValueNode pValueNode) throws SAXException {
209 		if (pValueNode == null) return null;
210 		return getObject(pType, (String) pValueNode.getValue());
211 	}
212 
213 	/**
214 	 * getObject
215 	 * 
216 	 * @param pType
217 	 * @param pValueArrayNode
218 	 * @return Object
219 	 * @throws SAXException
220 	 */
221 	public static Object getObject(CIMDataType pType, ValueArrayNode pValueArrayNode)
222 			throws SAXException {
223 		if (pValueArrayNode == null) return null;
224 		ArrayList<Object> objAL = new ArrayList<Object>(pValueArrayNode.size());
225 		for (int i = 0; i < pValueArrayNode.size(); i++)
226 			objAL.add(getObject(pType, (String) pValueArrayNode.elementAt(i)));
227 		return getObjectArray(pType, objAL);
228 	}
229 
230 	/**
231 	 * getCIMObjType
232 	 * 
233 	 * @param pObj
234 	 * @param pNullToString
235 	 * @return CIMDataType OBJECT_T, CLASS_T, STRING_T
236 	 * @throws SAXException
237 	 */
238 	public static CIMDataType getCIMObjScalarType(Object pObj, boolean pNullToString)
239 			throws SAXException {
240 		if (pObj == null) return pNullToString ? CIMDataType.STRING_T : null;
241 		if (pObj instanceof CIMInstance) {
242 			return CIMDataType.OBJECT_T;
243 		} else if (pObj instanceof CIMClass) {
244 			return CIMDataType.CLASS_T;
245 		} else if (pObj instanceof String) { return CIMDataType.STRING_T; }
246 		throw new SAXException(pObj.getClass().getName() + " is not a CIMObject!");
247 	}
248 
249 	/**
250 	 * getCIMObjType
251 	 * 
252 	 * @param pObj
253 	 * @return CIMDataType OBJECT_T, OBJECT_ARRAY_T
254 	 * @throws SAXException
255 	 */
256 	public static CIMDataType getCIMObjScalarType(Object pObj) throws SAXException {
257 		return getCIMObjScalarType(pObj, true);
258 	}
259 
260 	/**
261 	 * getCIMObjArrayType
262 	 * 
263 	 * @param pObj
264 	 * @return CIMDataType: OBJECT_ARRAY_T, CLASS_T array, STRING_ARRAY_T
265 	 * @throws SAXException
266 	 */
267 	public static CIMDataType getCIMObjArrayType(Object pObj) throws SAXException {
268 		return getCIMObjArrayType(pObj, true);
269 	}
270 
271 	/**
272 	 * getArrayCIMObjType
273 	 * 
274 	 * @param pObj
275 	 * @param pNullToString
276 	 * @return CIMDataType: OBJECT_ARRAY_T, CLASS_T array, STRING_ARRAY_T or
277 	 *         null
278 	 * @throws SAXException
279 	 */
280 	public static CIMDataType getCIMObjArrayType(Object pObj, boolean pNullToString)
281 			throws SAXException {
282 		if (pObj == null) return pNullToString ? CIMDataType.STRING_ARRAY_T : null;
283 		if (pObj instanceof CIMInstance[]) {
284 			return CIMDataType.OBJECT_ARRAY_T;
285 		} else if (pObj instanceof CIMClass[]) {
286 			return CIMDataType.CLASS_ARRAY_T;
287 		} else if (pObj instanceof String[]) { return CIMDataType.STRING_ARRAY_T; }
288 		throw new SAXException(pObj.getClass().getName() + " is not a CIMObject array!");
289 	}
290 
291 	/**
292 	 * getType
293 	 * 
294 	 * @param pTypeStr
295 	 * @return CIMDataType
296 	 * @throws SAXException
297 	 */
298 	public static CIMDataType getType(String pTypeStr) throws SAXException {
299 		if (pTypeStr == null) return null;
300 		createTypeStrMap();
301 		CIMDataType type = cTypeStrMap.get(pTypeStr);
302 		if (type == null && !cTypeStrMap.containsKey(pTypeStr)) throw new SAXException(pTypeStr
303 				+ " is invalid PARAMTYPE!");
304 		return type;
305 	}
306 
307 	static final CIMInstance[] EMPTY_INST_A = new CIMInstance[0];
308 
309 	static final CIMClass[] EMPTY_CLASS_A = new CIMClass[0];
310 
311 	static final String[] EMPTY_STR_A = new String[0];
312 
313 	static final UnsignedInteger8[] EMPTY_UINT8_A = new UnsignedInteger8[0];
314 
315 	static final UnsignedInteger16[] EMPTY_UINT16_A = new UnsignedInteger16[0];
316 
317 	static final UnsignedInteger32[] EMPTY_UINT32_A = new UnsignedInteger32[0];
318 
319 	static final UnsignedInteger64[] EMPTY_UINT64_A = new UnsignedInteger64[0];
320 
321 	static final Byte[] EMPTY_BYTE_A = new Byte[0];
322 
323 	static final Short[] EMPTY_SHORT_A = new Short[0];
324 
325 	static final Integer[] EMPTY_INT_A = new Integer[0];
326 
327 	static final Long[] EMPTY_LONG_A = new Long[0];
328 
329 	static final Float[] EMPTY_FLOAT_A = new Float[0];
330 
331 	static final Double[] EMPTY_DOUBLE_A = new Double[0];
332 
333 	static final Character[] EMPTY_CHAR_A = new Character[0];
334 
335 	static final Boolean[] EMPTY_BOOL_A = new Boolean[0];
336 
337 	static final CIMDateTime[] EMPTY_DT_A = new CIMDateTime[0];
338 
339 	static final CIMObjectPath[] EMPTY_OP_A = new CIMObjectPath[0];
340 
341 	private static void embeddedObjTypeCheck(CIMDataType pType) throws SAXException {
342 		if (pType.getType() != CIMDataType.STRING) throw new SAXException(
343 				"TYPE attribute should be 'string' for EmbeddedObjects!");
344 	}
345 
346 	private static Object parseEmbeddedObj(String pValueStr, SAXSession pSession)
347 			throws SAXException {
348 		if (pValueStr == null || pValueStr.length() == 0) return null;
349 		XMLDefaultHandlerImpl ourHandler = new XMLDefaultHandlerImpl(pSession, true);
350 		// XML String of embedded Object is parsed by the SAX parser
351 		SAXParserFactory factory = SAXParserFactory.newInstance();
352 		try {
353 			SAXParser saxParser = factory.newSAXParser();
354 			saxParser.parse(new ByteArrayInputStream(pValueStr.getBytes()), ourHandler);
355 		} catch (SAXException se) {
356 			throw se;
357 		} catch (Exception e) {
358 			throw new SAXException("Exception occurred during embedded object parsing!", e);
359 		}
360 		Node node = ourHandler.getRootNode();
361 		if (node instanceof InstanceNode) { return ((InstanceNode) node).getCIMInstance(); }
362 		if (node instanceof ClassNode) { return ((ClassNode) node).getCIMClass(); }
363 		throw new SAXException(node.getNodeName()
364 				+ " root element is unexpected for Embedded Object XML String!");
365 	}
366 
367 	private static HashMap<String, CIMDataType> cTypeStrMap;
368 
369 	private synchronized static void createTypeStrMap() {
370 		if (cTypeStrMap != null) return;
371 		cTypeStrMap = new HashMap<String, CIMDataType>();
372 		cTypeStrMap.put(MOF.DT_UINT8, CIMDataType.UINT8_T);
373 		cTypeStrMap.put(MOF.DT_UINT16, CIMDataType.UINT16_T);
374 		cTypeStrMap.put(MOF.DT_UINT32, CIMDataType.UINT32_T);
375 		cTypeStrMap.put(MOF.DT_UINT64, CIMDataType.UINT64_T);
376 		cTypeStrMap.put(MOF.DT_SINT8, CIMDataType.SINT8_T);
377 		cTypeStrMap.put(MOF.DT_SINT16, CIMDataType.SINT16_T);
378 		cTypeStrMap.put(MOF.DT_SINT32, CIMDataType.SINT32_T);
379 		cTypeStrMap.put(MOF.DT_SINT64, CIMDataType.SINT64_T);
380 		cTypeStrMap.put(MOF.DT_REAL32, CIMDataType.REAL32_T);
381 		cTypeStrMap.put(MOF.DT_REAL64, CIMDataType.REAL64_T);
382 		cTypeStrMap.put(MOF.DT_CHAR16, CIMDataType.CHAR16_T);
383 		cTypeStrMap.put(MOF.DT_STR, CIMDataType.STRING_T);
384 		cTypeStrMap.put(MOF.DT_BOOL, CIMDataType.BOOLEAN_T);
385 		cTypeStrMap.put(MOF.DT_DATETIME, CIMDataType.DATETIME_T);
386 		cTypeStrMap.put(MOF.REFERENCE, new CIMDataType(""));
387 	}
388 
389 	private interface ValueFactory {
390 
391 		/**
392 		 * make
393 		 * 
394 		 * @param pStr
395 		 * @return Object
396 		 */
397 		Object make(String pStr);
398 
399 		/**
400 		 * make
401 		 * 
402 		 * @param pAL
403 		 * @return Object[]
404 		 */
405 		Object[] make(ArrayList<Object> pAL);
406 	}
407 
408 	private static ValueFactory[] cValFactoryA;
409 
410 	private static void putFactory(int pTypeCode, ValueFactory pFactory) {
411 		cValFactoryA[pTypeCode] = pFactory;
412 	}
413 
414 	private synchronized static void createValFactoryA() {
415 		if (cValFactoryA != null) return;
416 		cValFactoryA = new ValueFactory[64];
417 		// unsigned integers
418 		putFactory(CIMDataType.UINT8, new ValueFactory() {
419 
420 			public Object make(String pStr) {
421 				return new UnsignedInteger8(pStr);
422 			}
423 
424 			public Object[] make(ArrayList<Object> pAL) {
425 				return pAL.toArray(EMPTY_UINT8_A);
426 			}
427 		});
428 		putFactory(CIMDataType.UINT16, new ValueFactory() {
429 
430 			public Object make(String pStr) {
431 				return new UnsignedInteger16(pStr);
432 			}
433 
434 			public Object[] make(ArrayList<Object> pAL) {
435 				return pAL.toArray(EMPTY_UINT16_A);
436 			}
437 		});
438 		putFactory(CIMDataType.UINT32, new ValueFactory() {
439 
440 			public Object make(String pStr) {
441 				return new UnsignedInteger32(pStr);
442 			}
443 
444 			public Object[] make(ArrayList<Object> pAL) {
445 				return pAL.toArray(EMPTY_UINT32_A);
446 			}
447 		});
448 		putFactory(CIMDataType.UINT64, new ValueFactory() {
449 
450 			public Object make(String pStr) {
451 				return new UnsignedInteger64(pStr);
452 			}
453 
454 			public Object[] make(ArrayList<Object> pAL) {
455 				return pAL.toArray(EMPTY_UINT64_A);
456 			}
457 		});
458 		// signed integers
459 		putFactory(CIMDataType.SINT8, new ValueFactory() {
460 
461 			public Object make(String pStr) {
462 				return new Byte(pStr);
463 			}
464 
465 			public Object[] make(ArrayList<Object> pAL) {
466 				return pAL.toArray(EMPTY_BYTE_A);
467 			}
468 		});
469 		putFactory(CIMDataType.SINT16, new ValueFactory() {
470 
471 			public Object make(String pStr) {
472 				return new Short(pStr);
473 			}
474 
475 			public Object[] make(ArrayList<Object> pAL) {
476 				return pAL.toArray(EMPTY_SHORT_A);
477 			}
478 		});
479 		putFactory(CIMDataType.SINT32, new ValueFactory() {
480 
481 			public Object make(String pStr) {
482 				return new Integer(pStr);
483 			}
484 
485 			public Object[] make(ArrayList<Object> pAL) {
486 				return pAL.toArray(EMPTY_INT_A);
487 			}
488 		});
489 		putFactory(CIMDataType.SINT64, new ValueFactory() {
490 
491 			public Object make(String pStr) {
492 				return new Long(pStr);
493 			}
494 
495 			public Object[] make(ArrayList<Object> pAL) {
496 				return pAL.toArray(EMPTY_LONG_A);
497 			}
498 		});
499 		// floats
500 		putFactory(CIMDataType.REAL32, new ValueFactory() {
501 
502 			public Object make(String pStr) {
503 				return new Float(pStr);
504 			}
505 
506 			public Object[] make(ArrayList<Object> pAL) {
507 				return pAL.toArray(EMPTY_FLOAT_A);
508 			}
509 		});
510 		putFactory(CIMDataType.REAL64, new ValueFactory() {
511 
512 			public Object make(String pStr) {
513 				if (WBEMConfiguration.getGlobalConfiguration().verifyJavaLangDoubleStrings()) {
514 					if (Util.isBadDoubleString(pStr)) throw new IllegalArgumentException(
515 							"Double value string hangs older JVMs!\n" + pStr);
516 				}
517 				return new Double(pStr);
518 			}
519 
520 			public Object[] make(ArrayList<Object> pAL) {
521 				return pAL.toArray(EMPTY_DOUBLE_A);
522 			}
523 		});
524 		// char
525 		putFactory(CIMDataType.CHAR16, new ValueFactory() {
526 
527 			public Object make(String pStr) {
528 				if (pStr == null || pStr.length() == 0) throw new IllegalArgumentException(
529 						"Cannot make Character from empty String!");
530 				return Character.valueOf(pStr.charAt(0));
531 			}
532 
533 			public Object[] make(ArrayList<Object> pAL) {
534 				return pAL.toArray(EMPTY_CHAR_A);
535 			}
536 		});
537 		// string
538 		putFactory(CIMDataType.STRING, new ValueFactory() {
539 
540 			public Object make(String pStr) {
541 				return pStr;
542 			}
543 
544 			public Object[] make(ArrayList<Object> pAL) {
545 				return pAL.toArray(EMPTY_STR_A);
546 			}
547 		});
548 		// boolean
549 		putFactory(CIMDataType.BOOLEAN, new ValueFactory() {
550 
551 			public Object make(String pStr) {
552 				return Boolean.valueOf(pStr);
553 			}
554 
555 			public Object[] make(ArrayList<Object> pAL) {
556 				return pAL.toArray(EMPTY_BOOL_A);
557 			}
558 		});
559 		// datetime
560 		putFactory(CIMDataType.DATETIME, new ValueFactory() {
561 
562 			public Object make(String pStr) {
563 				try {
564 					return new CIMDateTimeAbsolute(pStr);
565 				} catch (IllegalArgumentException eA) {
566 					try {
567 						return new CIMDateTimeInterval(pStr);
568 					} catch (IllegalArgumentException eI) {
569 						throw new IllegalArgumentException("CIMDataTimeAbsolute:" + eA.getMessage()
570 								+ "\nCIMDateTimeInterval:" + eI.getMessage());
571 					}
572 				}
573 			}
574 
575 			public Object[] make(ArrayList<Object> pAL) {
576 				return pAL.toArray(EMPTY_DT_A);
577 			}
578 		});
579 		// reference
580 		putFactory(CIMDataType.REFERENCE, new ValueFactory() {
581 
582 			public Object make(String pStr) {
583 				return new CIMObjectPath(pStr);
584 			}
585 
586 			public Object[] make(ArrayList<Object> pAL) {
587 				return pAL.toArray(EMPTY_OP_A);
588 			}
589 		});
590 	}
591 
592 }