--- branches/1.0-gt2-2.6/src/skrueger/AttributeMetadata.java 2009/11/18 09:54:52 523
+++ trunk/src/skrueger/AttributeMetadataInterface.java 2010/04/10 16:12:40 797
@@ -1,348 +1,123 @@
-/*******************************************************************************
- * Copyright (c) 2009 Martin O. J. Schmitz.
- *
- * This file is part of the SCHMITZM library - a collection of utility
- * classes based on Java 1.6, focusing (not only) on Java Swing
- * and the Geotools library.
- *
- * The SCHMITZM project is hosted at:
- * http://wald.intevation.org/projects/schmitzm/
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License (license.txt)
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * or try this link: http://www.gnu.org/licenses/lgpl.html
- *
- * Contributors:
- * Martin O. J. Schmitz - initial API and implementation
- * Stefan A. Krüger - additional utility classes
- ******************************************************************************/
package skrueger;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.HashSet;
-import org.apache.log4j.Logger;
import org.geotools.feature.NameImpl;
-import org.opengis.feature.type.AttributeDescriptor;
import org.opengis.feature.type.Name;
import skrueger.geotools.Copyable;
-import skrueger.geotools.StyledLayerInterface;
-import skrueger.i8n.I8NUtil;
import skrueger.i8n.Translation;
-/**
- * This class holds meta information about an attribute/column. This information
- * is used by {@link StyledLayerInterface} and many others.
- *
- * @author Stefan Alfons Krüger
- */
-public class AttributeMetadata implements Copyable,
- Comparable {
- static private final Logger LOGGER = Logger
- .getLogger(AttributeMetadata.class);
-
- // public class WeightComparator implements Comparator
- // {
- //
- // @Override
- // public int compare(AttributeDescriptor o1, AttributeDescriptor o2) {
- // // TODO Auto-generated method stub
- // return 0;
- // }
- //
- // };
-
- /** Translation of the attribute's title **/
- protected Translation title = new Translation();
-
- /** Translation of the attribute's description **/
- protected Translation desc = new Translation();
-
- /** Is the attribute visible to the user or ignored where possible **/
- protected boolean visible = true;
-
- /**
- * The unit append to all visualizations of values of this attribute (is not
- * null)
- **/
- protected String unit = "";
-
- /** The Name of the attribute **/
- private Name name;
-
- public int getWeight() {
- return weight;
- }
-
- public void setWeight(int weight) {
- this.weight = weight;
- }
-
- public List