|
||||||||||
| 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 Fieldorg.xml.sax.SAXException
protected void processProperties()
throws org.xml.sax.SAXException
processProperties in class Fieldorg.xml.sax.SAXExceptionpublic java.lang.Class getJavaType()
FieldDescriptor
getJavaType in interface FieldDescriptorgetJavaType in class Field
public java.lang.Object getObjectFromString(Record rec,
java.lang.String s)
throws MangledDataException
FieldDescriptor
MangledDataExceptionpublic java.lang.String normalize(java.lang.String s)
FieldDescriptor
normalize in interface FieldDescriptornormalize in class Fieldpublic java.lang.String valueToString(java.lang.Object o)
FieldDescriptor
valueToString in interface FieldDescriptorvalueToString in class Field
public void checkValidValue(Record rec,
java.lang.Object value)
throws DataException
FieldDescriptor
checkValidValue in interface FieldDescriptorcheckValidValue in class FieldDataExceptionprotected 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 FieldDescriptorconvertFromJDBC in class Fieldpublic java.lang.Object getCopy(java.lang.Object o)
FieldDescriptor
getCopy in interface FieldDescriptorgetCopy in class Field
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||