[Schmitzm-commits] r797 - in trunk/src/skrueger: . geotools

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Apr 10 18:12:41 CEST 2010


Author: alfonx
Date: 2010-04-10 18:12:40 +0200 (Sat, 10 Apr 2010)
New Revision: 797

Modified:
   trunk/src/skrueger/AbstractAttributeMetadata.java
   trunk/src/skrueger/AttributeMetadataImpl.java
   trunk/src/skrueger/AttributeMetadataInterface.java
   trunk/src/skrueger/geotools/AttributeMetadataImplMap.java
   trunk/src/skrueger/geotools/AttributeMetadataMap.java
Log:
Changed the AMD Interface from using org.geotools.NameImpl to use org.opengis.Name

Modified: trunk/src/skrueger/AbstractAttributeMetadata.java
===================================================================
--- trunk/src/skrueger/AbstractAttributeMetadata.java	2010-04-10 10:19:44 UTC (rev 796)
+++ trunk/src/skrueger/AbstractAttributeMetadata.java	2010-04-10 16:12:40 UTC (rev 797)
@@ -11,7 +11,7 @@
 public abstract class AbstractAttributeMetadata implements AttributeMetadataInterface {
 
 	/** The Name of the attribute. This is the 'primary key' **/
-	protected NameImpl name;
+	protected Name name;
 
 	/** {@link Translation}s of the attribute's title **/
 	protected Translation title = new Translation();
@@ -104,7 +104,7 @@
 	 * <code>org.bla.plo:blub</code>
 	 */
 	@Override
-	public NameImpl getName() {
+	public Name getName() {
 		return name;
 	}
 
@@ -126,7 +126,7 @@
 	 * <code>org.bla.plo:blub</code>
 	 */
 	@Override
-	public void setName(final NameImpl name) {
+	public void setName(final Name name) {
 		this.name = name;
 	}
 

Modified: trunk/src/skrueger/AttributeMetadataImpl.java
===================================================================
--- trunk/src/skrueger/AttributeMetadataImpl.java	2010-04-10 10:19:44 UTC (rev 796)
+++ trunk/src/skrueger/AttributeMetadataImpl.java	2010-04-10 16:12:40 UTC (rev 797)
@@ -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<String> langs) {
+	public AttributeMetadataImpl(final Name name, final List<String> 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<String> langs) {
 		this(name, true, new Translation(langs, defaultTitle),
 				new Translation(), "");

Modified: trunk/src/skrueger/AttributeMetadataInterface.java
===================================================================
--- trunk/src/skrueger/AttributeMetadataInterface.java	2010-04-10 10:19:44 UTC (rev 796)
+++ trunk/src/skrueger/AttributeMetadataInterface.java	2010-04-10 16:12:40 UTC (rev 797)
@@ -58,12 +58,12 @@
 	 * {@link #getLocalName()} value. The first may be <code>null</code> or
 	 * represent the layer name.
 	 */
-	public NameImpl getName();
+	public Name getName();
 
 	/**
 	 * set the fully qualified {@link Name} of this attribute.
 	 */
-	public void setName(NameImpl name);
+	public void setName(Name name);
 
 	/**
 	 * A list og objects that represent NODATA-values for this attribute. The

Modified: trunk/src/skrueger/geotools/AttributeMetadataImplMap.java
===================================================================
--- trunk/src/skrueger/geotools/AttributeMetadataImplMap.java	2010-04-10 10:19:44 UTC (rev 796)
+++ trunk/src/skrueger/geotools/AttributeMetadataImplMap.java	2010-04-10 16:12:40 UTC (rev 797)
@@ -36,7 +36,7 @@
 	 * fly.
 	 */
 	@Override
-	public AttributeMetadataImpl get(final NameImpl name) {
+	public AttributeMetadataImpl get(final Name name) {
 		final AttributeMetadataImpl AttributeMetadataImpl = super.get(name);
 		if (AttributeMetadataImpl == null && name != null
 				&& !name.getLocalPart().trim().isEmpty()) {

Modified: trunk/src/skrueger/geotools/AttributeMetadataMap.java
===================================================================
--- trunk/src/skrueger/geotools/AttributeMetadataMap.java	2010-04-10 10:19:44 UTC (rev 796)
+++ trunk/src/skrueger/geotools/AttributeMetadataMap.java	2010-04-10 16:12:40 UTC (rev 797)
@@ -22,7 +22,7 @@
  * <code>null</code>, but rather create a default {@link AMD_IMPL} on-the-fly.
  */
 public abstract class AttributeMetadataMap<AMD_IMPL extends AttributeMetadataInterface>
-		extends TreeMap<NameImpl, AMD_IMPL> implements
+		extends TreeMap<Name, AMD_IMPL> implements
 		Copyable<AttributeMetadataMap>, QualityQuantizable {
 
 	private static final long serialVersionUID = 4936966916517396063L;
@@ -74,7 +74,7 @@
 
 		amdMap.clear();
 
-		for (final NameImpl key : keySet()) {
+		for (final Name key : keySet()) {
 			final AMD_IMPL AMD_IMPL = get(key);
 			amdMap.put(key, AMD_IMPL.copy());
 		}
@@ -86,15 +86,15 @@
 	 * <code>null</code> or create a default {@link AttributeMetadataInterface} depending
 	 * on whether this method is overwritten. fly.
 	 */
-	public AMD_IMPL get(final NameImpl name) {
+	public AMD_IMPL get(final Name name) {
 		return super.get(name);
 	}
 
 	/**
 	 * @Deprecated use get(Name name) or get(String localName)
 	 */
+	@Deprecated 
 	@Override
-	@Deprecated
 	public AMD_IMPL get(final Object key) {
 		LOGGER.error("PLEASE DONT USE get(Object) any MORE!");
 		return super.get(key);



More information about the Schmitzm-commits mailing list