View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2010 eviware.com
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of version 2.1 of the GNU Lesser General Public License as published by 
6    *  the Free Software Foundation.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12  
13  package com.eviware.soapui.impl.wsdl;
14  
15  import javax.xml.namespace.QName;
16  
17  import org.apache.xmlbeans.SchemaGlobalElement;
18  import org.apache.xmlbeans.SchemaType;
19  
20  import com.eviware.soapui.model.iface.MessagePart;
21  
22  /***
23   * Descriptor for a Message/SOAP Header
24   * 
25   * @author ole.matzura
26   */
27  
28  public class WsdlHeaderPart extends MessagePart.HeaderPart
29  {
30  	private String name;
31  	private SchemaType schemaType;
32  	private QName partElementName;
33  	private final SchemaGlobalElement partElement;
34  
35  	public WsdlHeaderPart( String name, SchemaType schemaType, QName partElementName, SchemaGlobalElement partElement )
36  	{
37  		super();
38  
39  		this.name = name;
40  		this.schemaType = schemaType;
41  		this.partElementName = partElementName;
42  		this.partElement = partElement;
43  	}
44  
45  	public SchemaType getSchemaType()
46  	{
47  		return schemaType;
48  	}
49  
50  	public String getDescription()
51  	{
52  		return name + " of type [" + schemaType.getName() + "]";
53  	}
54  
55  	public String getName()
56  	{
57  		return name;
58  	}
59  
60  	public QName getPartElementName()
61  	{
62  		return partElementName;
63  	}
64  
65  	@Override
66  	public SchemaGlobalElement getPartElement()
67  	{
68  		return partElement;
69  	}
70  }