isc.sensor.outputadaptor.oaextensions
Class TypedDelimitedStringWriter
java.lang.Object
org.openadaptor.dostrings.DOStringReaderWriter
org.openadaptor.dostrings.DOStringWriter
org.openadaptor.dostrings.DelimitedStringWriter
isc.sensor.outputadaptor.oaextensions.TypedDelimitedStringWriter
public class TypedDelimitedStringWriter
- extends org.openadaptor.dostrings.DelimitedStringWriter
This is an overridden verion of Open Adaptor V 1.7.x DelimitedStringWriter
which prepends the Object Type to the object string.
This is useful when writing multiple object to a delimited file. Using this
dostring writer each of the object will be output to the file with their
object name prepended to the record.
- Author:
- John Casey
Project: DNA_sensor - Aug 12, 2005
- See Also:
,
org.opendadptor.adaptor.FileSink
Nested classes/interfaces inherited from class org.openadaptor.dostrings.DOStringReaderWriter |
org.openadaptor.dostrings.DOStringReaderWriter.TypeInfo |
Field Summary |
(package private) static org.apache.log4j.Logger |
log
logger |
Fields inherited from class org.openadaptor.dostrings.DelimitedStringWriter |
_field_delimiter, _quote_char, _string_delimiter, PROPERTY_FIELD_DELIMITER, PROPERTY_FIELD_DELIMITER_CHAR, PROPERTY_QUOTE_CHAR, PROPERTY_STRING_DELIMITER |
Fields inherited from class org.openadaptor.dostrings.DOStringReaderWriter |
_numFields, _numFieldsAtt, _single_type_property_defined, _textEncoding, _type, _type_field_number, _typeInfo_array, _typeInfo_count, _typeInfos, ACT_ATTR, ACT_IGNORE, ACT_STRING, ACT_TYPENAME, DEFAULT_ATT_STRING, DEFAULT_TYPE_STRING, KW_IGNORE, KW_TYPENAME |
Method Summary |
void |
init(java.util.Properties props,
java.lang.String prefix)
Initialise from properties object. |
java.lang.String |
stick(java.lang.String[] strings,
java.lang.String type_name)
Append the object type to the String and call super's to stick value strings together in delimited format. |
Methods inherited from class org.openadaptor.dostrings.DOStringWriter |
getFooter, getHeader, requireAttNameOrNumAttributes, toString, useDataObjectAttributes |
Methods inherited from class org.openadaptor.dostrings.DOStringReaderWriter |
getNumFields, getNumFieldsAtt, getTextEncoding, init, init, setNumFields, setNumFieldsAtt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
static org.apache.log4j.Logger log
- logger
TypedDelimitedStringWriter
public TypedDelimitedStringWriter()
init
public void init(java.util.Properties props,
java.lang.String prefix)
throws org.openadaptor.dostrings.DOStringException
- Initialise from properties object. See class comment for property values
- Overrides:
init
in class org.openadaptor.dostrings.DelimitedStringWriter
- Parameters:
props
- Properties objectprefix
- Prefix string to search for properties
- Throws:
org.openadaptor.dostrings.DOStringException
- Thrown if initialisation fails, mandatory
properties are missing or properties cannot
be parsed.
stick
public java.lang.String stick(java.lang.String[] strings,
java.lang.String type_name)
throws org.openadaptor.dostrings.DOStringException
- Append the object type to the String and call super's to stick value strings together in delimited format.
- Overrides:
stick
in class org.openadaptor.dostrings.DelimitedStringWriter
- Parameters:
strings
- Array of Stringstype_name
- Type name of DataObject these strings came from
- Throws:
org.openadaptor.dostrings.DOStringException
- Not thrown