001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     * 
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     * 
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */ 
017    
018    
019    package org.apache.commons.betwixt.schema;
020    
021    import org.apache.commons.betwixt.schema.strategy.SchemaTypeNamingStrategy;
022    import org.apache.commons.betwixt.schema.strategy.impl.QualifiedPropertyTypeSchemaNamingStrategy;
023    
024    /**
025     * Configuration for XMLBeanInfo to XML schema transcription.
026     * All settings are gathered into this one class for convenience.
027     * 
028     * @author <a href='http://commons.apache.org/'>Apache Commons Team</a>
029     * @version $Revision: 561314 $
030     */
031    public class TranscriptionConfiguration {
032        
033        private DataTypeMapper dataTypeMapper = new DefaultDataTypeMapper();
034        
035        private SchemaTypeNamingStrategy schemaTypeNamingStrategy = new QualifiedPropertyTypeSchemaNamingStrategy();
036        
037        /**
038         * Gets the <code>DataTypeMapper</code> to be used during the transcription.
039         * @return DataTypeMapper, not null
040         */
041        public DataTypeMapper getDataTypeMapper() {
042            return dataTypeMapper;
043        }
044    
045        /**
046         * Sets the <code>DataTypeMapper</code> to be used during the transcription/
047         * @param mapper DataTypeMapper, not null
048         */
049        public void setDataTypeMapper(DataTypeMapper mapper) {
050            dataTypeMapper = mapper;
051        }
052    
053        /**
054         * Gets the stategy to be used for naming types.
055         * @return <code>SchemaTypeNamingStrategy</code>, not null
056         * @since 0.8
057         */
058        public SchemaTypeNamingStrategy getSchemaTypeNamingStrategy() {
059            return schemaTypeNamingStrategy;
060        }
061    
062        /**
063         * Sets the strategy to be used for naming types.
064         * @param schemaTypeNamingStrategy <code>SchemaTypeNamingStrategy</code>, not null
065         * @since 0.8
066         */
067        public void setSchemaTypeNamingStrategy( SchemaTypeNamingStrategy schemaTypeNamingStrategy) {
068            this.schemaTypeNamingStrategy = schemaTypeNamingStrategy;
069        }
070        
071        
072    
073    }