Changed static variables in the servlets to instance. This allows multiple servlets to run with separate configurations under the same servlet container.
1 package org.cdlib.xtf.dynaXML;
3 import java.io.IOException;
5 import javax.xml.transform.Templates;
7 import org.cdlib.xtf.servletBase.TextServlet;
8 import org.cdlib.xtf.util.StructuredStore;
9 import org.xml.sax.InputSource;
12 * Copyright (c) 2004, Regents of the University of California
13 * All rights reserved.
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions are met:
18 * - Redistributions of source code must retain the above copyright notice,
19 * this list of conditions and the following disclaimer.
20 * - Redistributions in binary form must reproduce the above copyright notice,
21 * this list of conditions and the following disclaimer in the documentation
22 * and/or other materials provided with the distribution.
23 * - Neither the name of the University of California nor the names of its
24 * contributors may be used to endorse or promote products derived from this
25 * software without specific prior written permission.
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 * POSSIBILITY OF SUCH DAMAGE.
41 * This file created on Mar 11, 2005 by Martin Haye
45 * Iterface that locates lazy or normal data streams for dynaXML document
46 * requests. The default implementation, {@link DefaultDocLocator}, implements
47 * local file access, but other implementations can be imagined that
48 * read/write files over the network.
52 public interface DocLocator
55 * Attach this locator to a specific servlet, which can be used to
56 * provide, among other thigns, path mapping services.
58 * @param servlet Servlet to attach to
60 void setServlet( TextServlet servlet );
63 * Search for a StructuredStore containing the "lazy" or persistent
64 * representation of a given document. Index parameters are specified,
65 * since often the lazy file is stored along with the index. This method
66 * is called first, and if it returns null, then
67 * {@link #getInputSource(String, boolean)} will be called as a fall-back.
69 * @param sourcePath Path to the source document
70 * @param indexConfigPath Path to the index configuration file
71 * @param indexName Name of the index being searched
72 * @param preFilter Stylesheet to filter the document with
73 * @param removeDoctypeDecl Set to true to remove DOCTYPE declaration from
76 * @return Store containing the tree, or null if none
79 StructuredStore getLazyStore( String indexConfigPath,
83 boolean removeDoctypeDecl )
88 * Retrieve the data stream for an XML source document.
90 * @param sourcePath Path to the source document
91 * @param removeDoctypeDecl Set to true to remove DOCTYPE declaration from
94 * @return Data stream for the document.
96 InputSource getInputSource( String sourcePath,
97 boolean removeDoctypeDecl )
100 } // interface DocLocator