svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.swing / org.gvsig.fmap.dal.swing.impl / src / main / java / org / gvsig / fmap / dal / swing / impl / visualdbmodeler / TableDescriptorImpl.java @ 46986
History | View | Annotate | Download (1.4 KB)
1 |
/*
|
---|---|
2 |
* To change this license header, choose License Headers in Project Properties.
|
3 |
* To change this template file, choose Tools | Templates
|
4 |
* and open the template in the editor.
|
5 |
*/
|
6 |
package org.gvsig.fmap.dal.swing.impl.visualdbmodeler; |
7 |
|
8 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
9 |
import org.gvsig.fmap.dal.feature.FeatureType; |
10 |
|
11 |
/**
|
12 |
*
|
13 |
* @author jjdelcerro
|
14 |
*/
|
15 |
public class TableDescriptorImpl implements TableDescriptor { |
16 |
|
17 |
private final String repositoryId; |
18 |
private final String name; |
19 |
private EditableFeatureType type;
|
20 |
|
21 |
public TableDescriptorImpl(String repositoryId, String name, FeatureType type) { |
22 |
this.name = name;
|
23 |
this.repositoryId = repositoryId;
|
24 |
if( type instanceof EditableFeatureType ) { |
25 |
this.type = (EditableFeatureType) type;
|
26 |
} else {
|
27 |
this.type = type.getEditable();
|
28 |
|
29 |
} |
30 |
} |
31 |
|
32 |
@Override
|
33 |
public String getName() { |
34 |
return this.name; |
35 |
} |
36 |
|
37 |
@Override
|
38 |
public String getRepositoryId() { |
39 |
return this.repositoryId; |
40 |
} |
41 |
|
42 |
@Override
|
43 |
public EditableFeatureType getFeatureType() {
|
44 |
return this.type; |
45 |
} |
46 |
|
47 |
@Override
|
48 |
public String toString() { |
49 |
return this.name; |
50 |
} |
51 |
|
52 |
@Override
|
53 |
public String getLabel() { |
54 |
return this.name; |
55 |
} |
56 |
|
57 |
@Override
|
58 |
public TableDescriptor getValue() {
|
59 |
return this; |
60 |
} |
61 |
|
62 |
|
63 |
} |
64 |
|