javax.xml.bind.helpers
Class AbstractMarshallerImpl

java.lang.Object
  extended by javax.xml.bind.helpers.AbstractMarshallerImpl
All Implemented Interfaces:
Marshaller

public abstract class AbstractMarshallerImpl
extends Object
implements Marshaller


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.xml.bind.Marshaller
Marshaller.Listener
 
Field Summary
 
Fields inherited from interface javax.xml.bind.Marshaller
JAXB_ENCODING, JAXB_FORMATTED_OUTPUT, JAXB_FRAGMENT, JAXB_NO_NAMESPACE_SCHEMA_LOCATION, JAXB_SCHEMA_LOCATION
 
Constructor Summary
AbstractMarshallerImpl()
           
 
Method Summary
<A extends XmlAdapter>
A
getAdapter(Class<A> type)
           
 AttachmentMarshaller getAttachmentMarshaller()
           
protected  String getEncoding()
           
 ValidationEventHandler getEventHandler()
           
protected  String getJavaEncoding(String encoding)
           
 Marshaller.Listener getListener()
           
 Node getNode(Object obj)
           
protected  String getNoNSSchemaLocation()
           
 Object getProperty(String name)
           
 Schema getSchema()
           
protected  String getSchemaLocation()
           
protected  boolean isFormattedOutput()
           
protected  boolean isFragment()
           
 void marshal(Object obj, ContentHandler handler)
           
 void marshal(Object obj, File file)
           
 void marshal(Object obj, Node node)
           
 void marshal(Object obj, OutputStream os)
           
 void marshal(Object obj, Writer w)
           
 void marshal(Object obj, javax.xml.stream.XMLEventWriter writer)
           
 void marshal(Object obj, javax.xml.stream.XMLStreamWriter writer)
           
<A extends XmlAdapter>
void
setAdapter(Class<A> type, A adapter)
           
 void setAdapter(XmlAdapter adapter)
           
 void setAttachmentMarshaller(AttachmentMarshaller am)
           
protected  void setEncoding(String encoding)
           
 void setEventHandler(ValidationEventHandler handler)
           
protected  void setFormattedOutput(boolean v)
           
protected  void setFragment(boolean v)
           
 void setListener(Marshaller.Listener listener)
           
protected  void setNoNSSchemaLocation(String location)
           
 void setProperty(String name, Object value)
           
 void setSchema(Schema schema)
           
protected  void setSchemaLocation(String location)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.bind.Marshaller
marshal
 

Constructor Detail

AbstractMarshallerImpl

public AbstractMarshallerImpl()
Method Detail

marshal

public void marshal(Object obj,
                    File file)
             throws JAXBException
Specified by:
marshal in interface Marshaller
Throws:
JAXBException

marshal

public final void marshal(Object obj,
                          OutputStream os)
                   throws JAXBException
Specified by:
marshal in interface Marshaller
Throws:
JAXBException

marshal

public final void marshal(Object obj,
                          Writer w)
                   throws JAXBException
Specified by:
marshal in interface Marshaller
Throws:
JAXBException

marshal

public final void marshal(Object obj,
                          ContentHandler handler)
                   throws JAXBException
Specified by:
marshal in interface Marshaller
Throws:
JAXBException

marshal

public final void marshal(Object obj,
                          Node node)
                   throws JAXBException
Specified by:
marshal in interface Marshaller
Throws:
JAXBException

getNode

public Node getNode(Object obj)
             throws JAXBException
Specified by:
getNode in interface Marshaller
Throws:
JAXBException

getEncoding

protected String getEncoding()

setEncoding

protected void setEncoding(String encoding)

getSchemaLocation

protected String getSchemaLocation()

setSchemaLocation

protected void setSchemaLocation(String location)

getNoNSSchemaLocation

protected String getNoNSSchemaLocation()

setNoNSSchemaLocation

protected void setNoNSSchemaLocation(String location)

isFormattedOutput

protected boolean isFormattedOutput()

setFormattedOutput

protected void setFormattedOutput(boolean v)

isFragment

protected boolean isFragment()

setFragment

protected void setFragment(boolean v)

getJavaEncoding

protected String getJavaEncoding(String encoding)
                          throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

setProperty

public void setProperty(String name,
                        Object value)
                 throws PropertyException
Specified by:
setProperty in interface Marshaller
Throws:
PropertyException

getProperty

public Object getProperty(String name)
                   throws PropertyException
Specified by:
getProperty in interface Marshaller
Throws:
PropertyException

getEventHandler

public ValidationEventHandler getEventHandler()
                                       throws JAXBException
Specified by:
getEventHandler in interface Marshaller
Throws:
JAXBException

setEventHandler

public void setEventHandler(ValidationEventHandler handler)
                     throws JAXBException
Specified by:
setEventHandler in interface Marshaller
Throws:
JAXBException

marshal

public void marshal(Object obj,
                    javax.xml.stream.XMLEventWriter writer)
             throws JAXBException
Specified by:
marshal in interface Marshaller
Throws:
JAXBException

marshal

public void marshal(Object obj,
                    javax.xml.stream.XMLStreamWriter writer)
             throws JAXBException
Specified by:
marshal in interface Marshaller
Throws:
JAXBException

setSchema

public void setSchema(Schema schema)
Specified by:
setSchema in interface Marshaller

getSchema

public Schema getSchema()
Specified by:
getSchema in interface Marshaller

setAdapter

public void setAdapter(XmlAdapter adapter)
Specified by:
setAdapter in interface Marshaller

setAdapter

public <A extends XmlAdapter> void setAdapter(Class<A> type,
                                              A adapter)
Specified by:
setAdapter in interface Marshaller

getAdapter

public <A extends XmlAdapter> A getAdapter(Class<A> type)
Specified by:
getAdapter in interface Marshaller

setAttachmentMarshaller

public void setAttachmentMarshaller(AttachmentMarshaller am)
Specified by:
setAttachmentMarshaller in interface Marshaller

getAttachmentMarshaller

public AttachmentMarshaller getAttachmentMarshaller()
Specified by:
getAttachmentMarshaller in interface Marshaller

setListener

public void setListener(Marshaller.Listener listener)
Specified by:
setListener in interface Marshaller

getListener

public Marshaller.Listener getListener()
Specified by:
getListener in interface Marshaller


Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.