Package com.inductiveautomation.rm.base
Class RMDataSource
java.lang.Object
com.inductiveautomation.rm.base.RMDataSource
- All Implemented Interfaces:
Archivable
- Direct Known Subclasses:
SampleDataSchema
This class is used as a proxy for objects passed to document's generateReport() method. It provides schema
information of the object graph (in the form of Schema, Entity and Property objects) and it provides sample data
(mostly in the form of Java Collections and core types: List, Map, String, Number, Date).
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a plain datasource.RMDataSource
(WebURL aURL) Creates a datasource from a given source with a given name (can be null). -
Method Summary
Modifier and TypeMethodDescriptionprotected Map
Returns a sample dataset of objects associated with the datasource.protected Schema
Creates the schema.fromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival.boolean
Returns a schema that may differ from the one stored in an XML file.Returns a sample dataset of objects associated with the datasource.getName()
Returns the name for this data source.Returns the schema of represented datasource as a hierarchy of Entity and Property objects.void
setCustomSchema
(boolean customSchema) Sets a schema that may differ from the one stored in an XML file.toString()
Returns a string representation of the datasource (just its name).toXML
(RXArchiver anArchiver) XML archival.
-
Constructor Details
-
RMDataSource
public RMDataSource()Creates a plain datasource. -
RMDataSource
Creates a datasource from a given source with a given name (can be null).
-
-
Method Details
-
getName
Returns the name for this data source. -
getSchema
Returns the schema of represented datasource as a hierarchy of Entity and Property objects. -
createSchema
Creates the schema. -
getDataset
Returns a sample dataset of objects associated with the datasource. -
createDataset
Returns a sample dataset of objects associated with the datasource. -
getCustomSchema
public boolean getCustomSchema()Returns a schema that may differ from the one stored in an XML file. -
setCustomSchema
public void setCustomSchema(boolean customSchema) Sets a schema that may differ from the one stored in an XML file. -
toXML
XML archival.- Specified by:
toXML
in interfaceArchivable
-
fromXML
XML unarchival.- Specified by:
fromXML
in interfaceArchivable
-
toString
Returns a string representation of the datasource (just its name).
-