public class RMFileDataSource extends RMDataSource
RMDataSource.EntityResolver
Constructor and Description |
---|
RMFileDataSource()
Creates a new file data source.
|
RMFileDataSource(java.lang.String aName,
java.lang.String aPath)
Creates a new file data source at given path.
|
Modifier and Type | Method and Description |
---|---|
void |
copyValues(RMDataSource aDataSource)
Override to copy values.
|
RMEntity |
createEntityImpl(RMEntity anEntity)
Creates a new entity.
|
void |
delete()
Deletes this data source, assuming it corresponds to something that can be deleted, like a database.
|
void |
deleteFileImpl(RMFile aFile)
Deletes file.
|
void |
deleteRowImpl(RMRow aRow)
Deletes a given row.
|
RMFileDataSource |
fromXML(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML unarchival.
|
java.util.Map |
getDataset()
Returns all data source data as a dataset.
|
RMFile |
getEntityFile(java.lang.String aName,
boolean doCreate)
Returns the file for the given entity.
|
java.util.List<RMRow> |
getEntityRows(RMEntity anEntity)
Returns the list of rows for a given entity.
|
java.util.List<RMFile> |
getFilesImpl(java.lang.String aPath)
Returns files at path.
|
java.lang.String |
getPath()
Returns the path.
|
java.util.List<RMRow> |
getRowsImpl(java.util.List<? extends RMProperty> theProperties,
RMCondition aCondition,
java.lang.Class<? extends RMRow> aClass)
Returns a set of rows for the given properties and condition.
|
RMSchema |
getSchema()
Returns schema (loaded froms RMSchema.xml file).
|
java.lang.String |
getTypeString()
Returns the type string.
|
void |
insertRowImpl(RMRow aRow)
Inserts a given row.
|
void |
readFileImpl(RMFile aFile)
Gets file bytes.
|
RMSchema |
readSchema()
Reads schema from file.
|
void |
saveRowsImmediately()
Override to save CSV files.
|
void |
saveSchema()
Saves schema to file.
|
void |
setPath(java.lang.String aPath)
Sets the path.
|
com.reportmill.archiver.RXElement |
toXML(com.reportmill.archiver.RXArchiver anArchiver,
java.lang.Object anOwner)
XML archival.
|
void |
updateRowImpl(RMRow aRow)
Updates a given row.
|
void |
writeFileImpl(RMFile aFile)
Writes file bytes.
|
create, createEntity, createObject, deleteEntity, deleteFile, deleteRow, equals, getAllRows, getDataset, getDefaultCondition, getDefaultParameters, getEntity, getEntityClass, getEntityResolver, getFile, getFile, getFile, getName, getQueryParameters, getRootDirectory, getRow, getRow, getRows, getSchemaVisible, getUniqueRow, insertRow, propertyChange, readFile, refresh, saveRows, setEntityResolver, setName, toString, updateRow, writeFile
addListener, addPropertyChangeListener, animUpdate, clone, firePropertyChange, firePropertyChange, getListener, getListenerCount, getListeners, isFirePropertyChangeEnabled, isUndoing, removeListener, removePropertyChangeListener, setFirePropertyChangeEnabled, setUndoing
public RMFileDataSource()
public RMFileDataSource(java.lang.String aName, java.lang.String aPath)
public java.lang.String getTypeString()
getTypeString
in class RMDataSource
public java.lang.String getPath()
public void setPath(java.lang.String aPath)
public RMSchema getSchema()
getSchema
in class RMDataSource
public java.util.Map getDataset()
getDataset
in class RMDataSource
public java.util.List<RMRow> getRowsImpl(java.util.List<? extends RMProperty> theProperties, RMCondition aCondition, java.lang.Class<? extends RMRow> aClass)
public void insertRowImpl(RMRow aRow)
public void updateRowImpl(RMRow aRow)
public void deleteRowImpl(RMRow aRow)
public void saveRowsImmediately()
saveRowsImmediately
in class RMDataSource
public RMFile getEntityFile(java.lang.String aName, boolean doCreate)
public java.util.List<RMRow> getEntityRows(RMEntity anEntity)
public java.util.List<RMFile> getFilesImpl(java.lang.String aPath)
getFilesImpl
in class RMDataSource
public void readFileImpl(RMFile aFile)
public void writeFileImpl(RMFile aFile)
public void deleteFileImpl(RMFile aFile)
public RMSchema readSchema()
public void saveSchema()
public void delete()
delete
in class RMDataSource
public void copyValues(RMDataSource aDataSource)
copyValues
in class RMDataSource
public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver, java.lang.Object anOwner)
toXML
in class RMDataSource
public RMFileDataSource fromXML(com.reportmill.archiver.RXArchiver anArchiver, com.reportmill.archiver.RXElement anElement, java.lang.Object anOwner)
fromXML
in class RMDataSource