org.apache.wink.common.model
Class XmlFormattingOptions

java.lang.Object
  extended by 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:

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

Constructor Summary
XmlFormattingOptions()
           
XmlFormattingOptions(boolean omitXmlDeclaration, boolean indenting)
           
XmlFormattingOptions(java.util.Map<java.lang.String,java.lang.Object> properties)
           
 
Method Summary
static XmlFormattingOptions getDefaultXmlFormattingOptions()
           
 java.util.Map<java.lang.String,java.lang.Object> getProperties()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlFormattingOptions

public XmlFormattingOptions()

XmlFormattingOptions

public XmlFormattingOptions(boolean omitXmlDeclaration,
                            boolean indenting)

XmlFormattingOptions

public XmlFormattingOptions(java.util.Map<java.lang.String,java.lang.Object> properties)
Method Detail

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.