svn-gvsig-desktop / trunk / libraries / libMetadata / src / org / gvsig / metadata / Metadata.java @ 21075
History | View | Annotate | Download (5.31 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
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 2
|
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 |
*/
|
22 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2008 Geographic Information research group: http://www.geoinfo.uji.es
|
26 |
* Departamento de Lenguajes y Sistemas Inform?ticos (LSI)
|
27 |
* Universitat Jaume I
|
28 |
* {{Task}}
|
29 |
*/
|
30 |
|
31 |
package org.gvsig.metadata; |
32 |
|
33 |
import java.util.Date; |
34 |
|
35 |
public interface Metadata { |
36 |
|
37 |
/**
|
38 |
* Retrieves an object from the Metadata Object
|
39 |
* @param name the name which identifies the object to return
|
40 |
* @return the object referenced by 'name' in the Metadata Object
|
41 |
*/
|
42 |
public Object get(String name); |
43 |
|
44 |
/**
|
45 |
* Retrieves a boolean value from the Metadata Object
|
46 |
* @param name the name which identifies the value to return
|
47 |
* @throws ClassCastException thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance
|
48 |
* @return the boolean value referenced by 'name' in the Metadata Object
|
49 |
*/
|
50 |
public boolean getBoolean(String name) throws ClassCastException; |
51 |
|
52 |
/**
|
53 |
* Retrieves a double value from the Metadata Object
|
54 |
* @param name the name which identifies the value to return
|
55 |
* @throws ClassCastException thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance
|
56 |
* @return the double value referenced by 'name' in the Metadata Object
|
57 |
*/
|
58 |
public double getDouble(String name) throws ClassCastException; |
59 |
|
60 |
/**
|
61 |
* Retrieves an integer value from the Metadata Object
|
62 |
* @param name the name which identifies the value to return
|
63 |
* @throws ClassCastException thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance
|
64 |
* @return the integer value referenced by 'name' in the Metadata Object
|
65 |
*/
|
66 |
public int getInt(String name) throws ClassCastException; |
67 |
|
68 |
/**
|
69 |
* Retrieves a String from the Metadata Object
|
70 |
* @param name the name which identifies the object to return
|
71 |
* @throws ClassCastException thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance
|
72 |
* @return the String object referenced by 'name' in the Metadata Object
|
73 |
*/
|
74 |
public String getString(String name) throws ClassCastException; |
75 |
|
76 |
/**
|
77 |
* Retrieves a Date object from the Metadata Object
|
78 |
* @param name the name which identifies the value to return
|
79 |
* @throws ClassCastException thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance
|
80 |
* @return the Date object referenced by 'name' in the Metadata Object
|
81 |
*/
|
82 |
public Date getDate(String name) throws ClassCastException; |
83 |
|
84 |
/**
|
85 |
* Puts an object in the Metadata Object
|
86 |
* @param name the name which identifies the object to put in the Metadata Object
|
87 |
* @param value the object to put in the Object
|
88 |
* @throws ClassCastException thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance
|
89 |
*/
|
90 |
public void set(String name, Object value); |
91 |
|
92 |
/**
|
93 |
* Puts a boolean value in the Metadata Object
|
94 |
* @param name the name which identifies the value to put in the Metadata Object
|
95 |
* @param value the value to put in the Object
|
96 |
*/
|
97 |
public void setBoolean(String name, boolean value); |
98 |
|
99 |
/**
|
100 |
* Puts a double value in the Metadata Object
|
101 |
* @param name the name which identifies the value to put in the Metadata Object
|
102 |
* @param value the value to put in the Object
|
103 |
*/
|
104 |
public void setDouble(String name, double value); |
105 |
|
106 |
/**
|
107 |
* Puts an integer value in the Metadata Object
|
108 |
* @param name the name which identifies the value to put in the Metadata Object
|
109 |
* @param value the value to put in the Object
|
110 |
*/
|
111 |
public void setInt(String name, int value); |
112 |
|
113 |
/**
|
114 |
* Puts a String in the Metadata Object
|
115 |
* @param name the name which identifies the value to put in the Metadata Object
|
116 |
* @param value the value to put in the Object
|
117 |
*/
|
118 |
public void setString(String name, String value); |
119 |
|
120 |
/**
|
121 |
* Puts a Date object in the Metadata Object
|
122 |
* @param name the name which identifies the value to put in the Metadata Object
|
123 |
* @param value the value to put in the Object
|
124 |
*/
|
125 |
public void setDate(String name, Date value); |
126 |
|
127 |
/**
|
128 |
* Checks if the Metadata Object has a specific value
|
129 |
* @param name the name which identifies the value to check
|
130 |
* @return a boolean value which indicates if there is a value in the Object referenced by 'name'
|
131 |
*/
|
132 |
public boolean hasValue(String name); |
133 |
|
134 |
/**
|
135 |
* Checks if the Metadata Object is empty
|
136 |
* @return a boolean value which indicates if the Object has any value
|
137 |
*/
|
138 |
public boolean isEmpty(); |
139 |
} |