org.geotools.validation.xml
Class ArgHelper.LongMapping

java.lang.Object
  extended byorg.geotools.validation.xml.ArgHelper.LongMapping
All Implemented Interfaces:
ArgHelper.Mapping
Enclosing class:
ArgHelper

protected static class ArgHelper.LongMapping
extends java.lang.Object
implements ArgHelper.Mapping

LongMapping purpose.

Represents the workings for a Long Mapping

Version:
$Id: ArgHelper.java 17704 2006-01-23 00:26:16Z desruisseaux $
Author:
dzwiers, Refractions Research, Inc., $Author: dmzwiers $ (last modification)

Constructor Summary
protected ArgHelper.LongMapping()
           
 
Method Summary
 java.lang.String encode(java.lang.Object obj)
          Implementation of encode.
 java.lang.String getElementName()
          Implementation of getElementName.
 java.lang.Object getInstance(org.w3c.dom.Element elem)
          Implementation of getInstance.
 java.lang.Object getInstance(java.lang.String value)
          getInstance purpose.
 java.lang.String getType()
          Implementation of getType.
 boolean isClass(java.lang.Class c)
           
 boolean isClassInstance(java.lang.Object c)
          Implementation of isClassInstance.
 java.lang.String toString(java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArgHelper.LongMapping

protected ArgHelper.LongMapping()
Method Detail

getType

public java.lang.String getType()
Implementation of getType.

Specified by:
getType in interface ArgHelper.Mapping
Returns:
the type name
See Also:
ArgHelper.Mapping.getType()

getElementName

public java.lang.String getElementName()
Implementation of getElementName.

Specified by:
getElementName in interface ArgHelper.Mapping
Returns:
the element name
See Also:
ArgHelper.Mapping.getElementName()

getInstance

public java.lang.Object getInstance(org.w3c.dom.Element elem)
Implementation of getInstance.

Specified by:
getInstance in interface ArgHelper.Mapping
Parameters:
elem - Element the element to parse into a Long.
Returns:
Geometry an instance of Long if one can be created, null otherwise.
Throws:
java.lang.NullPointerException - DOCUMENT ME!
See Also:
ArgHelper.Mapping.getInstance(org.w3c.dom.Element)

getInstance

public java.lang.Object getInstance(java.lang.String value)
Description copied from interface: ArgHelper.Mapping
getInstance purpose.

Creates an instance of the appropriate type for this Mapping. This is where type-dependant magic occurs

Specified by:
getInstance in interface ArgHelper.Mapping
Parameters:
value - The Element to interpret.
Returns:
The particular argument type expected.

isClassInstance

public boolean isClassInstance(java.lang.Object c)
Implementation of isClassInstance.

Specified by:
isClassInstance in interface ArgHelper.Mapping
Parameters:
c - The Object to test
Returns:
true when both of type Long
See Also:
ArgHelper.Mapping.isClassInstance(java.lang.Object)

isClass

public boolean isClass(java.lang.Class c)
Specified by:
isClass in interface ArgHelper.Mapping

encode

public java.lang.String encode(java.lang.Object obj)
Implementation of encode.

Specified by:
encode in interface ArgHelper.Mapping
Parameters:
obj - An object to encode as a Integer.
Returns:
String the XML encoding
Throws:
java.lang.NullPointerException - DOCUMENT ME!
java.lang.ClassCastException - when obj is not of type Integer
See Also:
ArgHelper.Mapping.encode(java.lang.Object)

toString

public java.lang.String toString(java.lang.Object o)
Specified by:
toString in interface ArgHelper.Mapping


Copyright © GeoTools. All Rights Reserved.