PageRenderTime 22ms CodeModel.GetById 13ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/webportal/src/main/java/org/ala/spatial/util/Layer.java

http://alageospatialportal.googlecode.com/
Java | 86 lines | 36 code | 17 blank | 33 comment | 0 complexity | dc10e985e4b5423ea95a48e442444833 MD5 | raw file
 1package org.ala.spatial.util;
 2
 3/**
 4 * Data structure to house database Layer attributes.
 5 * 
 6 * Suitable as a reference to a database table as well as
 7 * an environmental data file (e.g. WorldClim grid files)
 8 * 
 9 * @author Adam Collins
10 */
11public class Layer extends java.lang.Object {
12	
13	/**
14	 * table for file name
15	 */
16	public String name;
17	
18	/**
19	 * short text for UI
20	 */
21	public String display_name;
22	
23	public String getName() {
24		return name;
25	}
26
27	public String getDisplay_name() {
28		return display_name;
29	}
30
31	public String getDescription() {
32		return description;
33	}
34
35	public String getType() {
36		return type;
37	}
38
39	public Field[] getFields() {
40		return fields;
41	}
42
43	/**
44	 * detailed description for UI
45	 */
46	public String description;
47	
48	/**
49	 * catagory of 'contextual' or 'environmental'
50	 */
51	public String type; 
52	
53	/**
54	 * associated table fields
55	 */
56	public Field [] fields;
57	
58	/**
59	 * Constructor for this data structure
60	 * @param _name table or file name as String
61	 * @param _display_name text as String for UI, keep it short
62	 * @param _description more detailed text for UI as String
63	 * @param _type one of 'contextual' or 'environmental' as String
64	 *        not enforced here.
65	 * @param _fields array of accessible table fields as Field []
66	 * @see Field
67	 */
68	public Layer(String _name, String _display_name, String _description, 
69			String _type, Field[] _fields){
70		name = _name;
71		display_name = _display_name;
72		description = _description;
73		type = _type;
74		fields = _fields;
75	}
76
77    @Override
78    public boolean equals(Object obj) {
79        Layer that = (Layer) obj;
80
81        return (this.display_name.equals(that.display_name));
82    }
83
84
85
86}