Package org.codehaus.jettison.mapped

Examples of org.codehaus.jettison.mapped.MappedXMLInputFactory


                new HashSet<String>(primitiveArrayKeys));
        }
       
        XMLInputFactory factory = depthProps != null
            ? new JettisonMappedReaderFactory(conf, depthProps)
            : new MappedXMLInputFactory(conf);
        return new JettisonReader(namespaceMap, factory.createXMLStreamReader(is));
    }
View Full Code Here


        try {

            Map<String, String> nstojns = new HashMap<String, String>();

            MappedXMLInputFactory factory = new MappedXMLInputFactory(nstojns);
            XMLStreamReader xsr = factory.createXMLStreamReader(is);
            Reader r = (Reader)xsr;
            result = parseXmlBean(type, r);

            xsr.close();
View Full Code Here

        try {
            Class<?> theType = getActualType(type, genericType);
            JAXBContext context = getJAXBContext(theType, genericType);
            Unmarshaller unmarshaller = context.createUnmarshaller();
           
            MappedXMLInputFactory factory = new MappedXMLInputFactory(namespaceMap);
            XMLStreamReader xsw = factory.createXMLStreamReader(is);
            Object response = null;
            if (JAXBElement.class.isAssignableFrom(type)) {
                response = unmarshaller.unmarshal(xsw, theType);
            } else {
                response = unmarshaller.unmarshal(xsw);
View Full Code Here

            XMLStreamReader xsr = null;
            if (isBadgerFishConventionUsed) {
                xsr = new BadgerFishXMLInputFactory().createXMLStreamReader(entityStream);
            } else {
                xsr =
                    new MappedXMLInputFactory(inputConfiguration)
                        .createXMLStreamReader(new StreamSource(entityStream));
            }

            unmarshaledResource = unmarshaller.unmarshal(xsr, classToFill);
        } catch (JAXBException e) {
View Full Code Here

            if (type.isAnnotationPresent(XmlRootElement.class)) {
                if (isBadgerFishConventionUsed) {
                    xsr = new BadgerFishXMLInputFactory().createXMLStreamReader(entityStream);
                } else {
                    xsr =
                        new MappedXMLInputFactory(inputConfiguration)
                            .createXMLStreamReader(entityStream);
                }
                unmarshaledResource = unmarshaller.unmarshal(xsr);
            } else {
                if (isBadgerFishConventionUsed) {
                    xsr = new BadgerFishXMLInputFactory().createXMLStreamReader(entityStream);
                } else {
                    xsr =
                        new MappedXMLInputFactory(inputConfiguration)
                            .createXMLStreamReader(entityStream);
                }
                unmarshaledResource = unmarshaller.unmarshal(xsr, type).getValue();
            }
        } catch (JAXBException e) {
View Full Code Here

    private final MappedXMLInputFactory mif;
   
    public JsonDataFormat() {
        final HashMap nstjsons = new HashMap();
        mof = new MappedXMLOutputFactory(nstjsons);
        mif = new MappedXMLInputFactory(nstjsons);
    }
View Full Code Here

    public static XMLStreamReader createStreamReader(InputStream is, boolean readXsiType,
        ConcurrentHashMap<String, String> namespaceMap) throws Exception {
        if (readXsiType) {
            namespaceMap.putIfAbsent(XSI_URI, XSI_PREFIX);
        }
        MappedXMLInputFactory factory = new MappedXMLInputFactory(namespaceMap);
        return new JettisonReader(namespaceMap, factory.createXMLStreamReader(is));
    }
View Full Code Here

    public static XMLStreamReader createStreamReader(InputStream is, boolean readXsiType,
        ConcurrentHashMap<String, String> namespaceMap) throws Exception {
        if (readXsiType) {
            namespaceMap.putIfAbsent(XSI_URI, XSI_PREFIX);
        }
        MappedXMLInputFactory factory = new MappedXMLInputFactory(namespaceMap);
        return new JettisonReader(namespaceMap, factory.createXMLStreamReader(is));
    }
View Full Code Here

     * @param useSerializeAsArray flag to use XStream's hints for collections and arrays
     * @since 1.4
     */
    public JettisonMappedXmlDriver(final Configuration config, final boolean useSerializeAsArray) {
        mof = new MappedXMLOutputFactory(config);
        mif = new MappedXMLInputFactory(config);
        convention = new MappedNamespaceConvention(config);
        this.useSerializeAsArray = useSerializeAsArray;
    }
View Full Code Here

    public static XMLStreamReader createStreamReader(InputStream is, boolean readXsiType,
        ConcurrentHashMap<String, String> namespaceMap) throws Exception {
        if (readXsiType) {
            namespaceMap.putIfAbsent(XSI_URI, XSI_PREFIX);
        }
        MappedXMLInputFactory factory = new MappedXMLInputFactory(namespaceMap);
        return new JettisonReader(namespaceMap, factory.createXMLStreamReader(is));
    }
View Full Code Here

TOP

Related Classes of org.codehaus.jettison.mapped.MappedXMLInputFactory

Copyright © 2018 www.massapicom. 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.