com.virtualweaver.xotics.datamodel.editor
Class XoXsdPropertyEditor

java.lang.Object
  extended byjava.beans.PropertyEditorSupport
      extended bycom.virtualweaver.xotics.datamodel.editor.XoAbstractPropertyEditor
          extended bycom.virtualweaver.xotics.datamodel.editor.XoXsdPropertyEditor
All Implemented Interfaces:
java.beans.PropertyEditor, XoPropertyEditor
Direct Known Subclasses:
XoBooleanXsdPropertyEditor, XoCalendarXsdPropertyEditor, XoFPXsdPropertyEditor, XoIdRefXsdPropertyEditor, XoLanguageXsdPropertyEditor, XoNumericXsdPropertyEditor, XoQNameXsdPropertyEditor, XoStringXsdPropertyEditor

public abstract class XoXsdPropertyEditor
extends XoAbstractPropertyEditor

This class is the base PropertyEditor of all Xo XSD datatypes and all XSD wrapper PropertyEditors. An XSD wrapper PE is a PropertyEditor editing, in the same way as an XSD PE, not an XSD type but its Java class equivalent.

Version:
4.1

Field Summary
protected  boolean isXsdType
          Must be true if derived class is an XSD PE (default) , false if it is a wrapper
protected  com.virtualweaver.xotics.datamodel.datatype.XdtRestrictionSupport support
          the restriction support class handling restriction mecanism, coming from XSD datatype
protected  java.lang.Class xsdClass
          The XSD class handled by this and overall its derived classes.
 
Fields inherited from class com.virtualweaver.xotics.datamodel.editor.XoAbstractPropertyEditor
customEditor, value
 
Constructor Summary
XoXsdPropertyEditor()
          Creates a new instance of XoXsdPropertyEditor.
 
Method Summary
protected abstract  void createCustomEditor()
          This method informs this to create the graphical UI to edit the value.
protected  java.lang.Object createValue(java.lang.String str)
          Creates an instance of value object by converting string param str.
protected  java.lang.Object decode(java.lang.String str)
           
protected  java.lang.String getAsString(java.lang.Object v)
           
 java.lang.String getAsText()
          Returns current value as string representation
 int getFractionDigit()
           
 int getLength()
           
 java.lang.Object getMaxExclusive()
           
 java.lang.Object getMaxInclusive()
           
 int getMaxLength()
           
 java.lang.Object getMinExclusive()
           
 java.lang.Object getMinInclusive()
           
 int getMinLength()
           
 java.util.regex.Pattern getPattern()
           
 int getTotalDigit()
           
 byte getWhiteSpace()
           
protected  java.lang.String getXsdTypeLabel()
           
protected abstract  void initCustomEditor()
          This method informs this to init or reinit the graphical UI previously created by createCustomEditor().
 void matchFractionDigit(java.lang.Object v)
           
 void matchLength(java.lang.Object v)
           
 void matchMaxExclusive(java.lang.Object v)
           
 void matchMaxInclusive(java.lang.Object v)
           
 void matchMaxLength(java.lang.Object v)
           
 void matchMinExclusive(java.lang.Object v)
           
 void matchMinInclusive(java.lang.Object v)
           
 void matchMinLength(java.lang.Object v)
           
 void matchPattern(java.lang.String v)
           
 void matchTotalDigit(java.lang.Object v)
           
protected abstract  void setCustomEditorValue()
          This method informs this to setup the graphical UI with current value.
 void setProperty(XoProperty p)
          Here, this method extracts XSD class if any.
 java.lang.String whiteSpace(java.lang.String lexStr)
           
 
Methods inherited from class com.virtualweaver.xotics.datamodel.editor.XoAbstractPropertyEditor
getCustomEditor, getValue, isPaintable, setAsText, setValue, supportsCustomEditor
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getJavaInitializationString, getTags, paintValue, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.beans.PropertyEditor
addPropertyChangeListener, getJavaInitializationString, getTags, paintValue, removePropertyChangeListener
 

Field Detail

xsdClass

