source: gs3-extensions/atlas-src/trunk/src/org/greenstone/atlas/server/ScanConfiguration.java@ 23934

Last change on this file since 23934 was 23934, checked in by sjm84, 13 years ago

Extensive improvements to the ATLAS code

File size: 1.5 KB
Line 
1package org.greenstone.atlas.server;
2
3public class ScanConfiguration
4{
5 protected double _penaltyPercentage = -1;
6 protected double _parentBonusPercentage = -1;
7 protected double _indirectReferencePercentage = -1;
8 protected double _parentLimitPercentage = -1;
9
10 public ScanConfiguration(double penaltyPercentage, double parentBonusPercentage, double indirectReferencePercentage, double parentLimitPercentage)
11 {
12 _penaltyPercentage = penaltyPercentage;
13 _parentBonusPercentage = parentBonusPercentage;
14 _indirectReferencePercentage = indirectReferencePercentage;
15 _parentLimitPercentage = parentLimitPercentage;
16 }
17
18 public double getPenalty()
19 {
20 return _penaltyPercentage;
21 }
22
23 public double getParentBonus()
24 {
25 return _parentBonusPercentage;
26 }
27
28 public double getIndirectReferencePenalty()
29 {
30 return _indirectReferencePercentage;
31 }
32
33 public String toString()
34 {
35 return "" + _penaltyPercentage + " " + _parentBonusPercentage + " " + _indirectReferencePercentage + " " + _parentLimitPercentage;
36 }
37
38 public boolean equals (Object other)
39 {
40 if(other == null)
41 {
42 return false;
43 }
44
45 if(!(other instanceof ScanConfiguration))
46 {
47 return false;
48 }
49
50 ScanConfiguration othersc = (ScanConfiguration)other;
51
52 if(_penaltyPercentage == othersc.getPenalty() && _parentBonusPercentage == othersc.getParentBonus() && _indirectReferencePercentage == othersc.getIndirectReferencePenalty())
53 {
54 return true;
55 }
56 return false;
57 }
58
59 public double getParentLimit()
60 {
61 return _parentLimitPercentage;
62 }
63}
Note: See TracBrowser for help on using the repository browser.