org.jboss.xb.binding
Class DtdMarshaller
java.lang.Object
org.jboss.xb.binding.AbstractMarshaller
org.jboss.xb.binding.DtdMarshaller
- All Implemented Interfaces:
- Marshaller
public class DtdMarshaller
- extends AbstractMarshaller
A DTD based org.jboss.xb.binding.Marshaller implementation.
- Version:
- $Revision: 1.5 $
- Author:
- Alexey Loubyansky
Method Summary |
void |
addAttribute(String prefix,
String localName,
String type,
String value)
|
void |
addBinding(String elementName,
TypeBinding binding)
|
void |
declareNamespace(String prefix,
String uri)
Defines a namespace. |
protected static com.wutka.dtd.DTDElement[] |
getRootList(com.wutka.dtd.DTD dtd)
|
void |
mapPublicIdToSystemId(String publicId,
String systemId)
|
void |
marshal(Reader dtdReader,
ObjectModelProvider provider,
Object document,
Writer writer)
|
protected static void |
removeElements(Hashtable h,
com.wutka.dtd.DTD dtd,
com.wutka.dtd.DTDItem item)
|
Methods inherited from class org.jboss.xb.binding.AbstractMarshaller |
addRootElement, addRootElement, getClassMapping, getPrefix, getProperty, mapClassToGlobalElement, mapClassToGlobalType, mapClassToXsiType, mapFieldToWildcard, marshal, propertyIsTrueOrNotSet, removeNamespace, setEncoding, setProperty, setVersion, writeXmlVersion |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DtdMarshaller
public DtdMarshaller()
addBinding
public void addBinding(String elementName,
TypeBinding binding)
mapPublicIdToSystemId
public void mapPublicIdToSystemId(String publicId,
String systemId)
- Specified by:
mapPublicIdToSystemId
in interface Marshaller
- Overrides:
mapPublicIdToSystemId
in class AbstractMarshaller
declareNamespace
public void declareNamespace(String prefix,
String uri)
- Description copied from class:
AbstractMarshaller
- Defines a namespace. The namespace declaration will appear in the root element.
If prefix
argument is null
or is an empty string then
the passed in URI will be used for the default namespace, i.e. xmlns
.
Otherwise, the declaration will follow the format xmlns:prefix=uri
.
If the namespace with the given prefix was already declared, its value is overwritten.
- Overrides:
declareNamespace
in class AbstractMarshaller
- Parameters:
prefix
- the prefix for the namespace to declare (can be null or empty string)uri
- the URI of the namespace.
addAttribute
public void addAttribute(String prefix,
String localName,
String type,
String value)
- Specified by:
addAttribute
in class AbstractMarshaller
marshal
public void marshal(Reader dtdReader,
ObjectModelProvider provider,
Object document,
Writer writer)
throws IOException,
SAXException
- Throws:
IOException
SAXException
getRootList
protected static com.wutka.dtd.DTDElement[] getRootList(com.wutka.dtd.DTD dtd)
- Parameters:
dtd
- the DTD object model
- Returns:
- root element names
removeElements
protected static void removeElements(Hashtable h,
com.wutka.dtd.DTD dtd,
com.wutka.dtd.DTDItem item)
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.