org.apache.ws.jaxme.js.beanreader

Class BeanSchemaWriter

public class BeanSchemaWriter extends Object

The BeanSchemaWriter is an object, which takes as input an instance of JavaSource, and creates a corresponding instance of XML Schema.
Constructor Summary
BeanSchemaWriter(BeanInfoFactory pFactory)
Creates a new instance.
Method Summary
booleanisFiringStartDocument()
Returns, whether the bean schema writer is firing the ContentHandler#startDocument(), and ContentHandler#endDocument() events.
booleanisFiringXmlnsAttributes()
Returns, whether XML namespace declarations are fired not only as ContentHandler#startPrefixMapping(String, String) as events, but as attributes in ContentHandler#startElement(String, String, String, org.xml.sax.Attributes) events as well.
voidsetFiringStartDocument(boolean pIsFiringStartDocument)
Sets, whether the bean schema writer is firing the ContentHandler#startDocument(), and ContentHandler#endDocument() events.
voidsetFiringXmlnsAttributes(boolean pFiringXmlnsAttributes)
Sets, whether XML namespace declarations are fired not only as ContentHandler#startPrefixMapping(String, String) as events, but as attributes in ContentHandler#startElement(String, String, String, org.xml.sax.Attributes) events as well.
voidwrite(BeanInfo pBeanInfo, ContentHandler pHandler)
Writes the XML schema to the given content handler.
protected voidwriteElement(ContentHandler pHandler, BeanInfo pBeanInfo)

Constructor Detail

BeanSchemaWriter

public BeanSchemaWriter(BeanInfoFactory pFactory)
Creates a new instance.

Method Detail

isFiringStartDocument

public boolean isFiringStartDocument()
Returns, whether the bean schema writer is firing the ContentHandler#startDocument(), and ContentHandler#endDocument() events. By default, it does.

isFiringXmlnsAttributes

public boolean isFiringXmlnsAttributes()
Returns, whether XML namespace declarations are fired not only as ContentHandler#startPrefixMapping(String, String) as events, but as attributes in ContentHandler#startElement(String, String, String, org.xml.sax.Attributes) events as well. Defaults to true.

setFiringStartDocument

public void setFiringStartDocument(boolean pIsFiringStartDocument)
Sets, whether the bean schema writer is firing the ContentHandler#startDocument(), and ContentHandler#endDocument() events. By default, it does.

setFiringXmlnsAttributes

public void setFiringXmlnsAttributes(boolean pFiringXmlnsAttributes)
Sets, whether XML namespace declarations are fired not only as ContentHandler#startPrefixMapping(String, String) as events, but as attributes in ContentHandler#startElement(String, String, String, org.xml.sax.Attributes) events as well. Defaults to true.

write

public void write(BeanInfo pBeanInfo, ContentHandler pHandler)
Writes the XML schema to the given content handler.

Throws: SAXException Invoking the target handler failed.

writeElement

protected void writeElement(ContentHandler pHandler, BeanInfo pBeanInfo)