Class RMDataSource

java.lang.Object
com.inductiveautomation.rm.base.RMDataSource
All Implemented Interfaces:
Archivable
Direct Known Subclasses:
SampleDataSchema

public class RMDataSource extends 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 Details

    • RMDataSource

      public RMDataSource()
      Creates a plain datasource.
    • RMDataSource

      public RMDataSource(WebURL aURL)
      Creates a datasource from a given source with a given name (can be null).
  • Method Details

    • getName

      public String getName()
      Returns the name for this data source.
    • getSchema

      public Schema getSchema()
      Returns the schema of represented datasource as a hierarchy of Entity and Property objects.
    • createSchema

      protected Schema createSchema()
      Creates the schema.
    • getDataset

      public Map getDataset()
      Returns a sample dataset of objects associated with the datasource.
    • createDataset

      protected Map 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

      public RXElement toXML(RXArchiver anArchiver)
      XML archival.
      Specified by:
      toXML in interface Archivable
    • fromXML

      public RMDataSource fromXML(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.
      Specified by:
      fromXML in interface Archivable
    • toString

      public String toString()
      Returns a string representation of the datasource (just its name).
      Overrides:
      toString in class Object