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  // $Id: MessageRecord.java 3461 2008-08-07 17:43:26Z pramirez $
14  
15  package gov.nasa.pds.tools.logging;
16  
17  public class MessageRecord {
18  	private int timesSeen;
19  	private String message;
20  	private String file;
21  	private int line;
22  	
23  	public MessageRecord() {
24  		timesSeen = 0;
25  		message = null;
26  		file = null;
27  		line = 0;
28  	}
29  	
30  	public void setMessage(String message) {
31  		this.message = message;
32  	}
33  	
34  	public String getMessage() {
35  		return message;
36  	}
37  	
38  	public void seen() {
39  		timesSeen++;
40  	}
41  	
42  	public int getTimesSeen() {
43  		return timesSeen;
44  	}
45  	
46  	public void setFile(String file) {
47  		this.file = file;
48  	}
49  	
50  	public String getFile() {
51  		return file;
52  	}
53  	
54  	public void setLine(int line) {
55  		this.line = line;
56  	}
57  	
58  	public int getLine() {
59  		return line;
60  	}
61  	
62  	public boolean hasLine() {
63  		return (line == -1) ? false : true;
64  	}
65  	
66  	public boolean hasFile() {
67  		return (file == null) ? false : true;
68  	}
69  }