Class RMDataSource

  • Direct Known Subclasses:
    DataSetDataSource, RMDataSourceGoogle, RMDataSourceJDBC, RMDataSourceXML

    public class RMDataSource
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      RMDataSource()
      Creates a plain datasource.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object fromXML​(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.
      java.util.Map getDataset()
      Returns a sample dataset of objects associated with the datasource.
      RMEntity getEntity​(java.lang.String aKeyPath)
      Returns the entity at the given key path.
      java.lang.String getError()
      Returns the last error encountered when loading a datasource.
      java.lang.String getName()
      Returns the name for the datasource.
      RMProperty getRelation​(java.lang.String aKeyPath)
      Returns the relation at the given key path.
      RMSchema getSchema()
      Returns the schema of represented datasource as a heirarchy of RMEntity and RMProperty objects.
      void setName​(java.lang.String aName)
      Sets the name for the datasource.
      java.lang.String toString()
      Returns a string representation of the datasource (just its name).
      RXElement toXML​(RXArchiver anArchiver)
      XML archival.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RMDataSource

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

      • getName

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

        public void setName​(java.lang.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 java.util.Map getDataset()
        Returns a sample dataset of objects associated with the datasource.
      • getError

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

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

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

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

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