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-11-05 ebak Make SBLIM client JSR48 compliant 16 * 2003590 2008-06-30 blaschke-oss Change licensing from CPL to EPL 17 * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) 18 */ 19 20 package org.metricshub.wbem.sblim.cimclient.internal.uri; 21 22 /*- 23 * ╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲ 24 * WBEM Java Client 25 * ჻჻჻჻჻჻ 26 * Copyright 2023 - 2025 MetricsHub 27 * ჻჻჻჻჻჻ 28 * Licensed under the Apache License, Version 2.0 (the "License"); 29 * you may not use this file except in compliance with the License. 30 * You may obtain a copy of the License at 31 * 32 * http://www.apache.org/licenses/LICENSE-2.0 33 * 34 * Unless required by applicable law or agreed to in writing, software 35 * distributed under the License is distributed on an "AS IS" BASIS, 36 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 37 * See the License for the specific language governing permissions and 38 * limitations under the License. 39 * ╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱╲╱ 40 */ 41 42 import org.metricshub.wbem.sblim.cimclient.internal.util.MOF; 43 import org.metricshub.wbem.sblim.cimclient.internal.util.Util; 44 45 /** 46 * Class UntypedReferenceValue encapsulates an untyped reference value. 47 */ 48 public class ReferenceValue extends Value implements QuotedValue { 49 private URI iRef; 50 51 /** 52 * Ctor. 53 * 54 * @param pRef 55 */ 56 public ReferenceValue(URI pRef) { 57 this.iRef = pRef; 58 } 59 60 /** 61 * @see java.lang.Object#toString() 62 */ 63 @Override 64 public String toString() { 65 return this.iRef.toString(); 66 } 67 68 /** 69 * @see QuotedValue#toQuotedString() 70 */ 71 public String toQuotedString() { 72 return Util.quote(this.iRef.toString()); 73 } 74 75 /** 76 * getRef 77 * 78 * @return <code>URI</code> 79 */ 80 public URI getRef() { 81 return this.iRef; 82 } 83 84 /** 85 * @see Value#getTypeInfo() 86 */ 87 @Override 88 public String getTypeInfo() { 89 return MOF.REFERENCE; 90 } 91 }