jcolibri.cbrcore
Interface Connector

All Known Implementing Classes:
DataBaseConnector, EmailConnector, OntologyConnector, PlainTextConnector, RestaurantsConnector, RestaurantsConnector

public interface Connector

Connector interface declares the methods required to access the cases stored in a persistence media. jCOLIBRI splits the managing of cases into persistence media and in-memory organization. This interface defines the access to de persistence and the CBRCaseBase interface defines the in-memory organization. Both interfaces are related as the CBRCaseBase manages the Connector. Implementations should read/write cases from Data Bases, Plain Text files, Ontologies, XML files, etc.

Author:
Juan A. Recio-García
See Also:
CBRCaseBase

Method Summary
 void close()
          Cleanup any resource that the connector might be using, and suspends the service
 void deleteCases(java.util.Collection<CBRCase> cases)
          Deletes given cases for the storage media
 void initFromXMLfile(java.net.URL file)
          Initialices the connector with the given XML file
 java.util.Collection<CBRCase> retrieveAllCases()
          Returns max cases without any special consideration
 java.util.Collection<CBRCase> retrieveSomeCases(CaseBaseFilter filter)
          Retrieves some cases depending on the filter.
 void storeCases(java.util.Collection<CBRCase> cases)
          Stores given classes on the storage media
 

Method Detail

initFromXMLfile

void initFromXMLfile(java.net.URL file)
                     throws InitializingException
Initialices the connector with the given XML file

Parameters:
file - XMl file with the settings
Throws:
InitializingException - Raised if the connector can not be initialezed.

close

void close()
Cleanup any resource that the connector might be using, and suspends the service


storeCases

void storeCases(java.util.Collection<CBRCase> cases)
Stores given classes on the storage media

Parameters:
cases - List of cases

deleteCases

void deleteCases(java.util.Collection<CBRCase> cases)
Deletes given cases for the storage media

Parameters:
cases - List of cases

retrieveAllCases

java.util.Collection<CBRCase> retrieveAllCases()
Returns max cases without any special consideration

Returns:
The list of retrieved cases

retrieveSomeCases

java.util.Collection<CBRCase> retrieveSomeCases(CaseBaseFilter filter)
Retrieves some cases depending on the filter. TODO.


GAIA - Group for Artificial Intelligence Applications
http://gaia.fdi.ucm.es