Class MicrosoftWordWriter
java.lang.Object
com.northconcepts.datapipeline.core.DataObject
com.northconcepts.datapipeline.core.Endpoint
com.northconcepts.datapipeline.core.DataEndpoint
com.northconcepts.datapipeline.core.DataWriter
com.northconcepts.datapipeline.core.AbstractWriter
com.northconcepts.datapipeline.core.BinaryWriter
com.northconcepts.datapipeline.microsoft.word.MicrosoftWordWriter
Writes records to a Microsoft Word (OOXML
.docx) document stream containing a single table.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe page orientations available to a Word document.static enumThe page sizes available to a Word document, with their portrait dimensions in twips (1/1440 of an inch).Nested classes/interfaces inherited from class com.northconcepts.datapipeline.core.DataEndpoint
DataEndpoint.State -
Field Summary
Fields inherited from class com.northconcepts.datapipeline.core.AbstractWriter
currentRecordFields inherited from class com.northconcepts.datapipeline.core.DataEndpoint
lastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEYFields inherited from class com.northconcepts.datapipeline.core.Endpoint
BUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZEFields inherited from class com.northconcepts.datapipeline.core.DataObject
id, log, name, TIMESTAMP_FORMAT -
Constructor Summary
ConstructorsConstructorDescriptionMicrosoftWordWriter(File file) MicrosoftWordWriter(OutputStream outputStream) -
Method Summary
Modifier and TypeMethodDescriptionaddExceptionProperties(DataException exception) Adds this endpoint's current state to aDataException.voidclose()Indicates that this endpoint has finished reading or writing.Returns the page orientation for the Word document (defaultMicrosoftWordWriter.PageOrientation.PORTRAIT).Returns the page size for the Word document (defaultMicrosoftWordWriter.PageSize.LETTER).voidopen()Makes this endpoint ready for reading or writing.setPageOrientation(MicrosoftWordWriter.PageOrientation pageOrientation) Specifies the page orientation for the Word document (defaultMicrosoftWordWriter.PageOrientation.PORTRAIT).setPageSize(MicrosoftWordWriter.PageSize pageSize) Specifies the page size for the Word document (defaultMicrosoftWordWriter.PageSize.LETTER).protected voidwriteRecord(Record record) Writes one row; called first for the header row (seeAbstractWriter.isHeaderRow()) when field names are written, then for each record.Methods inherited from class com.northconcepts.datapipeline.core.BinaryWriter
getOutputStreamMethods inherited from class com.northconcepts.datapipeline.core.AbstractWriter
createHeaderRecord, isFieldNamesInFirstRow, isHeaderRow, setFieldNamesInFirstRow, write, writeImplMethods inherited from class com.northconcepts.datapipeline.core.DataWriter
available, getNestedEndpoint, getNestedWriter, getRootEndpoint, getRootWriter, getWriterMethods inherited from class com.northconcepts.datapipeline.core.DataEndpoint
decrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCount, toStringMethods inherited from class com.northconcepts.datapipeline.core.Endpoint
addElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescription
-
Constructor Details
-
MicrosoftWordWriter
-
MicrosoftWordWriter
-
-
Method Details
-
open
Description copied from class:DataEndpointMakes this endpoint ready for reading or writing.- Overrides:
openin classAbstractWriter- Throws:
DataException
-
close
Description copied from class:DataEndpointIndicates that this endpoint has finished reading or writing.- Overrides:
closein classBinaryWriter- Throws:
DataException
-
writeRecord
Description copied from class:AbstractWriterWrites one row; called first for the header row (seeAbstractWriter.isHeaderRow()) when field names are written, then for each record.- Specified by:
writeRecordin classAbstractWriter- Throws:
Throwable
-
getPageSize
Returns the page size for the Word document (defaultMicrosoftWordWriter.PageSize.LETTER). -
setPageSize
Specifies the page size for the Word document (defaultMicrosoftWordWriter.PageSize.LETTER). -
getPageOrientation
Returns the page orientation for the Word document (defaultMicrosoftWordWriter.PageOrientation.PORTRAIT). -
setPageOrientation
Specifies the page orientation for the Word document (defaultMicrosoftWordWriter.PageOrientation.PORTRAIT). -
addExceptionProperties
Description copied from class:EndpointAdds this endpoint's current state to aDataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.- Overrides:
addExceptionPropertiesin classBinaryWriter
-