View Javadoc

1   // Copyright 2006-2007, by the California Institute of Technology.
2   // ALL RIGHTS RESERVED. United States Government Sponsorship acknowledged.
3   // Any commercial use must be negotiated with the Office of Technology Transfer
4   // at the California Institute of Technology.
5   //
6   // This software is subject to U. S. export control laws and regulations
7   // (22 C.F.R. 120-130 and 15 C.F.R. 730-774). To the extent that the software
8   // is subject to U.S. export control laws and regulations, the recipient has
9   // the responsibility to obtain export licenses or other export authority as
10  // may be required before exporting such information to foreign countries or
11  // providing access to foreign nationals.
12  //
13  
14  package gov.nasa.pds.tools.logging;
15  
16  public class MessageRecord {
17  	private int timesSeen;
18  	private String message;
19  	private String file;
20  	private int line;
21  	
22  	public MessageRecord() {
23  		timesSeen = 0;
24  		message = null;
25  		file = null;
26  		line = 0;
27  	}
28  	
29  	public void setMessage(String message) {
30  		this.message = message;
31  	}
32  	
33  	public String getMessage() {
34  		return message;
35  	}
36  	
37  	public void seen() {
38  		timesSeen++;
39  	}
40  	
41  	public int getTimesSeen() {
42  		return timesSeen;
43  	}
44  	
45  	public void setFile(String file) {
46  		this.file = file;
47  	}
48  	
49  	public String getFile() {
50  		return file;
51  	}
52  	
53  	public void setLine(int line) {
54  		this.line = line;
55  	}
56  	
57  	public int getLine() {
58  		return line;
59  	}
60  	
61  	public boolean hasLine() {
62  		return (line == -1) ? false : true;
63  	}
64  	
65  	public boolean hasFile() {
66  		return (file == null) ? false : true;
67  	}
68  }