Package com.ribs.datasource
Class RMDataSource
java.lang.Object
com.ribs.datasource.RMDataSource
- Direct Known Subclasses:
DataSetDataSource
,RMDataSourceGoogle
,RMDataSourceJDBC
,RMDataSourceXML
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 -
Method Summary
Modifier and TypeMethodDescriptionfromXML
(RXArchiver anArchiver, RXElement anElement) XML unarchival.Returns a sample dataset of objects associated with the datasource.Returns the entity at the given key path.getError()
Returns the last error encountered when loading a datasource.getName()
Returns the name for the datasource.getRelation
(String aKeyPath) Returns the relation at the given key path.Returns the schema of represented datasource as a heirarchy of RMEntity and RMProperty objects.void
Sets the name for the datasource.toString()
Returns a string representation of the datasource (just its name).toXML
(RXArchiver anArchiver) XML archival.
-
Constructor Details
-
RMDataSource
public RMDataSource()Creates a plain datasource.
-
-
Method Details
-
getName
Returns the name for the datasource. -
setName
Sets the name for the datasource. -
getSchema
Returns the schema of represented datasource as a heirarchy of RMEntity and RMProperty objects. -
getDataset
Returns a sample dataset of objects associated with the datasource. -
getError
Returns the last error encountered when loading a datasource. -
getEntity
Returns the entity at the given key path. -
getRelation
Returns the relation at the given key path. -
toString
Returns a string representation of the datasource (just its name). -
toXML
XML archival. -
fromXML
XML unarchival.
-