deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.record.persistence
Interface RecordStore

All Known Implementing Classes:
ISORecordStore

public interface RecordStore

Base interface of the RecordStore persistence layer, provides access to stored RecordStore instances and their schemas.

NOTE: One RecordStore instance corresponds to one metadata format (e.g. DublinCore, MD_Metadata (ISO TC211), SV_Service (ISO TC211)).

Version:
$Revision: $, $Date: $
Author:
Steffen Thomas, Markus Schneider, last edited by: $Author: schneider $

Method Summary
 void describeRecord(XMLStreamWriter writer, QName typeName)
          Exports the XML schema for the associated metadata format.
 void destroy()
          Called by the container to indicate that this RecordStore instance is being taken out of service.
 void getRecordById(XMLStreamWriter writer, List<String> idList, URI outputSchema, CSWConstants.SetOfReturnableElements elementSetName)
          Exports the records by the requested identifier.
 void getRecords(XMLStreamWriter writer, QName typeName, URI outputSchema, RecordStoreOptions recordStoreOptions)
          Exports the XML for the requested records.
 void getRecordsForTransactionInsertStatement(XMLStreamWriter writer, List<Integer> transactionIds)
          Gets the records in dublin core representation for the insert action of the transaction operation.
 Map<QName,Integer> getTypeNames()
          Returns the typeNames that are known in the backend.
 void init()
          Called by the container to indicate that this RecordStore instance is being placed into service.
 List<Integer> transaction(XMLStreamWriter writer, TransactionOperation operations, TransactionOptions opations)
          Exports the XML fragment to the recordstore-backend.
 

Method Detail

init

void init()
          throws RecordStoreException
Called by the container to indicate that this RecordStore instance is being placed into service.

Throws:
RecordStoreException - if the initialization fails

destroy

void destroy()
Called by the container to indicate that this RecordStore instance is being taken out of service.


describeRecord

void describeRecord(XMLStreamWriter writer,
                    QName typeName)
Exports the XML schema for the associated metadata format.

Parameters:
writer - writer to export to, must not be null
typeName - specifies which record profile should be returned in the response.

getRecords

void getRecords(XMLStreamWriter writer,
                QName typeName,
                URI outputSchema,
                RecordStoreOptions recordStoreOptions)
                throws SQLException,
                       XMLStreamException,
                       IOException
Exports the XML for the requested records.

Parameters:
writer - writer to export to, must not be null
typeName - of a specific requested record profile
outputSchema - that should present in the response. If there is a DC recordStore requested and the outputSchema is a ISO schema then there should be presented the ISO representation of the record.
recordStoreOptions - RecordStoreOptions
Throws:
SQLException
XMLStreamException
IOException

getRecordById

void getRecordById(XMLStreamWriter writer,
                   List<String> idList,
                   URI outputSchema,
                   CSWConstants.SetOfReturnableElements elementSetName)
                   throws SQLException
Exports the records by the requested identifier.

Parameters:
writer - writer to export to, must not be null
idList - list of the requested identifiers
outputSchema - that should be presented in the response
elementSetName - CSWConstants.SetOfReturnableElements
Throws:
SQLException

transaction

List<Integer> transaction(XMLStreamWriter writer,
                          TransactionOperation operations,
                          TransactionOptions opations)
                          throws SQLException,
                                 XMLStreamException
Exports the XML fragment to the recordstore-backend.

INSERT-action: inserts one or more records to the backend.
UPDATE-action: updates one or more complete records OR individual properties.
DELETE-action: deletes one or more records by one filter expression.

Parameters:
writer - writer to export to, must not be null
operations - that are hold by this container
opations - TransactionOptions
Returns:
the number of successful transactions
Throws:
SQLException
XMLStreamException

getRecordsForTransactionInsertStatement

void getRecordsForTransactionInsertStatement(XMLStreamWriter writer,
                                             List<Integer> transactionIds)
                                             throws SQLException,
                                                    IOException
Gets the records in dublin core representation for the insert action of the transaction operation. If there is an INSERT statement in the transaction operation there has to be a brief representation (because of the validity) of this inserted record presented in the response.

Parameters:
writer - to be updated with a brief representation of the inserted records
transactionIds - that are affected by the transaction
Throws:
SQLException
IOException

getTypeNames

Map<QName,Integer> getTypeNames()
Returns the typeNames that are known in the backend.
i.e. the ISORecordStore holds two profiles, the DUBLIN CORE and the ISO profile.

Returns:
a map from a QName to an int value

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>