Revision 21835

View differences:

branches/Mobile_Compatible_Hito_1/libFMap/src-data/org/gvsig/data/exception/InitializeWriterException.java
1
package org.gvsig.data.exception;
2

  
3

  
4
public class InitializeWriterException extends WriteException{
5

  
6
	public InitializeWriterException(String name,Throwable exception) {
7
		super("Intialize Access Error",name,exception);
8
		init();
9
	}
10

  
11
	public InitializeWriterException(String description,String name,Throwable exception) {
12
		super(description,name,exception);
13
		init();
14
	}
15

  
16
	public InitializeWriterException(String description,String name) {
17
		super(description,name);
18
		init();
19
	}
20
	/**
21
	 *
22
	 */
23
	protected void init() {
24
		super.init();
25
		messageKey = "error_initialize";
26
		formatString = "Can?t intialize writer of %(name): %(description) ";
27
	}
28

  
29
}
branches/Mobile_Compatible_Hito_1/libFMap/src-data/org/gvsig/data/exception/UnsupportedVersionException.java
1
package org.gvsig.data.exception;
2

  
3

  
4
public class UnsupportedVersionException extends OpenException {
5
	public UnsupportedVersionException(String name,Throwable exception) {
6
		super("Unsuported version",name,exception);
7
		init();
8
	}
9

  
10
	public UnsupportedVersionException(String description,String name,Throwable exception) {
11
		super(description,name,exception);
12
		init();
13
	}
14

  
15
	public UnsupportedVersionException(String description,String name) {
16
		super(description,name);
17
		init();
18
	}
19
	/**
20
	 *
21
	 */
22
	protected void init() {
23
		super.init();
24
		messageKey = "error_unsuported_version";
25
		formatString = "Can?t open %(name) caused by version problem: %(description) ";
26
	}
27

  
28
}
branches/Mobile_Compatible_Hito_1/libFMap/src-data/org/gvsig/data/exception/UnsupportedEncodingException.java
1
package org.gvsig.data.exception;
2

  
3

  
4
public class UnsupportedEncodingException extends OpenException {
5
	public UnsupportedEncodingException(String name,Throwable exception) {
6
		super("Unsuported version",name,exception);
7
		init();
8
	}
9

  
10
	public UnsupportedEncodingException(String description,String name,Throwable exception) {
11
		super(description,name,exception);
12
		init();
13
	}
14

  
15
	public UnsupportedEncodingException(String description,String name) {
16
		super(description,name);
17
		init();
18
	}
19
	/**
20
	 *
21
	 */
22
	protected void init() {
23
		super.init();
24
		messageKey = "error_unsuported_encoding";
25
		formatString = "Econding problem in %(name): %(description) ";
26
	}
27

  
28
}
branches/Mobile_Compatible_Hito_1/libFMap/src-data/org/gvsig/data/exception/package.html
1
<html>
2
<head>
3
<title>Excepciones de libData</title>
4
<style type="text/css">
5
    span.foldopened { color: white; font-size: xx-small;
6
    border-width: 1; font-family: monospace; padding: 0em 0.25em 0em 0.25em; background: #e0e0e0;
7
    VISIBILITY: visible;
8
    cursor:pointer; }
9

  
10

  
11
    span.foldclosed { color: #666666; font-size: xx-small;
12
    border-width: 1; font-family: monospace; padding: 0em 0.25em 0em 0.25em; background: #e0e0e0;
13
    VISIBILITY: hidden;
14
    cursor:pointer; }
15

  
16
    span.foldspecial { color: #666666; font-size: xx-small; border-style: none solid solid none;
17
    border-color: #CCCCCC; border-width: 1; font-family: sans-serif; padding: 0em 0.1em 0em 0.1em; background: #e0e0e0;
18
    cursor:pointer; }
19

  
20
    li { list-style: none; }
21

  
22
    span.l { color: red; font-weight: bold; }
