Revision 6

View differences:

org.gvsig.dgn/trunk/org.gvsig.dgn/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4

  
5
  <modelVersion>4.0.0</modelVersion>
6
  <artifactId>org.gvsig.dgn</artifactId>
7
  <version>2.0.10-SNAPSHOT</version>
8
  <packaging>pom</packaging>
9
  <name>${project.artifactId}</name>
10
  <description>DGN support fort DAL and gvSIG</description>
11
  <parent>
12
      <groupId>org.gvsig</groupId>
13
      <artifactId>org.gvsig.desktop</artifactId>
14
      <version>2.0.10-SNAPSHOT</version>
15
  </parent>
16
  <url>https://devel.gvsig.org/redmine/projects/gvsig-dgn</url>
17
  <scm>
18
      <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-dgn/</connection>
19
      <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-dgn/</developerConnection>
20
      <url>https://devel.gvsig.org/svn/gvsig-dxf/</url>
21
  </scm>
22

  
23
  <dependencyManagement>
24
      <dependencies>
25
          <dependency>
26
            <groupId>org.gvsig</groupId>
27
            <artifactId>org.gvsig.dgn.provider</artifactId>
28
            <version>2.0.10-SNAPSHOT</version>
29
          </dependency>
30
          <dependency>
31
            <groupId>org.gvsig</groupId>
32
            <artifactId>org.gvsig.dgn.provider.legend</artifactId>
33
            <version>2.0.10-SNAPSHOT</version>
34
          </dependency>
35
          <dependency>
36
            <groupId>org.gvsig</groupId>
37
            <artifactId>org.gvsig.dgn.app.mainplugin</artifactId>
38
            <version>2.0.10-SNAPSHOT</version>
39
          </dependency>
40
      </dependencies>
41
  </dependencyManagement>
42

  
43
  <dependencies>
44
        <dependency>
45
            <groupId>org.slf4j</groupId>
46
            <artifactId>slf4j-api</artifactId>
47
            <scope>compile</scope>
48
        </dependency>
49
  </dependencies>
50

  
51
  <modules>
52
    <module>org.gvsig.dgn.app</module>
53
    <module>org.gvsig.dgn.provider</module>
54
    <module>org.gvsig.dgn.provider.legend</module>
55
  </modules>
56

  
57

  
58
</project>
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.app/org.gvsig.dgn.app.mainplugin/src/main/resources-plugin/config.xml
1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<plugin-config>
3
  <libraries library-dir="lib/"/>
4
  <depends plugin-name="org.gvsig.app"/>
5
  <resourceBundle name="text"/>
6
  <extensions>
7
     <extension class-name="org.gvsig.andami.LibraryExtension" active="false"/>
8
  </extensions>    
9
</plugin-config>
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.app/org.gvsig.dgn.app.mainplugin/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
  <modelVersion>4.0.0</modelVersion>
4
  <artifactId>org.gvsig.dgn.app.mainplugin</artifactId>
5
  <packaging>jar</packaging>
6
  <name>Formats: DGN file format support</name>
7
  <description>DGN file format support</description>
8
  <parent>
9
      <groupId>org.gvsig</groupId>
10
      <artifactId>org.gvsig.dgn.app</artifactId>
11
      <version>2.0.10-SNAPSHOT</version>
12
  </parent>
13

  
14
  <dependencies>
15
    <dependency>
16
        <groupId>org.gvsig</groupId>
17
        <artifactId>org.gvsig.tools.lib</artifactId>
18
        <scope>compile</scope>
19
    </dependency>
20
    <dependency>
21
        <groupId>org.gvsig</groupId>
22
        <artifactId>org.gvsig.andami</artifactId>
23
        <scope>compile</scope>
24
    </dependency>
25
    <dependency>
26
        <groupId>org.gvsig</groupId>
27
        <artifactId>org.gvsig.dgn.provider</artifactId>
28
        <scope>compile</scope>
29
    </dependency>
30
    <dependency>
31
        <groupId>org.gvsig</groupId>
32
        <artifactId>org.gvsig.dgn.provider.legend</artifactId>
33
        <scope>compile</scope>
34
    </dependency>
35

  
36
  </dependencies>
37

  
38
</project>
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.app/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
  <modelVersion>4.0.0</modelVersion>
4
  <artifactId>org.gvsig.dgn.app</artifactId>
5
  <packaging>pom</packaging>
6
  <name>${project.artifactId}</name>
7
  <!--
8
    This projects extends org.gvsig.desktop.plugin to get the 
9
    plugin configuration instead of org.gvsig.dgn.
10

  
11
    Need to import the dependencies in dependencyManagement of 
12
    org.gvsig.dxf to get the correct version of the dependencies.
13

  
14
    -->
15
  <parent>
16
      <groupId>org.gvsig</groupId>
17
      <artifactId>org.gvsig.desktop.plugin</artifactId>
18
      <version>2.0.10-SNAPSHOT</version>
19
  </parent>
20
  <url>https://devel.gvsig.org/redmine/projects/gvsig-dgn</url>
21
  <scm>
22
      <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-dgn/</connection>
23
      <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-dgn/</developerConnection>
24
      <url>https://devel.gvsig.org/svn/gvsig-dgn/</url>
25
  </scm>
26

  
27
  <dependencyManagement>
28
      <dependencies>
29
          <dependency>
30
              <groupId>org.gvsig</groupId>
31
              <artifactId>org.gvsig.dgn</artifactId>
32
              <version>2.0.10-SNAPSHOT</version>
33
              <type>pom</type>
34
              <scope>import</scope>
35
          </dependency>
36
      </dependencies>
37
  </dependencyManagement>
38

  
39

  
40
  <modules>
41
    <module>org.gvsig.dgn.app.mainplugin</module>
42
  </modules>
43

  
44

  
45
</project>
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dgn/legend/DGNLegendLibrary.java
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 IVER T.I. S.A.   {{Task}}
26
*/
27

  
28
/**
29
 *
30
 */
31
package org.gvsig.fmap.dal.store.dgn.legend;
32

  
33
import org.gvsig.fmap.dal.DALLibrary;
34
import org.gvsig.fmap.dal.store.dgn.DGNLibrary;
35
import org.gvsig.fmap.dal.store.dgn.DGNStoreProvider;
36
import org.gvsig.metadata.MetadataLibrary;
37
import org.gvsig.metadata.MetadataLocator;
38
import org.gvsig.tools.dynobject.DynClass;
39
import org.gvsig.tools.library.AbstractLibrary;
40
import org.gvsig.tools.library.LibraryException;
41

  
42
/**
43
 * @author jmvivo
44
 *
45
 */
46
public class DGNLegendLibrary extends AbstractLibrary {
47

  
48
    @Override
49
    public void doRegistration() {
50
        registerAsServiceOf(DALLibrary.class);
51
        require(DGNLibrary.class);
52
        require(MetadataLibrary.class);
53
    }
54

  
55
	@Override
56
	protected void doInitialize() throws LibraryException {
57
	}
58

  
59
	@Override
60
	protected void doPostInitialize() throws LibraryException {
61
		DynClass metadataDefinition = (DynClass) MetadataLocator.getMetadataManager()
62
			.getDefinition(DGNStoreProvider.METADATA_DEFINITION_NAME);
63
		DGNGetLegendBuilder.register(metadataDefinition);
64
		DGNGetLegend.register(metadataDefinition);
65
		DGNGetLabeling.register(metadataDefinition);
66
	}
67
}
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dgn/legend/DGNGetLegendBuilder.java
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 IVER T.I. S.A.   {{Task}}
26
*/
27

  
28
package org.gvsig.fmap.dal.store.dgn.legend;
29

  
30
import org.gvsig.fmap.dal.store.dgn.LegendBuilder;
31
import org.gvsig.tools.ToolsLocator;
32
import org.gvsig.tools.dynobject.DynClass;
33
import org.gvsig.tools.dynobject.DynMethod;
34
import org.gvsig.tools.dynobject.DynObject;
35
import org.gvsig.tools.dynobject.DynObjectManager;
36
import org.gvsig.tools.dynobject.exception.DynMethodException;
37
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
38

  
39
public class DGNGetLegendBuilder implements DynMethod {
40
	private static int code = DynObjectManager.NULLCODE;
41

  
42
	static void register(DynClass DGNDynClass) {
43
		if (code != DynObjectManager.NULLCODE) {
44
			return;
45
		}
46
		code = ToolsLocator.getDynObjectManager().registerDynMethod(
47
			DGNDynClass, 
48
			new DGNGetLegendBuilder()
49
		);
50

  
51
	}
52
	
53
	public int getCode() throws DynMethodNotSupportedException {
54
		return code;
55
	}
56

  
57
	public String getDescription() {
58
		return "DGN LegendBuilder creator";
59
	}
60

  
61
	public String getName() {
62
		return LegendBuilder.DYNMETHOD_BUILDER_NAME;
63
	}
64

  
65
	public Object invoke(Object self, DynObject context)
66
			throws DynMethodException {
67
		return new DGNLegendBuilder();
68
	}
69

  
70
}
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dgn/legend/DGNLegendBuilder.java
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 IVER T.I. S.A.   {{Task}}
26
*/
27

  
28
package org.gvsig.fmap.dal.store.dgn.legend;
29

  
30
import java.awt.Color;
31

  
32
import org.gvsig.fmap.dal.DataTypes;
33
import org.gvsig.fmap.dal.feature.spi.FeatureProvider;
34
import org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider;
35
import org.gvsig.fmap.dal.store.dgn.DGNStoreProvider;
36
import org.gvsig.fmap.dal.store.dgn.LegendBuilder;
37
import org.gvsig.fmap.dal.store.dgn.lib.DGNReader;
38
import org.gvsig.fmap.geom.Geometry;
39
import org.gvsig.fmap.mapcontext.MapContextLocator;
40
import org.gvsig.fmap.mapcontext.MapContextManager;
41
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend;
42
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
43
import org.gvsig.symbology.SymbologyLocator;
44
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.styling.IAttrInTableLabelingStrategy;
45
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.fill.IFillSymbol;
46
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol;
47
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol;
48

  
49
public class DGNLegendBuilder implements LegendBuilder {
50

  
51
	private MapContextManager mapContextManager = MapContextLocator
52
			.getMapContextManager();
53

  
54
	private IVectorialUniqueValueLegend defaultLegend = null;
55
	private IAttrInTableLabelingStrategy labelingStragegy = null;
56

  
57
	public void begin() {
58
		// Nothing to do
59
	}
60

  
61
	public void end() {
62
		// Nothing to do
63
	}
64

  
65
	public Object getLegend() {
66
		return defaultLegend;
67
	}
68

  
69
	public LegendBuilder initialize(FeatureStoreProvider store) {
70
		defaultLegend = (IVectorialUniqueValueLegend) mapContextManager.createLegend(
71
						IVectorialUniqueValueLegend.LEGEND_NAME);
72
		defaultLegend.setShapeType(Geometry.TYPES.GEOMETRY);
73
		defaultLegend
74
				.setClassifyingFieldNames(new String[] { DGNStoreProvider.NAME_FIELD_COLOR });
75
		defaultLegend.setClassifyingFieldTypes(new int[] { DataTypes.INT });
76

  
77
		ISymbol myDefaultSymbol =
78
				mapContextManager.getSymbolManager()
79
				.createSymbol(Geometry.TYPES.GEOMETRY); 
80

  
81
		defaultLegend.setDefaultSymbol(myDefaultSymbol);
82
		defaultLegend.useDefaultSymbol(true);
83

  
84
		labelingStragegy = SymbologyLocator.getSymbologyManager().createAttrInTableLabelingStrategy();
85
		labelingStragegy.setTextField(DGNStoreProvider.NAME_FIELD_TEXT);
86
		labelingStragegy
87
				.setRotationField(DGNStoreProvider.NAME_FIELD_ROTATIONTEXT);
88
		labelingStragegy.setHeightField(DGNStoreProvider.NAME_FIELD_HEIGHTTEXT);
89
		labelingStragegy.setUnit(1); // MapContext.NAMES[1] (meters)
90
		return this;
91
	}
92

  
93
	public void process(FeatureProvider feature, DGNReader dgnReader) {
94
		Integer clave = (Integer) feature.get("Color");
95
		if (clave == null) {
96
			return;
97
		}
98

  
99
		defaultLegend.useDefaultSymbol(false);
100
		if (defaultLegend.getSymbolByValue(clave) == null) {
101
			ISymbol theSymbol;
102
			Color color = dgnReader.DGNLookupColor(clave.intValue());
103
			theSymbol =
104
					mapContextManager.getSymbolManager().createSymbol(
105
					Geometry.TYPES.GEOMETRY, color); 
106

  
107
			theSymbol.setDescription(clave.toString());
108

  
109
			if (theSymbol instanceof IMarkerSymbol) {
110
				((IMarkerSymbol) theSymbol).setSize(1);
111
			}
112

  
113
			if (theSymbol instanceof ILineSymbol) {
114
				ILineSymbol lineSymbol = (ILineSymbol) theSymbol;
115
				lineSymbol.setLineWidth(1);
116
				lineSymbol.setLineColor(color);
117
			}
118

  
119
			if (theSymbol instanceof IFillSymbol) {
120
				IFillSymbol fillSymbol = (IFillSymbol) theSymbol;
121
				fillSymbol.getOutline().setLineColor(color);
122
				fillSymbol.getOutline().setLineWidth(1);
123
				fillSymbol.setFillColor(null);
124
			}
125
			if (theSymbol != null) {
126
				defaultLegend.addSymbol(clave, theSymbol);
127
			}
128
		}
129
	}
130

  
131
	public Object getLabeling() {
132
		return labelingStragegy;
133
	}
134

  
135

  
136
}
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dgn/legend/DGNGetLabeling.java
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 IVER T.I. S.A.   {{Task}}
26
*/
27

  
28
package org.gvsig.fmap.dal.store.dgn.legend;
29

  
30
import org.gvsig.fmap.dal.exception.OpenException;
31
import org.gvsig.fmap.dal.store.dgn.DGNStoreProvider;
32
import org.gvsig.fmap.dal.store.dgn.LegendBuilder;
33
import org.gvsig.tools.ToolsLocator;
34
import org.gvsig.tools.dynobject.DynClass;
35
import org.gvsig.tools.dynobject.DynMethod;
36
import org.gvsig.tools.dynobject.DynObject;
37
import org.gvsig.tools.dynobject.DynObjectManager;
38
import org.gvsig.tools.dynobject.exception.DynMethodException;
39
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
40

  
41
public class DGNGetLabeling implements DynMethod {
42
	private static int code = DynObjectManager.NULLCODE;
43

  
44
	static void register(DynClass DGNDynClass) {
45
		if (code != DynObjectManager.NULLCODE) {
46
			return;
47
		}
48
		code = ToolsLocator.getDynObjectManager().registerDynMethod(
49
			DGNDynClass, 
50
			new DGNGetLabeling()
51
		);
52

  
53
	}
54
	public int getCode() throws DynMethodNotSupportedException {
55
		return code;
56
	}
57

  
58
	public String getDescription() {
59
		return "DGN Labeling";
60
	}
61

  
62
	public String getName() {
63
		return LegendBuilder.DYNMETHOD_GETLABELING_NAME;
64
	}
65

  
66
	public Object invoke(Object self, DynObject context)
67
			throws DynMethodException {
68
		try {
69
			return ((DGNStoreProvider) self).getLabeling();
70
		} catch (OpenException e) {
71
			//FIXME
72
			throw new RuntimeException(e);
73
		}
74
	}
75

  
76
}
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider.legend/src/main/java/org/gvsig/fmap/dal/store/dgn/legend/DGNGetLegend.java
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 IVER T.I. S.A.   {{Task}}
26
*/
27

  
28
package org.gvsig.fmap.dal.store.dgn.legend;
29

  
30
import org.gvsig.fmap.dal.exception.OpenException;
31
import org.gvsig.fmap.dal.store.dgn.DGNStoreProvider;
32
import org.gvsig.fmap.dal.store.dgn.LegendBuilder;
33
import org.gvsig.tools.ToolsLocator;
34
import org.gvsig.tools.dynobject.DynClass;
35
import org.gvsig.tools.dynobject.DynMethod;
36
import org.gvsig.tools.dynobject.DynObject;
37
import org.gvsig.tools.dynobject.DynObjectManager;
38
import org.gvsig.tools.dynobject.exception.DynMethodException;
39
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
40

  
41
public class DGNGetLegend implements DynMethod {
42
	private static int code = DynObjectManager.NULLCODE;
43

  
44
	static void register(DynClass DGNDynClass) {
45
		if (code != DynObjectManager.NULLCODE) {
46
			return;
47
		}
48
		code = ToolsLocator.getDynObjectManager().registerDynMethod(
49
			DGNDynClass, 
50
			new DGNGetLegend()
51
		);
52

  
53
	}
54
	public int getCode() throws DynMethodNotSupportedException {
55
		return code;
56
	}
57

  
58
	public String getDescription() {
59
		return "DGN Legend";
60
	}
61

  
62
	public String getName() {
63
		return LegendBuilder.DYNMETHOD_GETLEGEND_NAME;
64
	}
65

  
66
	public Object invoke(Object self, DynObject context)
67
			throws DynMethodException {
68
		try {
69
			return ((DGNStoreProvider) self).getLegend();
70
		} catch (OpenException e) {
71
			throw new RuntimeException(e);
72
		}
73
	}
74

  
75
}
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider.legend/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
  <modelVersion>4.0.0</modelVersion>
