DocumentTableSet
Inheritance: java.lang.Object
public class DocumentTableSet
Provides access to data of multiple tables (or spreadsheets) located in an external document to be used while assembling a document. Also, enables to define parent-child relations for the document tables thus simplifying access to related data within template documents.
For documents of Spreadsheet file formats, a DocumentTableSet instance represents a set of sheets. For documents of other file formats, a DocumentTableSet instance represents a set of tables.
To access data of the corresponding tables while assembling a document, pass an instance of this class as a data source to one of DocumentAssembler. assembleDocument overloads.
In template documents, a DocumentTableSet instance should be treated in the same way as if it was a DataSet instance. See template syntax reference for more information.
Constructors
Constructor | Description |
---|---|
DocumentTableSet(String documentPath) | Creates a new instance of this class loading all tables from a document using default DocumentTableOptions. |
DocumentTableSet(String documentPath, IDocumentTableLoadHandler loadHandler) | Creates a new instance of this class. |
DocumentTableSet(InputStream documentStream) | Creates a new instance of this class loading all tables from a document using default DocumentTableOptions. |
DocumentTableSet(InputStream documentStream, IDocumentTableLoadHandler loadHandler) | Creates a new instance of this class. |
Methods
Method | Description |
---|---|
getTables() | Gets the collection of DocumentTable objects representing tables of this set. |
getRelations() | Gets the collection of parent-child relations defined for document tables of this set. |
DocumentTableSet(String documentPath)
public DocumentTableSet(String documentPath)
Creates a new instance of this class loading all tables from a document using default DocumentTableOptions.
Parameters:
Parameter | Type | Description |
---|---|---|
documentPath | java.lang.String | The path to a document containing tables to be accessed. |
DocumentTableSet(String documentPath, IDocumentTableLoadHandler loadHandler)
public DocumentTableSet(String documentPath, IDocumentTableLoadHandler loadHandler)
Creates a new instance of this class.
Parameters:
Parameter | Type | Description |
---|---|---|
documentPath | java.lang.String | The path to a document containing tables to be accessed. |
loadHandler | IDocumentTableLoadHandler | An IDocumentTableLoadHandler implementation controlling how document tables are loaded. |
DocumentTableSet(InputStream documentStream)
public DocumentTableSet(InputStream documentStream)
Creates a new instance of this class loading all tables from a document using default DocumentTableOptions.
Parameters:
Parameter | Type | Description |
---|---|---|
documentStream | java.io.InputStream | The stream containing a document with tables to be accessed. |
DocumentTableSet(InputStream documentStream, IDocumentTableLoadHandler loadHandler)
public DocumentTableSet(InputStream documentStream, IDocumentTableLoadHandler loadHandler)
Creates a new instance of this class.
Parameters:
Parameter | Type | Description |
---|---|---|
documentStream | java.io.InputStream | The stream containing a document with tables to be accessed. |
loadHandler | IDocumentTableLoadHandler | An IDocumentTableLoadHandler implementation controlling how document tables are loaded. |
getTables()
public DocumentTableCollection getTables()
Gets the collection of DocumentTable objects representing tables of this set.
Returns: DocumentTableCollection - The collection of DocumentTable objects representing tables of this set.
getRelations()
public DocumentTableRelationCollection getRelations()
Gets the collection of parent-child relations defined for document tables of this set.
Returns: DocumentTableRelationCollection - The collection of parent-child relations defined for document tables of this set.