|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.oreodata.metadata.Field | +--org.oreodata.metadata.StringField
Field metadata that represents a field with a string value. The string may be "normalized" to all caps, all lower case, etc. Also, a regular expression pattern may be specified to validate against.
Field Summary | |
protected gnu.regexp.RE |
regexp
The regexp that expresses a constraint that the field must satisfy. |
protected java.lang.String |
regexpString
|
Fields inherited from class org.oreodata.metadata.Field |
defaultValueString, intern, properties, sqlType |
Constructor Summary | |
StringField()
|
Method Summary | |
void |
checkValidValue(Record rec,
java.lang.Object value)
Check whether this object is a valid value for this field of the given record. |
java.lang.Object |
convertFromJDBC(java.lang.Object o)
Method to support slurping records from a JDBC result set. |
protected java.lang.String |
decodeMultiLineString(java.lang.String input)
Deal with a string with embedded \n literals for newlines. |
protected java.lang.String |
encodeMultiLineString(java.lang.String input)
routine that encodes a string so that it can be all on one line in a key=value storage scheme. |
java.lang.Object |
getCopy(java.lang.Object o)
Used when encapsulation requires Record::get() to return a clone of an object. |
java.lang.Class |
getJavaType()
The kind of java object that can live in this record field. |
java.lang.Object |
getObjectFromString(Record rec,
java.lang.String s)
Given the string representation of a field, return its internal java object representation. |
protected void |
init(org.w3c.dom.Element element)
|
java.lang.String |
normalize(java.lang.String s)
"normalize" the string passed in. |
protected void |
processProperties()
|
java.lang.String |
valueToString(java.lang.Object o)
returns the preferred String representation of the object in question. |
Methods inherited from class org.oreodata.metadata.Field |
convertToJDBC, createSAXHandler, defaultValue, getLocalizedName, getName, getProperty, getSQLType, hashCode, intern, isFieldOf, isRequired, isSetExternally, processDefaultValue, processNormalization, setDefaultValue, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected transient gnu.regexp.RE regexp
protected java.lang.String regexpString
Constructor Detail |
public StringField()
Method Detail |
protected void init(org.w3c.dom.Element element) throws org.xml.sax.SAXException
init
in class Field
org.xml.sax.SAXException
protected void processProperties() throws org.xml.sax.SAXException
processProperties
in class Field
org.xml.sax.SAXException
public java.lang.Class getJavaType()
FieldDescriptor
getJavaType
in interface FieldDescriptor
getJavaType
in class Field
public java.lang.Object getObjectFromString(Record rec, java.lang.String s) throws MangledDataException
FieldDescriptor
MangledDataException
public java.lang.String normalize(java.lang.String s)
FieldDescriptor
normalize
in interface FieldDescriptor
normalize
in class Field
public java.lang.String valueToString(java.lang.Object o)
FieldDescriptor
valueToString
in interface FieldDescriptor
valueToString
in class Field
public void checkValidValue(Record rec, java.lang.Object value) throws DataException
FieldDescriptor
checkValidValue
in interface FieldDescriptor
checkValidValue
in class Field
DataException
protected java.lang.String encodeMultiLineString(java.lang.String input)
protected java.lang.String decodeMultiLineString(java.lang.String input)
public java.lang.Object convertFromJDBC(java.lang.Object o)
FieldDescriptor
convertFromJDBC
in interface FieldDescriptor
convertFromJDBC
in class Field
public java.lang.Object getCopy(java.lang.Object o)
FieldDescriptor
getCopy
in interface FieldDescriptor
getCopy
in class Field
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |