Revision 33188
branches/v2_0_0_prep/extensions/extDwg/src-test/org/gvsig/dwg/fmap/dal/store/dwg/TestDWG.java | ||
---|---|---|
41 | 41 |
public static File file_prueba = new File(TestDWG.class.getResource( |
42 | 42 |
"data/V2000.dwg").getFile()); |
43 | 43 |
|
44 |
@Override |
|
45 |
protected void doSetUp() throws Exception { |
|
46 |
// Do nothing |
|
47 |
} |
|
48 |
|
|
49 | 44 |
/* |
50 | 45 |
* (non-Javadoc) |
51 | 46 |
* |
... | ... | |
60 | 55 |
dwgParameters = (DWGStoreParameters) dataManager |
61 | 56 |
.createStoreParameters(DWGStoreProvider.NAME); |
62 | 57 |
|
63 |
dwgParameters.setFileName(file_prueba.getAbsolutePath());
|
|
64 |
dwgParameters.setSRSID("EPSG:23030");
|
|
58 |
dwgParameters.setFile(file_prueba);
|
|
59 |
dwgParameters.setCRS("EPSG:23030");
|
|
65 | 60 |
return dwgParameters; |
66 | 61 |
} |
67 | 62 |
|
... | ... | |
81 | 76 |
|
82 | 77 |
|
83 | 78 |
public void testLegendAndLabeling() throws Exception { |
84 |
FeatureStore store = (FeatureStore) dataManager |
|
85 |
.createStore(getDefaultDataStoreParameters()); |
|
79 |
DataStoreParameters params = getDefaultDataStoreParameters(); |
|
80 |
FeatureStore store = (FeatureStore) dataManager.openStore(params |
|
81 |
.getDataStoreName(), params); |
|
86 | 82 |
|
87 | 83 |
assertNotNull(store.invokeDynMethod("getLegend", null)); |
88 | 84 |
assertNotNull(store.invokeDynMethod("getLabeling", null)); |
branches/v2_0_0_prep/extensions/extDwg/src/org/gvsig/dwg/DWGRegisterExtension.java | ||
---|---|---|
1 |
/**
|
|
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
|
2 | 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 |
* |
|
3 | 21 |
*/ |
4 | 22 |
package org.gvsig.dwg; |
5 | 23 |
|
6 | 24 |
import org.gvsig.andami.plugins.Extension; |
25 |
import org.gvsig.dwg.fmap.dal.store.dwg.DWGLibrary; |
|
7 | 26 |
|
8 |
|
|
9 | 27 |
/** |
10 |
* @author paco |
|
11 |
* |
|
28 |
* Dummy DWG extension, as all the registration happens in the |
|
29 |
* {@link DWGLibrary}. |
|
30 |
* |
|
31 |
* @author gvSIG Team |
|
12 | 32 |
*/ |
13 | 33 |
public class DWGRegisterExtension extends Extension { |
14 |
// private DWGLibrary dwg; |
|
15 |
// private DWGLegendLibrary dwgLegend; |
|
16 | 34 |
|
17 |
/* (non-Javadoc) |
|
18 |
* @see com.iver.andami.plugins.IExtension#execute(java.lang.String) |
|
19 |
*/ |
|
20 | 35 |
public void execute(String actionCommand) { |
21 |
// TODO Auto-generated method stub |
|
22 |
|
|
36 |
// Nothing to do |
|
23 | 37 |
} |
24 | 38 |
|
25 |
/* (non-Javadoc) |
|
26 |
* @see com.iver.andami.plugins.IExtension#initialize() |
|
27 |
*/ |
|
28 | 39 |
public void initialize() { |
29 |
// dwg = new DWGLibrary(); |
|
30 |
// dwg.initialize(); |
|
31 |
// |
|
32 |
// dwgLegend = new DWGLegendLibrary(); |
|
33 |
// dwgLegend.initialize(); |
|
40 |
// Nothing to do |
|
34 | 41 |
} |
35 | 42 |
|
36 |
|
|
37 | 43 |
public void postInitialize() { |
38 | 44 |
super.postInitialize(); |
39 |
|
|
40 |
// dwg.postInitialize(); |
|
41 |
// |
|
42 |
// dwgLegend.postInitialize(); |
|
45 |
// Nothing to do |
|
43 | 46 |
} |
44 | 47 |
|
45 |
|
|
46 |
/* (non-Javadoc) |
|
47 |
* @see com.iver.andami.plugins.IExtension#isEnabled() |
|
48 |
*/ |
|
49 | 48 |
public boolean isEnabled() { |
50 |
// TODO Auto-generated method stub
|
|
49 |
// Nothing to do
|
|
51 | 50 |
return false; |
52 | 51 |
} |
53 | 52 |
|
54 |
/* (non-Javadoc) |
|
55 |
* @see com.iver.andami.plugins.IExtension#isVisible() |
|
56 |
*/ |
|
57 | 53 |
public boolean isVisible() { |
58 |
// TODO Auto-generated method stub
|
|
54 |
// Nothing to do
|
|
59 | 55 |
return false; |
60 | 56 |
} |
61 | 57 |
|
62 |
|
|
63 | 58 |
} |
branches/v2_0_0_prep/extensions/extDwg/src/org/gvsig/dwg/fmap/dal/store/dwg/DWGFilesystemServerProvider.java | ||
---|---|---|
54 | 54 |
// TODO comporbar si el ftype es correcto (para este formato es fijo) |
55 | 55 |
File file = new File(dwgParams.getFileName()); |
56 | 56 |
|
57 |
if (dwgParams.getSRSID() == null) {
|
|
57 |
if (dwgParams.getCRS() == null) {
|
|
58 | 58 |
return false; |
59 | 59 |
} |
60 | 60 |
// TODO comprobamos extension del fichero ?? |
branches/v2_0_0_prep/extensions/extDwg/src/org/gvsig/dwg/fmap/dal/store/dwg/DWGStoreProvider.java | ||
---|---|---|
21 | 21 |
import org.gvsig.fmap.dal.DataServerExplorer; |
22 | 22 |
import org.gvsig.fmap.dal.DataStoreNotification; |
23 | 23 |
import org.gvsig.fmap.dal.DataTypes; |
24 |
import org.gvsig.fmap.dal.FileHelper; |
|
24 | 25 |
import org.gvsig.fmap.dal.exception.DataException; |
25 | 26 |
import org.gvsig.fmap.dal.exception.InitializeException; |
26 | 27 |
import org.gvsig.fmap.dal.exception.OpenException; |
... | ... | |
28 | 29 |
import org.gvsig.fmap.dal.exception.ValidateDataParametersException; |
29 | 30 |
import org.gvsig.fmap.dal.feature.EditableFeatureAttributeDescriptor; |
30 | 31 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
31 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
32 | 32 |
import org.gvsig.fmap.dal.feature.FeatureType; |
33 | 33 |
import org.gvsig.fmap.dal.feature.exception.CreateGeometryException; |
34 | 34 |
import org.gvsig.fmap.dal.feature.exception.PerformEditingException; |
... | ... | |
50 | 50 |
import org.gvsig.fmap.geom.exception.CreateEnvelopeException; |
51 | 51 |
import org.gvsig.fmap.geom.primitive.Envelope; |
52 | 52 |
import org.gvsig.fmap.geom.primitive.Point; |
53 |
import org.gvsig.metadata.MetadataLocator; |
|
54 |
import org.gvsig.metadata.MetadataManager; |
|
55 |
import org.gvsig.metadata.exceptions.MetadataException; |
|
56 |
import org.gvsig.tools.ToolsLocator; |
|
57 |
import org.gvsig.tools.dynobject.DynClass; |
|
58 |
import org.gvsig.tools.dynobject.DynStruct; |
|
59 | 53 |
import org.gvsig.tools.dynobject.exception.DynMethodException; |
60 | 54 |
import org.gvsig.tools.exception.NotYetImplemented; |
61 | 55 |
import org.gvsig.tools.persistence.PersistentState; |
... | ... | |
69 | 63 |
|
70 | 64 |
public static final String NAME = "DWG"; |
71 | 65 |
public static final String DESCRIPTION = "DWG file"; |
72 |
public static final String METADATA_DEFINITION_NAME = "DWGStore"; |
|
73 |
protected static DynClass DYNCLASS = null; |
|
66 |
public static final String METADATA_DEFINITION_NAME = NAME; |
|
74 | 67 |
|
75 | 68 |
public static final String NAME_FIELD_ID = "ID"; |
76 | 69 |
public static final String NAME_FIELD_GEOMETRY = "Geometry"; |
... | ... | |
101 | 94 |
private long counterNewsOIDs = 0; |
102 | 95 |
protected GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
103 | 96 |
|
104 |
|
|
105 |
|
|
106 |
|
|
107 | 97 |
public DWGStoreProvider(DWGStoreParameters parameters, |
108 | 98 |
DataStoreProviderServices storeServices) throws InitializeException { |
109 |
super(parameters,storeServices,ToolsLocator |
|
110 |
.getDynObjectManager() |
|
111 |
.createDynObject(DYNCLASS)); |
|
99 |
super(parameters, storeServices, FileHelper |
|
100 |
.newMetadataContainer(METADATA_DEFINITION_NAME)); |
|
112 | 101 |
|
113 | 102 |
counterNewsOIDs = 0; |
114 | 103 |
// projection = CRSFactory.getCRS(getParameters().getSRSID()); |
... | ... | |
121 | 110 |
|
122 | 111 |
resource.addConsumer(this); |
123 | 112 |
|
124 |
this.projection = this.getDWGParameters().getSRS();
|
|
113 |
this.projection = this.getDWGParameters().getCRS();
|
|
125 | 114 |
|
126 | 115 |
|
127 | 116 |
try { |
... | ... | |
134 | 123 |
} |
135 | 124 |
|
136 | 125 |
this.initializeFeatureTypes(); |
137 |
|
|
138 |
|
|
139 | 126 |
} |
140 | 127 |
|
141 | 128 |
private DWGStoreParameters getDWGParameters() { |
... | ... | |
673 | 660 |
resource); |
674 | 661 |
} |
675 | 662 |
|
676 |
protected static void registerMetadataDefinition() throws MetadataException { |
|
677 |
MetadataManager manager = MetadataLocator.getMetadataManager(); |
|
678 |
if (manager.getDefinition(METADATA_DEFINITION_NAME) == null) { |
|
679 |
DynStruct metadataDefinition = manager.addDefinition( |
|
680 |
METADATA_DEFINITION_NAME, null); |
|
681 |
metadataDefinition.extend(manager |
|
682 |
.getDefinition(FeatureStore.METADATA_DEFINITION_NAME)); |
|
683 |
} |
|
684 |
} |
|
685 |
|
|
686 | 663 |
public Object getSourceId() { |
687 | 664 |
return this.getDWGParameters().getFile(); |
688 | 665 |
} |
branches/v2_0_0_prep/extensions/extDwg/src/org/gvsig/dwg/fmap/dal/store/dwg/legend/DWGLegendLibrary.java | ||
---|---|---|
30 | 30 |
*/ |
31 | 31 |
package org.gvsig.dwg.fmap.dal.store.dwg.legend; |
32 | 32 |
|
33 |
import org.gvsig.dwg.fmap.dal.store.dwg.DWGLibrary; |
|
33 | 34 |
import org.gvsig.dwg.fmap.dal.store.dwg.DWGStoreProvider; |
34 | 35 |
import org.gvsig.metadata.MetadataLibrary; |
35 |
import org.gvsig.tools.ToolsLocator;
|
|
36 |
import org.gvsig.metadata.MetadataLocator;
|
|
36 | 37 |
import org.gvsig.tools.dynobject.DynClass; |
37 |
import org.gvsig.tools.dynobject.DynObjectManager; |
|
38 | 38 |
import org.gvsig.tools.library.AbstractLibrary; |
39 | 39 |
import org.gvsig.tools.library.Library; |
40 | 40 |
import org.gvsig.tools.library.LibraryException; |
... | ... | |
48 | 48 |
public DWGLegendLibrary() { |
49 | 49 |
super(DWGLegendLibrary.class, Library.TYPE.IMPL); |
50 | 50 |
require(MetadataLibrary.class); |
51 |
require(DWGLibrary.class); |
|
51 | 52 |
} |
52 | 53 |
|
53 | 54 |
@Override |
... | ... | |
56 | 57 |
|
57 | 58 |
@Override |
58 | 59 |
protected void doPostInitialize() throws LibraryException { |
59 |
DynObjectManager dynMan = ToolsLocator.getDynObjectManager();
|
|
60 |
DynClass dynClass = dynMan.get(DWGStoreProvider.METADATA_DEFINITION_NAME);
|
|
60 |
DynClass dynClass = (DynClass) MetadataLocator.getMetadataManager()
|
|
61 |
.getDefinition(DWGStoreProvider.METADATA_DEFINITION_NAME);
|
|
61 | 62 |
|
62 |
if (dynClass == null) { |
|
63 |
dynClass = dynMan.add(DWGStoreProvider.METADATA_DEFINITION_NAME); |
|
64 |
} |
|
65 |
|
|
66 | 63 |
DWGGetLegendBuilder.register(dynClass); |
67 | 64 |
DWGGetLegend.register(dynClass); |
68 | 65 |
DWGGetLabeling.register(dynClass); |
branches/v2_0_0_prep/extensions/extDwg/src/org/gvsig/dwg/fmap/dal/store/dwg/DWGStoreParameters.java | ||
---|---|---|
3 | 3 |
import java.io.File; |
4 | 4 |
|
5 | 5 |
import org.cresques.cts.IProjection; |
6 |
import org.gvsig.fmap.crs.CRSFactory; |
|
7 | 6 |
import org.gvsig.fmap.dal.DataStoreParameters; |
8 |
import org.gvsig.fmap.dal.DataTypes;
|
|
7 |
import org.gvsig.fmap.dal.FileHelper;
|
|
9 | 8 |
import org.gvsig.fmap.dal.feature.FeatureType; |
10 | 9 |
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters; |
11 | 10 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters; |
12 | 11 |
import org.gvsig.fmap.dal.spi.AbstractDataParameters; |
13 |
import org.gvsig.tools.ToolsLocator;
|
|
12 |
import org.gvsig.fmap.dal.spi.DataStoreProviderServices;
|
|
14 | 13 |
import org.gvsig.tools.dynobject.DelegatedDynObject; |
15 |
import org.gvsig.tools.dynobject.DynClass; |
|
16 |
import org.gvsig.tools.dynobject.DynStruct; |
|
17 |
import org.gvsig.tools.persistence.PersistenceManager; |
|
18 | 14 |
|
19 | 15 |
public class DWGStoreParameters extends AbstractDataParameters implements |
20 | 16 |
DataStoreParameters, FilesystemStoreParameters, |
21 | 17 |
NewFeatureStoreParameters { |
22 | 18 |
|
23 |
public static final String DYNCLASS_NAME = "DWGStoreParameters";
|
|
19 |
public static final String PARAMETERS_DEFINITION_NAME = "DWGStoreParameters";
|
|
24 | 20 |
|
25 |
private static final String FIELD_FILEPATH = "filepath";
|
|
26 |
private static final String FIELD_SRS = "srsid";
|
|
21 |
private static final String FIELD_FILE = "file";
|
|
22 |
private static final String FIELD_CRS = "CRS";
|
|
27 | 23 |
|
28 |
private static DynClass DYNCLASS = null;
|
|
24 |
private DelegatedDynObject parameters;
|
|
29 | 25 |
|
30 |
private DelegatedDynObject delegatedDynObject; |
|
26 |
public DWGStoreParameters() { |
|
27 |
this(PARAMETERS_DEFINITION_NAME); |
|
28 |
} |
|
31 | 29 |
|
32 |
public DWGStoreParameters() { |
|
33 |
this.delegatedDynObject = (DelegatedDynObject) ToolsLocator |
|
34 |
.getDynObjectManager() |
|
35 |
.createDynObject(DYNCLASS); |
|
30 |
protected DWGStoreParameters(String parametersDefinitionName) { |
|
31 |
this(parametersDefinitionName, DWGStoreProvider.NAME); |
|
36 | 32 |
} |
37 | 33 |
|
34 |
public DWGStoreParameters(String parametersDefinitionName, String name) { |
|
35 |
super(); |
|
36 |
this.parameters = (DelegatedDynObject) FileHelper |
|
37 |
.newParameters(parametersDefinitionName); |
|
38 |
this |
|
39 |
.setDynValue(DataStoreProviderServices.PROVIDER_PARAMTER_NAME, |
|
40 |
name); |
|
41 |
} |
|
42 |
|
|
38 | 43 |
protected DelegatedDynObject getDelegatedDynObject() { |
39 |
return delegatedDynObject;
|
|
44 |
return parameters;
|
|
40 | 45 |
} |
41 | 46 |
|
42 | 47 |
public String getDataStoreName() { |
43 |
return DWGStoreProvider.NAME; |
|
48 |
return (String) this |
|
49 |
.getDynValue(DataStoreProviderServices.PROVIDER_PARAMTER_NAME); |
|
44 | 50 |
} |
45 | 51 |
|
46 | 52 |
public String getDescription() { |
47 |
return DWGStoreProvider.DESCRIPTION;
|
|
53 |
return this.getDynClass().getDescription();
|
|
48 | 54 |
} |
49 | 55 |
|
50 |
public String getSRSID() { |
|
51 |
IProjection srs = (IProjection) getDynValue(FIELD_SRS); |
|
52 |
if (srs == null) { |
|
53 |
return null; |
|
54 |
} |
|
55 |
return srs.getAbrev(); |
|
56 |
public void setCRS(IProjection crs) { |
|
57 |
setDynValue(FIELD_CRS, crs); |
|
56 | 58 |
} |
57 | 59 |
|
58 |
public void setSRSID(String srsid) { |
|
59 |
if (srsid == null) { |
|
60 |
setDynValue(FIELD_SRS, null); |
|
61 |
} else { |
|
62 |
setDynValue(FIELD_SRS, CRSFactory.getCRS(srsid)); |
|
63 |
} |
|
60 |
public void setCRS(String crs) { |
|
61 |
setDynValue(FIELD_CRS, crs); |
|
64 | 62 |
} |
65 | 63 |
|
66 |
public void setSRS(IProjection srs) {
|
|
67 |
setDynValue(FIELD_SRS, srs);
|
|
64 |
public IProjection getCRS() {
|
|
65 |
return (IProjection) getDynValue(FIELD_CRS);
|
|
68 | 66 |
} |
69 | 67 |
|
70 |
public IProjection getSRS() { |
|
71 |
if (this.getSRSID() == null) { |
|
72 |
return null; |
|
73 |
} |
|
74 |
return (IProjection) getDynValue(FIELD_SRS); |
|
75 |
} |
|
76 |
|
|
77 | 68 |
public String getFileName() { |
78 |
return (String) getDynValue(FIELD_FILEPATH);
|
|
69 |
return this.getFile().getPath();
|
|
79 | 70 |
} |
80 | 71 |
|
81 | 72 |
public void setFileName(String file) { |
82 |
setDynValue(FIELD_FILEPATH, file);
|
|
73 |
setDynValue(FIELD_FILE, file); |
|
83 | 74 |
} |
84 | 75 |
|
85 | 76 |
public boolean isValid() { |
86 |
if (getSRSID() == null || getSRSID().equals("")) {
|
|
77 |
if (getCRS() == null) {
|
|
87 | 78 |
return false; |
88 | 79 |
} |
89 |
if (getFileName() == null) {
|
|
80 |
if (getFile() == null) { |
|
90 | 81 |
return false; |
91 | 82 |
} |
92 | 83 |
return true; |
93 | 84 |
} |
94 | 85 |
|
95 | 86 |
public File getFile() { |
96 |
return new File(this.getFileName());
|
|
87 |
return (File) this.getDynValue(FIELD_FILE);
|
|
97 | 88 |
} |
98 | 89 |
|
99 | 90 |
public void setFile(File file) { |
100 |
this.setFileName(file.getPath());
|
|
91 |
this.setDynValue(FIELD_FILE, file);
|
|
101 | 92 |
} |
102 | 93 |
|
103 | 94 |
public FeatureType getDefaultFeatureType() { |
... | ... | |
108 | 99 |
throw new UnsupportedOperationException(); |
109 | 100 |
} |
110 | 101 |
|
111 |
protected static void registerDynClass() { |
|
112 |
if (DYNCLASS == null) { |
|
113 |
PersistenceManager manager = ToolsLocator.getPersistenceManager(); |
|
114 |
DynStruct definition = manager.addDefinition( |
|
115 |
DWGStoreParameters.class, |
|
116 |
DYNCLASS_NAME, |
|
117 |
"DWGStoreParameters Persistence definition", |
|
118 |
null, |
|
119 |
null |
|
120 |
); |
|
121 |
|
|
122 |
definition.addDynFieldObject(FIELD_SRS) |
|
123 |
.setType(DataTypes.CRS) |
|
124 |
.setDescription("The SRS identifier") |
|
125 |
.setMandatory(true); |
|
126 |
|
|
127 |
definition.addDynFieldString(FIELD_FILEPATH) |
|
128 |
.setDescription("The DWG file path") |
|
129 |
.setMandatory(true); |
|
130 |
|
|
131 |
DYNCLASS = (DynClass) definition; |
|
132 |
} |
|
133 |
} |
|
134 |
|
|
135 |
|
|
136 | 102 |
} |
branches/v2_0_0_prep/extensions/extDwg/src/org/gvsig/dwg/fmap/dal/store/dwg/DWGLibrary.java | ||
---|---|---|
29 | 29 |
|
30 | 30 |
import org.gvsig.fmap.dal.DALFileLibrary; |
31 | 31 |
import org.gvsig.fmap.dal.DALFileLocator; |
32 |
import org.gvsig.fmap.dal.DALLibrary; |
|
32 | 33 |
import org.gvsig.fmap.dal.DALLocator; |
34 |
import org.gvsig.fmap.dal.FileHelper; |
|
33 | 35 |
import org.gvsig.fmap.dal.spi.DataManagerProviderServices; |
34 | 36 |
import org.gvsig.metadata.MetadataLibrary; |
35 | 37 |
import org.gvsig.metadata.exceptions.MetadataException; |
... | ... | |
45 | 47 |
|
46 | 48 |
public DWGLibrary() { |
47 | 49 |
super(DWGLibrary.class, Library.TYPE.IMPL); |
50 |
require(DALLibrary.class); |
|
51 |
require(DALFileLibrary.class); |
|
48 | 52 |
require(MetadataLibrary.class); |
49 | 53 |
} |
50 | 54 |
|
... | ... | |
54 | 58 |
|
55 | 59 |
@Override |
56 | 60 |
protected void doPostInitialize() throws LibraryException { |
57 |
new DALFileLibrary().postInitialize(); |
|
58 |
|
|
59 |
DWGStoreParameters.registerDynClass(); |
|
61 |
FileHelper.registerParametersDefinition( |
|
62 |
DWGStoreParameters.PARAMETERS_DEFINITION_NAME, |
|
63 |
DWGStoreParameters.class, |
|
64 |
"DWGParameters.xml" |
|
65 |
); |
|
60 | 66 |
try { |
61 |
DWGStoreProvider.registerMetadataDefinition(); |
|
67 |
FileHelper.registerMetadataDefinition( |
|
68 |
DWGStoreProvider.METADATA_DEFINITION_NAME, |
|
69 |
DWGStoreProvider.class, |
|
70 |
"DWGMetadata.xml" |
|
71 |
); |
|
62 | 72 |
} catch (MetadataException e) { |
63 |
throw new LibraryException(this.getClass(), e);
|
|
73 |
throw new LibraryException(getClass(), e); |
|
64 | 74 |
} |
65 | 75 |
|
66 |
|
|
67 | 76 |
DataManagerProviderServices dataman = (DataManagerProviderServices) DALLocator |
68 | 77 |
.getDataManager(); |
69 | 78 |
|
branches/v2_0_0_prep/extensions/extDwg/pom.xml | ||
---|---|---|
116 | 116 |
<build> |
117 | 117 |
<sourceDirectory>src</sourceDirectory> |
118 | 118 |
<testSourceDirectory>src-test</testSourceDirectory> |
119 |
<testResources> |
|
120 |
<testResource> |
|
121 |
<directory>src-test</directory> |
|
122 |
</testResource> |
|
123 |
</testResources> |
|
119 |
<testResources> |
|
120 |
<testResource> |
|
121 |
<directory>src-test</directory> |
|
122 |
</testResource> |
|
123 |
</testResources> |
|
124 |
<resources> |
|
125 |
<resource> |
|
126 |
<directory>resources</directory> |
|
127 |
</resource> |
|
128 |
</resources> |
|
124 | 129 |
</build> |
125 | 130 |
</project> |
branches/v2_0_0_prep/extensions/extDwg/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.dwg.fmap.dal.store.dwg.DWGLibrary |
|
2 |
org.gvsig.dwg.fmap.dal.store.dwg.legend.DWGLegendLibrary |
branches/v2_0_0_prep/extensions/extDwg/resources/org/gvsig/dwg/fmap/dal/store/dwg/DWGMetadata.xml | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
Definitions of metadata fields of a DWG file. |
|
4 |
--> |
|
5 |
<definitions> |
|
6 |
<version>1.0.0</version> |
|
7 |
<classes> |
|
8 |
|
|
9 |
<class name="DWG" namespace="Metadata"> |
|
10 |
<extends> |
|
11 |
<class namespace="Metadata" name="SpatialProvider"/> |
|
12 |
</extends> |
|
13 |
<description>Metadata of a DWG store</description> |
|
14 |
<fields> |
|
15 |
</fields> |
|
16 |
</class> |
|
17 |
|
|
18 |
</classes> |
|
19 |
</definitions> |
branches/v2_0_0_prep/extensions/extDwg/resources/org/gvsig/dwg/fmap/dal/store/dwg/DWGParameters.xml | ||
---|---|---|
1 |
<?xml version= "1.0 "?> |
|
2 |
<definitions> |
|
3 |
<version>1.0.0</version> |
|
4 |
<classes> |
|
5 |
<class name="DWGStoreParameters"> |
|
6 |
<extends> |
|
7 |
<class namespace="dal" name="ProviderParameters"/> |
|
8 |
</extends> |
|
9 |
<description>Store the parameters need to open a dwg file</description> |
|
10 |
<fields> |
|
11 |
<field name="file" type="file" mandatory="true"> |
|
12 |
<description>dwg file</description> |
|
13 |
</field> |
|
14 |
<field name="CRS" type="crs" mandatory="true"> |
|
15 |
<description>The coordinate reference system used in this dwg file</description> |
|
16 |
</field> |
|
17 |
</fields> |
|
18 |
</class> |
|
19 |
</classes> |
|
20 |
</definitions> |
Also available in: Unified diff