Examples of LocalConfiguration


Examples of org.exolab.castor.util.LocalConfiguration

    protected Object readInternal(InputStream is) throws IOException {
        Object object = null;
        try {
            // Use JAXP if we are instructed to do so.
            if (USING_JAXP) {
                LocalConfiguration castorConfig = LocalConfiguration.getInstance();
                // empty string means "use JAXP" for Castor
                castorConfig.getProperties().setProperty("org.exolab.castor.parser", "");
                castorConfig.getProperties().setProperty("org.exolab.castor.xml.serializer.factory",
                        "org.exolab.castor.xml.XercesJDK5XMLSerializerFactory" );
            }
           
            if (LOG.isDebugEnabled()) {
                LOG.debug("Pluto descriptor service implementation using JAXP: [" + USING_JAXP + "]");                       
View Full Code Here

Examples of org.exolab.castor.util.LocalConfiguration

            //  http://castor.org/javadoc/org/exolab/castor/xml/Marshaller.html#setDoctype(java.lang.String,%20java.lang.String)
            Marshaller marshaller = new Marshaller(writer);
            marshaller.setMapping(getCastorMapping());
           
            // Use JAXP if we are instructed to do so.
            LocalConfiguration castorConfig = LocalConfiguration.getInstance();
            if (USING_JAXP) {               
                // empty string means "use JAXP" for Castor
                castorConfig.getProperties().setProperty("org.exolab.castor.parser", "" );               
                castorConfig.getProperties().setProperty("org.exolab.castor.xml.serializer.factory",
                        "org.exolab.castor.xml.XercesJDK5XMLSerializerFactory" );
            }
           
            if (LOG.isDebugEnabled()) {
                LOG.debug("Pluto descriptor service implementation using JAXP: [" + USING_JAXP + "]");                       
            }
           
            castorConfig.getProperties().setProperty("org.exolab.castor.indent", "true");
            setCastorMarshallerOptions(marshaller, object);
            marshaller.marshal(object);
        } catch(IOException io) {
            throw io;
        } catch (Exception e) {
View Full Code Here

Examples of org.exolab.castor.util.LocalConfiguration

                is = this.getClass().getResourceAsStream(TYPE_DEFINITIONS);
            TypeList typeList = (TypeList)unmarshaller.unmarshal( new org.xml.sax.InputSource(is) );

                //print what we just read (only in debug mode and if we have a logWriter)
                LocalConfiguration config = LocalConfiguration.getInstance();
            if (config.debug() && getLogWriter()!= null)
                  typeList.Print(getLogWriter());

                //Store the types by name in the typesByName and typesByCode hashtables
                //and create for each its associated SimpleType instance.
                Vector types= typeList.getTypes();
View Full Code Here

Examples of org.exolab.castor.util.LocalConfiguration

        init();
    } //-- Introspector

    private void init() {
       
        LocalConfiguration config = LocalConfiguration.getInstance();
       
        if (_defaultNaming == null) {
            _defaultNaming = config.getXMLNaming();
        }
        _naming = _defaultNaming;
        setPrimitiveNodeType(config.getPrimitiveNodeType());
       
        //-- wrap collections in a container element?
        String wrap = config.getProperty(WRAP_COLLECTIONS_PROPERTY, null);
        if (wrap != null) {
            _wrapCollectionsInContainer = Boolean.valueOf(wrap).booleanValue();
        }
       
    }
View Full Code Here

Examples of org.exolab.castor.util.LocalConfiguration

            StringTokenizer tokenizer;
            Class           infoClass;
            Method          method;

            allInfo = new Vector();
            LocalConfiguration config = LocalConfiguration.getInstance();
            tokenizer = new StringTokenizer( config.getProperty( "org.exolab.castor.mapping.collections", "" ), ", " );
            while ( tokenizer.hasMoreTokens() ) {
                try {
                    if ( CollectionHandlers.class.getClassLoader() != null )
                        infoClass = CollectionHandlers.class.getClassLoader().loadClass( tokenizer.nextToken() );
                    else
View Full Code Here

Examples of org.exolab.castor.util.LocalConfiguration

    public XMLMappingLoader( ClassLoader loader, PrintWriter logWriter )
        throws MappingException
    {
        super( loader, logWriter );
       
        LocalConfiguration config = LocalConfiguration.getInstance();
       
        _primitiveNodeType = config.getPrimitiveNodeType();
        _naming            = config.getXMLNaming();

    } //-- XMLMappingLoader
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.