org.ow2.dragon.api.service.dataloader
Interface DataLoader

All Known Implementing Classes:
DataLoaderImpl

public interface DataLoader

DataLoader provides methods to load dataset into Dragon database

Author:
ofabre - eBM Websourcing

Method Summary
 void loadDataset(java.io.InputStream datasetStream)
          Fill the database with information extracted from the given XML dataset, provided as an InputStream.
 void loadDataSet(java.lang.String xmlDataSetURI)
          Fill the database with information extracted from the given XML dataset, referenced by the given URI String.
 void rebuildIndex()
          Rebuild the lucene search index synchronized with the database state.
 void recreateDatabase()
          Rebuild the database schema.
 

Method Detail

loadDataSet

@Transactional
void loadDataSet(java.lang.String xmlDataSetURI)
                 throws DataLoaderException
Fill the database with information extracted from the given XML dataset, referenced by the given URI String. The dataset schema (dragon-dataset.xsd) is included in the Dragon web app (in the 'WEB-INF/classes/dataset' folder).

Parameters:
xmlDataSetURI - an URI String pointing on a xml dataset.
Throws:
DataLoaderException - if an error occurs during dataset loading

loadDataset

@Transactional
void loadDataset(java.io.InputStream datasetStream)
                 throws DataLoaderException
Fill the database with information extracted from the given XML dataset, provided as an InputStream. The dataset schema (dragon-dataset.xsd) is included in the Dragon web app (in the 'WEB-INF/classes/dataset' folder).

Parameters:
datasetStream -
Throws:
DataLoaderException

rebuildIndex

void rebuildIndex()
Rebuild the lucene search index synchronized with the database state.


recreateDatabase

@Transactional
void recreateDatabase()
Rebuild the database schema. Remove all information from the database. Be careful, it can't be reversed. Don't forget to reload Dragon base TModels, before registering new data into Dragon DB.



Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.