com.objsys.asn1j.runtime
Interface Asn1XmlEncoder

All Superinterfaces:
Asn1XmlXerEncoder
All Known Implementing Classes:
Asn1XmlEncodeBuffer, Asn1XmlOutputStream

public interface Asn1XmlEncoder
extends Asn1XmlXerEncoder

This is a base interface for encoding of ASN.1 messages as XML as specified in the W3C standard. It is implemented by both the Asn1XmlEncodeBuffer and Asn1XmlOutputStream.


Field Summary
static int XMLDATA
           
static int XMLEND
           
static int XMLINDENT
           
static int XMLINIT
           
static int XMLSTART
           
 
Method Summary
 void encodeAttr(java.lang.String qname, java.lang.String value)
          This method encodes an XML attribute value.
 void encodeDoubleValue(double valueName, java.lang.String elemName, java.lang.String nsPrefix)
          This method encodes an XML REAL (double) value (with start and end tags).
 void encodeEmptyElement(java.lang.String elemName, java.lang.String nsPrefix)
          This method encodes an XML empty element tag.
 void encodeEndElement(java.lang.String elemName, java.lang.String nsPrefix)
          This method encodes an XML end element tag.
 void encodeNamedValue(java.lang.String valueName, java.lang.String elemName, java.lang.String nsPrefix)
          This method encodes an XML named value (with start and end tags).
 void encodeStartElement(java.lang.String elemName, java.lang.String nsPrefix, boolean terminate)
          This method encodes an XML start element and attribute tag.
 void encodeXSIAttrs()
          This method encodes XSI attributes.
 Asn1XmlEncodeHelper getHelper()
          This method returns a reference to the internal helper object.
 void setIndent(int value)
          This method sets the number of spaces per indentation.
 void setXSIAttrs(Asn1XmlXSIAttrs value)
          This method sets the XSI attributes object to the given value.
 
Methods inherited from interface com.objsys.asn1j.runtime.Asn1XmlXerEncoder
copy, copy, copy, copy, decrLevel, encodeBinStrValue, encodeData, encodeEndDocument, encodeHexStrValue, encodeNamedValueElement, encodeStartDocument, getContext, incrLevel, indent
 

Field Detail

XMLINDENT

static final int XMLINDENT
See Also:
Constant Field Values

XMLINIT

static final int XMLINIT
See Also:
Constant Field Values

XMLSTART

static final int XMLSTART
See Also:
Constant Field Values

XMLDATA

static final int XMLDATA
See Also:
Constant Field Values

XMLEND

static final int XMLEND
See Also:
Constant Field Values
Method Detail

encodeAttr

void encodeAttr(java.lang.String qname,
                java.lang.String value)
                throws java.io.IOException,
                       Asn1Exception
This method encodes an XML attribute value.

Parameters:
qname - Attribute qualified name.
value - Attribute value in string form.
Throws:
java.io.IOException
Asn1Exception

encodeStartElement

void encodeStartElement(java.lang.String elemName,
                        java.lang.String nsPrefix,
                        boolean terminate)
                        throws java.io.IOException,
                               Asn1Exception
This method encodes an XML start element and attribute tag. start tag will contain the attribute name and value

Parameters:
elemName - The name of element.
nsPrefix - Element namespace prefix value
Throws:
java.io.IOException - If I/O error occurs.
Asn1Exception - Thrown, if operation is failed.

encodeEndElement

void encodeEndElement(java.lang.String elemName,
                      java.lang.String nsPrefix)
                      throws java.io.IOException,
                             Asn1Exception
This method encodes an XML end element tag.

Parameters:
elemName - The name of element.
Throws:
java.io.IOException - If I/O error occurs.
Asn1Exception - Thrown, if operation is failed.

encodeEmptyElement

void encodeEmptyElement(java.lang.String elemName,
                        java.lang.String nsPrefix)
                        throws java.io.IOException,
                               Asn1Exception
This method encodes an XML empty element tag. element name tag will also contain the attribute name and value

Parameters:
elemName - The name of element.
nsPrefix - Element namespace prefix value
Throws:
java.io.IOException - If I/O error occurs.
Asn1Exception - Thrown, if operation is failed.

encodeNamedValue

void encodeNamedValue(java.lang.String valueName,
                      java.lang.String elemName,
                      java.lang.String nsPrefix)
                      throws java.io.IOException,
                             Asn1Exception
This method encodes an XML named value (with start and end tags). start tag will contain the attribute name and value

Parameters:
valueName - The name of value.
elemName - The name of element.
nsPrefix - Element namespace prefix value
Throws:
java.io.IOException - If I/O error occurs.
Asn1Exception - Thrown, if operation is failed.

encodeDoubleValue

void encodeDoubleValue(double valueName,
                       java.lang.String elemName,
                       java.lang.String nsPrefix)
                       throws java.io.IOException,
                              Asn1Exception
This method encodes an XML REAL (double) value (with start and end tags). start tag will contain the attribute name and value

Parameters:
valueName - The name of value.
elemName - The name of element. If null, then start and end
nsPrefix - Element namespace prefix value
Throws:
java.io.IOException - If I/O error occurs.
Asn1Exception - Thrown, if operation is failed.

encodeXSIAttrs

void encodeXSIAttrs()
                    throws Asn1Exception,
                           java.io.IOException
This method encodes XSI attributes.

Throws:
Asn1Exception
java.io.IOException

getHelper

Asn1XmlEncodeHelper getHelper()
This method returns a reference to the internal helper object.

Returns:
Reference to mHelper object.

setIndent

void setIndent(int value)
This method sets the number of spaces per indentation. If the value is set to zero, no indentation of the XML data is done.

Parameters:
value - Number of spaces per indentation level.

setXSIAttrs

void setXSIAttrs(Asn1XmlXSIAttrs value)
This method sets the XSI attributes object to the given value.

Parameters:
value - XSI attributes object