org.geotools.validation.xml
Class ArgHelper.FilterMapping

Object
  extended by ArgHelper.FilterMapping
All Implemented Interfaces:
ArgHelper.Mapping
Enclosing class:
ArgHelper

protected static class ArgHelper.FilterMapping
extends Object
implements ArgHelper.Mapping

FilterMapping purpose.

Represents the specifics for the Filter Argument type

Author:
dzwiers, Refractions Research, Inc., $Author: dmzwiers $ (last modification)
See Also:
ArgHelper.Mapping

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

Constructor Detail

ArgHelper.FilterMapping

protected ArgHelper.FilterMapping()
Method Detail

getType

public String getType()
Implementation of getType.

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

getElementName

public String getElementName()
Implementation of getElementName.

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

getInstance

public Object getInstance(Element value)
Implementation of getInstance.

Specified by:
getInstance in interface ArgHelper.Mapping
Parameters:
value - Element the element to parse into an instance of type Filter
Returns:
Filter the filter instance if posible, null otherwise.
See Also:
ArgHelper.Mapping.getInstance(org.w3c.dom.Element)

getInstance

public Object getInstance(String elem)
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:
elem - The Element to interpret.
Returns:
The particular argument type expected.

isClassInstance

public boolean isClassInstance(Object c)
Implementation of isClassInstance.

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

isClass

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

encode

public String encode(Object obj)
              throws ValidationException
Implementation of encode.

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

toString

public String toString(Object obj)
Specified by:
toString in interface ArgHelper.Mapping


Copyright © 1996-2009 Geotools. All Rights Reserved.