com.sun.xml.ws.encoding
Class TagInfoset

java.lang.Object
  extended by com.sun.xml.ws.encoding.TagInfoset

public final class TagInfoset
extends Object

Complete infoset about a start tag.

This is used between StreamMessage and StreamSOAPCodec to capture the infoset of the s:Envelope, s:Header, and s:Body elements.

Design Note

Since StAX and SAX uses different null vs empty string convention, one has to choose which format we store things. It can go either way, but I'm assuming that we'll be using StAX more in JAX-WS, so things are kept in the StAX style in this class.


Field Summary
 AttributesImpl atts
          Attributes on this tag.
 String localName
          Local name of the start tag.
 String[] ns
          Namespace declarations on this tag.
 String nsUri
          Namespace URI of the start tag in stax-style.
 String prefix
          Prefix of the start tag in stax-style.
 
Constructor Summary
TagInfoset(String nsUri, String localName, String prefix, AttributesImpl atts, String... ns)
           
TagInfoset(javax.xml.stream.XMLStreamReader reader)
          Fills a TagInfoset object by the current element that the reader points to.
 
Method Summary
 void writeEnd(ContentHandler contentHandler)
          Writes the end element event.
 void writeStart(ContentHandler contentHandler)
          Writes the start element event.
 void writeStart(javax.xml.stream.XMLStreamWriter w)
          Writes the start element event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ns

@NotNull
public final String[] ns
Namespace declarations on this tag. Read-only. This is an array of the even length of the form { prefix0, uri0, prefix1, uri1, ... }. URIs/prefixes can be null (StAX-style)


atts

@NotNull
public final AttributesImpl atts
Attributes on this tag. Read-only.


prefix

@Nullable
public final String prefix
Prefix of the start tag in stax-style.


nsUri

@Nullable
public final String nsUri
Namespace URI of the start tag in stax-style.


localName

@NotNull
public final String localName
Local name of the start tag.

Constructor Detail

TagInfoset

public TagInfoset(String nsUri,
                  String localName,
                  String prefix,
                  AttributesImpl atts,
                  String... ns)

TagInfoset

public TagInfoset(javax.xml.stream.XMLStreamReader reader)
Fills a TagInfoset object by the current element that the reader points to.

Method Detail

writeStart

public void writeStart(ContentHandler contentHandler)
                throws SAXException
Writes the start element event.

Throws:
SAXException

writeEnd

public void writeEnd(ContentHandler contentHandler)
              throws SAXException
Writes the end element event.

Throws:
SAXException

writeStart

public void writeStart(javax.xml.stream.XMLStreamWriter w)
                throws javax.xml.stream.XMLStreamException
Writes the start element event.

Throws:
javax.xml.stream.XMLStreamException