org.springframework.xml.namespace
Class QNameEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.springframework.xml.namespace.QNameEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class QNameEditor
extends java.beans.PropertyEditorSupport

PropertyEditor for javax.xml.namespace.QName, to populate a property of type QName from a String value.

Expects the syntax

 localPart
 
or
 {namespace}localPart
 
or
 {namespace}prefix:localPart
 
This resembles the toString() representation of QName itself, but allows for prefixes to be specified as well.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
QName, QName.toString(), QName.valueOf(String)

Constructor Summary
QNameEditor()
           
 
Method Summary
 java.lang.String getAsText()
           
 void setAsText(java.lang.String text)
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QNameEditor

public QNameEditor()
Method Detail

setAsText

public void setAsText(java.lang.String text)
               throws java.lang.IllegalArgumentException
Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class java.beans.PropertyEditorSupport
Throws:
java.lang.IllegalArgumentException

getAsText

public java.lang.String getAsText()
Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class java.beans.PropertyEditorSupport


Copyright � 2005-2008 The Spring Web Services Framework. All Rights Reserved.