protected java.lang.Class xsdClass
The XSD class handled by this and overall its derived classes.


isXsdType

protected boolean isXsdType
Must be true if derived class is an XSD PE (default) , false if it is a wrapper


support

protected com.virtualweaver.xotics.datamodel.datatype.XdtRestrictionSupport support
the restriction support class handling restriction mecanism, coming from XSD datatype

Constructor Detail

XoXsdPropertyEditor

public XoXsdPropertyEditor()
Creates a new instance of XoXsdPropertyEditor.

Method Detail

setProperty

public void setProperty(XoProperty p)
Here, this method extracts XSD class if any.

Specified by:
setProperty in interface XoPropertyEditor
Overrides:
setProperty in class XoAbstractPropertyEditor

createValue

protected java.lang.Object createValue(java.lang.String str)
                                throws java.lang.IllegalArgumentException
Description copied from class: XoAbstractPropertyEditor
Creates an instance of value object by converting string param str.

Specified by:
createValue in class XoAbstractPropertyEditor
Parameters:
str - the string to convert into value
Returns:
an object created with str
Throws:
java.lang.IllegalArgumentException - if str is not convertible

decode

protected java.lang.Object decode(java.lang.String str)
                           throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getAsText

public java.lang.String getAsText()
Description copied from class: XoAbstractPropertyEditor
Returns current value as string representation

Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class XoAbstractPropertyEditor
Returns:
this method returns null if value is null or value.toString()

getAsString

protected java.lang.String getAsString(java.lang.Object v)

createCustomEditor

protected abstract void createCustomEditor()
Description copied from class: XoAbstractPropertyEditor
This method informs this to create the graphical UI to edit the value. The result must be stored in customEditor field. If a customEditor instance already exists, it must be released cleanly (i.e. remove any listener on it) before creating new instance.

Specified by:
createCustomEditor in class XoAbstractPropertyEditor

initCustomEditor

protected abstract void initCustomEditor()
Description copied from class: XoAbstractPropertyEditor
This method informs this to init or reinit the graphical UI previously created by createCustomEditor().

Specified by:
initCustomEditor in class XoAbstractPropertyEditor

setCustomEditorValue

protected abstract void setCustomEditorValue()
Description copied from class: XoAbstractPropertyEditor
This method informs this to setup the graphical UI with current value.

Specified by:
setCustomEditorValue in class XoAbstractPropertyEditor

getXsdTypeLabel

protected java.lang.String getXsdTypeLabel()

matchFractionDigit

public void matchFractionDigit(java.lang.Object v)
                        throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

matchLength

public void matchLength(java.lang.Object v)
                 throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

matchMaxExclusive

public void matchMaxExclusive(java.lang.Object v)
                       throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

matchMaxInclusive

public void matchMaxInclusive(java.lang.Object v)
                       throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

matchMaxLength

public void matchMaxLength(java.lang.Object v)
                    throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

matchMinExclusive

public void matchMinExclusive(java.lang.Object v)
                       throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

matchMinInclusive

public void matchMinInclusive(java.lang.Object v)
                       throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

matchMinLength

public void matchMinLength(java.lang.Object v)
                    throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

matchPattern

public void matchPattern(java.lang.String v)
                  throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

matchTotalDigit

public void matchTotalDigit(java.lang.Object v)
                     throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

whiteSpace

public java.lang.String whiteSpace(java.lang.String lexStr)
                            throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getFractionDigit

public int getFractionDigit()
                     throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

getTotalDigit

public int getTotalDigit()

getMaxExclusive

public java.lang.Object getMaxExclusive()

getMaxInclusive

public java.lang.Object getMaxInclusive()

getMinExclusive

public java.lang.Object getMinExclusive()

getMinInclusive

public java.lang.Object getMinInclusive()

getLength

public int getLength()

getMaxLength

public int getMaxLength()

getMinLength

public int getMinLength()

getPattern

public java.util.regex.Pattern getPattern()

getWhiteSpace

public byte getWhiteSpace()