Statistics
| Revision:

root / org.gvsig.proj / branches / refactor2018 / org.gvsig.proj / org.gvsig.proj.swing / org.gvsig.proj.swing.impl / src / main / java / org / gvsig / proj / swing / impl / tree / CRSSearchFilter.java @ 852

History | View | Annotate | Download (2.76 KB)

1
package org.gvsig.proj.swing.impl.tree;
2

    
3
import org.gvsig.proj.catalog.CRSType;
4
import org.gvsig.proj.catalog.extent.GeographicBoundingBox;
5

    
6
public class CRSSearchFilter {
7
        private String textFilter = null;
8
        private GeographicBoundingBox boundingBox = null;
9
        private CRSType[] includeTypes = null;
10
        private CRSType[] excludeTypes = null;
11
        private String authority = null;
12

    
13
        public CRSSearchFilter() {
14

    
15
        }
16
        
17
        /**
18
         * Adds a text filter for the search. The CRSs will be included
19
         * in the search results if they include the {@code searchString}
20
         * in the name, description or identifier.
21
         * 
22
         * Calling this method replaces any previous text filter.
23
         * 
24
         * @param searchString
25
         */
26
        public void setTextFilter(String searchString) {
27
                this.textFilter = searchString;
28
        }
29
        
30
        /**
31
         * Gets the text filter for the search. The CRSs will be included
32
         * in the search results if they include this text
33
         * in the name, description or identifier.
34
         */
35
        public String getTextFilter() {
36
                return textFilter;
37
        }
38

    
39
        /**
40
         * Adds a spatial filter. The CRSs will be included in the search
41
         * if their validity area contains the provided bounding box.
42
         * 
43
         * Calling this method replaces any previous spatial filter.
44
         * @param boundingBox
45
         */
46
        public void setSpatialFilter(GeographicBoundingBox boundingBox) {
47
                this.boundingBox = boundingBox;
48
        }
49
        
50
        /**
51
         * Gets the spatial filter. The CRSs will be included in the search
52
         * if their validity area contains this bounding box.
53
         */
54
        public GeographicBoundingBox getSpatialFilter() {
55
                return this.boundingBox;
56
        }
57
        
58
        /**
59
         * Defines the {@link CRSType}s to include in the search.
60
         * 
61
         * Calling this method resets any previous inclusion or inclusion
62
         * filter.
63
         * 
64
         * @param includeTypes The types to be included. An empty list or null
65
         * means that all the types can be included in the search results.
66
         * @see #setExcludedTypes(CRSType[])
67
         */
68
        public void setIncludedTypes(CRSType[] includeTypes) {
69
                this.excludeTypes = null;
70
                this.includeTypes = includeTypes;
71
        }
72
        
73
        /**
74
         * Gets the {@link CRSType}s to include in the search.
75
         */
76
        public CRSType[] getIncludedTypes() {
77
                return this.includeTypes;
78
        }
79
        
80
        /**
81
         * Defines the {@link CRSType}s to exclude from the search.
82
         * 
83
         * Calling this method resets any previous inclusion or exclusion filter.
84
         * 
85
         * @param excludeTypes The types to be excluded. An empty list or null
86
         * means that no type is excluded.
87
         */
88
        public void setExcludedTypes(CRSType[] excludeTypes) {
89
                this.includeTypes = null;
90
                this.excludeTypes = excludeTypes;
91
        }
92
        
93

    
94
        /**
95
         * Gets the {@link CRSType}s to exclude from the search.
96
         */
97
        public CRSType[] getExcludedTypes() {
98
                return this.excludeTypes;
99
        }
100

    
101
        public String getAuthority() {
102
                return authority;
103
        }
104

    
105
        public void setAuthority(String authority) {
106
                this.authority = authority;
107
        }
108
        
109

    
110
}