01: /*
02: * Copyright 2005 Sun Microsystems, Inc. All
03: * rights reserved. Use of this product is subject
04: * to license terms. Federal Acquisitions:
05: * Commercial Software -- Government Users
06: * Subject to Standard License Terms and
07: * Conditions.
08: *
09: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
10: * are trademarks or registered trademarks of Sun Microsystems,
11: * Inc. in the United States and other countries.
12: */
13:
14: package com.sun.portal.wsrp.common.registry.ebxml;
15:
16: import javax.xml.registry.JAXRException;
17:
18: import javax.xml.registry.infomodel.InternationalString;
19: import javax.xml.registry.infomodel.Key;
20: import javax.xml.registry.infomodel.RegistryObject;
21:
22: public class RegistryUtil {
23:
24: public static String getName(RegistryObject ro)
25: throws JAXRException {
26: InternationalString is = null;
27:
28: is = ro.getName();
29: if (is != null) {
30: return is.getValue();
31: }
32: return "";
33: }
34:
35: public static String getDescription(RegistryObject ro)
36: throws JAXRException {
37: InternationalString is = null;
38:
39: is = ro.getDescription();
40: if (is != null) {
41: return is.getValue();
42: }
43: return "";
44: }
45:
46: public static String getKey(RegistryObject ro) throws JAXRException {
47: Key key = null;
48:
49: key = ro.getKey();
50: if (key != null) {
51: return key.getId();
52: }
53: return "";
54: }
55: }
|