Package com.ribs.datasource
Class RMDataSourceXML
- java.lang.Object
- 
- com.ribs.datasource.RMDataSource
- 
- com.ribs.datasource.RMDataSourceXML
 
 
- 
 public class RMDataSourceXML extends RMDataSource 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 SummaryConstructors Constructor Description RMDataSourceXML()Creates a plain datasource.RMDataSourceXML(java.lang.Object aSource, java.lang.String aName)Creates a datasource from a given source with a given name (can be null).
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectfromXML(RXArchiver anArchiver, RXElement anElement)XML unarchival.booleangetCustomSchema()Returns a schema that may differ from the one stored in an XML file.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.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.java.lang.ObjectgetSource()Returns the source for the datasource.java.lang.ObjectinitWithArchiver(RMArchiver anArchiver)Legacy unarchival.voidsetCustomSchema(boolean customSchema)Sets a schema that may differ from the one stored in an XML file.voidsetSource(java.lang.Object aSource)Sets the source for the datasource.static voidsetSourceContext(java.lang.Object aSource)Sets possible context for aSource.java.lang.StringtoString()Returns a string representation of the datasource (just its name).RXElementtoXML(RXArchiver anArchiver)XML archival.- 
Methods inherited from class com.ribs.datasource.RMDataSourcegetName, setName
 
- 
 
- 
- 
- 
Method Detail- 
getSourcepublic java.lang.Object getSource() Returns the source for the datasource.
 - 
setSourcepublic void setSource(java.lang.Object aSource) Sets the source for the datasource.
 - 
getSchemapublic RMSchema getSchema() Returns the schema of represented datasource as a heirarchy of RMEntity and RMProperty objects.- Overrides:
- getSchemain class- RMDataSource
 
 - 
getCustomSchemapublic boolean getCustomSchema() Returns a schema that may differ from the one stored in an XML file.
 - 
setCustomSchemapublic void setCustomSchema(boolean customSchema) Sets a schema that may differ from the one stored in an XML file.
 - 
getEntitypublic RMEntity getEntity(java.lang.String aKeyPath) Returns the entity at the given key path.- Overrides:
- getEntityin class- RMDataSource
 
 - 
getRelationpublic RMProperty getRelation(java.lang.String aKeyPath) Returns the relation at the given key path.- Overrides:
- getRelationin class- RMDataSource
 
 - 
getDatasetpublic java.util.Map getDataset() Returns a sample dataset of objects associated with the datasource.- Overrides:
- getDatasetin class- RMDataSource
 
 - 
getErrorpublic java.lang.String getError() Returns the last error encountered when loading a datasource.- Overrides:
- getErrorin class- RMDataSource
 
 - 
setSourceContextpublic static void setSourceContext(java.lang.Object aSource) Sets possible context for aSource.
 - 
toStringpublic java.lang.String toString() Returns a string representation of the datasource (just its name).- Overrides:
- toStringin class- RMDataSource
 
 - 
toXMLpublic RXElement toXML(RXArchiver anArchiver) XML archival.- Overrides:
- toXMLin class- RMDataSource
 
 - 
fromXMLpublic java.lang.Object fromXML(RXArchiver anArchiver, RXElement anElement) XML unarchival.- Overrides:
- fromXMLin class- RMDataSource
 
 - 
initWithArchiverpublic java.lang.Object initWithArchiver(RMArchiver anArchiver) Legacy unarchival.
 
- 
 
-