KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > xquark > mapper > RepositoryCollection


1 /*
2  * This file belongs to the XQuark distribution.
3  * Copyright (C) 2003 Universite de Versailles Saint-Quentin.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307.
18  * You can also get it at http://www.gnu.org/licenses/lgpl.html
19  *
20  * For more information on this software, see http://www.xquark.org.
21  */

22
23 package org.xquark.mapper;
24
25 import java.util.List JavaDoc;
26
27 import org.xquark.xml.xdbc.XMLCollection;
28 import org.xquark.xml.xdbc.XMLDBCException;
29
30 /** A <code>RepositoryCollection</code> object grants access to a collection of XML
31  * documents. Using the SAX 2.0 or DOM level 2 interfaces, this object
32  * will allow you to perform storing, reading and removal of XML documents.
33  *
34  * <p>A RepositoryCollection object is created every time every time you call
35  * the {@link RepositoryConnection#getRepositoryCollection(String) method. It
36  * must be closed after use in order to release resources, escpecially JDBC
37  * resources.</p>
38  * <p>This object is not synchronized since a {@link RepositoryConnection} is
39  * monothread.</p>
40  * @see org.xquark.mapper.RepositoryConnection
41  */

42 public interface RepositoryCollection extends XMLCollection
43 {
44     /** Creates a new {@link RepositoryDocument} object.
45      * @param documentID the document string ID.
46      * @return a RepositoryDocument object that may or may not exist. If not a
47      * subsequent exception will be raised when performing data access.
48      * @throws XMLDBCException API exception.
49      */

50      RepositoryDocument getRepositoryDocument(String JavaDoc documentID)
51      throws XMLDBCException;
52     
53     /** Returns a list of{@link RepositoryDocument} objects.
54      * @return a List object.
55      * @throws XMLDBCException API exception.
56      */

57      List JavaDoc getRepositoryDocumentList() throws XMLDBCException;
58     
59     /** Creates indexes on storage tables.
60      * <p>To use after document insertion when indexes have been dropped
61      * to improve performance.</p>
62      * <p><B>Warning :</B> Index reconstruction can be sometimes a quite
63      * long process.</p>
64      * @throws XMLDBCException API exception.
65      */

66      void createIndexes() throws XMLDBCException;
67
68     /** Drops indexes on the storage tables.
69      * <p>To use in order to improve performance during storage of a lot
70      * of data in the XML collection.</p>
71      * @throws XMLDBCException API exception.
72      */

73      void dropIndexes() throws XMLDBCException;
74      
75     /** Update DBMS statistics on collection tables to improve query performance.
76      * @throws XMLDBCException API exception.
77      */

78      void updateStatistics() throws XMLDBCException;
79 }
80
Popular Tags