source: trunk/gsdl3/src/java/org/greenstone/gsdl3/core/ModuleInterface.java@ 3346

Last change on this file since 3346 was 3235, checked in by say1, 22 years ago

added GNU headers to all java files. added @author and @version tags. added a fair number of javadoc comments (but not as many as I probably should).

  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1/*
2 * ModuleInterface.java
3 * Copyright (C) 2002 New Zealand Digital Library, http://www.nzdl.org
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (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
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19package org.greenstone.gsdl3.core;
20
21import org.w3c.dom.Node;
22
23/**
24 * Module interface for all components/modules in greenstone.
25 *
26 * all components talk via a process method - in its simplest form,
27 * it takes a String of XML, and returns a String of XML
28 *
29 * Java modules also implement a convenience process method -
30 * uses DOM Nodes instead of Strings - avoids parsing the XML at each module
31 *
32 * @author <a href="mailto:[email protected]">Katherine Don</a>
33 * @version $Revision: 3235 $
34 */
35public interface ModuleInterface {
36
37 /**
38 * Process an XML request - as a String
39 *
40 * @param xml_in the request to process
41 * @return the response - contains any error messages
42 * @see java.lang.String
43 */
44 abstract public String process(String xml_in);
45
46 /**
47 * Process an XML request - as a DOM model node
48 * the Node may be an Element or a Document
49 *
50 * @param in the request to process
51 * @return the response - contains any error messages
52 * @see org.w3c.dom.Node
53 * @see org.w3c.dom.Document
54 * @see org.w3c.dom.Element
55 */
56 abstract public Node process(Node xml_in);
57 //abstract public XMLConverter process(XMLConverter out);
58}
59
Note: See TracBrowser for help on using the repository browser.