4
  <artifactId>org.gvsig.dgn.provider.legend</artifactId>
5
  <packaging>jar</packaging>
6
  <name>${project.artifactId}</name>
7
  <description>DAL provider for DGN files</description>
8
  <parent>
9
      <groupId>org.gvsig</groupId>
10
      <artifactId>org.gvsig.dgn</artifactId>
11
      <version>2.0.10-SNAPSHOT</version>
12
  </parent>
13

  
14
  <dependencies>
15

  
16
    <dependency>
17
      <groupId>org.gvsig</groupId>
18
      <artifactId>org.gvsig.dgn.provider</artifactId>
19
      <scope>compile</scope>
20
    </dependency>
21

  
22
    <dependency>
23
      <groupId>commons-io</groupId>
24
      <artifactId>commons-io</artifactId>
25
      <scope>compile</scope>
26
    </dependency>
27

  
28
    <dependency>
29
        <groupId>org.gvsig</groupId>
30
        <artifactId>org.gvsig.tools.lib</artifactId>
31
        <scope>compile</scope>
32
    </dependency>
33
    <dependency>
34
        <groupId>org.gvsig</groupId>
35
        <artifactId>org.gvsig.projection.api</artifactId>
36
        <scope>compile</scope>
37
    </dependency>
38
    <dependency>
