org.geotools.validation.xml
Class ArgHelper.URIMapping

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

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

URIMapping purpose.

Represents the workings for a URI 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.URIMapping()
           
 
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.URIMapping

protected ArgHelper.URIMapping()
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)
                             throws ValidationException
Implementation of getInstance.

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

getInstance

public java.lang.Object getInstance(java.lang.String value)
                             throws ValidationException
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.
Throws:
ValidationException

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 URI.
Returns:
String the XML encoding
Throws:
java.lang.NullPointerException - DOCUMENT ME!
java.lang.ClassCastException - when obj is not of type URI
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.