]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - gis/plugins/org.argeo.gis.ui/src/main/java/org/argeo/gis/ui/data/DataStoreNode.java
1 package org
.argeo
.gis
.ui
.data
;
3 import java
.io
.IOException
;
5 import org
.argeo
.ArgeoException
;
6 import org
.argeo
.eclipse
.ui
.TreeParent
;
7 import org
.geotools
.data
.DataStore
;
8 import org
.opengis
.feature
.type
.Name
;
10 public class DataStoreNode
extends TreeParent
{
11 private DataStore dataStore
;
13 public DataStoreNode(DataStore dataStore
) {
14 super(dataStore
.getInfo().getTitle() != null ? dataStore
.getInfo()
15 .getTitle() : dataStore
.toString());
16 this.dataStore
= dataStore
;
18 for (Name name
: dataStore
.getNames()) {
19 addChild(new FeatureNode(dataStore
, name
));
21 } catch (IOException e
) {
22 throw new ArgeoException("Cannot scan data store", e
);
26 public DataStore
getDataStore() {