org.geotools.image.io.text
Class TextMetadataParser.Key

java.lang.Object
  extended by org.geotools.image.io.text.TextMetadataParser.Key
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
TextMetadataParser

public static class TextMetadataParser.Key
extends java.lang.Object
implements java.io.Serializable

A key for fetching metadata in a format independent way. For example, the northern limit of an image way be named "Limit North" is some metadata files, and "ULY" (as Upper Left Y) in other metadata files. The MetadataReader#Y_MAXIMUM allows to fetch this metadata without knowledge of the actual name used in the underlying metadata file.

Keys are case-insensitive. Furthermore, trailing and leading spaces are ignored. Any succession of one ore more unicode whitespace characters (as of Character.isSpaceChar(char) is understood as equal to a single '_' character. For example, the key "false  easting" is considered equals to "false_easting".

Version:
$Id: TextMetadataParser.java 30972 2008-07-09 15:39:01Z cedricbr $
Author:
Martin Desruisseaux (IRD)
See Also:
Serialized Form

Constructor Summary
TextMetadataParser.Key(java.lang.String name)
          Construct a new key.
 
Method Summary
 boolean equals(java.lang.Object object)
          Compare this key with the supplied key for equality.
 int hashCode()
          Returns a hash code value.
 java.lang.String toString()
          Returns the name for this key.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextMetadataParser.Key

public TextMetadataParser.Key(java.lang.String name)
Construct a new key.

Parameters:
name - The key name.
Method Detail

toString

public java.lang.String toString()
Returns the name for this key. This is the name supplied to the constructor (i.e. case and whitespaces are preserved).

Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Returns a hash code value.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Compare this key with the supplied key for equality. Comparaison is case-insensitive and considere any sequence of whitespaces as a single '_' character, as specified in this class documentation.

Overrides:
equals in class java.lang.Object


Copyright © 1996-2010 Geotools. All Rights Reserved.