--- trunk/src/skrueger/AttributeMetadataImpl.java 2010/03/21 11:36:11 770 +++ trunk/src/skrueger/AttributeMetadataImpl.java 2010/05/22 01:24:46 862 @@ -25,7 +25,7 @@ * * Contributors: * Martin O. J. Schmitz - initial API and implementation - * Stefan A. Krüger - additional utility classes + * Stefan A. Tzeggai - additional utility classes ******************************************************************************/ package skrueger; @@ -35,6 +35,7 @@ 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; @@ -96,7 +97,7 @@ * @param unit * {@link String} of the unit that the information is in */ - public AttributeMetadataImpl(final NameImpl name, final Boolean visible, + public AttributeMetadataImpl(final Name name, final Boolean visible, final Translation title, final Translation desc, final String unit) { this.setName(name); @@ -118,7 +119,7 @@ * @param unit * {@link String} of the unit that the information is in */ - public AttributeMetadataImpl(final NameImpl name, final Boolean visible, + public AttributeMetadataImpl(final Name name, final Boolean visible, final String unit) { this.setName(name); this.visible = visible; @@ -128,7 +129,7 @@ /** * Creates a new visible {@link AttributeMetadataImpl} */ - public AttributeMetadataImpl(final NameImpl name, final List langs) { + public AttributeMetadataImpl(final Name name, final List langs) { this(name, true, new Translation(langs, name.getLocalPart()), new Translation(), ""); } @@ -136,7 +137,7 @@ /** * Creates a new visible {@link AttributeMetadataImpl} */ - public AttributeMetadataImpl(final NameImpl name, final String defaultTitle, + public AttributeMetadataImpl(final Name name, final String defaultTitle, final List langs) { this(name, true, new Translation(langs, defaultTitle), new Translation(), ""); @@ -184,7 +185,7 @@ * further down. */ @Override - public int compareTo(final AttributeMetadata atm2) { + public int compareTo(final AttributeMetadataInterface atm2) { return new Integer(weight).compareTo(new Double(atm2.getWeight()) .intValue()); } @@ -193,7 +194,7 @@ * @see Copyable inferface */ @Override - public AttributeMetadata copy() { + public AttributeMetadataInterface copy() { return copyTo(new AttributeMetadataImpl()); } @@ -201,7 +202,7 @@ * @see Copyable inferface */ @Override - public AttributeMetadata copyTo(final AttributeMetadata amd) { + public AttributeMetadataInterface copyTo(final AttributeMetadataInterface amd) { getTitle().copyTo(amd.getTitle()); getDesc().copyTo(amd.getDesc()); amd.setUnit(getUnit());