svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / main / java / org / gvsig / fmap / dal / DataParameterDescriptor.java @ 44058
History | View | Annotate | Download (2.77 KB)
1 | 40559 | jjdelcerro | /**
|
---|---|---|---|
2 | * gvSIG. Desktop Geographic Information System.
|
||
3 | *
|
||
4 | * Copyright (C) 2007-2013 gvSIG Association.
|
||
5 | *
|
||
6 | * This program is free software; you can redistribute it and/or
|
||
7 | * modify it under the terms of the GNU General Public License
|
||
8 | * as published by the Free Software Foundation; either version 3
|
||
9 | * of the License, or (at your option) any later version.
|
||
10 | *
|
||
11 | * This program is distributed in the hope that it will be useful,
|
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | *
|
||
16 | * You should have received a copy of the GNU General Public License
|
||
17 | * along with this program; if not, write to the Free Software
|
||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
19 | * MA 02110-1301, USA.
|
||
20 | *
|
||
21 | * For any additional information, do not hesitate to contact us
|
||
22 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
23 | */
|
||
24 | 40435 | jjdelcerro | package org.gvsig.fmap.dal; |
25 | |||
26 | /**
|
||
27 | * This interface describes the properties of a parameter. It is useful
|
||
28 | * for any component that needs to know how to edit or visualize it.
|
||
29 | *
|
||
30 | */
|
||
31 | public interface DataParameterDescriptor { |
||
32 | |||
33 | /** Accepts a single value */
|
||
34 | public static final int SINGLE = 1; |
||
35 | /** Accepts a single value from a value set */
|
||
36 | public static final int CHOICE = 2; |
||
37 | /** Accepts a range of values defined with a minimum and a maximum value */
|
||
38 | public static final int RANGE = 3; |
||
39 | |||
40 | /**
|
||
41 | * Returns the parameter's name
|
||
42 | *
|
||
43 | * @return String containing the parameter's name
|
||
44 | */
|
||
45 | public String getName(); |
||
46 | |||
47 | /**
|
||
48 | * Returns the parameter's description
|
||
49 | *
|
||
50 | * @return String containing the parameter's description.
|
||
51 | */
|
||
52 | public String getDescription(); |
||
53 | |||
54 | /**
|
||
55 | * Returns the parameter's data type.
|
||
56 | *
|
||
57 | * @return parameter's data type.
|
||
58 | *
|
||
59 | * @see DataTypes
|
||
60 | */
|
||
61 | public int getDataType(); |
||
62 | |||
63 | /**
|
||
64 | * Returns the parameter's default value.
|
||
65 | *
|
||
66 | * @return an Object containing the default value. Use the data type to cast.
|
||
67 | */
|
||
68 | public Object getDefaultValue(); |
||
69 | |||
70 | /**
|
||
71 | * Returns one of the available values type.
|
||
72 | *
|
||
73 | * @return an <code>int</code> with one of the available values type.
|
||
74 | *
|
||
75 | * @see #SINGLE
|
||
76 | * @see #CHOICE
|
||
77 | * @see #RANGE
|
||
78 | */
|
||
79 | public int getAvailableValuesType(); |
||
80 | |||
81 | /**
|
||
82 | * Returns an array containing the available values accepted by the parameter.
|
||
83 | *
|
||
84 | * @return array of Object containing the available values accepted by the parameter. Use the data type to cast.
|
||
85 | */
|
||
86 | public Object[] getAvailableValues(); |
||
87 | |||
88 | /**
|
||
89 | * Returns the minimum value when the parameter accepts a range of values.
|
||
90 | *
|
||
91 | * @return range's minimum value
|
||
92 | */
|
||
93 | public Object getMinValue(); |
||
94 | |||
95 | /**
|
||
96 | * Returns the maximum value when the parameter accepts a range of values.
|
||
97 | *
|
||
98 | * @return range's maximum value.
|
||
99 | */
|
||
100 | public Object getMaxValue(); |
||
101 | } |