001: /*
002: * Geotools2 - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2005-2006, GeoTools Project Managment Committee (PMC)
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation;
009: * version 2.1 of the License.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: */
017: package org.geotools.data.complex.config;
018:
019: import java.io.Serializable;
020: import java.util.ArrayList;
021: import java.util.Collections;
022: import java.util.List;
023:
024: import org.geotools.util.CheckedArrayList;
025:
026: /**
027: *
028: * @author Gabriel Roldan, Axios Engineering
029: * @version $Id: TypeMapping.java 25814 2007-06-12 12:03:41Z groldan $
030: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/unsupported/community-schemas/community-schema-ds/src/main/java/org/geotools/data/complex/config/TypeMapping.java $
031: * @since 2.4
032: */
033: public class TypeMapping implements Serializable {
034:
035: private static final long serialVersionUID = 1444252634598922057L;
036: private String sourceDataStore;
037: private String sourceTypeName;
038: private String targetElementName;
039: private List groupbyAttributeNames = Collections.EMPTY_LIST;
040: private List attributeMappings = Collections.EMPTY_LIST;
041:
042: public TypeMapping() {
043: //no-op
044: }
045:
046: public List getAttributeMappings() {
047: return new ArrayList(attributeMappings);
048: }
049:
050: public void setAttributeMappings(List attributeMappings) {
051: this .attributeMappings = new CheckedArrayList(
052: AttributeMapping.class);
053: if (attributeMappings != null) {
054: this .attributeMappings.addAll(attributeMappings);
055: }
056: }
057:
058: public List getGroupbyAttributeNames() {
059: return new ArrayList(groupbyAttributeNames);
060: }
061:
062: public void setGroupbyAttributeNames(List groupbyAttributeNames) {
063: this .groupbyAttributeNames = new CheckedArrayList(String.class);
064: if (groupbyAttributeNames != null) {
065: this .groupbyAttributeNames.addAll(groupbyAttributeNames);
066: }
067: }
068:
069: public String getSourceDataStore() {
070: return sourceDataStore;
071: }
072:
073: public void setSourceDataStore(String sourceDataStore) {
074: this .sourceDataStore = sourceDataStore;
075: }
076:
077: public String getSourceTypeName() {
078: return sourceTypeName;
079: }
080:
081: public void setSourceTypeName(String sourceTypeName) {
082: this .sourceTypeName = sourceTypeName;
083: }
084:
085: public String getTargetElementName() {
086: return targetElementName;
087: }
088:
089: public void setTargetElementName(String targetElementName) {
090: this .targetElementName = targetElementName;
091: }
092:
093: public String toString() {
094: StringBuffer sb = new StringBuffer();
095: sb.append("TypeMappingDTO[").append("sourceDataStore=").append(
096: sourceDataStore).append(",\n sourceTypeName=").append(
097: sourceTypeName).append(",\n targetElementName=")
098: .append(targetElementName).append(
099: ",\n groupbyAttributeNames=").append(
100: groupbyAttributeNames).append(
101: ",\n attributeMappings=").append(
102: attributeMappings).append("]");
103: return sb.toString();
104:
105: }
106:
107: }
|