Package com.ribs.datasource
Class RMDataSource
- java.lang.Object
-
- com.ribs.datasource.RMDataSource
-
- Direct Known Subclasses:
DataSetDataSource,RMDataSourceGoogle,RMDataSourceJDBC,RMDataSourceXML
public class RMDataSource extends java.lang.ObjectThis 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.ObjectfromXML(RXArchiver anArchiver, RXElement anElement)XML unarchival.java.util.MapgetDataset()Returns a sample dataset of objects associated with the datasource.RMEntitygetEntity(java.lang.String aKeyPath)Returns the entity at the given key path.java.lang.StringgetError()Returns the last error encountered when loading a datasource.java.lang.StringgetName()Returns the name for the datasource.RMPropertygetRelation(java.lang.String aKeyPath)Returns the relation at the given key path.RMSchemagetSchema()Returns the schema of represented datasource as a heirarchy of RMEntity and RMProperty objects.voidsetName(java.lang.String aName)Sets the name for the datasource.java.lang.StringtoString()Returns a string representation of the datasource (just its name).RXElementtoXML(RXArchiver anArchiver)XML archival.
-
-
-
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:
toStringin classjava.lang.Object
-
toXML
public RXElement toXML(RXArchiver anArchiver)
XML archival.
-
fromXML
public java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement)
XML unarchival.
-
-