public abstract class IPDROIFormatter extends OIFileFormatter implements StateBufferSaveable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
m_docAttributes |
protected java.lang.String |
m_docInfo |
protected int |
m_docSeqNumber |
protected java.lang.String |
m_docVersion |
protected int |
m_recCount |
protected java.lang.String |
m_recID |
protected java.lang.String |
m_recInfo |
protected TimestampUtil |
m_timestampFormatter |
protected boolean |
m_useIPDRDocAttributes |
protected boolean |
m_useIPDRDocInfo |
protected boolean |
m_useIPDRDocSequenceNumber |
protected boolean |
m_useIPDRDocStartTime |
protected boolean |
m_useIPDRDocVersionNumber |
protected boolean |
m_useIPDRRecID |
protected boolean |
m_useIPDRRecInfo |
protected boolean |
m_useIPDRRecStartTime |
protected boolean |
m_useUseIPDRDocEnd |
protected boolean |
m_useUseIPDRDocEndCount |
protected boolean |
m_useUseIPDRDocEndEndTime |
emptyFile, errMesg, logger, writer
Constructor and Description |
---|
IPDROIFormatter(LoggerIfc logr,
OIFileWriter oiFileWriter)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
fileClosing(DCFieldContainer rec)
This is a callback from the base-class.
|
void |
fileOpening(DCFieldContainer rec)
This is a callback from the base-class.
|
protected abstract java.lang.String |
getRecordString(DCFieldContainer record) |
protected java.lang.String |
getTimestamp() |
void |
restoreState(StateBuffer buffer)
This function is used to restore the writer's state
based on information read from a StateBuffer.
|
void |
saveState(StateBuffer buffer)
This function is used to store state (recovery) information into
a buffer managed by the caller.
|
void |
setDocumentAttributes(java.lang.String attrs)
Sets the additional attributes.
|
void |
setDocumentInfo(java.lang.String info)
Sets the description infomation for the IPDRDoc element.
|
void |
setDocumentVersion(java.lang.String version)
Sets the version number for the IPDRDoc element..
|
void |
setRecordID(java.lang.String id)
Sets the unique identifier for the IPDRRec element.
|
void |
setRecordInfo(java.lang.String info)
Sets the description infomation for the IPDRRec element.
|
void |
setTimestampFormatter(int type)
Sets the type of timestamp for the timestamp formatter.
|
void |
setUseIPDRDocAttributes(boolean flag)
Sets the usage of additional attributes for IPDRDoc element.
|
void |
setUseIPDRDocEnd(boolean flag)
Sets the usage of end marker (IPDRDoc.End) for the document.
|
void |
setUseIPDRDocEndCount(boolean flag)
Sets the usage of count for the end marker (IPDRDoc.End).
|
void |
setUseIPDRDocEndEndTime(boolean flag)
Sets the usage of end time for the end marker (IPDRDoc.End).
|
void |
setUseIPDRDocInfo(boolean flag)
Sets the usage of description infomation for IPDRDoc element.
|
void |
setUseIPDRDocSequenceNumber(boolean flag)
Sets the usage of sequence number for IPDRDoc element.
|
void |
setUseIPDRDocStartTime(boolean flag)
Sets the usage of start time for IPDRDoc element.
|
void |
setUseIPDRDocVersionNumber(boolean flag)
Sets the usage of version number for IPDRDoc element.
|
void |
setUseIPDRRecID(boolean flag)
Sets the usage of unique identifier for IPDRRec element.
|
void |
setUseIPDRRecInfo(boolean flag)
Sets the usage of description infomation for IPDRRec element.
|
void |
setUseIPDRRecStartTime(boolean flag)
Sets the usage of start time for IPDRRec element.
|
void |
writeToFile(DCFieldContainer record)
This method will write the appropriately formatted data
contained within the DCFieldContainer to the output file.
|
getFileWriter, getFtpPusher, isHealthy, putToFile, readyToCycle, setFtpPusher, shutdown
protected TimestampUtil m_timestampFormatter
protected int m_recCount
protected java.lang.String m_docAttributes
protected java.lang.String m_docInfo
protected java.lang.String m_recInfo
protected java.lang.String m_docVersion
protected java.lang.String m_recID
protected int m_docSeqNumber
protected boolean m_useIPDRDocAttributes
protected boolean m_useIPDRDocSequenceNumber
protected boolean m_useIPDRDocVersionNumber
protected boolean m_useIPDRDocStartTime
protected boolean m_useIPDRDocInfo
protected boolean m_useUseIPDRDocEnd
protected boolean m_useUseIPDRDocEndCount
protected boolean m_useUseIPDRDocEndEndTime
protected boolean m_useIPDRRecID
protected boolean m_useIPDRRecStartTime
protected boolean m_useIPDRRecInfo
public IPDROIFormatter(LoggerIfc logr, OIFileWriter oiFileWriter)
logr
- LoggerIfc() object providing access to
the node's log fileoiFileWriter
- OIFileWriter() object responsible for
file output and managing the output
files.public void setDocumentAttributes(java.lang.String attrs)
attrs
- Contains the additional attributes (e.g. location of
schema documents.public void setDocumentInfo(java.lang.String info)
info
- Contains the description information.public void setDocumentVersion(java.lang.String version)
version
- Indicates the version of the Master IPDRDoc Schema
being used.public void setRecordInfo(java.lang.String info)
info
- Contains the description information.public void setRecordID(java.lang.String id)
id
- Contains the unique identifier.public void setUseIPDRDocAttributes(boolean flag)
flag
- Set to true to activate the generation of additional
attributes for IPDRDoc element.public void setUseIPDRDocSequenceNumber(boolean flag)
flag
- Set to true to activate the generation of sequence number
for IPDRDoc element.public void setUseIPDRDocVersionNumber(boolean flag)
flag
- Set to true to activate the generation of version number
for IPDRDoc element.public void setUseIPDRDocStartTime(boolean flag)
flag
- Set to true to activate the generation of start time
for IPDRDoc element.public void setUseIPDRDocInfo(boolean flag)
flag
- Set to true to activate the generation of description
infomation for IPDRDoc element.public void setUseIPDRDocEnd(boolean flag)
flag
- Set to true to activate the generation of end marker
for document.public void setUseIPDRDocEndCount(boolean flag)
flag
- Set to true to activate the generation of count for
end marker.public void setUseIPDRDocEndEndTime(boolean flag)
flag
- Set to true to activate the generation of end time for
end marker.public void setUseIPDRRecID(boolean flag)
flag
- Set to true to activate the generation of unique
identifier for IPDRRec element.public void setUseIPDRRecStartTime(boolean flag)
flag
- Set to true to activate the generation of start time
for IPDRRec element.public void setUseIPDRRecInfo(boolean flag)
flag
- Set to true to activate the generation of description
infomation for IPDRRec element.public void setTimestampFormatter(int type)
type
- Contains the type of timestamp.
0 - Z timestamp type
1 - UTC timestamp typepublic void writeToFile(DCFieldContainer record) throws java.io.IOException
writeToFile
in class OIFileFormatter
java.io.IOException
public void fileOpening(DCFieldContainer rec)
fileOpening
in class OIFileFormatter
public void fileClosing(DCFieldContainer rec)
fileClosing
in class OIFileFormatter
protected abstract java.lang.String getRecordString(DCFieldContainer record)
protected final java.lang.String getTimestamp()
public void saveState(StateBuffer buffer)
Context information saved:
saveState
in interface StateBufferSaveable
buffer
- Buffer used to store recovery informationpublic void restoreState(StateBuffer buffer) throws StateException
restoreState
in interface StateBufferSaveable
buffer
- Buffer to read recovery information fromStateException