Package com.inductiveautomation.rm.base
Class RMDataSource
- java.lang.Object
- 
- com.inductiveautomation.rm.base.RMDataSource
 
- 
- All Implemented Interfaces:
- Archivable
 - Direct Known Subclasses:
- SampleDataSchema
 
 public class RMDataSource extends java.lang.Object implements Archivable 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 SummaryConstructors Constructor Description RMDataSource()Creates a plain datasource.RMDataSource(WebURL aURL)Creates a datasource from a given source with a given name (can be null).
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.MapcreateDataset()Returns a sample dataset of objects associated with the datasource.protected SchemacreateSchema()Creates the schema.RMDataSourcefromXML(RXArchiver anArchiver, RXElement anElement)XML unarchival.booleangetCustomSchema()Returns a schema that may differ from the one stored in an XML file.java.util.MapgetDataset()Returns a sample dataset of objects associated with the datasource.java.lang.StringgetName()Returns the name for this data source.SchemagetSchema()Returns the schema of represented datasource as a hierarchy of Entity and Property objects.voidsetCustomSchema(boolean customSchema)Sets a schema that may differ from the one stored in an XML file.java.lang.StringtoString()Returns a string representation of the datasource (just its name).RXElementtoXML(RXArchiver anArchiver)XML archival.
 
- 
- 
- 
Constructor Detail- 
RMDataSourcepublic RMDataSource() Creates a plain datasource.
 - 
RMDataSourcepublic RMDataSource(WebURL aURL) Creates a datasource from a given source with a given name (can be null).
 
- 
 - 
Method Detail- 
getNamepublic java.lang.String getName() Returns the name for this data source.
 - 
getSchemapublic Schema getSchema() Returns the schema of represented datasource as a hierarchy of Entity and Property objects.
 - 
createSchemaprotected Schema createSchema() Creates the schema.
 - 
getDatasetpublic java.util.Map getDataset() Returns a sample dataset of objects associated with the datasource.
 - 
createDatasetprotected java.util.Map createDataset() Returns a sample dataset of objects associated with the datasource.
 - 
getCustomSchemapublic boolean getCustomSchema() Returns a schema that may differ from the one stored in an XML file.
 - 
setCustomSchemapublic void setCustomSchema(boolean customSchema) Sets a schema that may differ from the one stored in an XML file.
 - 
toXMLpublic RXElement toXML(RXArchiver anArchiver) XML archival.- Specified by:
- toXMLin interface- Archivable
 
 - 
fromXMLpublic RMDataSource fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.- Specified by:
- fromXMLin interface- Archivable
 
 - 
toStringpublic java.lang.String toString() Returns a string representation of the datasource (just its name).- Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-