23

  
24
    a:link {text-decoration: none; color: black; }
25
    a:visited {text-decoration: none; color: black; }
26
    a:active {text-decoration: none; color: black; }
27
    a:hover {text-decoration: none; color: black; background: #eeeee0; }
28

  
29
</style>
30
<!-- ^ Position is not set to relative / absolute here because of Mozilla -->
31
</head>
32
<body>
33
<p>Excepciones de libData
34
<ul><li>DataException
35
<ul><li>ReadException
36
<ul><li>CloseException
37

  
38
</li>
39
<li>EvaluationExpressionException
40

  
41
</li>
42
<li>InitializeException
43
<ul><li>OpenException
44
<ul><li>UnsupportedEncodingException
45

  
46
</li>
47
<li>UnsupportedVersionException
48

  
49
</li>
50

  
51
</ul>
52
</li>
53

  
54
</ul>
55
</li>
56

  
57
</ul>
58
</li>
59
<li>WriteException
60
<ul><li>InitializeWriterException
61

  
62
</li>
63
<li>UnsupportedTypeException
64

  
65
</li>
66

  
67
</ul>
68
</li>
69

  
70
</ul>
71
</li>
72

  
73
</ul></body>
74
</html>
branches/Mobile_Compatible_Hito_1/libFMap/src-data/org/gvsig/data/exception/InitializeException.java
1
package org.gvsig.data.exception;
2

  
3

  
4
public class InitializeException extends ReadException {
5

  
6
	public InitializeException(String name,Throwable exception) {
7
		super("Intialize Error",name,exception);
8
		init();
9
	}
10

  
11
	public InitializeException(String description,String name,Throwable exception) {
12
		super(description,name,exception);
13
		init();
14
	}
15

  
16
	public InitializeException(String description,String name) {
17
		super(description,name);
18
		init();
19
	}
20
	/**
21
	 *
22
	 */
23
	protected void init() {
24
		super.init();
25
		messageKey = "error_initialize";
26
		formatString = "Can?t initialize %(name): %(description) ";
27
	}
28

  
29
}
branches/Mobile_Compatible_Hito_1/libFMap/src-data/org/gvsig/data/exception/OpenException.java
1
package org.gvsig.data.exception;
2

  
3

  
4
public class OpenException extends InitializeException {
5
	public OpenException(String name,Throwable exception) {
6
		super("Open Error",name,exception);
7
		init();
8
	}
9

  
10
	public OpenException(String description,String name,Throwable exception) {
11
		super(description,name,exception);
12
		init();
13
	}
14

  
15
	public OpenException(String description,String name) {
16
		super(description,name);
17
		init();
18
	}
19
	/**
20
	 *
21
	 */
22
	protected void init() {
23
		super.init();
24
		messageKey = "error_open";
25
		formatString = "Can?t open %(name): %(description) ";
26
	}
27

  
28

  
29
}
branches/Mobile_Compatible_Hito_1/libFMap/src-data/org/gvsig/data/exception/CloseException.java
1
package org.gvsig.data.exception;
2

  
3

  
4
public class CloseException extends ReadException {
5

  
6
	public CloseException(String name,Throwable exception) {
7
		super("Close Error",name,exception);
8
		init();
9
	}
10

  
11
	public CloseException(String description,String name,Throwable exception) {
12
		super(description,name,exception);
13
		init();
14
	}
15

  
16
	public CloseException(String description,String name) {
17
		super(description,name);
18
		init();
19
	}
20

  
21
	/**
22
	 *
23
	 */
24
	protected void init() {
25
		super.init();
26
		messageKey = "error_close";
27
		formatString = "Can?t close %(name): %(description) ";
28
	}
29
}
branches/Mobile_Compatible_Hito_1/libFMap/src-data/org/gvsig/data/exception/EvaluationExpressionException.java
1
package org.gvsig.data.exception;
2

  
3
import java.util.Hashtable;
4
import java.util.Iterator;
5
import java.util.Map;
6

  
7
import org.gvsig.exceptions.IExceptionTranslator;
8

  
9
public class EvaluationExpressionException extends ReadException {
10
	private String expression = null;
11

  
12
	public EvaluationExpressionException(String description, String name, String expression,Throwable exception) {
13
		super(description, name, exception);
14
		this.expression = expression;
15
		init();
16
	}
17

  
18
	public EvaluationExpressionException(String expression,Throwable exception) {
19
		super("Evaluation Experssion Error", "unknow", exception);
20
		this.expression = expression;
21
		init();
22
	}
23

  
24
	public EvaluationExpressionException(String description, String name, String expression) {
25
		super(description, name);
26
		this.expression = expression;
27
		init();
28
	}
29

  
30
	protected void init() {
31
		super.init();
32
		messageKey = "error_parsing_expression";
33
		formatString = "Error parsing expression '%(expression)': %(description)";
34
	}
35

  
36
	protected Map values() {
37
		Map params = super.values();
38
		params.put("expression",expression);
39
		return params;
40
	}
41

  
42
}
branches/Mobile_Compatible_Hito_1/libFMap/src-data/org/gvsig/data/exception/exceptions_hierarchy.mm
1
<map version="0.8.1">
2
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
3
<node CREATED="1208241399576" ID="Freemind_Link_1091473561" MODIFIED="1208241415967" TEXT="Excepciones de libData">
4
<node CREATED="1208241431252" ID="_" MODIFIED="1208241437907" POSITION="right" TEXT="DataException">
5
<node CREATED="1208241470021" ID="Freemind_Link_981251953" MODIFIED="1208241474457" TEXT="ReadException">
6
<node CREATED="1208241498819" ID="Freemind_Link_881323281" MODIFIED="1208241505041" TEXT="CloseException"/>
7
<node CREATED="1208241505667" ID="Freemind_Link_1556911998" MODIFIED="1208241530057" TEXT="EvaluationExpressionException"/>
8
<node CREATED="1208241531453" ID="Freemind_Link_1913524181" MODIFIED="1208241547804" TEXT="InitializeException">
9
<node CREATED="1208241616423" ID="Freemind_Link_898717563" MODIFIED="1208241622216" TEXT="OpenException">
10
<node CREATED="1208241665195" ID="Freemind_Link_631985578" MODIFIED="1208241667566" TEXT="UnsupportedEncodingException"/>
11
<node CREATED="1208241670430" ID="Freemind_Link_774404741" MODIFIED="1208241681842" TEXT="UnsupportedVersionException"/>
12
</node>
13
</node>
14
</node>
15
<node CREATED="1208241475857" ID="Freemind_Link_1571515948" MODIFIED="1208241482354" TEXT="WriteException">
16
<node CREATED="1208241728259" ID="Freemind_Link_696993722" MODIFIED="1208241735132" TEXT="InitializeWriterException"/>
17
<node CREATED="1208241735618" ID="Freemind_Link_97625364" MODIFIED="1208241749322" TEXT="UnsupportedTypeException"/>
18
</node>
19
</node>
20
</node>
21
</map>
branches/Mobile_Compatible_Hito_1/libFMap/src-data/org/gvsig/data/exception/DataException.java
1
package org.gvsig.data.exception;
2

  
3
import java.util.Hashtable;
4
import java.util.Map;
5

  
6
import org.gvsig.exceptions.BaseException;
7

  
8
public class DataException extends BaseException {
9

  
10
	private String description;
11

  
12
	public DataException(String description){
13
		this.description = description;
14
		this.init();
15

  
16
	}
17

  
18
	public DataException(String description,Throwable cause){
19
		this.description = description;
20
		this.init();
21
		this.initCause(cause);
22
	}
23

  
24
	protected void init() {
25
		messageKey = "libData_exception";
26
		formatString = "%(description)";
27
	}
28

  
29
	protected Map values() {
30
		Hashtable params = new Hashtable();
31
		params.put("description",this.description);
32
		return params;
33
	}
34
}
branches/Mobile_Compatible_Hito_1/libFMap/src-data/org/gvsig/data/exception/UnsupportedTypeException.java
1
package org.gvsig.data.exception;
2

  
3
import java.util.Map;
4

  
5
public class UnsupportedTypeException extends WriteException {
6
	private String fieldType="";
7
	private String fieldName="";
8

  
9

  
10
	public UnsupportedTypeException(String sourceName,Throwable exception) {
11
		super("Unsuported type",sourceName,exception);
12
		init();
13
	}
14

  
15
	public UnsupportedTypeException(String fieldType,String sourceName,Throwable exception) {
16
		super("Unsuported type '"+fieldType+"'",sourceName,exception);
17
		this.fieldType = fieldType;
18
		init();
19
	}
20

  
21
	public UnsupportedTypeException(String sourceName,String fieldType,String fieldName) {
22
		super("Unsuported type '"+fieldType+"' for "+fieldName+"'",sourceName);
23
		this.fieldType = fieldType;
24
		this.fieldName = fieldName;
25
		init();
26
	}
27
	/**
28
	 *
29
	 */
30
	protected void init() {
31
		super.init();
32
		messageKey = "error_unsuported_type";
33
		formatString = "Unsuported type for %(name): %(description) ";
34
	}
35

  
36
	protected Map values() {
37
		Map params = super.values();
38
		params.put("fieldType",this.fieldType);
39
		params.put("fieldName",this.fieldName);
40
		return params;
41
	}
42

  
43

  
44
}
branches/Mobile_Compatible_Hito_1/libFMap/src-data/org/gvsig/data/exception/WriteException.java
1
package org.gvsig.data.exception;
2

  
3
import java.util.Hashtable;
4
import java.util.Map;
5

  
6
import org.gvsig.exceptions.BaseException;
7

  
8
public class WriteException extends DataException {
9

  
10

  
11
	private String name = null;
12

  
13
	public WriteException(String description, String name) {
14
		super(description);
15
		this.name = name;
16
		init();
17
	}
18

  
19
	public WriteException(String description, String name,Throwable exception) {
20
		super(description);
21
		this.name = name;
22
		init();
23
		initCause(exception);
24
	}
25

  
26
	public WriteException(String name,Throwable exception) {
27
		super("Error writing");
28
		this.name = name;
29
		init();
30
		initCause(exception);
31
	}
32

  
33
	protected void init() {
34
		super.init();
35
		messageKey = "error_write";
36
		formatString = "Can?t write %(name): %(description) ";
37
	}
38

  
39
	protected Map values() {
40
		Map params = super.values();
41
		params.put("name",this.name);
42
		return params;
43
	}
44

  
45
}
branches/Mobile_Compatible_Hito_1/libFMap/src-data/org/gvsig/data/exception/ReadException.java
1
package org.gvsig.data.exception;
2

  
3
import java.util.Map;
4

  
5
public class ReadException extends DataException {
6

  
7

  
8
	private String name = null;
9

  
10
	public ReadException(String description, String name) {
11
		super(description);
12
		this.name = name;
13
		init();
14
	}
15

  
16
	public ReadException(String description, String name,Throwable exception) {
17
		super(description);
18
		this.name = name;
19
		init();
20
		initCause(exception);
21
	}
22

  
23
	public ReadException(String name,Throwable exception) {
24
		super("Error reading");
25
		this.name = name;
26
		init();
27
		initCause(exception);
28
	}
29

  
30
	protected void init() {
31
		super.init();
32
		messageKey = "error_read";
33
		formatString = "Can?t read %(name): %(description) ";
34
	}
35

  
36
	protected Map values() {
37
		Map params = super.values();
38
		params.put("name",this.name);
39
		return params;
40
	}
41

  
42
}

Also available in: Unified diff