public class UrlFieldDesc extends FieldDesc<java.net.URL>
Constructor and Description |
---|
UrlFieldDesc()
Default constructor with no arguments, useful for cases where the
descriptor is configured from XML elements.
|
UrlFieldDesc(java.lang.String fieldName)
Constructor taking a field name.
|
Modifier and Type | Method and Description |
---|---|
DataType |
getFieldType()
Get the field type for this field description
|
boolean |
isValid(java.net.URL value)
Return whether a field value is valid.
|
java.net.URL |
parse(java.lang.String stringVal)
Parse the value into the format for this field description.
|
java.net.URL |
parseValueIntoRecord(DataRecord rec,
java.lang.String value)
Validate the string value, and store it in a string field in the
specified data record.
|
protected void |
setValues(org.w3c.dom.NodeList valueList)
Set the values for this URL field description.
|
void |
storeDefaultIntoRecord(DataRecord rec)
Store the default value into the data record provided.
|
org.w3c.dom.Element |
toXml(org.w3c.dom.Document doc)
Convert this field description to an XML Element.
|
addSourceField, applyTransform, getDefaultValue, getFieldName, getLookupIndexField, getLookupTable, getLookupValueField, getSourceFields, getTransform, isMultiValue, loadFromXml, setDefaultValue, setFieldName, setMultiValue
public UrlFieldDesc()
public UrlFieldDesc(java.lang.String fieldName)
fieldName
- the field name for this descriptorpublic DataType getFieldType()
getFieldType
in class FieldDesc<java.net.URL>
public boolean isValid(java.net.URL value)
public java.net.URL parse(java.lang.String stringVal) throws java.text.ParseException
public java.net.URL parseValueIntoRecord(DataRecord rec, java.lang.String value) throws java.text.ParseException
parseValueIntoRecord
in class FieldDesc<java.net.URL>
rec
- the DataRecord to parse the value intovalue
- the String value to be parsedjava.lang.IllegalArgumentException
- if the value is not a valid value of
this Text Value fieldjava.text.ParseException
- if there is a problem parsing the stringprotected void setValues(org.w3c.dom.NodeList valueList)
public void storeDefaultIntoRecord(DataRecord rec)
storeDefaultIntoRecord
in class FieldDesc<java.net.URL>
rec
- the DataRecord to store the value intopublic org.w3c.dom.Element toXml(org.w3c.dom.Document doc)
fieldDef
element, sets the fieldName and fieldType, and
creates a values child element. The values element contains the optional
maxLength text node. If the default value is set, this method adds it as
well.