Examples of XmlFormattingOptions


Examples of org.apache.wink.common.model.XmlFormattingOptions

        // will set to UTF-8 if there isn't a charset
        m.setProperty(Marshaller.JAXB_ENCODING, ProviderUtils.getCharset(mediaType));

        ContextResolver<XmlFormattingOptions> contextResolver =
            providers.getContextResolver(XmlFormattingOptions.class, mediaType);
        XmlFormattingOptions formatingOptions = null;
        if (contextResolver != null) {
            formatingOptions = contextResolver.getContext(type);
        }
        if (formatingOptions != null) {
            JAXBUtils.setXmlFormattingOptions(m, formatingOptions);
View Full Code Here

Examples of org.apache.wink.common.model.XmlFormattingOptions

        // will set to UTF-8 if there isn't a charset
        m.setProperty(Marshaller.JAXB_ENCODING, ProviderUtils.getCharset(mediaType));

        ContextResolver<XmlFormattingOptions> contextResolver =
            providers.getContextResolver(XmlFormattingOptions.class, mediaType);
        XmlFormattingOptions formatingOptions = null;
        if (contextResolver != null) {
            formatingOptions = contextResolver.getContext(type);
        }
        if (formatingOptions != null) {
            JAXBUtils.setXmlFormattingOptions(m, formatingOptions);
View Full Code Here

Examples of org.apache.wink.common.model.XmlFormattingOptions

        // will set to UTF-8 if there isn't a charset
        m.setProperty(Marshaller.JAXB_ENCODING, ProviderUtils.getCharset(mediaType));

        ContextResolver<XmlFormattingOptions> contextResolver =
            providers.getContextResolver(XmlFormattingOptions.class, mediaType);
        XmlFormattingOptions formatingOptions = null;
        if (contextResolver != null) {
            formatingOptions = contextResolver.getContext(type);
        }
        if (formatingOptions != null) {
            JAXBUtils.setXmlFormattingOptions(m, formatingOptions);
View Full Code Here

Examples of org.apache.wink.common.model.XmlFormattingOptions

@Provider
public class FormattingOptionsContextResolver implements ContextResolver<XmlFormattingOptions> {

    public XmlFormattingOptions getContext(Class<?> type) {
        return new XmlFormattingOptions(false, false);
    }
View Full Code Here

Examples of org.apache.wink.common.model.XmlFormattingOptions

        // will set to UTF-8 if there isn't a charset
        m.setProperty(Marshaller.JAXB_ENCODING, ProviderUtils.getCharset(mediaType));

        ContextResolver<XmlFormattingOptions> contextResolver =
            providers.getContextResolver(XmlFormattingOptions.class, mediaType);
        XmlFormattingOptions formatingOptions = null;
        if (contextResolver != null) {
            formatingOptions = contextResolver.getContext(type);
        }
        if (formatingOptions != null) {
            JAXBUtils.setXmlFormattingOptions(m, formatingOptions);
View Full Code Here

Examples of org.apache.wink.common.model.XmlFormattingOptions

public class FormattingOptionsContextResolver implements ContextResolver<XmlFormattingOptions> {

    public XmlFormattingOptions getContext(Class<?> type) {

        if (type.getPackage().getName().equals(DefectBean.class.getPackage().getName())) {
            return new XmlFormattingOptions(false, false);
        }

        return null;
    }
View Full Code Here

Examples of org.apache.wink.common.model.XmlFormattingOptions

        // will set to UTF-8 if there isn't a charset
        m.setProperty(Marshaller.JAXB_ENCODING, ProviderUtils.getCharset(mediaType));

        ContextResolver<XmlFormattingOptions> contextResolver =
            providers.getContextResolver(XmlFormattingOptions.class, mediaType);
        XmlFormattingOptions formatingOptions = null;
        if (contextResolver != null) {
            formatingOptions = contextResolver.getContext(type);
        }
        if (formatingOptions != null) {
            JAXBUtils.setXmlFormattingOptions(m, formatingOptions);
View Full Code Here

Examples of org.apache.wink.common.model.XmlFormattingOptions

public class FormattingOptionsContextResolver implements ContextResolver<XmlFormattingOptions> {

    public XmlFormattingOptions getContext(Class<?> type) {

        if (type.getPackage().getName().equals(JaxbResource.class.getPackage().getName())) {
            return new XmlFormattingOptions(false, false);
        }

        return null;
    }
View Full Code Here

Examples of org.apache.wink.common.model.XmlFormattingOptions

    @Provider
    @Produces( {MediaType.APPLICATION_ATOM_XML, MediaType.APPLICATION_XML, MediaType.WILDCARD})
    public static class MyXmlFormattingOptionsResolver implements ContextResolver<XmlFormattingOptions> {

        public XmlFormattingOptions getContext(Class<?> type) {
            XmlFormattingOptions myXmlFormattingOptions = new XmlFormattingOptions();
            NamespacePrefixMapper prefixMapper = new MyPrefixMapperImpl();
            myXmlFormattingOptions.getProperties().put("com.sun.xml.bind.namespacePrefixMapper", prefixMapper);
            return myXmlFormattingOptions;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.