01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.commons.betwixt.schema;
19:
20: import org.apache.commons.betwixt.schema.strategy.SchemaTypeNamingStrategy;
21: import org.apache.commons.betwixt.schema.strategy.impl.QualifiedPropertyTypeSchemaNamingStrategy;
22:
23: /**
24: * Configuration for XMLBeanInfo to XML schema transcription.
25: * All settings are gathered into this one class for convenience.
26: *
27: * @author <a href='http://jakarta.apache.org/'>Jakarta Commons Team</a>
28: * @version $Revision: 471234 $
29: */
30: public class TranscriptionConfiguration {
31:
32: private DataTypeMapper dataTypeMapper = new DefaultDataTypeMapper();
33:
34: private SchemaTypeNamingStrategy schemaTypeNamingStrategy = new QualifiedPropertyTypeSchemaNamingStrategy();
35:
36: /**
37: * Gets the <code>DataTypeMapper</code> to be used during the transcription.
38: * @return DataTypeMapper, not null
39: */
40: public DataTypeMapper getDataTypeMapper() {
41: return dataTypeMapper;
42: }
43:
44: /**
45: * Sets the <code>DataTypeMapper</code> to be used during the transcription/
46: * @param mapper DataTypeMapper, not null
47: */
48: public void setDataTypeMapper(DataTypeMapper mapper) {
49: dataTypeMapper = mapper;
50: }
51:
52: /**
53: * Gets the stategy to be used for naming types.
54: * @return <code>SchemaTypeNamingStrategy</code>, not null
55: * @since 0.8
56: */
57: public SchemaTypeNamingStrategy getSchemaTypeNamingStrategy() {
58: return schemaTypeNamingStrategy;
59: }
60:
61: /**
62: * Sets the strategy to be used for naming types.
63: * @param schemaTypeNamingStrategy <code>SchemaTypeNamingStrategy</code>, not null
64: * @since 0.8
65: */
66: public void setSchemaTypeNamingStrategy(
67: SchemaTypeNamingStrategy schemaTypeNamingStrategy) {
68: this.schemaTypeNamingStrategy = schemaTypeNamingStrategy;
69: }
70:
71: }
|