comparison src/java/de/intevation/mxd/reader/PictureMarkerSymbolReader.java @ 135:a4ab239509f1

Updated the default values and reader error handling.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 22 Jun 2011 13:55:22 +0200
parents fb93f20478cc
children df4e0946ef02
comparison
equal deleted inserted replaced
134:acc9e5430177 135:a4ab239509f1
66 symbolElement.setAttribute( 66 symbolElement.setAttribute(
67 "angle", 67 "angle",
68 String.valueOf(symbol.getAngle())); 68 String.valueOf(symbol.getAngle()));
69 } 69 }
70 catch(IOException ioe) { 70 catch(IOException ioe) {
71 logger.warn("Could not read angle. Setting angle to 0."); 71 logger.warn("Could not read angle.");
72 symbolElement.setAttribute("angle", "0");
73 } 72 }
74 73
75 try { 74 try {
76 symbolElement.setAttribute( 75 symbolElement.setAttribute(
77 "size", 76 "size",
78 String.valueOf(symbol.getSize())); 77 String.valueOf(symbol.getSize()));
79 } 78 }
80 catch (IOException ioe) { 79 catch (IOException ioe) {
81 logger.warn("Could not read size. Setting size to 1."); 80 logger.warn("Could not read size. Setting size to 1.");
82 symbolElement.setAttribute("size", "0"); 81 symbolElement.setAttribute("size", "1");
83 } 82 }
84 83
85 try { 84 try {
86 symbolElement.setAttribute( 85 symbolElement.setAttribute(
87 "x_offset", 86 "x_offset",
88 String.valueOf(symbol.getXOffset())); 87 String.valueOf(symbol.getXOffset()));
89 } 88 }
90 catch(IOException ioe) { 89 catch(IOException ioe) {
91 logger.warn("Could not read x-offset. Setting x-offset to 0"); 90 logger.warn("Could not read x-offset.");
92 symbolElement.setAttribute("x_offset", "0");
93 } 91 }
94 92
95 try { 93 try {
96 symbolElement.setAttribute( 94 symbolElement.setAttribute(
97 "y_offset", 95 "y_offset",
98 String.valueOf(symbol.getYOffset())); 96 String.valueOf(symbol.getYOffset()));
99 } 97 }
100 catch(IOException ioe) { 98 catch(IOException ioe) {
101 logger.warn("Could not read y-offset. Setting y-offset to 0."); 99 logger.warn("Could not read y-offset.");
102 symbolElement.setAttribute("y_offset", "0");
103 } 100 }
104 101
105 try { 102 try {
106 symbolElement.setAttribute( 103 symbolElement.setAttribute(
107 "name", 104 "name",
115 try { 112 try {
116 PictureElement pElem = new PictureElement(); 113 PictureElement pElem = new PictureElement();
117 pElem.importPicture(symbol.getPicture()); 114 pElem.importPicture(symbol.getPicture());
118 } 115 }
119 catch(IOException ioe) { 116 catch(IOException ioe) {
120 logger.warn("Could not read picture. No fallback defined."); 117 logger.warn("Could not read picture.");
121 } 118 }
122 symbolElement.setAttribute("style", "picture"); 119 symbolElement.setAttribute("style", "picture");
123 symbolElement.setAttribute("type", "marker"); 120 symbolElement.setAttribute("type", "marker");
124 return symbolElement; 121 return symbolElement;
125 } 122 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)