Class RMDataSource

java.lang.Object
com.ribs.datasource.RMDataSource
Direct Known Subclasses:
DataSetDataSource, RMDataSourceGoogle, RMDataSourceJDBC, RMDataSourceXML

public class RMDataSource extends Object
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 RMEntity and RMProperty objects) and it provides sample data (probably in the form of Java Collections and core types: List, Map, String, Number, Date).
  • Constructor Details

    • RMDataSource

      public RMDataSource()
      Creates a plain datasource.
  • Method Details

    • getName

      public String getName()
      Returns the name for the datasource.
    • setName

      public void setName(String aName)
      Sets the name for the datasource.
    • getSchema

      public RMSchema getSchema()
      Returns the schema of represented datasource as a heirarchy of RMEntity and RMProperty objects.
    • getDataset

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

      public String getError()
      Returns the last error encountered when loading a datasource.
    • getEntity

      public RMEntity getEntity(String aKeyPath)
      Returns the entity at the given key path.
    • getRelation

      public RMProperty getRelation(String aKeyPath)
      Returns the relation at the given key path.
    • toString

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

      public RXElement toXML(RXArchiver anArchiver)
      XML archival.
    • fromXML

      public Object fromXML(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.