edu.ksi.virtualclassroom.mappers.jaxb.xmlwrapper.impl.runtime
Class MarshallerImpl

java.lang.Object
  extended byjavax.xml.bind.helpers.AbstractMarshallerImpl
      extended byedu.ksi.virtualclassroom.mappers.jaxb.xmlwrapper.impl.runtime.MarshallerImpl
All Implemented Interfaces:
javax.xml.bind.Marshaller

public class MarshallerImpl
extends javax.xml.bind.helpers.AbstractMarshallerImpl

Implementation of Marshaller interface for JAXB RI. * * @author Kohsuke Kawaguchi * @author Vivek Pandey * @version $Revision$


Field Summary
(package private)  DefaultJAXBContextImpl context
          reference to the context that created this object
private static java.lang.String ENCODING_HANDLER
          Field ENCODING_HANDLER (value is ""com.sun.xml.bind.characterEscapeHandler"")
private  com.sun.xml.bind.marshaller.CharacterEscapeHandler escapeHandler
          Object that handles character escaping.
private  java.lang.String header
          XML BLOB written after the XML declaration.
private  java.lang.String indent
          Indentation string.
private static java.lang.String INDENT_STRING
          Field INDENT_STRING (value is ""com.sun.xml.bind.indentString"")
private static java.lang.String PREFIX_MAPPER
          Field PREFIX_MAPPER (value is ""com.sun.xml.bind.namespacePrefixMapper"")
private  com.sun.xml.bind.marshaller.NamespacePrefixMapper prefixMapper
          Used to assign prefixes to namespace URIs.
private  boolean printXmlDeclaration
          Whether the xml declaration will be printed or not.
private static java.lang.String XML_HEADERS
          Field XML_HEADERS (value is ""com.sun.xml.bind.xmlHeaders"")
private static java.lang.String XMLDECLARATION
          Field XMLDECLARATION (value is ""com.sun.xml.bind.xmlDeclaration"")
 
Fields inherited from class javax.xml.bind.helpers.AbstractMarshallerImpl
 
Fields inherited from interface javax.xml.bind.Marshaller
JAXB_ENCODING, JAXB_FORMATTED_OUTPUT, JAXB_NO_NAMESPACE_SCHEMA_LOCATION, JAXB_SCHEMA_LOCATION
 
Constructor Summary
MarshallerImpl(DefaultJAXBContextImpl c)
          Constructor for MarshallerImpl
 
Method Summary
protected  com.sun.xml.bind.marshaller.CharacterEscapeHandler createEscapeHandler(java.lang.String encoding)
          Method createEscapeHandler
 com.sun.xml.bind.marshaller.XMLWriter createWriter(java.io.OutputStream os)
          Method createWriter
 com.sun.xml.bind.marshaller.XMLWriter createWriter(java.io.OutputStream os, java.lang.String encoding)
          Method createWriter
 com.sun.xml.bind.marshaller.XMLWriter createWriter(java.io.Writer w)
          Method createWriter
 com.sun.xml.bind.marshaller.XMLWriter createWriter(java.io.Writer w, java.lang.String encoding)
          Method createWriter
 java.lang.Object getProperty(java.lang.String name)
          Method getProperty
 void marshal(java.lang.Object obj, javax.xml.transform.Result result)
          Method marshal
 void setProperty(java.lang.String name, java.lang.Object value)
          Method setProperty
private  void write(XMLSerializable obj, org.xml.sax.ContentHandler writer)
          Method write
 
Methods inherited from class javax.xml.bind.helpers.AbstractMarshallerImpl
getEncoding, getEventHandler, getJavaEncoding, getNode, getNoNSSchemaLocation, getSchemaLocation, isFormattedOutput, marshal, marshal, marshal, marshal, setEncoding, setEventHandler, setFormattedOutput, setNoNSSchemaLocation, setSchemaLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

indent

private java.lang.String indent
Indentation string. Default is four whitespaces.


prefixMapper

private com.sun.xml.bind.marshaller.NamespacePrefixMapper prefixMapper
Used to assign prefixes to namespace URIs.


escapeHandler

private com.sun.xml.bind.marshaller.CharacterEscapeHandler escapeHandler
Object that handles character escaping.


printXmlDeclaration

private boolean printXmlDeclaration
Whether the xml declaration will be printed or not.


header

private java.lang.String header
XML BLOB written after the XML declaration.


context

final DefaultJAXBContextImpl context
reference to the context that created this object


INDENT_STRING

private static final java.lang.String INDENT_STRING
Field INDENT_STRING (value is ""com.sun.xml.bind.indentString"")

See Also:
Constant Field Values

PREFIX_MAPPER

private static final java.lang.String PREFIX_MAPPER
Field PREFIX_MAPPER (value is ""com.sun.xml.bind.namespacePrefixMapper"")

See Also:
Constant Field Values

ENCODING_HANDLER

private static final java.lang.String ENCODING_HANDLER
Field ENCODING_HANDLER (value is ""com.sun.xml.bind.characterEscapeHandler"")

See Also:
Constant Field Values

XMLDECLARATION

private static final java.lang.String XMLDECLARATION
Field XMLDECLARATION (value is ""com.sun.xml.bind.xmlDeclaration"")

See Also:
Constant Field Values

XML_HEADERS

private static final java.lang.String XML_HEADERS
Field XML_HEADERS (value is ""com.sun.xml.bind.xmlHeaders"")

See Also:
Constant Field Values
Constructor Detail

MarshallerImpl

public MarshallerImpl(DefaultJAXBContextImpl c)
Constructor for MarshallerImpl

Parameters:
c - DefaultJAXBContextImpl
Method Detail

marshal

public void marshal(java.lang.Object obj,
                    javax.xml.transform.Result result)
             throws javax.xml.bind.JAXBException
Method marshal

Parameters:
obj - Object
result - Result
Throws:
javax.xml.bind.JAXBException
See Also:
Marshaller.marshal(Object, Result)

write

private void write(XMLSerializable obj,
                   org.xml.sax.ContentHandler writer)
            throws javax.xml.bind.JAXBException
Method write

Parameters:
obj - XMLSerializable
writer - ContentHandler
Throws:
javax.xml.bind.JAXBException

createEscapeHandler

protected com.sun.xml.bind.marshaller.CharacterEscapeHandler createEscapeHandler(java.lang.String encoding)
Method createEscapeHandler

Parameters:
encoding - String
Returns:
CharacterEscapeHandler

createWriter

public com.sun.xml.bind.marshaller.XMLWriter createWriter(java.io.Writer w,
                                                          java.lang.String encoding)
                                                   throws javax.xml.bind.JAXBException
Method createWriter

Parameters:
w - Writer
encoding - String
Returns:
XMLWriter
Throws:
javax.xml.bind.JAXBException

createWriter

public com.sun.xml.bind.marshaller.XMLWriter createWriter(java.io.Writer w)
                                                   throws javax.xml.bind.JAXBException
Method createWriter

Parameters:
w - Writer
Returns:
XMLWriter
Throws:
javax.xml.bind.JAXBException

createWriter

public com.sun.xml.bind.marshaller.XMLWriter createWriter(java.io.OutputStream os)
                                                   throws javax.xml.bind.JAXBException
Method createWriter

Parameters:
os - OutputStream
Returns:
XMLWriter
Throws:
javax.xml.bind.JAXBException

createWriter

public com.sun.xml.bind.marshaller.XMLWriter createWriter(java.io.OutputStream os,
                                                          java.lang.String encoding)
                                                   throws javax.xml.bind.JAXBException
Method createWriter

Parameters:
os - OutputStream
encoding - String
Returns:
XMLWriter
Throws:
javax.xml.bind.JAXBException

getProperty

public java.lang.Object getProperty(java.lang.String name)
                             throws javax.xml.bind.PropertyException
Method getProperty

Parameters:
name - String
Returns:
Object
Throws:
javax.xml.bind.PropertyException
See Also:
Marshaller.getProperty(String)

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws javax.xml.bind.PropertyException
Method setProperty

Parameters:
name - String
value - Object
Throws:
javax.xml.bind.PropertyException
See Also:
Marshaller.setProperty(String, Object)