39
        <groupId>org.gvsig</groupId>
40
        <artifactId>org.gvsig.fmap.dal.api</artifactId>
41
        <scope>compile</scope>
42
    </dependency>
43
    <dependency>
44
        <groupId>org.gvsig</groupId>
45
        <artifactId>org.gvsig.fmap.dal.spi</artifactId>
46
        <scope>compile</scope>
47
    </dependency>
48
    <dependency>
49
        <groupId>org.gvsig</groupId>
50
        <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
51
        <scope>compile</scope>
52
    </dependency>
53
    <dependency>
54
        <groupId>org.gvsig</groupId>
55
        <artifactId>org.gvsig.fmap.geometry.api</artifactId>
56
        <scope>compile</scope>
57
    </dependency>
58
    <dependency>
59
        <groupId>org.gvsig</groupId>
60
        <artifactId>org.gvsig.fmap.mapcontext.api</artifactId>
61
        <scope>compile</scope>
62
    </dependency>
63
    <dependency>
64
        <groupId>org.gvsig</groupId>
65
        <artifactId>org.gvsig.dgn.provider</artifactId>
66
        <scope>compile</scope>
67
    </dependency>
68
    <dependency>
69
        <groupId>org.gvsig</groupId>
70
        <artifactId>org.gvsig.symbology.lib.api</artifactId>
71
        <scope>compile</scope>
72
    </dependency>
73
    <dependency>
74
        <groupId>org.gvsig</groupId>
75
        <artifactId>org.gvsig.timesupport.lib.api</artifactId>
76
        <scope>compile</scope>
77
    </dependency>  
78
    <dependency>
79
      <groupId>org.gvsig</groupId>
80
      <artifactId>org.gvsig.utils</artifactId>
81
      <scope>compile</scope>
82
    </dependency>
83

  
84

  
85
    <!-- TESTS -->
86
    <dependency>
87
      <groupId>org.gvsig</groupId>
88
      <artifactId>org.gvsig.tools.lib</artifactId>
89
      <type>test-jar</type>
90
      <scope>test</scope>
91
    </dependency>
92
    <dependency>
93
      <groupId>org.gvsig</groupId>
94
      <artifactId>org.gvsig.compat.se</artifactId>
95
      <scope>test</scope>
96
    </dependency>
97
    <dependency>
98
      <groupId>org.gvsig</groupId>
99
      <artifactId>org.gvsig.fmap.dal.impl</artifactId>
100
      <scope>test</scope>
101
    </dependency>
102
    <dependency>
103
      <groupId>org.gvsig</groupId>
104
      <artifactId>org.gvsig.fmap.geometry.impl</artifactId>
105
      <scope>test</scope>
106
    </dependency>
107
    <dependency>
108
      <groupId>org.gvsig</groupId>
109
      <artifactId>org.gvsig.projection.cresques.impl</artifactId>
110
      <scope>test</scope>
111
    </dependency>
112
    <dependency>
113
      <groupId>org.gvsig</groupId>
114
      <artifactId>org.gvsig.timesupport.lib.impl</artifactId>
115
      <scope>test</scope>
116
    </dependency>   
117

  
118

  
119
  </dependencies>
120

  
121
</project>
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2

  
3
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4

  
5
  <modelVersion>4.0.0</modelVersion>
6
  <artifactId>org.gvsig.dgn.provider</artifactId>
7
  <packaging>jar</packaging>
8
  <name>${project.artifactId}</name>
9
  <description>DAL provider for DGN files</description>
10
  <parent>
11
      <groupId>org.gvsig</groupId>
12
      <artifactId>org.gvsig.dgn</artifactId>
13
      <version>2.0.10-SNAPSHOT</version>
14
  </parent>
15

  
16
  <dependencies>
17

  
18
    <dependency>
19
      <groupId>commons-io</groupId>
20
      <artifactId>commons-io</artifactId>
21
      <scope>compile</scope>
22
    </dependency>
23

  
24
    <dependency>
25
        <groupId>org.gvsig</groupId>
26
        <artifactId>org.gvsig.tools.lib</artifactId>
27
        <scope>compile</scope>
