01: /**
02: * $Id: PartDescriptorImpl.java,v 1.5 2003/06/03 10:49:24 sy131129 Exp $
03: * Copyright 2002-2003 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.portal.providers.simplewebservice.wsdl.impl;
14:
15: import com.sun.portal.providers.simplewebservice.wsdl.PartDescriptor;
16:
17: /**
18: * This interface represents a message part.
19: *
20: */
21: public class PartDescriptorImpl implements PartDescriptor {
22:
23: private String name = null;
24: private String type = null;
25:
26: /**
27: * Default Constructor.
28: *
29: * @param name the name of the PartDescriptor.
30: * @param type the type of the PartDescriptor.
31: */
32: public PartDescriptorImpl(String name, String type) {
33: this .name = name;
34: this .type = type;
35: }
36:
37: /**
38: * Get the name of this PartDescriptor.
39: *
40: * @return the PartDescriptor name.
41: */
42: public String getName() {
43: return name;
44: }
45:
46: /**
47: * Get the type of this PartDescriptor.
48: *
49: * @return the PartDescriptor name.
50: */
51: public String getType() {
52: return type;
53: }
54:
55: /**
56: * Get the String representation of this PartDescriptor.
57: *
58: * @return the String representation of this PartDescriptor.
59: */
60: public String toString() {
61: StringBuffer strBuf = new StringBuffer();
62:
63: strBuf.append("\nPartDescriptor: name=" + name);
64:
65: if (type != null) {
66: strBuf.append("\ntype=" + type);
67: }
68:
69: return strBuf.toString();
70: }
71: }
|