Package org.exolab.castor.tests.framework.testDescriptor

Examples of org.exolab.castor.tests.framework.testDescriptor.Configuration


        getXMLContext().getInternalContext().getXMLClassDescriptorResolver().cleanDescriptorCache();
        Marshaller marshaller = getXMLContext().createMarshaller();
        marshaller.setWriter(new FileWriter(marshalOutput));

        //-- Configuration for marshaler?  Use config from unit test case if available
        Configuration config = _unitTest.getConfiguration();
        if (config == null) {
            config = _configuration;
        }

        if (config != null) {
            ConfigurationType marshal = config.getMarshal();
            List returnValues = invokeEnumeratedMethods(marshaller, marshal);
            returnValues.clear(); // We don't care about the return values
        }//-- config != null

        if (_mapping != null) {
View Full Code Here


        return result;
    }

    private Unmarshaller createUnmarshaler() throws Exception {
        //-- Configuration for unmarshaler?  Use config from unit test case if available
        Configuration config = _unitTest.getConfiguration();
        if (config == null) {
            config = _configuration;
        }

        final Unmarshaller unmar;
        if (_mapping != null) {
//J            unmar = new Unmarshaller(_mapping);
            unmar = getXMLContext().createUnmarshaller();
            unmar.setMapping(_mapping);
        } else {
            if (_test.getClassLoader() != null) {
//J                unmar = new Unmarshaller(_rootClass, _test.getClassLoader());
                unmar = getXMLContext().createUnmarshaller();
                unmar.setClassLoader(_test.getClassLoader());
                unmar.setClass(_rootClass);
            } else {
//J                unmar = new Unmarshaller(_rootClass);
                unmar = getXMLContext().createUnmarshaller();
                unmar.setClass(_rootClass);
            }
        }

        if (_listener != null
                && _listener instanceof org.exolab.castor.xml.UnmarshalListener
                && _listenerType != TypeType.MARSHAL) {
            unmar.setUnmarshalListener((org.exolab.castor.xml.UnmarshalListener)_listener);
        }

        if (_listener != null
                && _listener instanceof org.castor.xml.UnmarshalListener
                && _listenerType != TypeType.MARSHAL) {
            unmar.setUnmarshalListener((org.castor.xml.UnmarshalListener)_listener);
        }

        unmar.setDebug(_verbose);

        if (config != null) {
            ConfigurationType unmarshal = config.getUnmarshal();
            List returnValues = invokeEnumeratedMethods(unmar, unmarshal);
            returnValues.clear(); // We don't care about the return values
        }

        return unmar;
View Full Code Here

TOP

Related Classes of org.exolab.castor.tests.framework.testDescriptor.Configuration

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.