com.fasterxml.jackson.dataformat.xml.XmlPrettyPrinter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger-all Show documentation
Show all versions of swagger-all Show documentation
swagger-all is a rebundled verison of Swagger as one OSGi bundle.
The newest version!
package com.fasterxml.jackson.dataformat.xml;
import java.math.BigDecimal;
import java.math.BigInteger;
import javax.xml.stream.XMLStreamException;
import org.codehaus.stax2.XMLStreamWriter2;
import com.fasterxml.jackson.core.PrettyPrinter;
/**
* There are some XML-specific quirks that need extra TLC when
* indenting: so we will use a refinement of general purpose one.
*/
public interface XmlPrettyPrinter extends PrettyPrinter
{
/**
* Method for forcibly writing a start element, without going
* through Jackson generator (and thus, without updating currently
* active element stack)
*
* @since 2.1
*/
public void writeStartElement(XMLStreamWriter2 sw,
String nsURI, String localName) throws XMLStreamException;
/**
* Method for forcibly writing an end element, without going
* through Jackson generator (and thus, without updating currently
* active element stack)
*
* @since 2.1
*/
public void writeEndElement(XMLStreamWriter2 sw, int nrOfEntries) throws XMLStreamException;
public void writeLeafElement(XMLStreamWriter2 sw,
String nsURI, String localName, String text)
throws XMLStreamException;
public void writeLeafElement(XMLStreamWriter2 sw,
String nsURI, String localName,
char[] buffer, int offset, int len)
throws XMLStreamException;
public void writeLeafElement(XMLStreamWriter2 sw,
String nsURI, String localName, boolean value)
throws XMLStreamException;
// Lots of numbers...
public void writeLeafElement(XMLStreamWriter2 sw,
String nsURI, String localName, int value)
throws XMLStreamException;
public void writeLeafElement(XMLStreamWriter2 sw,
String nsURI, String localName, long value)
throws XMLStreamException;
public void writeLeafElement(XMLStreamWriter2 sw,
String nsURI, String localName, double value)
throws XMLStreamException;
public void writeLeafElement(XMLStreamWriter2 sw,
String nsURI, String localName, float value)
throws XMLStreamException;
public void writeLeafElement(XMLStreamWriter2 sw,
String nsURI, String localName, BigInteger value)
throws XMLStreamException;
public void writeLeafElement(XMLStreamWriter2 sw,
String nsURI, String localName, BigDecimal value)
throws XMLStreamException;
// binary element
public void writeLeafElement(XMLStreamWriter2 sw,
String nsURI, String localName,
byte[] data, int offset, int len)
throws XMLStreamException;
// empty element to represent null
public void writeLeafNullElement(XMLStreamWriter2 sw,
String nsURI, String localName)
throws XMLStreamException;
}