Changeset 3235 for trunk/gsdl3/src/java/org
- Timestamp:
- 2002-07-06T14:25:01+12:00 (22 years ago)
- Location:
- trunk/gsdl3/src/java/org/greenstone/gsdl3
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/Library1.java
r3222 r3235 1 /* 2 * Library1.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 */ 1 19 package org.greenstone.gsdl3; 2 20 … … 9 27 * 10 28 * enter XML queries at the prompt 29 * @author <a href="mailto:[email protected]">Katherine Don</a> 30 * @version $Revision$ 11 31 */ 12 32 final public class Library1 { -
trunk/gsdl3/src/java/org/greenstone/gsdl3/Library2.java
r3222 r3235 1 /* 2 * Library2.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 */ 1 19 package org.greenstone.gsdl3; 2 20 … … 8 26 import java.io.File; 9 27 import java.io.IOException; 28 /** 29 * A program to take XML strings from the command line and send 30 * them to the system. 31 * 32 * @author <a href="mailto:[email protected]">Katherine Don</a> 33 * @version $Revision$ 34 */ 10 35 final public class Library2 { 11 36 -
trunk/gsdl3/src/java/org/greenstone/gsdl3/SOAPServer.java
r3222 r3235 1 /* 2 * SOAPServer.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 */ 1 19 package org.greenstone.gsdl3; 2 20 3 21 import org.greenstone.gsdl3.core.*; 4 22 import org.w3c.dom.Node; 23 /** 24 * The server side of a SOAP connection 25 * 26 * @author <a href="mailto:[email protected]">Katherine Don</a> 27 * @version $Revision$ 28 * @see <a href="http://www.w3.org/TR/SOAP/">Simple Object Access Protocol (SOAP) 1.1 </a> 29 */ 5 30 6 31 public class SOAPServer 7 32 implements ModuleInterface { 8 33 34 /** The message router we're talking to */ 9 35 MessageRouter mr_=null; 10 36 37 /** The no-args constructor */ 11 38 public SOAPServer() { 12 39 mr_ = new MessageRouter(); … … 16 43 } 17 44 45 /** Process a request */ 18 46 public String process(String xml_in) { 19 47 return mr_.process(xml_in); -
trunk/gsdl3/src/java/org/greenstone/gsdl3/collection/Collection.java
r3222 r3235 1 /* 2 * Collection.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 */ 1 19 package org.greenstone.gsdl3.collection; 2 20 … … 20 38 * Implements ModuleInterface. Contains a list of services supported by the collection, as well as collection metadata 21 39 * 40 * @author <a href="mailto:[email protected]">Katherine Don</a> 41 * @version $Revision$ 22 42 * @see ModuleInterface 23 43 */ -
trunk/gsdl3/src/java/org/greenstone/gsdl3/comms/Communicator.java
r3222 r3235 1 /* 2 * Communicator.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 */ 1 19 package org.greenstone.gsdl3.comms; 2 20 … … 9 27 /** Communicator - base class for Modules that talk via some protocol to other modules 10 28 * 29 * @author <a href="mailto:[email protected]">Katherine Don</a> 30 * @version $Revision$ 11 31 */ 12 32 abstract public class Communicator -
trunk/gsdl3/src/java/org/greenstone/gsdl3/comms/SOAPCommunicator.java
r3222 r3235 1 /* 2 * SOAPCommunicator.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 */ 1 19 package org.greenstone.gsdl3.comms; 2 20 … … 20 38 import org.w3c.dom.Element; 21 39 40 /* 41 * The Client side of a SOAP Connection 42 * 43 * @author <a href="mailto:[email protected]">Katherine Don</a> 44 * @version $Revision$ 45 * @see <a href="http://www.w3.org/TR/SOAP/">Simple Object Access Protocol (SOAP) 1.1 </a> 46 */ 22 47 public class SOAPCommunicator 23 48 extends Communicator { … … 25 50 /** the call object that does the SOAP talking */ 26 51 private Call call_ = null; 27 52 53 /** The no-args constructor */ 28 54 public SOAPCommunicator() { 29 55 -
trunk/gsdl3/src/java/org/greenstone/gsdl3/core/MessageRouter.java
r3229 r3235 1 /* 2 * MessageRouter.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 */ 1 19 package org.greenstone.gsdl3.core; 2 20 … … 30 48 * objects talking to other MessageRouters etc. 31 49 * 50 * 51 * @author <a href="mailto:[email protected]">Katherine Don</a> 52 * @version $Revision$ 32 53 * @see ModuleInterface 33 54 * @see Collection -
trunk/gsdl3/src/java/org/greenstone/gsdl3/core/ModuleInterface.java
r3233 r3235 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 */ 1 19 package org.greenstone.gsdl3.core; 2 20 3 21 import org.w3c.dom.Node; 22 4 23 /** 5 24 * Module interface for all components/modules in greenstone. … … 10 29 * Java modules also implement a convenience process method - 11 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$ 12 34 */ 13 14 35 public interface ModuleInterface { 15 36 … … 25 46 /** 26 47 * Process an XML request - as a DOM model node 27 * the Node may be an E Lement or a Document48 * the Node may be an Element or a Document 28 49 * 29 50 * @param in the request to process -
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/MGGDBMService.java
r3222 r3235 1 /* 2 * MGGDBMService.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 */ 1 19 package org.greenstone.gsdl3.service; 2 20 … … 6 24 import org.w3c.dom.Element; 7 25 import org.w3c.dom.NodeList; 26 /** 27 * 28 * @author <a href="mailto:[email protected]">Katherine Don</a> 29 * @version $Revision$ 30 */ 8 31 9 10 32 public class MGGDBMService 11 33 extends ServiceModule { … … 26 48 return null; 27 49 } 28 50 /** configure this service */ 29 51 public boolean configure(Element info) { 30 52 … … 69 91 return true; 70 92 } 71 93 /** process a text query */ 72 94 protected Element processTextQuery(Element request) { 73 95 Element result = doc_.createElement("response"); … … 81 103 } 82 104 105 /** retrieve a document */ 83 106 protected Element processDocRetrieve(Element request) { 84 107 Element result = doc_.createElement("response"); … … 92 115 } 93 116 117 /** retrieve metadata */ 94 118 protected Element processMetadataRetrieve(Element request) { 95 119 Element result = doc_.createElement("response"); -
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/MGPPService.java
r3222 r3235 1 /* 2 * MGPPService.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 */ 1 19 package org.greenstone.gsdl3.service; 2 20 … … 6 24 import org.w3c.dom.Element; 7 25 import org.w3c.dom.NodeList; 26 /** 27 * A Service class for MGPP 28 * 29 * @author <a href="mailto:[email protected]">Katherine Don</a> 30 * @version $Revision$ 31 */ 8 32 9 33 … … 32 56 33 57 58 /** confifure this service */ 34 59 public boolean configure(Element info) { 35 60 … … 83 108 } 84 109 110 /** process a text query */ 85 111 protected Element processTextQuery(Element request) { 86 112 Element result = doc_.createElement("response"); … … 94 120 } 95 121 122 /** process a fielded query */ 96 123 protected Element processFieldQuery(Element request) { 97 124 Element result = doc_.createElement("response"); … … 105 132 } 106 133 134 /** retrieve a document */ 107 135 protected Element processDocRetrieve(Element request) { 108 136 Element result = doc_.createElement("response"); … … 116 144 } 117 145 146 /** retrieve metadata */ 118 147 protected Element processMetadataRetrieve(Element request) { 119 148 Element result = doc_.createElement("response"); -
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/PhindService.java
r3222 r3235 1 /* 2 * PhindService.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 */ 1 19 package org.greenstone.gsdl3.service; 2 20 … … 6 24 import org.w3c.dom.Text; 7 25 8 /** PhindService - the phind phrase browsing service 26 /** 27 * PhindService - the phind phrase browsing service 9 28 * 29 * @author <a href="mailto:[email protected]">Katherine Don</a> 30 * @version $Revision$ 10 31 */ 11 32 public class PhindService -
trunk/gsdl3/src/java/org/greenstone/gsdl3/service/ServiceModule.java
r3222 r3235 1 /* 2 * ServiceModule.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 */ 1 19 package org.greenstone.gsdl3.service; 2 20 … … 26 44 * MGGDBMServiceModule may support "DocRetrieve", "TextQuery", "MetadataRetrieve" services 27 45 * 46 * @author <a href="mailto:[email protected]">Katherine Don</a> 47 * @version $Revision$ 28 48 */ 29 49 public abstract class ServiceModule … … 52 72 protected HashMap service_info_map_ = null; 53 73 74 /** sets the collect name */ 54 75 public void setCollectionName(String coll_name) { 55 76 collection_name_ = coll_name; 56 77 } 57 78 79 /** sets the site home */ 58 80 public void setSiteHome(String site_home) { 59 81 site_home_ = site_home; 60 82 } 61 83 84 /** sets the message router */ 62 85 public void setMessageRouter(ModuleInterface m) { 63 86 router_ = m; 64 87 } 65 88 89 /** the no-args constructor */ 66 90 public ServiceModule() { 67 91 converter_ = new XMLConverter(); -
trunk/gsdl3/src/java/org/greenstone/gsdl3/util/GSFile.java
r3222 r3235 1 /* 2 * GSFile.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 */ 1 19 package org.greenstone.gsdl3.util; 2 20 … … 8 26 * contains File creation methods. 9 27 * 28 * @author <a href="mailto:[email protected]">Katherine Don</a> 29 * @version $Revision$ 10 30 * @see File 11 31 */ … … 42 62 } 43 63 64 /** returns the directory for XML Transforms */ 44 65 static public String xmlTransformDir(String gsdl_home) { 45 66 return gsdl_home+File.separatorChar+"transform"; -
trunk/gsdl3/src/java/org/greenstone/gsdl3/util/GSPath.java
r3222 r3235 1 /* 2 * GSPath.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 */ 1 19 package org.greenstone.gsdl3.util; 2 20 … … 5 23 * 6 24 * modifies and examines message address paths and names 25 * 26 * @author <a href="mailto:[email protected]">Katherine Don</a> 27 * @version $Revision$ 7 28 * 8 29 */ -
trunk/gsdl3/src/java/org/greenstone/gsdl3/util/XMLConverter.java
r3222 r3235 1 /* 2 * XMLConverter.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 */ 1 19 package org.greenstone.gsdl3.util; 2 20 … … 21 39 * different parsers have different behaviour - can experiment in here 22 40 * 41 * @author <a href="mailto:[email protected]">Katherine Don</a> 42 * @version $Revision$ 43 * 23 44 */ 24 45 public class XMLConverter { … … 32 53 protected DOMParser parser_ = null; 33 54 55 /** the no-args constructor */ 34 56 public XMLConverter() { 35 57 try { … … 60 82 return null; 61 83 } 62 84 85 /** returns a DOM Document */ 63 86 public Document getDOM(File in) { 64 87 try { -
trunk/gsdl3/src/java/org/greenstone/gsdl3/util/XMLTransformer.java
r3222 r3235 1 /* 2 * XMLTransformer.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 */ 1 19 package org.greenstone.gsdl3.util; 2 20 … … 20 38 * different parsers have different behaviour - can experiment in here 21 39 * 40 * @author <a href="mailto:[email protected]">Katherine Don</a> 41 * @version $Revision$ 22 42 */ 23 43 public class XMLTransformer { 24 25 TransformerFactory t_factory_=null; 26 44 /** The transformer we're using */ 45 TransformerFactory t_factory_=null; 46 47 /** 48 * The no-arguments constructor. 49 * 50 * Any exceptions thrown are caught internally 51 * 52 * @return a new transformer 53 * @see javax.xml.transform.TransformerFactory 54 */ 27 55 public XMLTransformer() { 28 56 try { … … 36 64 37 65 66 /** 67 * Transform an XML document using a XSLT stylesheet 68 * 69 * @param stylesheet an XSLT stylesheet 70 * @param xml_in the XML to be transformed 71 * @return the transformed XML 72 */ 38 73 public String transform(String stylesheet, String xml_in) { 39 74
Note:
See TracChangeset
for help on using the changeset viewer.