Joda System API

org.joda.property.xml
Class ElementNameXMLFilter

java.lang.Object
  |
  +--org.joda.property.xml.ElementNameXMLFilter
All Implemented Interfaces:
XMLFilter

public class ElementNameXMLFilter
extends java.lang.Object
implements XMLFilter

ElementNameFilter filters element names from camelCase to xml-case.

Author:
Stephen Colebourne, Andy Lehane

Field Summary
static XMLFilter INSTANCE
           
 
Method Summary
 boolean filterChildren()
          Should the children of the XMLData be filtered as well?
 void filterInputXMLDataOnEndTag(XMLConvertorContext context, ModelElement element, XMLData data)
          Filter the XMLData representation of an object on input when the end tag is reached.
 void filterInputXMLDataOnStartTag(XMLConvertorContext context, XMLData data)
          Filter the XMLData representation of an object on input.
 boolean filterOutputXMLData(XMLConvertorContext context, XMLData data)
          Filter the XMLData representation of an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final XMLFilter INSTANCE
Method Detail

filterChildren

public boolean filterChildren()
Should the children of the XMLData be filtered as well?

Specified by:
filterChildren in interface XMLFilter
Returns:
true to ensure that the filter method is called for each XMLData child

filterOutputXMLData

public boolean filterOutputXMLData(XMLConvertorContext context,
                                   XMLData data)
Filter the XMLData representation of an object. Typical uses are to add or remove an attribute or element.

Specified by:
filterOutputXMLData in interface XMLFilter
Parameters:
context - the context for the output
data - the XMLData to filter
Returns:
true to retain the element, false to remove

filterInputXMLDataOnStartTag

public void filterInputXMLDataOnStartTag(XMLConvertorContext context,
                                         XMLData data)
Description copied from interface: XMLFilter
Filter the XMLData representation of an object on input. Typical uses are to add or remove an attribute or element.

Specified by:
filterInputXMLDataOnStartTag in interface XMLFilter
Parameters:
context - the context for the output
data - the XMLData to filter
See Also:
XMLFilter#filterInputXMLData(XMLConvertorContext, XMLData)

filterInputXMLDataOnEndTag

public void filterInputXMLDataOnEndTag(XMLConvertorContext context,
                                       ModelElement element,
                                       XMLData data)
Filter the XMLData representation of an object on input when the end tag is reached. This gives us access to the XML and the object created. Typical uses of this is to change fields of an object on input.

Specified by:
filterInputXMLDataOnEndTag in interface XMLFilter
Parameters:
context - The contect for the input
data - The xml data to filter

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.