Package org.codehaus.jettison.mapped

Examples of org.codehaus.jettison.mapped.MappedXMLInputFactory


            conf.setPrimitiveArrayKeys(
                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


        if (!readNullAsString) {
            conf.setReadNullAsEmptyString(readNullAsString);
        }
        XMLInputFactory factory = depthProps != null
            ? new JettisonMappedReaderFactory(conf, depthProps)
            : new MappedXMLInputFactory(conf);
        return new JettisonReader(namespaceMap, factory.createXMLStreamReader(is));
    }
View Full Code Here

        try {
            Class<?> theType = getActualType(type, genericType, anns);
           
            Unmarshaller unmarshaller = createUnmarshaller(theType, genericType);
           
            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

    public JettisonMappedXmlDriver() {
        final HashMap nstjsons = new HashMap();
        final Configuration config = new Configuration(nstjsons);
        mof = new MappedXMLOutputFactory(config);
        mif = new MappedXMLInputFactory(config);
        convention = new MappedNamespaceConvention(config);
    }
View Full Code Here

    public XStreamConverter() {
        this.classMapper = new DefaultClassMapper();
       
   Map nstjsons = new HashMap();
        this.outputFactory = new MappedXMLOutputFactory(nstjsons);
        this.inputFactory = new MappedXMLInputFactory(nstjsons);
        this.objectMapper = new XStream();
    }
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

            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

        // 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

            conf.setPrimitiveArrayKeys(
                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

        return null;
    }

    protected XMLStreamReader createReader(Class<?> type, InputStream is)
        throws Exception {
        MappedXMLInputFactory factory = new MappedXMLInputFactory(namespaceMap);
        return 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.