public static class AddUserFields.AttributeSpec
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected java.text.SimpleDateFormat |
m_dateFormat
The date format to use (if the new attribute is a date)
|
protected java.lang.String |
m_name
The name of the new attribute
|
protected java.lang.String |
m_nameS
The name after resolving any environment variables
|
protected java.util.Date |
m_parsedDate
Holds the parsed date value
|
protected java.lang.String |
m_type
The type of the new attribute
|
protected java.lang.String |
m_typeS
The type after resolving any environment variables
|
protected java.lang.String |
m_value
The constant value it should assume
|
protected java.lang.String |
m_valueS
The value after resolving any environment variables
|
| Constructor and Description |
|---|
AttributeSpec()
Default constructor
|
AttributeSpec(java.lang.String spec)
Constructor that takes an attribute specification in internal format
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDateFormat()
Get the date formatting string (if any)
|
java.util.Date |
getDateValue()
Get the value of the attribute as a date or null if the attribute isn't
of type date.
|
java.lang.String |
getName()
Get the name of the new attribute
|
java.lang.String |
getNominalOrStringValue()
Get the value of the attribute as a string (nominal and string attribute)
or null if the attribute is not nominal or string
|
double |
getNumericValue()
Get the value of the attribute as a number or Utils.missingValue() if the
attribute is not numeric.
|
java.lang.String |
getResolvedName()
Get the name of the attribute after substituting any environment
variables
|
java.lang.String |
getResolvedType()
Get the type of the attribute after substituting any environment
variables
|
java.lang.String |
getResolvedValue()
Get the value of the attribute after substituting any environment
variables
|
java.lang.String |
getType()
Get the type of the new attribute
|
java.lang.String |
getValue()
Get the value of the new attribute.
|
void |
init(Environment env)
Initialize this attribute spec by resolving any environment variables and
setting up the date format (if necessary)
|
protected void |
parseFromInternal(java.lang.String spec) |
void |
setName(java.lang.String name)
Set the name of the new attribute
|
void |
setType(java.lang.String type)
Set the type of the new attribute
|
void |
setValue(java.lang.String value)
Set the value of the new attribute.
|
java.lang.String |
toString()
Return a nicely formatted string for display
|
java.lang.String |
toStringInternal() |
protected java.lang.String m_name
protected java.lang.String m_value
protected java.lang.String m_type
protected java.lang.String m_nameS
protected java.lang.String m_valueS
protected java.lang.String m_typeS
protected java.text.SimpleDateFormat m_dateFormat
protected java.util.Date m_parsedDate
public AttributeSpec()
public AttributeSpec(java.lang.String spec)
spec - the attribute spec to usepublic void setName(java.lang.String name)
name - the name of the new attributepublic java.lang.String getName()
public void setType(java.lang.String type)
type - the type of the new attributepublic java.lang.String getType()
public void setValue(java.lang.String value)
value - the value of the new attributepublic java.lang.String getValue()
public java.lang.String getResolvedName()
public java.lang.String getResolvedValue()
public java.lang.String getResolvedType()
public java.lang.String getDateFormat()
public java.util.Date getDateValue()
public double getNumericValue()
public java.lang.String getNominalOrStringValue()
protected void parseFromInternal(java.lang.String spec)
public void init(Environment env)
env - environment variables to usepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringInternal()