[14975] | 1 | /**
|
---|
| 2 | *#########################################################################
|
---|
| 3 | *
|
---|
| 4 | * A component of the Gatherer application, part of the Greenstone digital
|
---|
| 5 | * library suite from the New Zealand Digital Library Project at the
|
---|
| 6 | * University of Waikato, New Zealand.
|
---|
| 7 | *
|
---|
| 8 | * Author: John Thompson and David Bainbridge,
|
---|
| 9 | * Greenstone Digital Library, University of Waikato
|
---|
| 10 | *
|
---|
| 11 | * Copyright (C) 1999 New Zealand Digital Library Project
|
---|
| 12 | *
|
---|
| 13 | * This program is free software; you can redistribute it and/or modify
|
---|
| 14 | * it under the terms of the GNU General Public License as published by
|
---|
| 15 | * the Free Software Foundation; either version 2 of the License, or
|
---|
| 16 | * (at your option) any later version.
|
---|
| 17 | *
|
---|
| 18 | * This program is distributed in the hope that it will be useful,
|
---|
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 21 | * GNU General Public License for more details.
|
---|
| 22 | *
|
---|
| 23 | * You should have received a copy of the GNU General Public License
|
---|
| 24 | * along with this program; if not, write to the Free Software
|
---|
| 25 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
| 26 | *########################################################################
|
---|
| 27 | */
|
---|
| 28 |
|
---|
| 29 | package org.greenstone.gatherer;
|
---|
| 30 |
|
---|
| 31 | import java.io.*;
|
---|
| 32 | import org.greenstone.gatherer.util.StaticStrings;
|
---|
| 33 | import org.greenstone.gatherer.util.Utility;
|
---|
| 34 |
|
---|
| 35 | public class FedoraInfo
|
---|
| 36 | {
|
---|
| 37 | public String home = null;
|
---|
| 38 |
|
---|
| 39 | public String hostname = null;
|
---|
| 40 | public String port = null;
|
---|
| 41 | public String username = null;
|
---|
| 42 | public String password = null;
|
---|
| 43 | public String protocol = null;
|
---|
| 44 |
|
---|
| 45 | public FedoraInfo()
|
---|
| 46 | {
|
---|
| 47 | this.hostname ="localhost";
|
---|
| 48 | this.port = "8080";
|
---|
| 49 | this.username = "fedoraAdmin";
|
---|
| 50 | this.password = "fedoraAdmin";
|
---|
| 51 | this.protocol = "http";
|
---|
| 52 | }
|
---|
| 53 |
|
---|
| 54 | public FedoraInfo(String hostname, String port, String username, String password, String protocol)
|
---|
| 55 | {
|
---|
| 56 | this.hostname = hostname;
|
---|
| 57 | this.port = port;
|
---|
| 58 | this.username = username;
|
---|
| 59 | this.password = password;
|
---|
| 60 | this.protocol = protocol;
|
---|
| 61 | }
|
---|
| 62 |
|
---|
| 63 |
|
---|
| 64 | public boolean isActive()
|
---|
| 65 | {
|
---|
| 66 | return home != null;
|
---|
| 67 | }
|
---|
| 68 |
|
---|
| 69 | public void setHome(String home)
|
---|
| 70 | {
|
---|
| 71 | this.home = home;
|
---|
| 72 | }
|
---|
| 73 |
|
---|
| 74 |
|
---|
| 75 | public String getHome()
|
---|
| 76 | {
|
---|
| 77 | return home;
|
---|
| 78 | }
|
---|
| 79 |
|
---|
| 80 |
|
---|
| 81 | public void setHostname(String hostname)
|
---|
| 82 | {
|
---|
| 83 | this.hostname = hostname;
|
---|
| 84 | }
|
---|
| 85 |
|
---|
| 86 | public String getHostname()
|
---|
| 87 | {
|
---|
| 88 | return hostname;
|
---|
| 89 | }
|
---|
| 90 |
|
---|
| 91 |
|
---|
| 92 | public void setPort(String port)
|
---|
| 93 | {
|
---|
| 94 | this.port = port;
|
---|
| 95 | }
|
---|
| 96 |
|
---|
| 97 | public String getPort()
|
---|
| 98 | {
|
---|
| 99 | return port;
|
---|
| 100 | }
|
---|
| 101 |
|
---|
| 102 |
|
---|
| 103 | public void setUsername(String username)
|
---|
| 104 | {
|
---|
| 105 | this.username = username;
|
---|
| 106 | }
|
---|
| 107 |
|
---|
| 108 | public String getUsername()
|
---|
| 109 | {
|
---|
| 110 | return username;
|
---|
| 111 | }
|
---|
| 112 |
|
---|
| 113 |
|
---|
| 114 | public void setPassword(String password)
|
---|
| 115 | {
|
---|
| 116 | this.password = password;
|
---|
| 117 | }
|
---|
| 118 |
|
---|
| 119 | public String getPassword()
|
---|
| 120 | {
|
---|
| 121 | return password;
|
---|
| 122 | }
|
---|
| 123 |
|
---|
| 124 |
|
---|
| 125 | public void setProtocol(String protocol)
|
---|
| 126 | {
|
---|
| 127 | this.protocol = protocol;
|
---|
| 128 | }
|
---|
| 129 |
|
---|
| 130 | public String getProtocol()
|
---|
| 131 | {
|
---|
| 132 | return protocol;
|
---|
| 133 | }
|
---|
| 134 |
|
---|
| 135 | }
|
---|