Project

General

Profile

1
/**
2
 *  '$RCSfile$'
3
 *    Purpose: A class represent a server in xml_replcation table
4
 *  Copyright: 2000 Regents of the University of California and the
5
 *             National Center for Ecological Analysis and Synthesis
6
 *    Authors: Jing Tao
7
 *    Release: @release@
8
 *
9
 *   '$Author: tao $'
10
 *     '$Date: 2002-07-14 12:33:25 -0700 (Sun, 14 Jul 2002) $'
11
 * '$Revision: 1292 $'
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
 */
27

    
28
package edu.ucsb.nceas.metacat;
29

    
30
/**
31
 * A class express a entry in xml_replication. It include server name,
32
 * lastChechedDate, replication or not, dataReplication or not, hub or not
33
 */
34
 
35
public class ReplicationServer
36
{
37
  private String serverName = null; //server name
38
  private String lastCheckedDate = null; //string of last 
39
  private boolean replication = false; //replciate xml document or not
40
  private boolean dataReplication = false; //replciate data file or not
41
                                           //it is relative to replcation
42
                                           //if replication is false, it should
43
                                           //be false
44
  private boolean hub = false; //it is hub or not. Hub means the localhost can
45
                               //replcate documents to the server if the 
46
                               //document's home server is not localhost
47
  /**
48
   * Consturctor of ReplicationServer
49
   */
50
  public ReplicationServer()
51
  {
52
    this.serverName = null;
53
    this.lastCheckedDate = null;
54
    this.replication = false;
55
    this.dataReplication = false;
56
    this.hub = false;
57
  }//constructor
58
  
59
  /**
60
   * Get server name
61
   */
62
  public String getServerName()
63
  {
64
    return this.serverName;
65
  }//getServerName
66
  
67
  /**
68
   * Set a sting as server name
69
   * @param myServerName, the string will set to object's serverName
70
   */
71
  public void setServerName(String myServerName)
72
  {
73
    this.serverName = myServerName;
74
  }//setServerName
75
  
76
  /**
77
   * Get last checked date
78
   */
79
  public String getLastCheckedDate()
80
  {
81
    return this.lastCheckedDate;
82
  }//getLastCheckedDate
83
  
84
  /**
85
   * Set a string as last checked date
86
   * @Param myLastCheckedDate, the string will set to object's lastCheckedDate
87
   */
88
  public void setLastCheckedDate(String myLastCheckedDate)
89
  {
90
    this.lastCheckedDate = myLastCheckedDate;
91
  }//setLastCheckedDate
92
   
93
  /**
94
   * Get replication xml or not option
95
   */
96
  public boolean getReplication()
97
  {
98
    return this.replication;
99
  }//getReplication
100
  
101
  /**
102
   * Set replication option
103
   * @param myReplication, the option will set to object's replication
104
   */
105
  public void setReplication(boolean myReplication)
106
  {
107
    this.replication = myReplication;
108
  }//setReplication
109
  
110
  /**
111
   * Get datareplication xml or not option
112
   */
113
  public boolean getDataReplication()
114
  {
115
    return this.dataReplication;
116
  }//getDataReplication
117
  
118
  /**
119
   * Set data replication option
120
   * @param myDataReplication, the option will set to object's datareplication
121
   */
122
  public void setDataReplication(boolean myDataReplication)
123
  {
124
    this.dataReplication = myDataReplication;
125
  }//setDataReplication   
126
   
127
  /**
128
   * Get hub option
129
   */
130
  public boolean getHub()
131
  {
132
    return this.hub;
133
  }//getHub
134
  
135
  /**
136
   * Set hub option
137
   * @param myHub, the option will set to object's hub option
138
   */
139
  public void setHub(boolean myHub)
140
  {
141
    this.hub = myHub;
142
  }//setHub     
143
  
144
}//class ReplicationServer
145

    
(53-53/57)