Package org.codehaus.jettison.mapped

Examples of org.codehaus.jettison.mapped.MappedXMLInputFactory


        this(new Configuration(), true);
    }

    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


            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 (isBadgerFishConventionUsed) {
                xsr = new BadgerFishXMLInputFactory().createXMLStreamReader(entityStream);
            } else {
                xsr =
                    new MappedXMLInputFactory(inputConfiguration)
                        .createXMLStreamReader(entityStream);
            }

            if (type.isAnnotationPresent(XmlRootElement.class)) {
                unmarshaledResource = unmarshaller.unmarshal(xsr);
View Full Code Here

        if (readXsiType) {
            namespaceMap.putIfAbsent(XSI_URI, XSI_PREFIX);
        }
        XMLInputFactory factory = depthProps != null
            ? new JettisonMappedReaderFactory(namespaceMap, depthProps)
            : new MappedXMLInputFactory(namespaceMap);
        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();
            result = null;
View Full Code Here

        // Set up the JSON StAX implementation
        Map<String, String> nstojns = new HashMap<String, String>();
        nstojns.put("http://book.acme.com", "acme");

        MappedXMLInputFactory xif = new MappedXMLInputFactory(nstojns);
        properties.put(XMLInputFactory.class.getName(), xif);

        MappedXMLOutputFactory xof = new MappedXMLOutputFactory(nstojns);
        properties.put(XMLOutputFactory.class.getName(), xof);
View Full Code Here

                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

        HashMap XMLToJSNNamespaceMap = new HashMap();
        XMLToJSNNamespaceMap.put("", "");

        //input factory for "Mapped" convention
        MappedXMLInputFactory inputFactory = new MappedXMLInputFactory(XMLToJSNNamespaceMap);
        String jsonString = "{" + localName + ":" + this.getJSONString();
        return inputFactory.createXMLStreamReader(new JSONTokener(jsonString));
    }
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

        // Set up the JSON StAX implementation
        Map<String, String> nstojns = new HashMap<String, String>();
        nstojns.put("http://customer.acme.com", "acme");

        MappedXMLInputFactory xif = new MappedXMLInputFactory(nstojns);
        properties.put(XMLInputFactory.class.getName(), xif);

        MappedXMLOutputFactory xof = new MappedXMLOutputFactory(nstojns);
        properties.put(XMLOutputFactory.class.getName(), xof);
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.