28
    </dependency>
29
    <dependency>
30
        <groupId>org.gvsig</groupId>
31
        <artifactId>org.gvsig.projection.api</artifactId>
32
        <scope>compile</scope>
33
    </dependency>
34
    <dependency>
35
        <groupId>org.gvsig</groupId>
36
        <artifactId>org.gvsig.fmap.dal.api</artifactId>
37
        <scope>compile</scope>
38
    </dependency>
39
    <dependency>
40
        <groupId>org.gvsig</groupId>
41
        <artifactId>org.gvsig.fmap.dal.file.lib</artifactId>
42
        <scope>compile</scope>
43
    </dependency>
44
    <dependency>
45
        <groupId>org.gvsig</groupId>
46
        <artifactId>org.gvsig.fmap.dal.spi</artifactId>
47
        <scope>compile</scope>
48
    </dependency>
49
    <dependency>
50
        <groupId>org.gvsig</groupId>
51
        <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
52
        <scope>compile</scope>
53
    </dependency>
54
    <dependency>
55
        <groupId>org.gvsig</groupId>
56
        <artifactId>org.gvsig.fmap.geometry.api</artifactId>
57
        <scope>compile</scope>
58
    </dependency>
59
    <dependency>
60
        <groupId>org.gvsig</groupId>
61
        <artifactId>org.gvsig.timesupport.lib.api</artifactId>
62
        <scope>compile</scope>
63
    </dependency>  
64
    <dependency>
65
      <groupId>org.gvsig</groupId>
66
      <artifactId>org.gvsig.utils</artifactId>
67
      <scope>compile</scope>
68
    </dependency>
69

  
70

  
71
    <!-- TESTS -->
72
    <dependency>
73
      <groupId>org.gvsig</groupId>
74
      <artifactId>org.gvsig.tools.lib</artifactId>
75
      <type>test-jar</type>
76
      <scope>test</scope>
77
    </dependency>
78
    <dependency>
79
      <groupId>org.gvsig</groupId>
80
      <artifactId>org.gvsig.compat.se</artifactId>
81
      <scope>test</scope>
82
    </dependency>
83
    <dependency>
84
      <groupId>org.gvsig</groupId>
85
      <artifactId>org.gvsig.fmap.dal.impl</artifactId>
86
      <scope>test</scope>
87
    </dependency>
88
    <dependency>
89
      <groupId>org.gvsig</groupId>
90
      <artifactId>org.gvsig.fmap.geometry.impl</artifactId>
91
      <scope>test</scope>
92
    </dependency>
93
    <dependency>
94
      <groupId>org.gvsig</groupId>
95
      <artifactId>org.gvsig.projection.cresques.impl</artifactId>
96
      <scope>test</scope>
97
    </dependency>
98
    <dependency>
99
      <groupId>org.gvsig</groupId>
100
      <artifactId>org.gvsig.timesupport.lib.impl</artifactId>
101
      <scope>test</scope>
102
    </dependency>   
103

  
104

  
105
  </dependencies>
106
  
107
    <build>
108
      <plugins>
109
        <plugin>
110
          <!-- Skip compilation tests -->
111
          <groupId>org.apache.maven.plugins</groupId>
112
          <artifactId>maven-compiler-plugin</artifactId>
113
          <executions>
114
            <execution>
115
              <id>default-testCompile</id>
116
              <phase>process-test-sources</phase>
117
              <goals>
118
                <goal>testCompile</goal>
119
              </goals>
120
              <configuration>
121
                <skip>true</skip>
122
              </configuration>
123
            </execution>
124
          </executions>
125
        </plugin>
126
      </plugins>
127
    </build>
128
    
129
</project>
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider/src/test/java/org/gvsig/fmap/dal/store/dgn/TestDGN.java
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 IVER T.I. S.A.   {{Task}}
26
*/
27

  
28
package org.gvsig.fmap.dal.store.dgn;
29

  
30
import java.io.File;
31

  
32
import org.gvsig.fmap.dal.DataStoreParameters;
33
import org.gvsig.fmap.dal.exception.DataException;
34
import org.gvsig.fmap.dal.feature.BaseTestFeatureStore;
35
import org.gvsig.fmap.dal.feature.FeatureStore;
36

  
37
public class TestDGN extends BaseTestFeatureStore {
38

  
39
	public static final File file_prueba = new File(TestDGN.class.getResource(
40
			"data/prueba.dgn").getFile());
41
	
42
	/*
43
	 * (non-Javadoc)
44
	 *
45
	 * @see
46
	 * org.gvsig.fmap.dal.feature.BaseTestFeatureStore#getDefaultDataStoreParameters
47
	 * ()
48
	 */
49
	public DataStoreParameters getDefaultDataStoreParameters()
50
			throws DataException {
51
		DGNStoreParameters dgnParameters = null;
52

  
53
		dgnParameters = (DGNStoreParameters) dataManager
54
				.createStoreParameters(DGNStoreProvider.NAME);
55

  
56
		dgnParameters.setFile(file_prueba.getAbsolutePath());
57
		dgnParameters.setCRS("EPSG:23030");
58
		return dgnParameters;
59
	}
60

  
61
	/*
62
	 * (non-Javadoc)
63
	 *
64
	 * @see org.gvsig.fmap.dal.feature.BaseTestFeatureStore#hasExplorer()
65
	 */
66
	public boolean hasExplorer() {
67
		// TODO Auto-generated method stub
68
		return false;
69
	}
70

  
71
	public boolean usesResources() {
72
		return true;
73
	}
74

  
75

  
76
	public void testLegendAndLabeling() throws Exception {
77
		FeatureStore store = (FeatureStore) dataManager
78
				.createStore(getDefaultDataStoreParameters());
79

  
80
		assertNotNull(store.invokeDynMethod("getLegend", null));
81
		assertNotNull(store.invokeDynMethod("getLabeling", null));
82
		store.dispose();
83
	}
84
}
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
1
org.gvsig.fmap.dal.store.dgn.DGNLibrary
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider/src/main/resources/org/gvsig/fmap/dal/store/dgn/DGNMetadata.xml
1
<?xml version="1.0"?>
2
<!--
3
Definitions of metadata fields of a shp file.  
4
 -->
5
<definitions>
6
  <version>1.0.0</version>
7
  <classes>
8
    
9
    <class name="DGN" namespace="Metadata">
10
      <extends>
11
      	<class namespace="Metadata" name="SpatialProvider"/>
12
      </extends>
13
      <description>Metadata of a DGN store</description>
14
      <fields>
15
      </fields>
16
    </class>
17

  
18
  </classes>
19
</definitions>  
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider/src/main/resources/org/gvsig/fmap/dal/store/dgn/DGNParameters.xml
1
<?xml version= "1.0 "?>
2
<definitions>
3
  <version>1.0.0</version>
4
  <classes>
5
    <class name="DGNStoreParameters">
6
      <extends>
7
      	<class namespace="dal" name="ProviderParameters"/>
8
      </extends>
9
      <description>Store the parameters need to open a dgn file</description>
10
      <fields>
11
        <field name="file" type="file" mandatory="true">
12
          <description>dgn file</description>
13
        </field>
14
        <field name="CRS" type="crs" mandatory="true">
15
          <description>The coordinate reference system used in this dgn file</description>
16
        </field>
17
      </fields>
18
    </class>
19
  </classes>
20
</definitions>  
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/LegendBuilder.java
1
package org.gvsig.fmap.dal.store.dgn;
2

  
3
import org.gvsig.fmap.dal.feature.spi.FeatureProvider;
4
import org.gvsig.fmap.dal.feature.spi.FeatureStoreProvider;
5
import org.gvsig.fmap.dal.store.dgn.lib.DGNReader;
6

  
7

  
8
public interface LegendBuilder {
9

  
10
	final public static String DYNMETHOD_BUILDER_NAME = "getLegendBuilder";
11
	final public static String DYNMETHOD_GETLEGEND_NAME = "getLegend";
12
	final public static String DYNMETHOD_GETLABELING_NAME = "getLabeling";
13

  
14
	public LegendBuilder initialize(FeatureStoreProvider store);
15

  
16
	public void begin();
17

  
18
	public void process(FeatureProvider feature, DGNReader dgnReader);
19

  
20
	public void end();
21

  
22
	public Object getLegend();
23
	public Object getLabeling();
24

  
25
}
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/lib/DGNElemComplexHeader.java
1
/*
2
 * Created on 17-jul-2003
3
 *
4
 * Copyright (c) 2003
5
 * Francisco José Peñarrubia Martínez
6
 * IVER Tecnologías de la Información S.A.
7
 * Salamanca 50
8
 * 46005 Valencia (        SPAIN )
9
 * +34 963163400
10
 * mailto:fran@iver.es
11
 * http://www.iver.es
12
 */
13
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
14
 *
15
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
16
 *
17
 * This program is free software; you can redistribute it and/or
18
 * modify it under the terms of the GNU General Public License
19
 * as published by the Free Software Foundation; either version 2
20
 * of the License, or (at your option) any later version.
21
 *
22
 * This program is distributed in the hope that it will be useful,
23
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 * GNU General Public License for more details.
26
 *
27
 * You should have received a copy of the GNU General Public License
28
 * along with this program; if not, write to the Free Software
29
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
30
 *
31
 * For more information, contact:
32
 *
33
 *  Generalitat Valenciana
34
 *   Conselleria d'Infraestructures i Transport
35
 *   Av. Blasco Ib??ez, 50
36
 *   46010 VALENCIA
37
 *   SPAIN
38
 *
39
 *      +34 963862235
40
 *   gvsig@gva.es
41
 *      www.gvsig.gva.es
42
 *
43
 *    or
44
 *
45
 *   IVER T.I. S.A
46
 *   Salamanca 50
47
 *   46005 Valencia
48
 *   Spain
49
 *
50
 *   +34 963163400
51
 *   dac@iver.es
52
 */
53
package org.gvsig.fmap.dal.store.dgn.lib;
54

  
55
/**
56
 * Clase utilizada para guardar un elemento de tipo ComplexHeader.
57
 *
58
 * @author Vicente Caballero Navarro
59
 */
60
public class DGNElemComplexHeader extends DGNElemCore {
61
	//DGNElemCore core=new DGNElemCore();
62
	public int totlength; /*!< Total length of surface */
63
	public int numelems; /*!< # of elements in surface */
64
}
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/lib/DGNViewInfo.java
1
/*
2
 * Created on 17-jul-2003
3
 *
4
 * Copyright (c) 2003
5
 * Francisco José Peñarrubia Martínez
6
 * IVER Tecnologías de la Información S.A.
7
 * Salamanca 50
8
 * 46005 Valencia (        SPAIN )
9
 * +34 963163400
10
 * mailto:fran@iver.es
11
 * http://www.iver.es
12
 */
13
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
14
 *
15
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
16
 *
17
 * This program is free software; you can redistribute it and/or
18
 * modify it under the terms of the GNU General Public License
19
 * as published by the Free Software Foundation; either version 2
20
 * of the License, or (at your option) any later version.
21
 *
22
 * This program is distributed in the hope that it will be useful,
23
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 * GNU General Public License for more details.
26
 *
27
 * You should have received a copy of the GNU General Public License
28
 * along with this program; if not, write to the Free Software
29
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
30
 *
31
 * For more information, contact:
32
 *
33
 *  Generalitat Valenciana
34
 *   Conselleria d'Infraestructures i Transport
35
 *   Av. Blasco Ib??ez, 50
36
 *   46010 VALENCIA
37
 *   SPAIN
38
 *
39
 *      +34 963862235
40
 *   gvsig@gva.es
41
 *      www.gvsig.gva.es
42
 *
43
 *    or
44
 *
45
 *   IVER T.I. S.A
46
 *   Salamanca 50
47
 *   46005 Valencia
48
 *   Spain
49
 *
50
 *   +34 963163400
51
 *   dac@iver.es
52
 */
53
package org.gvsig.fmap.dal.store.dgn.lib;
54

  
55
/**
56
 * Informaci?n sobre la vista.
57
 *
58
 * @author Vicente Caballero Navarro
59
 */
60
public class DGNViewInfo {
61
	public int flags;
62
	public short[] levels = new short[8]; //8
63
	public DGNPoint origin = new DGNPoint();
64
	public DGNPoint delta = new DGNPoint();
65
	public double[] transmatrx = new double[9]; //9
66
	public double conversion;
67
	public double activez;
68
}
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/lib/DGNElemText.java
1
/*
2
 * Created on 17-jul-2003
3
 *
4
 * Copyright (c) 2003
5
 * Francisco José Peñarrubia Martínez
6
 * IVER Tecnologías de la Información S.A.
7
 * Salamanca 50
8
 * 46005 Valencia (        SPAIN )
9
 * +34 963163400
10
 * mailto:fran@iver.es
11
 * http://www.iver.es
12
 */
13
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
14
 *
15
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
16
 *
17
 * This program is free software; you can redistribute it and/or
18
 * modify it under the terms of the GNU General Public License
19
 * as published by the Free Software Foundation; either version 2
20
 * of the License, or (at your option) any later version.
21
 *
22
 * This program is distributed in the hope that it will be useful,
23
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 * GNU General Public License for more details.
26
 *
27
 * You should have received a copy of the GNU General Public License
28
 * along with this program; if not, write to the Free Software
29
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
30
 *
31
 * For more information, contact:
32
 *
33
 *  Generalitat Valenciana
34
 *   Conselleria d'Infraestructures i Transport
35
 *   Av. Blasco Ib??ez, 50
36
 *   46010 VALENCIA
37
 *   SPAIN
38
 *
39
 *      +34 963862235
40
 *   gvsig@gva.es
41
 *      www.gvsig.gva.es
42
 *
43
 *    or
44
 *
45
 *   IVER T.I. S.A
46
 *   Salamanca 50
47
 *   46005 Valencia
48
 *   Spain
49
 *
50
 *   +34 963163400
51
 *   dac@iver.es
52
 */
53
package org.gvsig.fmap.dal.store.dgn.lib;
54

  
55
/**
56
 * Clase utilizada para guardar un elemento de tipo Text.
57
 *
58
 * @author Vicente Caballero Navarro
59
 */
60
public class DGNElemText extends DGNElemCore {
61
	//DGNElemCore core;
62
	public int font_id; /*!< Microstation font id, no list available*/
63
	public int justification; /*!< Justification, see DGNJ_* */
64
	public double length_mult; /*!< Char width in master (if square) */
65
	public double height_mult; /*!< Char height in master units */
66
	public double rotation; /*!< Counterclockwise rotation in degrees */
67
	public DGNPoint origin = new DGNPoint();
68

  
69
	/*!< Bottom left corner of text. */
70
	public String string;
71

  
72
	/*!< Actual text (length varies, \0 terminated*/
73
}
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/lib/tagValueUnion.java
1
/*
2
 * Created on 21-jul-2003
3
 *
4
 * Copyright (c) 2003
5
 * Francisco José Peñarrubia Martínez
6
 * IVER Tecnologías de la Información S.A.
7
 * Salamanca 50
8
 * 46005 Valencia (        SPAIN )
9
 * +34 963163400
10
 * mailto:fran@iver.es
11
 * http://www.iver.es
12
 */
13
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
14
 *
15
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
16
 *
17
 * This program is free software; you can redistribute it and/or
18
 * modify it under the terms of the GNU General Public License
19
 * as published by the Free Software Foundation; either version 2
20
 * of the License, or (at your option) any later version.
21
 *
22
 * This program is distributed in the hope that it will be useful,
23
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 * GNU General Public License for more details.
26
 *
27
 * You should have received a copy of the GNU General Public License
28
 * along with this program; if not, write to the Free Software
29
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
30
 *
31
 * For more information, contact:
32
 *
33
 *  Generalitat Valenciana
34
 *   Conselleria d'Infraestructures i Transport
35
 *   Av. Blasco Ib??ez, 50
36
 *   46010 VALENCIA
37
 *   SPAIN
38
 *
39
 *      +34 963862235
40
 *   gvsig@gva.es
41
 *      www.gvsig.gva.es
42
 *
43
 *    or
44
 *
45
 *   IVER T.I. S.A
46
 *   Salamanca 50
47
 *   46005 Valencia
48
 *   Spain
49
 *
50
 *   +34 963163400
51
 *   dac@iver.es
52
 */
53
package org.gvsig.fmap.dal.store.dgn.lib;
54

  
55
/**
56
 * Uni?n del valor del tag.
57
 *
58
 * @author Vicente Caballero Navarro
59
 */
60
public class tagValueUnion {
61
	public char[] string;
62
	public long integer;
63
	public double real;
64
}
org.gvsig.dgn/trunk/org.gvsig.dgn/org.gvsig.dgn.provider/src/main/java/org/gvsig/fmap/dal/store/dgn/lib/DGNFileHeader.java
1
/*
2
 * Created on 16-jul-2003
3
 *
4
 * Copyright (c) 2003
5
 * Francisco José Peñarrubia Martínez
6
 * IVER Tecnologías de la Información S.A.
7
 * Salamanca 50
8
 * 46005 Valencia (        SPAIN )
9
 * +34 963163400
10
 * mailto:fran@iver.es
11
 * http://www.iver.es
12
 */
13
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
14
 *
15
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
16
 *
17
 * This program is free software; you can redistribute it and/or
18
 * modify it under the terms of the GNU General Public License
19
 * as published by the Free Software Foundation; either version 2
20
 * of the License, or (at your option) any later version.
21
 *
22
 * This program is distributed in the hope that it will be useful,
23
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
 * GNU General Public License for more details.
26
 *
27
 * You should have received a copy of the GNU General Public License
28
 * along with this program; if not, write to the Free Software
29
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
30
 *
31
 * For more information, contact:
32
 *
33
 *  Generalitat Valenciana
34
 *   Conselleria d'Infraestructures i Transport
35
 *   Av. Blasco Ib??ez, 50
36
 *   46010 VALENCIA
37
 *   SPAIN
38
 *
39
 *      +34 963862235
40
 *   gvsig@gva.es
41
 *      www.gvsig.gva.es
42
 *
43
 *    or
44
 *
45
 *   IVER T.I. S.A
46
 *   Salamanca 50
47
 *   46005 Valencia
48
 *   Spain
49
 *
50
 *   +34 963163400
51
 *   dac@iver.es
52
 */
53
package org.gvsig.fmap.dal.store.dgn.lib;
54

  
55
import java.nio.MappedByteBuffer;
56

  
57

  
58
/**
59
 * Clase Header del DGN.
60
 *
61
 * @author Vicente Caballero Navarro
62
 */
63
public class DGNFileHeader {
64
	/** DGNElemCore style: Element uses DGNElemCore structure */
65
	public static final int DGNST_CORE = 1;
66

  
67
	/** DGNElemCore style: Element uses DGNElemMultiPoint structure */
68
	public static final int DGNST_MULTIPOINT = 2;
69

  
70
	/** DGNElemCore style: Element uses DGNElemColorTable structure */
71
	public static final int DGNST_COLORTABLE = 3;
72

  
73
	/** DGNElemCore style: Element uses DGNElemTCB structure */
74
	public static final int DGNST_TCB = 4;
75

  
76
	/** DGNElemCore style: Element uses DGNElemArc structure */
77
	public static final int DGNST_ARC = 5;
78

  
79
	/** DGNElemCore style: Element uses DGNElemText structure */
80
	public static final int DGNST_TEXT = 6;
81

  
82
	/** DGNElemCore style: Element uses DGNElemComplexHeader structure */
83
	public static final int DGNST_COMPLEX_HEADER = 7;
84

  
85
	/** DGNElemCore style: Element uses DGNElemCellHeader structure */
86
	public static final int DGNST_CELL_HEADER = 8;
87

  
88
	/** DGNElemCore style: Element uses DGNElemTagValue structure */
89
	public static final int DGNST_TAG_VALUE = 9;
90

  
91
	/** DGNElemCore style: Element uses DGNElemTagSet structure */
92
	public static final int DGNST_TAG_SET = 10;
93

  
94
	/** DGNElemCore style: Element uses DGNElemCellLibrary structure */
95
	public static final int DGNST_CELL_LIBRARY = 11;
96

  
97
	/** DGNElemCore style: Element uses DGNElemGroup structure */
98
	public static final int DGNST_GROUP_DATA = 12;
99
	public static final int DGNST_SHARED_CELL_DEFN = 13;
100

  
101
	/* -------------------------------------------------------------------- */
102
	/*      Element types                                                   */
103
	/* -------------------------------------------------------------------- */
104
	public static final int DGNT_NULL = 0;
105
	public static final int DGNT_CELL_LIBRARY = 1;
106
	public static final int DGNT_CELL_HEADER = 2;
107
	public static final int DGNT_LINE = 3;
108
	public static final int DGNT_LINE_STRING = 4;
109
	public static final int DGNT_GROUP_DATA = 5;
110
	public static final int DGNT_SHAPE = 6;
111
	public static final int DGNT_TEXT_NODE = 7;
112
	public static final int DGNT_DIGITIZER_SETUP = 8;
113
	public static final int DGNT_TCB = 9;
114
	public static final int DGNT_LEVEL_SYMBOLOGY = 10;
115
	public static final int DGNT_CURVE = 11;
116
	public static final int DGNT_COMPLEX_CHAIN_HEADER = 12;
117
	public static final int DGNT_COMPLEX_SHAPE_HEADER = 14;
118
	public static final int DGNT_ELLIPSE = 15;
119
	public static final int DGNT_ARC = 16;
120
	public static final int DGNT_TEXT = 17;
121
	public static final int DGNT_BSPLINE = 21;
122
	public static final int DGNT_SHARED_CELL_DEFN = 34;
123
	public static final int DGNT_SHARED_CELL_ELEM = 35; // REVISAR
124
	public static final int DGNT_TAG_VALUE = 37;
125
	public static final int DGNT_APPLICATION_ELEM = 66;
126

  
127
	/* -------------------------------------------------------------------- */
128
	/*      Line Styles                                                     */
129
	/* -------------------------------------------------------------------- */
130
	public static final int DGNS_SOLID = 0;
131
	public static final int DGNS_DOTTED = 1;
132
	public static final int DGNS_MEDIUM_DASH = 2;
133
	public static final int DGNS_LONG_DASH = 3;
134
	public static final int DGNS_DOT_DASH = 4;
135
	public static final int DGNS_SHORT_DASH = 5;
136
	public static final int DGNS_DASH_DOUBLE_DOT = 6;
137
	public static final int DGNS_LONG_DASH_SHORT_DASH = 7;
138

  
139
	/* -------------------------------------------------------------------- */
140
	/*      Class                                                           */
141
	/* -------------------------------------------------------------------- */
142
	public static final int DGNC_PRIMARY = 0;
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff