org.apache.wink.common.model
Class XmlFormattingOptions
java.lang.Object
org.apache.wink.common.model.XmlFormattingOptions
- All Implemented Interfaces:
- java.lang.Cloneable
public class XmlFormattingOptions
- extends java.lang.Object
- implements java.lang.Cloneable
Holds the following XML Formatting Options:
- omitXmlDeclaration - indicates if xml declaration should be omitted.
Default value true - omitted.
- indenting - indicates if xml should be indented. Default value true -
indented.
Can be used by XML representations to give a control over the formation of
XML output.
In order to use it, implement a ContextResolver returning an
XmlFormattingOptions. And register it in Application
.
Example:
@Provider
public class FormattingOptionsContextResolver implements ContextResolver<XmlFormattingOptions> {
public XmlFormattingOptions getContext(Class<?> type) {
if (type == MyClass.class) {
return new XmlFormattingOptions(false, false);
}
return null;
}
}
- See Also:
Application
,
ContextResolver
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlFormattingOptions
public XmlFormattingOptions()
XmlFormattingOptions
public XmlFormattingOptions(boolean omitXmlDeclaration,
boolean indenting)
XmlFormattingOptions
public XmlFormattingOptions(java.util.Map<java.lang.String,java.lang.Object> properties)
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
getDefaultXmlFormattingOptions
public static XmlFormattingOptions getDefaultXmlFormattingOptions()
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.