Overview | Package | Class | Tree | Deprecated | Index | Help
| Qizx/Open v0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.xfra.qizxopen.xquery
Class DocumentManager

    java.lang.Object
      |
      +--net.xfra.qizxopen.xquery.DocumentManager

public class DocumentManager
extends java.lang.Object

Provides access to the data-model of XML documents.

Resolves the URI of a document and parses it or opens it according to its representation: the open-source version can only parse source XML documents; the full-blown implementation has access to compressed persistent randomly accessible representations called ZIPDocuments.

Parsed documents are managed in a cache with configurable size (see `setCacheSize(long)`).

Supports XML catalogs through Norman Walsh's `com.sun.resolver.tools.CatalogResolver`.

Constructor Summary
`DocumentManager(java.lang.String baseURI)` Creation with a single base location.
`DocumentManager(java.net.URL baseURL)` Creation with a single base location.

Method Summary
`Node` | `findDocument(java.lang.String uri)` Cached access by URI.
`java.lang.String` | `getBaseURI()` Returns the current baseURI.
`FONIDataModel` | `parseDocument(org.xml.sax.InputSource input)` Simple document parsing (no caching).
`FONIDataModel` | `parseDocument(java.net.URL url)` Simple document parsing (no caching).
`void` | `setCacheSize(long size)` Defines the maximal memory size of the document cache.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DocumentManager

    public DocumentManager(java.net.URL baseURL)

  Creation with a single base location.

Parameters:
  `baseURL` - the base URL used for resolving a relative document URI. For parsed documents, any Java-supported URL is suitable.

### DocumentManager

    public DocumentManager(java.lang.String baseURI)
                    throws java.io.IOException

  Creation with a single base location.

Method Detail

### getBaseURI

    public java.lang.String getBaseURI()

  Returns the current baseURI.

### setCacheSize

    public void setCacheSize(long size)

  Defines the maximal memory size of the document cache. This size is otherwise defined by the system property "qizx.docman.cachesize".

  Parameters:
    `size` - in bytes (hint).

### findDocument

    public Node findDocument(java.lang.String uri)
                      throws EvalException

  Cached access by URI.

    `EvalException`

### parseDocument

    public FONIDataModel parseDocument(java.net.URL url)
                                throws org.xml.sax.SAXException,
                                       java.io.IOException

  Simple document parsing (no caching). Helper method.

    `org.xml.sax.SAXException`
    `java.io.IOException`

### parseDocument

    public FONIDataModel parseDocument(org.xml.sax.InputSource input)
                                throws org.xml.sax.SAXException,
                                       java.io.IOException

  Simple document parsing (no caching). Helper method.

    `org.xml.sax.SAXException`
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright Xavier FRANC 2003-2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD