Revision 21018
trunk/libraries/libMetadata/src/org/gvsig/metadata/extended/manager/MDElement.java | ||
---|---|---|
1 |
package org.gvsig.metadata.extended.manager; |
|
2 |
|
|
3 |
import java.util.Locale; |
|
4 |
|
|
5 |
import org.gvsig.metadata.extended.registry.objects.MDElementDefinition; |
|
6 |
|
|
7 |
|
|
8 |
public class MDElement { |
|
9 |
|
|
10 |
private String id; |
|
11 |
private Object value; |
|
12 |
private MDElementDefinition type; |
|
13 |
private Locale locale; |
|
14 |
|
|
15 |
public MDElement() {} |
|
16 |
|
|
17 |
public MDElement(String id, Object value, MDElementDefinition type, Locale locale) { |
|
18 |
this.id = id; |
|
19 |
this.value = value; |
|
20 |
this.type = type; |
|
21 |
this.locale = locale; |
|
22 |
} |
|
23 |
|
|
24 |
public String getId() { |
|
25 |
return this.id; |
|
26 |
} |
|
27 |
|
|
28 |
public Object getValue() { |
|
29 |
return this.value; |
|
30 |
} |
|
31 |
|
|
32 |
public MDElementDefinition getType() { |
|
33 |
return this.type; |
|
34 |
} |
|
35 |
|
|
36 |
public Locale getLocale() { |
|
37 |
return this.locale; |
|
38 |
} |
|
39 |
|
|
40 |
public void setId(String id) { |
|
41 |
this.id = id; |
|
42 |
} |
|
43 |
|
|
44 |
public void setValue(Object value) { |
|
45 |
this.value = value; |
|
46 |
} |
|
47 |
|
|
48 |
public void setType(MDElementDefinition type) { |
|
49 |
this.type = type; |
|
50 |
} |
|
51 |
|
|
52 |
public void setLocale(Locale locale) { |
|
53 |
this.locale = locale; |
|
54 |
} |
|
55 |
} |
trunk/libraries/libMetadata/src/org/gvsig/metadata/extended/manager/MDElementImpl.java | ||
---|---|---|
1 |
package org.gvsig.metadata.extended.manager; |
|
2 |
|
|
3 |
import java.util.Locale; |
|
4 |
|
|
5 |
import org.gvsig.metadata.extended.registry.objects.MDElementDefinition; |
|
6 |
|
|
7 |
|
|
8 |
public class MDElementImpl { |
|
9 |
|
|
10 |
private String id; |
|
11 |
private Object value; |
|
12 |
private MDElementDefinition type; |
|
13 |
private Locale locale; |
|
14 |
|
|
15 |
public MDElementImpl() {} |
|
16 |
|
|
17 |
public MDElementImpl(String id, Object value, MDElementDefinition type, Locale locale) { |
|
18 |
this.id = id; |
|
19 |
this.value = value; |
|
20 |
this.type = type; |
|
21 |
this.locale = locale; |
|
22 |
} |
|
23 |
|
|
24 |
public String getId() { |
|
25 |
return this.id; |
|
26 |
} |
|
27 |
|
|
28 |
public Object getValue() { |
|
29 |
return this.value; |
|
30 |
} |
|
31 |
|
|
32 |
public MDElementDefinition getType() { |
|
33 |
return this.type; |
|
34 |
} |
|
35 |
|
|
36 |
public Locale getLocale() { |
|
37 |
return this.locale; |
|
38 |
} |
|
39 |
|
|
40 |
public void setId(String id) { |
|
41 |
this.id = id; |
|
42 |
} |
|
43 |
|
|
44 |
public void setValue(Object value) { |
|
45 |
this.value = value; |
|
46 |
} |
|
47 |
|
|
48 |
public void setType(MDElementDefinition type) { |
|
49 |
this.type = type; |
|
50 |
} |
|
51 |
|
|
52 |
public void setLocale(Locale locale) { |
|
53 |
this.locale = locale; |
|
54 |
} |
|
55 |
} |
trunk/libraries/libMetadata/src/org/gvsig/metadata/extended/manager/ExtendedMDManagerImpl.java | ||
---|---|---|
22 | 22 |
return null; |
23 | 23 |
} |
24 | 24 |
|
25 |
public MDElement createMDElement(String mded) { |
|
25 |
public MDElementImpl createMDElement(String mded) {
|
|
26 | 26 |
// TODO Auto-generated method stub |
27 | 27 |
return null; |
28 | 28 |
} |
trunk/libraries/libMetadata/src/org/gvsig/metadata/extended/manager/ExtendedMetadataImpl.java | ||
---|---|---|
28 | 28 |
this.type = type; |
29 | 29 |
} |
30 | 30 |
|
31 |
public MDElement getElement(String idElem) { |
|
32 |
return (MDElement) elements.get(idElem); |
|
31 |
public MDElementImpl getElement(String idElem) {
|
|
32 |
return (MDElementImpl) elements.get(idElem);
|
|
33 | 33 |
} |
34 | 34 |
|
35 |
public void setElement(MDElement elem) { |
|
35 |
public void setElement(MDElementImpl elem) {
|
|
36 | 36 |
String idElem = elem.getId(); |
37 | 37 |
elements.put(idElem, elem); |
38 | 38 |
} |
Also available in: Unified diff