001    //
002    // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b11-EA 
003    // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
004    // Any modifications to this file will be lost upon recompilation of the source schema. 
005    // Generated on: 2005.05.06 at 02:17:10 BST 
006    //
007    
008    
009    package org.codehaus.activesoap.policy.addressing;
010    
011    import javax.xml.namespace.NamespaceContext;
012    import javax.xml.namespace.QName;
013    import javax.xml.stream.XMLStreamException;
014    import javax.xml.stream.XMLStreamWriter;
015    
016    /**
017     * @XmlAccessorType(value = AccessType.FIELD)
018     * @XmlType(name = "ServiceNameType", namespace = "http://schemas.xmlsoap.org/ws/2003/03/addressing")
019     */
020    public class ServiceNameType extends AttributedQName {
021    
022        public static final QName PORT_NAME = new QName("RelationshipType");
023    
024        /** @XmlAttribute(name = "PortName", namespace = "") */
025        /**
026         * @XmlJavaTypeAdapter(value = CollapsedStringAdapter.class)
027         */
028        protected String portName;
029    
030        /**
031         * Gets the value of the portName property.
032         *
033         * @return possible object is
034         *         {@link String}
035         */
036        public String getPortName() {
037            return portName;
038        }
039    
040        /**
041         * Sets the value of the portName property.
042         *
043         * @param value allowed object is
044         *              {@link String}
045         */
046        public void setPortName(String value) {
047            this.portName = value;
048        }
049    
050    
051        public void putAttributeValue(NamespaceContext namespaceContext, QName attributeName, String attributeValue) {
052            if (attributeName.equals(PORT_NAME)) {
053                setPortName(attributeValue);
054            }
055            else {
056                super.putAttributeValue(namespaceContext, attributeName, attributeValue);
057            }
058        }
059    
060    
061        public void writeAttributes(XMLStreamWriter out) throws XMLStreamException {
062            if (portName != null) {
063                out.writeAttribute(PORT_NAME.getPrefix(), PORT_NAME.getNamespaceURI(), PORT_NAME.getLocalPart(), portName);
064            }
065            super.writeAttributes(out);
066        }
067    }