KickJava   Java API By Example, From Geeks To Geeks.

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


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.Date JavaDoc;
26
27 import org.xquark.xml.xdbc.XMLDBCException;
28 import org.xquark.xml.xdbc.XMLDocument;
29
30 /** A <code>RepositoryDocument</code> object stands for an XML document stored
31  * in the repository.
32  * <p>It allows, in addition to the {@link org.xquark.xml.xdbc.XMLCollection XMLCollection}
33  * API methods, to access specific information of repository XML documents.</p>
34  * @see org.xquark.mapper.RepositoryCollection
35  */

36 public interface RepositoryDocument extends XMLDocument
37 {
38     /** Returns the number of XML nodes in the document (according to the XQuark
39      * storage model). Nodes are elements, attributes, comments, text nodes...
40      * @return XQuark storage model node count.
41      * @throws RepositoryException API exception.
42      */

43      long getNodeCount() throws XMLDBCException;
44      
45     /** Returns the average number of characters of XML nodes of the document
46      * @return a character count.
47      * @throws RepositoryException API exception.
48      */

49      int getAverageNodeDataLength() throws XMLDBCException;
50      
51     /** Returns an estimation of the document length.
52      * <p>The XML serialized data may differ in a significant way from this
53      * estimation for several reasons:</p>
54      * <ul>
55      * <li>Character encoding,</li>
56      * <li>Indentation characters,</li>
57      * <li>Markup normalization,</li>
58      * <li>etc.</li>
59      * </ul>
60      * @return a character count, not a byte count.
61      * @throws RepositoryException API exception.
62      */

63      long getEstimatedDocumentLength() throws XMLDBCException;
64      
65     /** Returns the storage date of the XML file in the repository.
66      * @throws RepositoryException API exception.
67      * @return a java.util.Date.
68      */

69      Date JavaDoc getCreationDate() throws XMLDBCException;
70      
71
72 }
73
Popular Tags