Added original source code
eivind@boehn.org
15 years ago
1 | 1 | <classpath> |
2 | 2 | <classpathentry kind="src" path="src"/> |
3 | 3 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> |
4 | <classpathentry kind="lib" path="lib/commons-logging.jar"/> | |
5 | <classpathentry kind="lib" path="lib/javax.servlet.jar"/> | |
6 | <classpathentry kind="lib" path="lib/urlrewrite-2.6.0.jar"/> | |
7 | <classpathentry kind="lib" path="lib/xom-1.0.jar"/> | |
8 | <classpathentry kind="lib" path="lib/xpp3_min-1.1.3.4.O.jar"/> | |
9 | <classpathentry kind="lib" path="lib/xpp3_xpath-1.1.3.4.O.jar"/> | |
10 | <classpathentry kind="lib" path="lib/xpp3-1.1.3.4.O.jar"/> | |
4 | 11 | <classpathentry kind="output" path="bin"/> |
5 | 12 | </classpath> |
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
0 | package org.boehn.gef; | |
1 | ||
2 | public enum AltitudeModes { | |
3 | relativeToGround, absolute, clampToGround | |
4 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | import org.boehn.gef.coordinates.EarthCoordinate; | |
3 | ||
4 | public class BoundingBox { | |
5 | ||
6 | private Double north; | |
7 | private Double east; | |
8 | private Double south; | |
9 | private Double west; | |
10 | ||
11 | public BoundingBox() {} | |
12 | ||
13 | public BoundingBox(Double north, Double east, Double south, Double west) { | |
14 | this.north = north; | |
15 | this.east = east; | |
16 | this.south = south; | |
17 | this.west = west; | |
18 | } | |
19 | ||
20 | public boolean isInsideBoundingBox(EarthCoordinate earthCoordinate) { | |
21 | return earthCoordinate.getLatitude() < north && earthCoordinate.getLatitude() > south && earthCoordinate.getLongitude() > west && earthCoordinate.getLongitude() < east; | |
22 | } | |
23 | ||
24 | public Double getEast() { | |
25 | return east; | |
26 | } | |
27 | ||
28 | public void setEast(Double east) { | |
29 | this.east = east; | |
30 | } | |
31 | ||
32 | public Double getNorth() { | |
33 | return north; | |
34 | } | |
35 | ||
36 | public void setNorth(Double north) { | |
37 | this.north = north; | |
38 | } | |
39 | ||
40 | public Double getSouth() { | |
41 | return south; | |
42 | } | |
43 | ||
44 | public void setSouth(Double south) { | |
45 | this.south = south; | |
46 | } | |
47 | ||
48 | public Double getWest() { | |
49 | return west; | |
50 | } | |
51 | ||
52 | public void setWest(Double west) { | |
53 | this.west = west; | |
54 | } | |
55 | ||
56 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | import java.io.UnsupportedEncodingException; | |
3 | import java.net.URLEncoder; | |
4 | import java.util.HashMap; | |
5 | import java.util.Map; | |
6 | ||
7 | import javax.servlet.http.HttpServletRequest; | |
8 | ||
9 | import org.boehn.gef.servlet.HttpServletModel; | |
10 | ||
11 | ||
12 | public class Button { | |
13 | ||
14 | private String url; | |
15 | private String text; | |
16 | private Map<String, String> parameters; | |
17 | ||
18 | public Button() { | |
19 | } | |
20 | ||
21 | public Button(String text, String url) { | |
22 | this.text = text; | |
23 | this.url = url; | |
24 | } | |
25 | ||
26 | public Button(String text, String url, String parameterName, String parameterValue) { | |
27 | this(text, url); | |
28 | addParameter(parameterName, parameterValue); | |
29 | } | |
30 | ||
31 | public Button(String text, String url, Map<String, String> parameters) { | |
32 | this(text, url); | |
33 | this.parameters = parameters; | |
34 | } | |
35 | ||
36 | public void addParameter(String parameterName, String parameterValue) { | |
37 | if (parameters == null) { | |
38 | parameters = new HashMap<String, String>(); | |
39 | } | |
40 | parameters.put(parameterName, parameterValue); | |
41 | } | |
42 | ||
43 | public String getText() { | |
44 | return text; | |
45 | } | |
46 | ||
47 | public void setText(String text) { | |
48 | this.text = text; | |
49 | } | |
50 | ||
51 | public Map<String, String> getParameters() { | |
52 | return parameters; | |
53 | } | |
54 | ||
55 | public void setParameters(Map<String, String> parameters) { | |
56 | this.parameters = parameters; | |
57 | } | |
58 | ||
59 | public String toHtml(Model model) { | |
60 | try { | |
61 | StringBuffer html = new StringBuffer(); | |
62 | StringBuffer urlToUse; | |
63 | if (url.startsWith("http://")) { | |
64 | urlToUse = new StringBuffer(url); | |
65 | } else { | |
66 | // The url is not absolute. We need info from the HttpServletModel | |
67 | if (model instanceof HttpServletModel) { | |
68 | HttpServletModel httpServleModel = (HttpServletModel) model; | |
69 | urlToUse = new StringBuffer(encodeURL(httpServleModel.getBaseUrl() + url, httpServleModel.getRequest())); | |
70 | } else { | |
71 | throw new IllegalArgumentException("Button has an url that is not absolute (does not starts with 'http://'). Then the model must be an instance of the HttpServletModel class."); | |
72 | } | |
73 | } | |
74 | if (parameters != null) { | |
75 | urlToUse.append("?"); | |
76 | for (Object key: parameters.keySet()) { | |
77 | urlToUse.append("&" + URLEncoder.encode(key.toString(), "UTF-8") + "=" + URLEncoder.encode(parameters.get(key).toString(), "UTF-8")); | |
78 | } | |
79 | } | |
80 | html.append("<a href=\"" + urlToUse.toString() + "\">" + text + "</a>"); | |
81 | return html.toString(); | |
82 | } catch (UnsupportedEncodingException e) { | |
83 | throw new RuntimeException(e); | |
84 | } | |
85 | } | |
86 | ||
87 | public String encodeURL(String url, HttpServletRequest request) { | |
88 | // TODO This method should not be neccesarily. There is a method for doing this in the HttpServletResponse. | |
89 | // At the moment that method is not doing the encoding. No idea why. It used to work... | |
90 | int indexQuestionMark = url.indexOf("?"); | |
91 | if (indexQuestionMark < 0) { | |
92 | return url + ";jsessionid=" + request.getSession().getId(); | |
93 | } else { | |
94 | return url.substring(0, indexQuestionMark) + ";jsessionid=" + request.getSession().getId() + url.substring(indexQuestionMark); | |
95 | } | |
96 | } | |
97 | ||
98 | public String getUrl() { | |
99 | return url; | |
100 | } | |
101 | ||
102 | public void setUrl(String url) { | |
103 | this.url = url; | |
104 | } | |
105 | ||
106 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | import java.io.IOException; | |
3 | import java.io.Writer; | |
4 | import java.util.ArrayList; | |
5 | import java.util.Collection; | |
6 | ||
7 | import org.w3c.dom.Document; | |
8 | import org.w3c.dom.Element; | |
9 | import org.xmlpull.v1.XmlSerializer; | |
10 | ||
11 | public class Folder implements ModelElement { | |
12 | ||
13 | private Collection<ModelElement> modelElements; | |
14 | private ViewPosition viewPosition; | |
15 | private String name; | |
16 | private String description; | |
17 | private Boolean visibility; | |
18 | ||
19 | public Folder() {} | |
20 | ||
21 | public Folder(String name) { | |
22 | this.name = name; | |
23 | } | |
24 | ||
25 | public ViewPosition getViewPosition() { | |
26 | return viewPosition; | |
27 | } | |
28 | ||
29 | public void setViewPosition(ViewPosition viewPosition) { | |
30 | this.viewPosition = viewPosition; | |
31 | } | |
32 | ||
33 | public Collection<ModelElement> getModelElements() { | |
34 | return modelElements; | |
35 | } | |
36 | ||
37 | public void setModelElements(Collection<ModelElement> modelElements) { | |
38 | this.modelElements = modelElements; | |
39 | } | |
40 | ||
41 | public void add(ModelElement element) { | |
42 | if (modelElements == null) { | |
43 | modelElements = new ArrayList<ModelElement>(); | |
44 | } | |
45 | modelElements.add(element); | |
46 | } | |
47 | ||
48 | public void add(Collection<ModelElement> modelElements) { | |
49 | if (this.modelElements == null) { | |
50 | this.modelElements = modelElements; | |
51 | } else { | |
52 | this.modelElements.addAll(modelElements); | |
53 | } | |
54 | } | |
55 | ||
56 | public String getDescription() { | |
57 | return description; | |
58 | } | |
59 | ||
60 | public void setDescription(String description) { | |
61 | this.description = description; | |
62 | } | |
63 | ||
64 | public String getName() { | |
65 | return name; | |
66 | } | |
67 | ||
68 | public void setName(String name) { | |
69 | this.name = name; | |
70 | } | |
71 | ||
72 | public Boolean getVisibility() { | |
73 | return visibility; | |
74 | } | |
75 | ||
76 | public void setVisibility(Boolean visibility) { | |
77 | this.visibility = visibility; | |
78 | } | |
79 | ||
80 | public void addKml(Element parentElement, Model model, Document xmlDocument) throws ModelException { | |
81 | Element folderElement = xmlDocument.createElement("Folder"); | |
82 | ||
83 | if (name != null) { | |
84 | Element nameElement = xmlDocument.createElement("name"); | |
85 | nameElement.appendChild(xmlDocument.createTextNode(name)); | |
86 | folderElement.appendChild(nameElement); | |
87 | } | |
88 | ||
89 | if (description != null) { | |
90 | Element descriptionElement = xmlDocument.createElement("description"); | |
91 | descriptionElement.appendChild(xmlDocument.createCDATASection(description)); | |
92 | folderElement.appendChild(descriptionElement); | |
93 | } | |
94 | ||
95 | if (viewPosition != null) { | |
96 | viewPosition.addKml(folderElement, model, xmlDocument); | |
97 | } | |
98 | ||
99 | if (modelElements != null) { | |
100 | for (ModelElement modelElement : modelElements) { | |
101 | // If the object is a MapObject it is only being added if: | |
102 | // - ENABLE_ONLY_SHOW_OBJECTS_VISIBLE_TO_OBSERVER is false or the object is inside the view to the observer | |
103 | // - observer == null or distance to observer is withoin the visibleFrom/To values to the object | |
104 | boolean showCurrentModelElement; | |
105 | if (!(modelElement instanceof MapObject) || model.getObserver() == null) { | |
106 | showCurrentModelElement = true; | |
107 | } else { | |
108 | MapObject mapObject = (MapObject) modelElement; | |
109 | if (mapObject.getLocation() != null) { | |
110 | if (!model.ENABLE_ONLY_SHOW_OBJECTS_VISIBLE_TO_OBSERVER || model.getObserver().isVisibleToObserver(mapObject.getLocation())) { | |
111 | double distanceToObserver = model.getObserver().distanceTo(mapObject.getLocation()); | |
112 | MapObjectClass mapObjectClass = mapObject.getMapObjectClass(); | |
113 | if (mapObjectClass == null) { | |
114 | showCurrentModelElement = true; | |
115 | } else { | |
116 | if (!model.ENABLE_DETAILS_DEPENDS_ON_DISTANCE_TO_OBSERVER || ((mapObjectClass.getVisibleFrom() == null || mapObjectClass.getVisibleFrom() < distanceToObserver) && (mapObjectClass.getVisibleTo() == null || mapObjectClass.getVisibleTo() > distanceToObserver))) { | |
117 | showCurrentModelElement = true; | |
118 | } else { | |
119 | showCurrentModelElement = false; | |
120 | } | |
121 | } | |
122 | } else { | |
123 | showCurrentModelElement = false; | |
124 | } | |
125 | } else { | |
126 | showCurrentModelElement = true; | |
127 | } | |
128 | } | |
129 | if (showCurrentModelElement) { | |
130 | modelElement.addKml(folderElement, model, xmlDocument); | |
131 | } | |
132 | } | |
133 | } | |
134 | ||
135 | if (visibility != null) { | |
136 | Element visibilityElement = xmlDocument.createElement("visibility"); | |
137 | visibilityElement.appendChild(xmlDocument.createTextNode((visibility) ? "1" : "0")); | |
138 | folderElement.appendChild(visibilityElement); | |
139 | } | |
140 | ||
141 | parentElement.appendChild(folderElement); | |
142 | } | |
143 | ||
144 | public void addKmlXPP(Model model, XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException { | |
145 | // TODO This is a temp version of this method for testing the speed only | |
146 | serializer.startTag(null, "Folder"); | |
147 | if (modelElements != null) { | |
148 | for (ModelElement modelElement : modelElements) { | |
149 | if (modelElement instanceof MapObject) { | |
150 | ((MapObject) modelElement).addKmlXPP(model, serializer); | |
151 | } | |
152 | } | |
153 | } | |
154 | serializer.endTag(null, "Folder"); | |
155 | } | |
156 | ||
157 | public void addKmlDirect(Model model, Writer writer) throws IOException { | |
158 | // TODO This is a temp version of this method for testing the speed only | |
159 | writer.write("<Folder>"); | |
160 | ||
161 | if (modelElements != null) { | |
162 | for (ModelElement modelElement : modelElements) { | |
163 | if (modelElement instanceof MapObject) { | |
164 | ((MapObject) modelElement).addKmlDirect(model, writer); | |
165 | } | |
166 | } | |
167 | } | |
168 | writer.write("</Folder>"); | |
169 | } | |
170 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | import java.util.ArrayList; | |
3 | import java.util.Collection; | |
4 | ||
5 | import org.boehn.gef.coordinates.CartesianCoordinate; | |
6 | import org.boehn.gef.coordinates.Coordinate; | |
7 | import org.boehn.gef.coordinates.EarthCoordinate; | |
8 | import org.w3c.dom.Document; | |
9 | import org.w3c.dom.Element; | |
10 | ||
11 | public class GraphicalModel implements GraphicalModelElement { | |
12 | ||
13 | private Collection<GraphicalModelElement> elements; | |
14 | private Integer visibleFrom; | |
15 | private Integer visibleTo; | |
16 | ||
17 | public GraphicalModel() {} | |
18 | ||
19 | public Collection<GraphicalModelElement> getElements() { | |
20 | return elements; | |
21 | } | |
22 | ||
23 | public void setElements(Collection<GraphicalModelElement> elements) { | |
24 | this.elements = elements; | |
25 | } | |
26 | ||
27 | public void addGraphicalModelElement(GraphicalModelElement graphicalModelElement) { | |
28 | if (elements == null) { | |
29 | elements = new ArrayList<GraphicalModelElement>(); | |
30 | } | |
31 | elements.add(graphicalModelElement); | |
32 | } | |
33 | ||
34 | public Integer getVisibleFrom() { | |
35 | return visibleFrom; | |
36 | } | |
37 | ||
38 | public void setVisibleFrom(Integer visibleFrom) { | |
39 | this.visibleFrom = visibleFrom; | |
40 | } | |
41 | ||
42 | public Integer getVisibleTo() { | |
43 | return visibleTo; | |
44 | } | |
45 | ||
46 | public void setVisibleTo(Integer visibleTo) { | |
47 | this.visibleTo = visibleTo; | |
48 | } | |
49 | ||
50 | public Collection<Coordinate> getCoordinates() { | |
51 | Collection<Coordinate> coordinates = new ArrayList<Coordinate>(); | |
52 | for (GraphicalModelElement element : elements) { | |
53 | coordinates.addAll(element.getCoordinates()); | |
54 | } | |
55 | return coordinates; | |
56 | } | |
57 | ||
58 | public void addKml(Element parentElement, Model model, Document xmlDocument, EarthCoordinate location, Double rotation, CartesianCoordinate localReferenceCoordinate, CartesianCoordinate scale) throws ModelException { | |
59 | if (elements != null) { | |
60 | for (GraphicalModelElement element : elements) { | |
61 | element.addKml(parentElement, model, xmlDocument, location, rotation, localReferenceCoordinate, scale); | |
62 | } | |
63 | } | |
64 | } | |
65 | ||
66 | public String toString() { | |
67 | StringBuffer text = new StringBuffer("GraphicalModel:\n"); | |
68 | text.append(" visibleFrom: " + visibleFrom + "\n"); | |
69 | text.append(" visibleTo: " + visibleTo + "\n"); | |
70 | text.append(" elements: " + elements); | |
71 | return text.toString(); | |
72 | } | |
73 | ||
74 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | import org.boehn.gef.coordinates.CartesianCoordinate; | |
5 | import org.boehn.gef.coordinates.Coordinate; | |
6 | import org.boehn.gef.coordinates.EarthCoordinate; | |
7 | import org.w3c.dom.Document; | |
8 | import org.w3c.dom.Element; | |
9 | ||
10 | public interface GraphicalModelElement { | |
11 | ||
12 | public Collection<Coordinate> getCoordinates(); | |
13 | public void addKml(Element parentElement, Model model, Document xmlDocument, EarthCoordinate earthCoordinate, Double rotation, CartesianCoordinate localReferenceCoordinate, CartesianCoordinate scale) throws ModelException; | |
14 | ||
15 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | import java.io.IOException; | |
3 | import java.io.Writer; | |
4 | import java.util.ArrayList; | |
5 | import java.util.List; | |
6 | ||
7 | import org.boehn.gef.coordinates.CartesianCoordinate; | |
8 | import org.boehn.gef.coordinates.EarthCoordinate; | |
9 | import org.boehn.gef.coordinates.TimeAndPlace; | |
10 | import org.w3c.dom.Document; | |
11 | import org.w3c.dom.Element; | |
12 | import org.xmlpull.v1.XmlSerializer; | |
13 | ||
14 | public class MapObject implements ModelElement { | |
15 | ||
16 | private String name; | |
17 | private String description; | |
18 | private EarthCoordinate location; | |
19 | private MapObjectClass mapObjectClass; | |
20 | private List<Button> buttons; | |
21 | private List<TimeAndPlace> movements; | |
22 | private String snippet; | |
23 | private Boolean visibility; | |
24 | ||
25 | private Double rotation; | |
26 | private CartesianCoordinate localReferenceCoordinate; | |
27 | private CartesianCoordinate scale; | |
28 | ||
29 | public MapObject() {} | |
30 | ||
31 | public MapObject(String name) { | |
32 | this.name = name; | |
33 | } | |
34 | ||
35 | public MapObject(MapObjectClass mapObjectClass) { | |
36 | this.mapObjectClass = mapObjectClass; | |
37 | } | |
38 | ||
39 | public MapObject(String name, MapObjectClass mapObjectClass) { | |
40 | this.name = name; | |
41 | this.mapObjectClass = mapObjectClass; | |
42 | } | |
43 | ||
44 | public MapObjectClass getMapObjectClass() { | |
45 | return mapObjectClass; | |
46 | } | |
47 | ||
48 | public void setMapObjectClass(MapObjectClass mapObjectClass) { | |
49 | this.mapObjectClass = mapObjectClass; | |
50 | } | |
51 | ||
52 | public CartesianCoordinate getLocalReferenceCoordinate() { | |
53 | return localReferenceCoordinate; | |
54 | } | |
55 | ||
56 | public void setLocalReferenceCoordinate( | |
57 | CartesianCoordinate localReferenceCoordinate) { | |
58 | this.localReferenceCoordinate = localReferenceCoordinate; | |
59 | } | |
60 | ||
61 | public Double getRotation() { | |
62 | return rotation; | |
63 | } | |
64 | ||
65 | public void setRotation(Double rotation) { | |
66 | this.rotation = rotation; | |
67 | } | |
68 | ||
69 | public CartesianCoordinate getScale() { | |
70 | return scale; | |
71 | } | |
72 | ||
73 | public void setScale(CartesianCoordinate scale) { | |
74 | this.scale = scale; | |
75 | } | |
76 | ||
77 | public Boolean getVisibility() { | |
78 | return visibility; | |
79 | } | |
80 | ||
81 | public void setVisibility(Boolean visibility) { | |
82 | this.visibility = visibility; | |
83 | } | |
84 | ||
85 | public void setButtons(List<Button> buttons) { | |
86 | this.buttons = buttons; | |
87 | } | |
88 | ||
89 | public void addButton(Button button) { | |
90 | if (buttons == null) { | |
91 | buttons = new ArrayList<Button>(); | |
92 | } | |
93 | buttons.add(button); | |
94 | } | |
95 | ||
96 | public void addButtons(List<Button> buttons) { | |
97 | if (this.buttons == null) { | |
98 | this.buttons = buttons; | |
99 | } else { | |
100 | this.buttons.addAll(buttons); | |
101 | } | |
102 | } | |
103 | ||
104 | public String getDescription() { | |
105 | return description; | |
106 | } | |
107 | ||
108 | public void setDescription(String description) { | |
109 | this.description = description; | |
110 | } | |
111 | ||
112 | public String getDescriptionTextWithButtons(Model model) { | |
113 | StringBuffer result = new StringBuffer(); | |
114 | if (buttons != null) { | |
115 | for (Button button : buttons) { | |
116 | result.append(button.toHtml(model) + "<br />"); | |
117 | } | |
118 | } | |
119 | if (description != null) { | |
120 | result.append(description); | |
121 | } | |
122 | ||
123 | return (result.length() == 0) ? null : result.toString(); | |
124 | } | |
125 | ||
126 | public EarthCoordinate getLocation() { | |
127 | return location; | |
128 | } | |
129 | ||
130 | public void setLocation(EarthCoordinate earthCoordinate) { | |
131 | this.location = earthCoordinate; | |
132 | } | |
133 | ||
134 | public String getName() { | |
135 | return name; | |
136 | } | |
137 | ||
138 | public void setName(String name) { | |
139 | this.name = name; | |
140 | } | |
141 | ||
142 | public String getSnippet() { | |
143 | return snippet; | |
144 | } | |
145 | ||
146 | public void setSnippet(String snippet) { | |
147 | this.snippet = snippet; | |
148 | } | |
149 | ||
150 | public void addKml(Element parentElement, Model model, Document xmlDocument) throws ModelException { | |
151 | ||
152 | Element placemarkElement = xmlDocument.createElement("Placemark"); | |
153 | ||
154 | if (name != null) { | |
155 | Element nameElement = xmlDocument.createElement("name"); | |
156 | nameElement.appendChild(xmlDocument.createTextNode(name)); | |
157 | placemarkElement.appendChild(nameElement); | |
158 | } | |
159 | ||
160 | if (snippet != null) { | |
161 | Element snippetElement = xmlDocument.createElement("Snippet"); | |
162 | snippetElement.appendChild(xmlDocument.createTextNode(snippet)); | |
163 | placemarkElement.appendChild(snippetElement); | |
164 | } | |
165 | ||
166 | String descriptionText = getDescriptionTextWithButtons(model); | |
167 | if (descriptionText != null) { | |
168 | Element descriptionElement = xmlDocument.createElement("description"); | |
169 | descriptionElement.appendChild(xmlDocument.createCDATASection(descriptionText)); | |
170 | placemarkElement.appendChild(descriptionElement); | |
171 | } | |
172 | ||
173 | if (mapObjectClass != null) { | |
174 | ||
175 | mapObjectClass.addKml(this, parentElement, model, xmlDocument, location, rotation, localReferenceCoordinate, scale, name); | |
176 | ||
177 | if (mapObjectClass.getStyleUrl() != null || mapObjectClass.getStyle() != null) { | |
178 | Element styleUrlElement = xmlDocument.createElement("styleUrl"); | |
179 | styleUrlElement.appendChild(xmlDocument.createTextNode((mapObjectClass.getStyleUrl() != null ? mapObjectClass.getStyleUrl() : "#" + mapObjectClass.getStyle().getId()))); | |
180 | placemarkElement.appendChild(styleUrlElement); | |
181 | } | |
182 | } | |
183 | ||
184 | if (location != null) { | |
185 | location.addKml(placemarkElement, model, xmlDocument); | |
186 | } | |
187 | ||
188 | if (visibility != null) { | |
189 | Element visibilityElement = xmlDocument.createElement("visibility"); | |
190 | visibilityElement.appendChild(xmlDocument.createTextNode((visibility) ? "1" : "0")); | |
191 | placemarkElement.appendChild(visibilityElement); | |
192 | } | |
193 | ||
194 | parentElement.appendChild(placemarkElement); | |
195 | } | |
196 | ||
197 | public void addKmlXPP(Model model, XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException { | |
198 | // TODO this is a temp method for speed testing | |
199 | serializer.startTag(null, "Placemark"); | |
200 | ||
201 | if (name != null) { | |
202 | serializer.startTag(null, "name"); | |
203 | serializer.text(name); | |
204 | serializer.endTag(null, "name"); | |
205 | } | |
206 | ||
207 | String descriptionText = getDescriptionTextWithButtons(model); | |
208 | if (descriptionText != null) { | |
209 | serializer.startTag(null, "description"); | |
210 | serializer.cdsect(descriptionText); | |
211 | serializer.endTag(null, "description"); | |
212 | } | |
213 | ||
214 | if (location != null) { | |
215 | location.addKmlXPP(model, serializer); | |
216 | } | |
217 | serializer.endTag(null, "Placemark"); | |
218 | } | |
219 | ||
220 | public void addKmlDirect(Model model, Writer writer) throws IOException { | |
221 | // TODO this is a temp method for speed testing | |
222 | writer.write("<Placemark>"); | |
223 | ||
224 | if (name != null) { | |
225 | writer.write("<name>" + name + "</name>"); | |
226 | } | |
227 | ||
228 | String descriptionText = getDescriptionTextWithButtons(model); | |
229 | if (descriptionText != null) { | |
230 | writer.write("<description>" + descriptionText + "</description>"); | |
231 | } | |
232 | ||
233 | if (location != null) { | |
234 | location.addKmlDirect(model, writer); | |
235 | } | |
236 | writer.write("</Placemark>"); | |
237 | } | |
238 | ||
239 | public List<TimeAndPlace> getMovements() { | |
240 | return movements; | |
241 | } | |
242 | ||
243 | public void setMovements(List<TimeAndPlace> movements) { | |
244 | this.movements = movements; | |
245 | } | |
246 | ||
247 | public void addMovement(TimeAndPlace movement) { | |
248 | if (this.movements == null) { | |
249 | this.movements = new ArrayList<TimeAndPlace>(); | |
250 | } | |
251 | this.movements.add(movement); | |
252 | } | |
253 | ||
254 | public String toString() { | |
255 | StringBuffer text = new StringBuffer("MapObject:\n"); | |
256 | text.append(" name: '" + name + "'\n"); | |
257 | text.append(" description: '" + description + "'\n"); | |
258 | text.append(" rotation: " + rotation + "\n"); | |
259 | text.append(" scale: " + scale + "\n"); | |
260 | text.append(" localReferenceCoordinate: " + localReferenceCoordinate + "\n"); | |
261 | text.append(" location: " + location + "\n"); | |
262 | text.append(" buttons: " + buttons + "\n"); | |
263 | text.append(" movements: " + movements + "\n"); | |
264 | text.append(" mapObjectClass: " + mapObjectClass + "\n"); | |
265 | return text.toString(); | |
266 | } | |
267 | ||
268 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | import java.util.ArrayList; | |
3 | import java.util.Calendar; | |
4 | import java.util.Date; | |
5 | import java.util.GregorianCalendar; | |
6 | import java.util.List; | |
7 | ||
8 | import org.boehn.gef.coordinates.CartesianCoordinate; | |
9 | import org.boehn.gef.coordinates.EarthCoordinate; | |
10 | import org.boehn.gef.coordinates.TimeAndPlace; | |
11 | import org.boehn.gef.style.Style; | |
12 | import org.w3c.dom.Document; | |
13 | import org.w3c.dom.Element; | |
14 | ||
15 | public class MapObjectClass { | |
16 | ||
17 | private String className; | |
18 | private List<GraphicalModel> models; | |
19 | private boolean showTail = true; | |
20 | private boolean showModels = true; | |
21 | private Integer visibleFrom; | |
22 | private Integer visibleTo; | |
23 | private Integer tailHistoryLimit; | |
24 | private Integer tailVisibleFrom; | |
25 | private Integer tailVisibleTo; | |
26 | private String styleUrl; | |
27 | private Style style; | |
28 | ||
29 | public MapObjectClass(String className) { | |
30 | this.className = className; | |
31 | } | |
32 | ||
33 | public String getClassName() { | |
34 | return className; | |
35 | } | |
36 | ||
37 | public void setClassName(String className) { | |
38 | this.className = className; | |
39 | } | |
40 | ||
41 | public List<GraphicalModel> getModels() { | |
42 | return models; | |
43 | } | |
44 | ||
45 | public void setModels(List<GraphicalModel> models) { | |
46 | this.models = models; | |
47 | } | |
48 | ||
49 | public void addModel(GraphicalModel model) { | |
50 | if (models == null) { | |
51 | models = new ArrayList<GraphicalModel>(); | |
52 | } | |
53 | models.add(model); | |
54 | } | |
55 | ||
56 | public void addModels(List<GraphicalModel> models) { | |
57 | if (this.models == null) { | |
58 | this.models = models; | |
59 | } else { | |
60 | this.models.addAll(models); | |
61 | } | |
62 | } | |
63 | ||
64 | public Integer getVisibleFrom() { | |
65 | return visibleFrom; | |
66 | } | |
67 | ||
68 | public void setVisibleFrom(Integer visibleFrom) { | |
69 | this.visibleFrom = visibleFrom; | |
70 | } | |
71 | ||
72 | public Integer getVisibleTo() { | |
73 | return visibleTo; | |
74 | } | |
75 | ||
76 | public void setVisibleTo(Integer visibleTo) { | |
77 | this.visibleTo = visibleTo; | |
78 | } | |
79 | ||
80 | public String getStyleUrl() { | |
81 | return styleUrl; | |
82 | } | |
83 | ||
84 | public void setStyleUrl(String styleUrl) { | |
85 | this.styleUrl = styleUrl; | |
86 | // styleUrl and style cannot be set at the same time | |
87 | this.style = null; | |
88 | } | |
89 | ||
90 | public Style getStyle() { | |
91 | return style; | |
92 | } | |
93 | ||
94 | public void setStyle(Style style) { | |
95 | this.style = style; | |
96 | // styleUrl and style cannot be set at the same time | |
97 | this.styleUrl = null; | |
98 | } | |
99 | ||
100 | public boolean getShowModels() { | |
101 | return showModels; | |
102 | } | |
103 | ||
104 | public void setShowModels(boolean showModel) { | |
105 | this.showModels = showModel; | |
106 | } | |
107 | ||
108 | public boolean getShowTail() { | |
109 | return showTail; | |
110 | } | |
111 | ||
112 | public void setShowTail(boolean showTail) { | |
113 | this.showTail = showTail; | |
114 | } | |
115 | ||
116 | public Integer getTailVisibleFrom() { | |
117 | return tailVisibleFrom; | |
118 | } | |
119 | ||
120 | public void setTailVisibleFrom(Integer tailVisibleFrom) { | |
121 | this.tailVisibleFrom = tailVisibleFrom; | |
122 | } | |
123 | ||
124 | public Integer getTailVisibleTo() { | |
125 | return tailVisibleTo; | |
126 | } | |
127 | ||
128 | public void setTailVisibleTo(Integer tailVisibleTo) { | |
129 | this.tailVisibleTo = tailVisibleTo; | |
130 | } | |
131 | ||
132 | public Integer getTailHistoryLimit() { | |
133 | return tailHistoryLimit; | |
134 | } | |
135 | ||
136 | public void setTailHistoryLimit(Integer tailHistoryLimit) { | |
137 | this.tailHistoryLimit = tailHistoryLimit; | |
138 | } | |
139 | ||
140 | public void addKml(MapObject mapObject, Element parentElement, Model model, Document xmlDocument, EarthCoordinate location, Double rotation, CartesianCoordinate localReferenceCoordinate, CartesianCoordinate scale, String name) throws ModelException { | |
141 | if (models != null || (mapObject.getMovements() != null && showTail)) { | |
142 | ||
143 | boolean objectHasGraphicalElementToDraw = false; | |
144 | ||
145 | Element multiGeometryElement = xmlDocument.createElement("MultiGeometry"); | |
146 | // If we are going to draw a tail after this MapObject, we have to add another model containing the tail. We cannot add this | |
147 | // model to models, because then it will be added to all MapObject using this MapObject class. Thus we have to make a new list | |
148 | List<GraphicalModel> graphicalModelsTemp; | |
149 | if (mapObject.getMovements() == null || !showTail) { | |
150 | graphicalModelsTemp = models; | |
151 | } else { | |
152 | graphicalModelsTemp = new ArrayList<GraphicalModel>(models); | |
153 | GraphicalModel graphicalModel = new GraphicalModel(); | |
154 | Path path = new Path(); | |
155 | path.addCoordinate(location); | |
156 | ||
157 | // We stop drawing the tail if passing the timeHistoryLimit | |
158 | Date timeHistoryLimitAbsolute; | |
159 | if (tailHistoryLimit != null) { | |
160 | GregorianCalendar calendar = new GregorianCalendar(); | |
161 | calendar.add(Calendar.SECOND, -tailHistoryLimit); | |
162 | timeHistoryLimitAbsolute = calendar.getTime(); | |
163 | } else { | |
164 | timeHistoryLimitAbsolute = null; | |
165 | } | |
166 | ||
167 | for (TimeAndPlace timeAndPlace : mapObject.getMovements()) { | |
168 | if (timeHistoryLimitAbsolute != null && timeHistoryLimitAbsolute.after(timeAndPlace.getTime())) { | |
169 | // We stop drawing the tail because the tail history has passed the timeHistoryLimit | |
170 | break; | |
171 | } | |
172 | path.addCoordinate(timeAndPlace.getPlace()); | |
173 | } | |
174 | graphicalModel.addGraphicalModelElement(path); | |
175 | graphicalModel.setVisibleFrom(tailVisibleFrom); | |
176 | graphicalModel.setVisibleTo(tailVisibleTo); | |
177 | graphicalModelsTemp.add(graphicalModel); | |
178 | } | |
179 | Double distanceToObserver = (model.getObserver() != null && mapObject.getLocation() != null) ? model.getObserver().distanceTo(mapObject.getLocation()) : null; | |
180 | for (GraphicalModel graphicalModel : graphicalModelsTemp) { | |
181 | if (!model.ENABLE_DETAILS_DEPENDS_ON_DISTANCE_TO_OBSERVER || (distanceToObserver == null || (graphicalModel.getVisibleTo() == null || graphicalModel.getVisibleTo() > distanceToObserver) && (graphicalModel.getVisibleFrom() == null || graphicalModel.getVisibleFrom() < distanceToObserver))) { | |
182 | graphicalModel.addKml(multiGeometryElement, model, xmlDocument, location, rotation, localReferenceCoordinate, scale); | |
183 | objectHasGraphicalElementToDraw = true; | |
184 | } | |
185 | } | |
186 | ||
187 | if (objectHasGraphicalElementToDraw) { | |
188 | Element placemarkElement = xmlDocument.createElement("Placemark"); | |
189 | Element nameElement = xmlDocument.createElement("name"); | |
190 | nameElement.appendChild(xmlDocument.createTextNode((name != null) ? name + " model" : "model")); | |
191 | placemarkElement.appendChild(nameElement); | |
192 | if (styleUrl != null || style != null) { | |
193 | Element styleUrlElement = xmlDocument.createElement("styleUrl"); | |
194 | styleUrlElement.appendChild(xmlDocument.createTextNode((styleUrl != null ? styleUrl : "#" + style.getId()))); | |
195 | placemarkElement.appendChild(styleUrlElement); | |
196 | } | |
197 | placemarkElement.appendChild(multiGeometryElement); | |
198 | parentElement.appendChild(placemarkElement); | |
199 | } | |
200 | } | |
201 | } | |
202 | ||
203 | public String toString() { | |
204 | StringBuffer text = new StringBuffer("MapObjectClass:\n"); | |
205 | text.append(" className: '" + className + "'\n"); | |
206 | text.append(" styleUrl: '" + styleUrl + "'\n"); | |
207 | text.append(" models: " + models + "\n"); | |
208 | text.append(" showModels: " + showModels + "\n"); | |
209 | text.append(" showTail: " + showTail + "\n"); | |
210 | text.append(" tailVisibleFrom: " + tailVisibleFrom + "\n"); | |
211 | text.append(" tailVisibleTo: " + tailVisibleTo + "\n"); | |
212 | text.append(" timeHistoryLimit: " + tailHistoryLimit + "\n"); | |
213 | return text.toString(); | |
214 | } | |
215 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | import java.io.FileOutputStream; | |
3 | import java.io.IOException; | |
4 | import java.io.OutputStream; | |
5 | import java.io.OutputStreamWriter; | |
6 | import java.io.UnsupportedEncodingException; | |
7 | import java.util.ArrayList; | |
8 | import java.util.Hashtable; | |
9 | import java.util.List; | |
10 | ||
11 | import javax.xml.parsers.DocumentBuilderFactory; | |
12 | import javax.xml.parsers.ParserConfigurationException; | |
13 | import javax.xml.transform.OutputKeys; | |
14 | import javax.xml.transform.Result; | |
15 | import javax.xml.transform.Transformer; | |
16 | import javax.xml.transform.TransformerConfigurationException; | |
17 | import javax.xml.transform.TransformerException; | |
18 | import javax.xml.transform.TransformerFactory; | |
19 | import javax.xml.transform.dom.DOMSource; | |
20 | import javax.xml.transform.stream.StreamResult; | |
21 | ||
22 | import org.boehn.gef.servlet.Observer; | |
23 | import org.boehn.gef.style.Style; | |
24 | import org.w3c.dom.Document; | |
25 | import org.w3c.dom.Element; | |
26 | ||
27 | public class Model { | |
28 | ||
29 | private List<ModelElement> modelElements; | |
30 | private Observer observer; | |
31 | private Hashtable<String,Style> styles; | |
32 | ||
33 | public int CURRENT_TIME_OFFSET = 0; // in seconds | |
34 | public int TAIL_HISTORY_TIME_LIMIT = 3600; // in seconds | |
35 | public boolean ENABLE_TAILS = true; | |
36 | public boolean ENABLE_3D_OBJECTS = true; | |
37 | public int DISTANCE_LIMIT_TAIL = 15000; // in meters | |
38 | public int DISTANCE_LIMIT_3D_OBJECTS = 15000; // in meters | |
39 | public boolean ENABLE_DETAILS_DEPENDS_ON_DISTANCE_TO_OBSERVER = true; | |
40 | public boolean ENABLE_ONLY_SHOW_OBJECTS_VISIBLE_TO_OBSERVER = true; | |
41 | public String ENCODING = "UTF-8"; | |
42 | public boolean XML_INDENT = false; | |
43 | ||
44 | public Model() { | |
45 | modelElements = new ArrayList<ModelElement>(); | |
46 | } | |
47 | ||
48 | public void add(ModelElement element) { | |
49 | modelElements.add(element); | |
50 | } | |
51 | ||
52 | public List<ModelElement> getModelElements() { | |
53 | return modelElements; | |
54 | } | |
55 | ||
56 | public void setModelElements(List<ModelElement> modelElements) { | |
57 | this.modelElements = modelElements; | |
58 | } | |
59 | ||
60 | public Observer getObserver() { | |
61 | return observer; | |
62 | } | |
63 | ||
64 | public void setObserver(Observer observer) { | |
65 | this.observer = observer; | |
66 | } | |
67 | ||
68 | public Hashtable<String, Style> getStyles() { | |
69 | return styles; | |
70 | } | |
71 | ||
72 | public void setStyles(Hashtable<String, Style> styles) { | |
73 | this.styles = styles; | |
74 | } | |
75 | ||
76 | public void addStyle(Style style) { | |
77 | if (styles == null) { | |
78 | styles = new Hashtable<String, Style>(); | |
79 | } | |
80 | // We give a name to the style if it is missing that | |
81 | if (style.getId() == null) { | |
82 | int i = styles.size(); | |
83 | while (styles.containsKey("style" + i)) { | |
84 | i++; | |
85 | } | |
86 | style.setId("style" + i); | |
87 | } | |
88 | styles.put(style.getId(), style); | |
89 | } | |
90 | ||
91 | public Style getStyle(String id) { | |
92 | return styles.get(id); | |
93 | } | |
94 | ||
95 | public void write(OutputStream outputStream) throws ModelException { | |
96 | try { | |
97 | Result result = new StreamResult(new OutputStreamWriter(outputStream, ENCODING)); | |
98 | Transformer transformer = TransformerFactory.newInstance().newTransformer(); | |
99 | if (XML_INDENT) { | |
100 | transformer.setOutputProperty(OutputKeys.INDENT, "yes"); | |
101 | } | |
102 | transformer.setOutputProperty(OutputKeys.ENCODING, ENCODING); | |
103 | transformer.transform(new DOMSource(generateXmlDocument()),result); | |
104 | } catch (UnsupportedEncodingException e) { | |
105 | throw new ModelException(e); | |
106 | } catch (TransformerConfigurationException e) { | |
107 | throw new ModelException(e); | |
108 | } catch (TransformerException e) { | |
109 | throw new ModelException(e); | |
110 | } | |
111 | } | |
112 | ||
113 | public void write(String fileName) throws ModelException, IOException { | |
114 | FileOutputStream fileOutputStream = new FileOutputStream(fileName); | |
115 | write(fileOutputStream); | |
116 | fileOutputStream.close(); | |
117 | } | |
118 | ||
119 | /*public void writeXPP(String fileName) throws ModelException, IOException { | |
120 | FileOutputStream fileOutputStream = new FileOutputStream(fileName); | |
121 | writeXPP(fileOutputStream); | |
122 | fileOutputStream.close(); | |
123 | } | |
124 | ||
125 | public void writeDirect(String fileName) throws ModelException, IOException { | |
126 | FileOutputStream fileOutputStream = new FileOutputStream(fileName); | |
127 | writeDirect(fileOutputStream); | |
128 | fileOutputStream.close(); | |
129 | } | |
130 | ||
131 | public void writeXPP(OutputStream outputStream) throws ModelException { | |
132 | ||
133 | try { | |
134 | XmlPullParserFactory factory; | |
135 | factory = XmlPullParserFactory.newInstance(System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null); | |
136 | XmlSerializer serializer = factory.newSerializer(); | |
137 | serializer.setOutput(outputStream, "UTF-8"); | |
138 | serializer.startDocument(null, null); | |
139 | generateXmlDocumentXPP(serializer); | |
140 | serializer.endDocument(); | |
141 | } catch (XmlPullParserException e1) { | |
142 | e1.printStackTrace(); | |
143 | } catch (IOException e1) { | |
144 | e1.printStackTrace(); | |
145 | } | |
146 | } | |
147 | ||
148 | public void writeDirect(OutputStream outputStream) throws ModelException { | |
149 | try { | |
150 | Writer writer = new BufferedWriter(new OutputStreamWriter(outputStream, "UTF-8")); | |
151 | writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); | |
152 | generateXmlDocumentDirect(writer); | |
153 | writer.close(); | |
154 | } catch (IOException e1) { | |
155 | e1.printStackTrace(); | |
156 | } | |
157 | } | |
158 | ||
159 | public void generateXmlDocumentXPP(XmlSerializer serializer) throws ModelException, IllegalArgumentException, IllegalStateException, IOException { | |
160 | serializer.startTag(null, "kml"); | |
161 | serializer.attribute(null, "xmlns", "http://earth.google.com/kml/2.0"); | |
162 | serializer.endTag(null, "kml"); | |
163 | ||
164 | if (modelElements != null) { | |
165 | modelElements.addKmlXPP(this, serializer); | |
166 | } | |
167 | } | |
168 | ||
169 | public void generateXmlDocumentDirect(Writer writer) throws ModelException, IllegalArgumentException, IllegalStateException, IOException { | |
170 | writer.write("<kml xmlns=\"http://earth.google.com/kml/2.0\">"); | |
171 | ||
172 | if (modelElements != null) { | |
173 | modelElements.addKmlDirect(this, writer); | |
174 | } | |
175 | }*/ | |
176 | ||
177 | public Document generateXmlDocument() throws ModelException { | |
178 | Document xmlDocument; | |
179 | try { | |
180 | xmlDocument = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); | |
181 | } catch (ParserConfigurationException e) { | |
182 | throw new ModelException(e); | |
183 | } | |
184 | ||
185 | Element kmlElement = xmlDocument.createElement("kml"); | |
186 | kmlElement.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", "http://earth.google.com/kml/2.0"); | |
187 | xmlDocument.appendChild(kmlElement); | |
188 | ||
189 | Element documentElement = xmlDocument.createElement("Document"); | |
190 | kmlElement.appendChild(documentElement); | |
191 | ||
192 | if (styles != null) { | |
193 | for (Style style: styles.values()) { | |
194 | style.addKml(documentElement, this, xmlDocument); | |
195 | } | |
196 | } | |
197 | ||
198 | if (modelElements != null) { | |
199 | for (ModelElement modelElement: modelElements) | |
200 | modelElement.addKml(documentElement, this, xmlDocument); | |
201 | } | |
202 | ||
203 | return xmlDocument; | |
204 | } | |
205 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | import java.io.IOException; | |
3 | import java.io.Writer; | |
4 | ||
5 | import org.w3c.dom.Document; | |
6 | import org.w3c.dom.Element; | |
7 | import org.xmlpull.v1.XmlSerializer; | |
8 | ||
9 | public interface ModelElement { | |
10 | ||
11 | public void addKml(Element parentElement, Model model, Document xmlDocument) throws ModelException; | |
12 | public void addKmlXPP(Model model, XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException; | |
13 | public void addKmlDirect(Model model, Writer writer) throws IOException; | |
14 | ||
15 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | public class ModelException extends Exception { | |
3 | ||
4 | private static final long serialVersionUID = 1L; | |
5 | ||
6 | public ModelException() { | |
7 | super(); | |
8 | } | |
9 | ||
10 | public ModelException(String arg0) { | |
11 | super(arg0); | |
12 | } | |
13 | ||
14 | public ModelException(String arg0, Throwable arg1) { | |
15 | super(arg0, arg1); | |
16 | } | |
17 | ||
18 | public ModelException(Throwable arg0) { | |
19 | super(arg0); | |
20 | } | |
21 | ||
22 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | import java.io.File; | |
3 | import java.io.IOException; | |
4 | import java.util.Hashtable; | |
5 | ||
6 | import javax.xml.parsers.DocumentBuilder; | |
7 | import javax.xml.parsers.DocumentBuilderFactory; | |
8 | import javax.xml.parsers.ParserConfigurationException; | |
9 | ||
10 | import org.boehn.gef.coordinates.CartesianCoordinate; | |
11 | import org.boehn.gef.coordinates.Coordinate; | |
12 | import org.w3c.dom.Document; | |
13 | import org.w3c.dom.NamedNodeMap; | |
14 | import org.w3c.dom.Node; | |
15 | import org.w3c.dom.NodeList; | |
16 | import org.xml.sax.SAXException; | |
17 | ||
18 | public class ModelObjectFactory { | |
19 | ||
20 | private String fileName; | |
21 | private Hashtable<String, MapObjectClass> mapObjectClasses; | |
22 | ||
23 | public ModelObjectFactory(String fileName) throws IOException, ParserConfigurationException, SAXException { | |
24 | this.fileName = fileName; | |
25 | loadFile(); | |
26 | } | |
27 | ||
28 | public MapObject createMapObject(String className) { | |
29 | return new MapObject(getMapObjectClass(className)); | |
30 | } | |
31 | ||
32 | public MapObjectClass getMapObjectClass(String className) { | |
33 | MapObjectClass mapObjectClass = mapObjectClasses.get(className); | |
34 | if (mapObjectClass == null) { | |
35 | mapObjectClass = new MapObjectClass(className); | |
36 | mapObjectClasses.put(className, mapObjectClass); | |
37 | } | |
38 | return mapObjectClass; | |
39 | } | |
40 | ||
41 | public void loadFile() throws IOException, ParserConfigurationException, SAXException { | |
42 | mapObjectClasses = new Hashtable<String, MapObjectClass>(); | |
43 | DocumentBuilder documentBuilder; | |
44 | ||
45 | documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); | |
46 | Document document = documentBuilder.parse(new File(fileName)); | |
47 | NodeList documentNodes = document.getChildNodes(); | |
48 | for (int i = 0; i < documentNodes.getLength(); i++) { | |
49 | Node objectClassesNode = documentNodes.item(i); | |
50 | if ("mapObjectClasses".equals(objectClassesNode.getNodeName()) && objectClassesNode.getChildNodes().getLength() > 0) { | |
51 | NodeList objectClassesChildren = objectClassesNode.getChildNodes(); | |
52 | for (int j = 0; j < objectClassesChildren.getLength(); j ++) { | |
53 | Node mapObjectClassNode = objectClassesChildren.item(j); | |
54 | if ("mapObjectClass".equals(mapObjectClassNode.getNodeName())) { | |
55 | NamedNodeMap mapObjectClassAttributes = mapObjectClassNode.getAttributes(); | |
56 | ||
57 | // We make the mapObject class | |
58 | MapObjectClass mapObjectClass = new MapObjectClass(mapObjectClassAttributes.getNamedItem("className").getNodeValue()); | |
59 | ||
60 | // We read all optional parameters for the mapObject class | |
61 | if (mapObjectClassAttributes.getNamedItem("showTail") != null) { | |
62 | mapObjectClass.setShowTail(new Boolean(mapObjectClassAttributes.getNamedItem("showTail").getNodeValue())); | |
63 | } | |
64 | if (mapObjectClassAttributes.getNamedItem("showModel") != null) { | |
65 | mapObjectClass.setShowModels(new Boolean(mapObjectClassAttributes.getNamedItem("showModel").getNodeValue())); | |
66 | } | |
67 | if (mapObjectClassAttributes.getNamedItem("visibleFrom") != null) { | |
68 | mapObjectClass.setVisibleFrom(new Integer(mapObjectClassAttributes.getNamedItem("visibleFrom").getNodeValue())); | |
69 | } | |
70 | if (mapObjectClassAttributes.getNamedItem("visibleTo") != null) { | |
71 | mapObjectClass.setVisibleTo(new Integer(mapObjectClassAttributes.getNamedItem("visibleTo").getNodeValue())); | |
72 | } | |
73 | if (mapObjectClassAttributes.getNamedItem("tailHistoryLimit") != null) { | |
74 | mapObjectClass.setTailHistoryLimit(new Integer(mapObjectClassAttributes.getNamedItem("tailHistoryLimit").getNodeValue())); | |
75 | } | |
76 | if (mapObjectClassAttributes.getNamedItem("tailVisibleFrom") != null) { | |
77 | mapObjectClass.setTailVisibleFrom(new Integer(mapObjectClassAttributes.getNamedItem("tailVisibleFrom").getNodeValue())); | |
78 | } | |
79 | if (mapObjectClassAttributes.getNamedItem("tailVisibleTo") != null) { | |
80 | mapObjectClass.setTailVisibleTo(new Integer(mapObjectClassAttributes.getNamedItem("tailVisibleTo").getNodeValue())); | |
81 | } | |
82 | if (mapObjectClassAttributes.getNamedItem("styleUrl") != null) { | |
83 | mapObjectClass.setStyleUrl(mapObjectClassAttributes.getNamedItem("styleUrl").getNodeValue()); | |
84 | } | |
85 | ||
86 | // We load the children to the mapObjectClass | |
87 | NodeList mapObjectClassChildren = mapObjectClassNode.getChildNodes(); | |
88 | for (int k = 0; k < mapObjectClassChildren.getLength(); k++) { | |
89 | Node mapObjectClassChild = mapObjectClassChildren.item(k); | |
90 | if ("model".equals(mapObjectClassChild.getNodeName())) { | |
91 | GraphicalModel model = new GraphicalModel(); | |
92 | ||
93 | // We read the attributes to the model element | |
94 | NamedNodeMap modelAttributes = mapObjectClassChild.getAttributes(); | |
95 | if (modelAttributes.getNamedItem("visibleFrom") != null) { | |
96 | model.setVisibleFrom(new Integer(modelAttributes.getNamedItem("visibleFrom").getNodeValue())); | |
97 | } | |
98 | if (modelAttributes.getNamedItem("visibleTo") != null) { | |
99 | model.setVisibleTo(new Integer(modelAttributes.getNamedItem("visibleTo").getNodeValue())); | |
100 | } | |
101 | ||
102 | NodeList modelChildren = mapObjectClassChild.getChildNodes(); | |
103 | for (int l = 0; l < modelChildren.getLength(); l++) { | |
104 | Node modelChild =modelChildren.item(l); | |
105 | if ("polygon".equals(modelChild.getNodeName()) || "path".equals(modelChild.getNodeName())) { | |
106 | Path path; | |
107 | if ("polygon".equals(modelChild.getNodeName())) { | |
108 | path = new Polygon(); | |
109 | } else { | |
110 | path = new Path(); | |
111 | } | |
112 | ||
113 | // We read the attributes to the path/polygon element | |
114 | NamedNodeMap modelChildAttributes = modelChild.getAttributes(); | |
115 | if (modelChildAttributes.getNamedItem("altitudeMode") != null) { | |
116 | path.setAltitudeMode(AltitudeModes.valueOf(modelChildAttributes.getNamedItem("altitudeMode").getNodeValue())); | |
117 | } | |
118 | if (modelChildAttributes.getNamedItem("extrude") != null) { | |
119 | path.setExtrude(new Boolean(modelChildAttributes.getNamedItem("extrude").getNodeValue())); | |
120 | } | |
121 | ||
122 | // We read the children to the path/polygon | |
123 | NodeList pathChildren = modelChild.getChildNodes(); | |
124 | for (int m = 0; m < pathChildren.getLength(); m++) { | |
125 | Node pathChild = pathChildren.item(m); | |
126 | if ("coordinate".equals(pathChild.getNodeName())) { | |
127 | NamedNodeMap coordinateAttributes = pathChild.getAttributes(); | |
128 | Coordinate coordinate = new CartesianCoordinate(Double.parseDouble(coordinateAttributes.getNamedItem("x").getNodeValue()), Double.parseDouble(coordinateAttributes.getNamedItem("y").getNodeValue()), Double.parseDouble(coordinateAttributes.getNamedItem("z").getNodeValue())); | |
129 | path.addCoordinate(coordinate); | |
130 | } | |
131 | } | |
132 | model.addGraphicalModelElement(path); | |
133 | } | |
134 | } | |
135 | mapObjectClass.addModel(model); | |
136 | } | |
137 | } | |
138 | // We add the object class to the hashtable | |
139 | mapObjectClasses.put(mapObjectClass.getClassName(), mapObjectClass); | |
140 | } | |
141 | } | |
142 | break; | |
143 | } | |
144 | } | |
145 | } | |
146 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | import java.util.ArrayList; | |
3 | import java.util.List; | |
4 | ||
5 | import org.boehn.gef.coordinates.CartesianCoordinate; | |
6 | import org.boehn.gef.coordinates.Coordinate; | |
7 | import org.boehn.gef.coordinates.EarthCoordinate; | |
8 | import org.w3c.dom.Document; | |
9 | import org.w3c.dom.Element; | |
10 | ||
11 | public class Path implements GraphicalModelElement { | |
12 | ||
13 | private List<Coordinate> coordinates; | |
14 | private Boolean extrude; | |
15 | private Boolean tessellate; | |
16 | private AltitudeModes altitudeMode; | |
17 | ||
18 | public Path() {} | |
19 | ||
20 | public Path(List<Coordinate> coordinates) { | |
21 | this(coordinates, null, null, null); | |
22 | } | |
23 | ||
24 | public Path(List<Coordinate> coordinates, Boolean extrude, Boolean tessellate, AltitudeModes altitudeMode) { | |
25 | this.coordinates = coordinates; | |
26 | this.extrude = extrude; | |
27 | this.tessellate = tessellate; | |
28 | this.altitudeMode = altitudeMode; | |
29 | } | |
30 | ||
31 | public AltitudeModes getAltitudeMode() { | |
32 | return altitudeMode; | |
33 | } | |
34 | ||
35 | public void setAltitudeMode(AltitudeModes altitudeMode) { | |
36 | this.altitudeMode = altitudeMode; | |
37 | } | |
38 | ||
39 | public Boolean getExtrude() { | |
40 | return extrude; | |
41 | } | |
42 | ||
43 | public void setExtrude(Boolean extrude) { | |
44 | this.extrude = extrude; | |
45 | } | |
46 | ||
47 | public Boolean getTessellate() { | |
48 | return tessellate; | |
49 | } | |
50 | ||
51 | public void setTessellate(Boolean tessellate) { | |
52 | this.tessellate = tessellate; | |
53 | } | |
54 | ||
55 | public List<Coordinate> getCoordinates() { | |
56 | return coordinates; | |
57 | } | |
58 | ||
59 | public void setCoordinates(List<Coordinate> coordinates) { | |
60 | this.coordinates = coordinates; | |
61 | } | |
62 | ||
63 | public void addCoordinate(Coordinate coordinate) { | |
64 | if (coordinates == null) { | |
65 | coordinates = new ArrayList<Coordinate>(); | |
66 | } | |
67 | coordinates.add(coordinate); | |
68 | } | |
69 | ||
70 | public void addCoordinates(List<Coordinate> coordinates) { | |
71 | if (this.coordinates == null) { | |
72 | this.coordinates = coordinates; | |
73 | } else { | |
74 | this.coordinates.addAll(coordinates); | |
75 | } | |
76 | } | |
77 | ||
78 | public Element getCoordinates(Document xmlDocument, EarthCoordinate location, Double rotation, CartesianCoordinate localReferenceCoordinate, CartesianCoordinate scale) { | |
79 | Element coordinatesElement = xmlDocument.createElement("coordinates"); | |
80 | ||
81 | StringBuffer coordinatesText = new StringBuffer(); | |
82 | for (Coordinate coordinate : coordinates) { | |
83 | EarthCoordinate earthCoordinate = coordinate.toEarthCoordinate(location, rotation, localReferenceCoordinate, scale); | |
84 | coordinatesText.append(earthCoordinate.getLongitude() + "," + earthCoordinate.getLatitude() + "," + earthCoordinate.getAltitude() + " "); | |
85 | } | |
86 | // We remove the extra space added to the end of the string | |
87 | coordinatesText.deleteCharAt(coordinatesText.length()-1); | |
88 | ||
89 | coordinatesElement.appendChild(xmlDocument.createTextNode(coordinatesText.toString())); | |
90 | ||
91 | return coordinatesElement; | |
92 | } | |
93 | ||
94 | public void addKml(Element parentElement, Model model, Document xmlDocument, EarthCoordinate location, Double rotation, CartesianCoordinate localReferenceCoordinate, CartesianCoordinate scale) { | |
95 | Element pathElement = xmlDocument.createElement("LineString"); | |
96 | ||
97 | if (coordinates != null) { | |
98 | pathElement.appendChild(getCoordinates(xmlDocument, location, rotation, localReferenceCoordinate, scale)); | |
99 | } | |
100 | ||
101 | if (extrude != null) { | |
102 | Element extrudeElement = xmlDocument.createElement("extrude"); | |
103 | extrudeElement.appendChild(xmlDocument.createTextNode((extrude) ? "1" : "0")); | |
104 | pathElement.appendChild(extrudeElement); | |
105 | } | |
106 | ||
107 | if (tessellate != null) { | |
108 | Element tessellateElement = xmlDocument.createElement("tessellate"); | |
109 | tessellateElement.appendChild(xmlDocument.createTextNode((tessellate) ? "1" : "0")); | |
110 | pathElement.appendChild(tessellateElement); | |
111 | } | |
112 | ||
113 | if (altitudeMode != null) { | |
114 | Element altitudeModeElement = xmlDocument.createElement("altitudeMode"); | |
115 | altitudeModeElement.appendChild(xmlDocument.createTextNode(altitudeMode.toString())); | |
116 | pathElement.appendChild(altitudeModeElement); | |
117 | } | |
118 | ||
119 | parentElement.appendChild(pathElement); | |
120 | } | |
121 | ||
122 | public String toString() { | |
123 | StringBuffer text = new StringBuffer("Path"); | |
124 | text.append("altitudeMode: " + altitudeMode + "\n"); | |
125 | text.append("extrude: " + extrude + "\n"); | |
126 | text.append("tessellate: " + tessellate + "\n"); | |
127 | text.append("coordinates: " + coordinates + "\n"); | |
128 | return text.toString(); | |
129 | } | |
130 | ||
131 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | import java.util.List; | |
3 | ||
4 | import org.boehn.gef.coordinates.CartesianCoordinate; | |
5 | import org.boehn.gef.coordinates.Coordinate; | |
6 | import org.boehn.gef.coordinates.EarthCoordinate; | |
7 | import org.w3c.dom.Document; | |
8 | import org.w3c.dom.Element; | |
9 | ||
10 | public class Polygon extends Path { | |
11 | ||
12 | private Polygon subtractionPolygon; | |
13 | ||
14 | public Polygon() {} | |
15 | ||
16 | public Polygon(List<Coordinate> points) { | |
17 | this(points, null, null, null, null); | |
18 | } | |
19 | ||
20 | public Polygon(List<Coordinate> points, Polygon subtractionPolygon, Boolean extrude, Boolean tessellate, AltitudeModes altitudeMode) { | |
21 | super(points, extrude, tessellate, altitudeMode); | |
22 | this.subtractionPolygon = subtractionPolygon; | |
23 | } | |
24 | ||
25 | public Polygon getSubtractionPolygon() { | |
26 | return subtractionPolygon; | |
27 | } | |
28 | ||
29 | public void setSubtractionPolygon(Polygon subtractionPolygon) { | |
30 | this.subtractionPolygon = subtractionPolygon; | |
31 | } | |
32 | ||
33 | public Element getLinearRing(Document xmlDocument, EarthCoordinate location, Double rotation, CartesianCoordinate localReferenceCoordinate, CartesianCoordinate scale) { | |
34 | Element linearRingElement = xmlDocument.createElement("LinearRing"); | |
35 | linearRingElement.appendChild(getCoordinates(xmlDocument, location, rotation, localReferenceCoordinate, scale)); | |
36 | return linearRingElement; | |
37 | } | |
38 | ||
39 | @Override | |
40 | public void addKml(Element parentElement, Model model, Document xmlDocument, EarthCoordinate location, Double rotation, CartesianCoordinate localReferenceCoordinate, CartesianCoordinate scale) { | |
41 | Element polygonElement = xmlDocument.createElement("Polygon"); | |
42 | ||
43 | if (getCoordinates() != null) { | |
44 | Element outerBoundaryIsElement = xmlDocument.createElement("outerBoundaryIs"); | |
45 | outerBoundaryIsElement.appendChild(getLinearRing(xmlDocument, location, rotation, localReferenceCoordinate, scale)); | |
46 | polygonElement.appendChild(outerBoundaryIsElement); | |
47 | } | |
48 | ||
49 | if (subtractionPolygon != null) { | |
50 | Element innerBoundaryIsElement = xmlDocument.createElement("innerBoundaryIs"); | |
51 | innerBoundaryIsElement.appendChild(subtractionPolygon.getLinearRing(xmlDocument, location, rotation, localReferenceCoordinate, scale)); | |
52 | polygonElement.appendChild(innerBoundaryIsElement); | |
53 | } | |
54 | ||
55 | if (getExtrude() != null) { | |
56 | Element extrudeElement = xmlDocument.createElement("extrude"); | |
57 | extrudeElement.appendChild(xmlDocument.createTextNode((getExtrude()) ? "1" : "0")); | |
58 | polygonElement.appendChild(extrudeElement); | |
59 | } | |
60 | ||
61 | if (getTessellate() != null) { | |
62 | Element tessellateElement = xmlDocument.createElement("tessellate"); | |
63 | tessellateElement.appendChild(xmlDocument.createTextNode((getTessellate()) ? "1" : "0")); | |
64 | polygonElement.appendChild(tessellateElement); | |
65 | } | |
66 | ||
67 | if (getAltitudeMode() != null) { | |
68 | Element altitudeModeElement = xmlDocument.createElement("altitudeMode"); | |
69 | altitudeModeElement.appendChild(xmlDocument.createTextNode(getAltitudeMode().toString())); | |
70 | polygonElement.appendChild(altitudeModeElement); | |
71 | } | |
72 | ||
73 | parentElement.appendChild(polygonElement); | |
74 | } | |
75 | ||
76 | public String toString() { | |
77 | StringBuffer text = new StringBuffer("Path"); | |
78 | text.append("altitudeMode: " + getAltitudeMode() + "\n"); | |
79 | text.append("extrude: " + getExtrude() + "\n"); | |
80 | text.append("tessellate: " + getTessellate() + "\n"); | |
81 | text.append("coordinates: " + getCoordinates() + "\n"); | |
82 | text.append("subtractionPolygon: " + subtractionPolygon + "\n"); | |
83 | return text.toString(); | |
84 | } | |
85 | ||
86 | } |
0 | package org.boehn.gef; | |
1 | ||
2 | import org.w3c.dom.Document; | |
3 | import org.w3c.dom.Element; | |
4 | ||
5 | public class ViewPosition { | |
6 | ||
7 | private double longitude; | |
8 | private double latitude; | |
9 | private Double range; | |
10 | private Double tilt; | |
11 | private Double heading; | |
12 | ||
13 | public ViewPosition() { | |
14 | } | |
15 | ||
16 | public ViewPosition(double latitude, double longitude) { | |
17 | this(latitude, longitude, null, null, null); | |
18 | } | |
19 | ||
20 | public ViewPosition(double latitude, double longitude, Double range, Double tilt, Double heading) { | |
21 | this.latitude = latitude; | |
22 | this.longitude = longitude; | |
23 | this.range = range; | |
24 | this.tilt = tilt; | |
25 | this.heading = heading; | |
26 | } | |
27 | ||
28 | public Double getHeading() { | |
29 | return heading; | |
30 | } | |
31 | ||
32 | public void setHeading(Double heading) { | |
33 | this.heading = heading; | |
34 | } | |
35 | ||
36 | public double getLatitude() { | |
37 | return latitude; | |
38 | } | |
39 | ||
40 | public void setLatitude(double latitude) { | |
41 | this.latitude = latitude; | |
42 | } | |
43 | ||
44 | public double getLongitude() { | |
45 | return longitude; | |
46 | } | |
47 | ||
48 | public void setLongitude(double longitude) { | |
49 | this.longitude = longitude; | |
50 | } | |
51 | ||
52 | public Double getRange() { | |
53 | return range; | |
54 | } | |
55 | ||
56 | public void setRange(Double range) { | |
57 | this.range = range; | |
58 | } | |
59 | ||
60 | public Double getTilt() { | |
61 | return tilt; | |
62 | } | |
63 | ||
64 | public void setTilt(Double tilt) { | |
65 | this.tilt = tilt; | |
66 | } | |
67 | ||
68 | public void addKml(Element parentElement, Model model, Document xmlDocument) { | |
69 | Element lookAtElement = xmlDocument.createElement("LookAt"); | |
70 | ||
71 | Element longitudeElement = xmlDocument.createElement("longitude"); | |
72 | longitudeElement.appendChild(xmlDocument.createTextNode(Double.toString(longitude))); | |
73 | lookAtElement.appendChild(longitudeElement); | |
74 | ||
75 | Element latitudeElement = xmlDocument.createElement("latitude"); | |
76 | latitudeElement.appendChild(xmlDocument.createTextNode(Double.toString(latitude))); | |
77 | lookAtElement.appendChild(latitudeElement); | |
78 | ||
79 | if (range != null) { | |
80 | Element rangeElement = xmlDocument.createElement("range"); | |
81 | rangeElement.appendChild(xmlDocument.createTextNode(range.toString())); | |
82 | lookAtElement.appendChild(rangeElement); | |
83 | } | |
84 | ||
85 | if (tilt!= null) { | |
86 | Element tiltElement = xmlDocument.createElement("tilt"); | |
87 | tiltElement.appendChild(xmlDocument.createTextNode(tilt.toString())); | |
88 | lookAtElement.appendChild(tiltElement); | |
89 | } | |
90 | ||
91 | if (heading != null) { | |
92 | Element headingElement = xmlDocument.createElement("heading"); | |
93 | headingElement.appendChild(xmlDocument.createTextNode(heading.toString())); | |
94 | lookAtElement.appendChild(headingElement); | |
95 | } | |
96 | ||
97 | parentElement.appendChild(lookAtElement); | |
98 | } | |
99 | } |
0 | package org.boehn.gef.coordinates; | |
1 | ||
2 | import org.boehn.gef.utils.Ellipsoid; | |
3 | ||
4 | public class CartesianCoordinate implements Coordinate { | |
5 | ||
6 | private double x; | |
7 | private double y; | |
8 | private double z; | |
9 | ||
10 | public CartesianCoordinate() {} | |
11 | ||
12 | public CartesianCoordinate(double x, double y, double z) { | |
13 | this.x = x; | |
14 | this.y = y; | |
15 | this.z = z; | |
16 | } | |
17 | ||
18 | public double getX() { | |
19 | return x; | |
20 | } | |
21 | ||
22 | public void setX(double x) { | |
23 | this.x = x; | |
24 | } | |
25 | ||
26 | public double getY() { | |
27 | return y; | |
28 | } | |
29 | ||
30 | public void setY(double y) { | |
31 | this.y = y; | |
32 | } | |
33 | ||
34 | public double getZ() { | |
35 | return z; | |
36 | } | |
37 | ||
38 | public void setZ(double z) { | |
39 | this.z = z; | |
40 | } | |
41 | ||
42 | public double distanceTo(CartesianCoordinate cartesianCoordinate) { | |
43 | return Math.sqrt( Math.pow(Math.abs(cartesianCoordinate.getX()-x), 2) + Math.pow(Math.abs(cartesianCoordinate.getY()-y), 2) + Math.pow(Math.abs(cartesianCoordinate.getZ()-z), 2)); | |
44 | } | |
45 | ||
46 | public void rotateAroundZAxis(double rotation) { | |
47 | double xTemp = Math.cos(rotation) * x - Math.sin(rotation) * y; | |
48 | y = Math.sin(rotation) * x + Math.cos(rotation) * y; | |
49 | x = xTemp; | |
50 | } | |
51 | ||
52 | public void rotateAroundYAxis(double rotation) { | |
53 | double xTemp = Math.cos(rotation) * x + Math.sin(rotation) * z; | |
54 | z = - Math.sin(rotation) * x + Math.cos(rotation) * z; | |
55 | x = xTemp; | |
56 | } | |
57 | ||
58 | public void rotateAroundXAxis(double rotation) { | |
59 | double yTemp = Math.cos(rotation) * y - Math.sin(rotation) * z; | |
60 | z = Math.sin(rotation) * y + Math.cos(rotation) * z; | |
61 | y = yTemp; | |
62 | } | |
63 | ||
64 | public void add(CartesianCoordinate cartesianCoordinate) { | |
65 | x += cartesianCoordinate.getX(); | |
66 | y += cartesianCoordinate.getY(); | |
67 | z += cartesianCoordinate.getZ(); | |
68 | } | |
69 | ||
70 | public void subtract(CartesianCoordinate cartesianCoordinate) { | |
71 | x -= cartesianCoordinate.getX(); | |
72 | y -= cartesianCoordinate.getY(); | |
73 | z -= cartesianCoordinate.getZ(); | |
74 | } | |
75 | ||
76 | public double length() { | |
77 | return Math.sqrt(x*x + y*y + z*z); | |
78 | } | |
79 | ||
80 | public void normalize() { | |
81 | double length = length(); | |
82 | x /= length; | |
83 | y /= length; | |
84 | z /= length; | |
85 | } | |
86 | ||
87 | public void scale(double scalingFactor) { | |
88 | x *= scalingFactor; | |
89 | y *= scalingFactor; | |
90 | z *= scalingFactor; | |
91 | } | |
92 | ||
93 | public String toString() { | |
94 | return "[" + x + ", " + y + ", " + z + "]"; | |
95 | } | |
96 | ||
97 | public EarthCoordinate toEarthCoordinate(EarthCoordinate location, Double rotation, CartesianCoordinate localReferenceCoordinate, CartesianCoordinate scale) { | |
98 | // We scale the coordinates | |
99 | double xTransformed = x; | |
100 | double yTransformed = y; | |
101 | double zTransformed = z; | |
102 | ||
103 | if (scale != null) { | |
104 | xTransformed = x * scale.getX(); | |
105 | yTransformed = y * scale.getY(); | |
106 | zTransformed = z * scale.getZ(); | |
107 | } | |
108 | ||
109 | // We move the coordinates according to the local reference coordinate | |
110 | if (localReferenceCoordinate != null) { | |
111 | xTransformed -= localReferenceCoordinate.getX(); | |
112 | yTransformed -= localReferenceCoordinate.getY(); | |
113 | zTransformed -= localReferenceCoordinate.getZ(); | |
114 | } | |
115 | ||
116 | //rotation = Math.PI/4; | |
117 | // We rotate the coordinates according to the rotation. We do only support rotation around the z axis | |
118 | if (rotation != null) { | |
119 | double xTmp = xTransformed; | |
120 | xTransformed = Math.cos(rotation) * xTmp + Math.sin(rotation) * yTransformed; | |
121 | yTransformed = -Math.sin(rotation) * xTmp + Math.cos(rotation) * yTransformed; | |
122 | } | |
123 | ||
124 | // Move to world coordinates | |
125 | if (location != null) { | |
126 | xTransformed = location.getLongitude() + xTransformed * Ellipsoid.meterToLongitude(location.getLatitude()); | |
127 | yTransformed = location.getLatitude() + yTransformed * Ellipsoid.meterToLatitude(location.getLatitude()); | |
128 | zTransformed += location.getAltitude(); | |
129 | } | |
130 | return new EarthCoordinate(zTransformed, yTransformed, xTransformed); | |
131 | } | |
132 | } |
0 | package org.boehn.gef.coordinates; | |
1 | ||
2 | ||
3 | public interface Coordinate { | |
4 | ||
5 | EarthCoordinate toEarthCoordinate(EarthCoordinate earthCoordinate, Double rotation, CartesianCoordinate localReferenceCoordinate, CartesianCoordinate scale); | |
6 | ||
7 | } |
0 | package org.boehn.gef.coordinates; | |
1 | ||
2 | import java.io.IOException; | |
3 | import java.io.Writer; | |
4 | ||
5 | import org.boehn.gef.AltitudeModes; | |
6 | import org.boehn.gef.Model; | |
7 | import org.w3c.dom.Document; | |
8 | import org.w3c.dom.Element; | |
9 | import org.xmlpull.v1.XmlSerializer; | |
10 | ||
11 | public class EarthCoordinate implements Coordinate { | |
12 | ||
13 | private double altitude; | |
14 | private double latitude; | |
15 | private double longitude; | |
16 | private Boolean extrude; | |
17 | private Boolean tessellate; | |
18 | private AltitudeModes altitudeMode; | |
19 | public static double EARTHRADIUS = 6372795.477598; // in meters | |
20 | ||
21 | public EarthCoordinate() {} | |
22 | ||
23 | public EarthCoordinate(double altitude, double latitude, double longitude) { | |
24 | this.altitude = altitude; | |
25 | this.latitude = latitude; | |
26 | this.longitude = longitude; | |
27 | } | |
28 | ||
29 | public EarthCoordinate(double latitude, double longitude) { | |
30 | this(0, latitude, longitude); | |
31 | } | |
32 | ||
33 | public double getAltitude() { | |
34 | return altitude; | |
35 | } | |
36 | ||
37 | public void setAltitude(double altitude) { | |
38 | this.altitude = altitude; | |
39 | } | |
40 | ||
41 | public double getLatitude() { | |
42 | return latitude; | |
43 | } | |
44 | ||
45 | public void setLatitude(double latitude) { | |
46 | this.latitude = latitude; | |
47 | } | |
48 | ||
49 | public double getLongitude() { | |
50 | return longitude; | |
51 | } | |
52 | ||
53 | public void setLongitude(double longitude) { | |
54 | this.longitude = longitude; | |
55 | } | |
56 | ||
57 | public AltitudeModes getAltitudeMode() { | |
58 | return altitudeMode; | |
59 | } | |
60 | ||
61 | public void setAltitudeMode(AltitudeModes altitudeMode) { | |
62 | this.altitudeMode = altitudeMode; | |
63 | } | |
64 | ||
65 | public Boolean getExtrude() { | |
66 | return extrude; | |
67 | } | |
68 | ||
69 | public void setExtrude(Boolean extrude) { | |
70 | this.extrude = extrude; | |
71 | } | |
72 | ||
73 | public Boolean getTessellate() { | |
74 | return tessellate; | |
75 | } | |
76 | ||
77 | public void setTessellate(Boolean tessellate) { | |
78 | this.tessellate = tessellate; | |
79 | } | |
80 | ||
81 | public void addKml(Element parentElement, Model model, Document xmlDocument) { | |
82 | Element pointElement = xmlDocument.createElement("Point"); | |
83 | ||
84 | Element coordinatesElement = xmlDocument.createElement("coordinates"); | |
85 | coordinatesElement.appendChild(xmlDocument.createTextNode(getLongitude() + "," + getLatitude() + "," + getAltitude())); | |
86 | pointElement.appendChild(coordinatesElement); | |
87 | ||
88 | if (extrude != null) { | |
89 | Element extrudeElement = xmlDocument.createElement("extrude"); | |
90 | extrudeElement.appendChild(xmlDocument.createTextNode((extrude) ? "1" : "0")); | |
91 | pointElement.appendChild(extrudeElement); | |
92 | } | |
93 | ||
94 | if (tessellate != null) { | |
95 | Element tessellateElement = xmlDocument.createElement("tessellate"); | |
96 | tessellateElement.appendChild(xmlDocument.createTextNode((tessellate) ? "1" : "0")); | |
97 | pointElement.appendChild(tessellateElement); | |
98 | } | |
99 | ||
100 | if (altitudeMode!= null) { | |
101 | Element altitudeModeElement = xmlDocument.createElement("altitudeMode"); | |
102 | altitudeModeElement.appendChild(xmlDocument.createTextNode(altitudeMode.toString())); | |
103 | pointElement.appendChild(altitudeModeElement); | |
104 | } | |
105 | ||
106 | parentElement.appendChild(pointElement); | |
107 | } | |
108 | ||
109 | public void addKmlXPP(Model model, XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException { | |
110 | serializer.startTag(null, "Point"); | |
111 | serializer.startTag(null, "coordinates"); | |
112 | serializer.text(getLongitude() + "," + getLatitude() + "," + getAltitude()); | |
113 | serializer.endTag(null, "coordinates"); | |
114 | serializer.endTag(null, "Point"); | |
115 | ||
116 | /*Element coordinatesElement = xmlDocument.createElement("coordinates"); | |
117 | coordinatesElement.appendChild(xmlDocument.createTextNode(getLongitude() + "," + getLatitude() + "," + getAltitude())); | |
118 | pointElement.appendChild(coordinatesElement); | |
119 | ||
120 | if (extrude != null) { | |
121 | Element extrudeElement = xmlDocument.createElement("extrude"); | |
122 | extrudeElement.appendChild(xmlDocument.createTextNode((extrude) ? "1" : "0")); | |
123 | pointElement.appendChild(extrudeElement); | |
124 | } | |
125 | ||
126 | if (tessellate != null) { | |
127 | Element tessellateElement = xmlDocument.createElement("tessellate"); | |
128 | tessellateElement.appendChild(xmlDocument.createTextNode((tessellate) ? "1" : "0")); | |
129 | pointElement.appendChild(tessellateElement); | |
130 | } | |
131 | ||
132 | if (altitudeMode!= null) { | |
133 | Element altitudeModeElement = xmlDocument.createElement("altitudeMode"); | |
134 | altitudeModeElement.appendChild(xmlDocument.createTextNode(altitudeMode.toString())); | |
135 | pointElement.appendChild(altitudeModeElement); | |
136 | } | |
137 | ||
138 | parentElement.appendChild(pointElement);*/ | |
139 | } | |
140 | ||
141 | public void addKmlDirect(Model model, Writer writer) throws IOException { | |
142 | writer.write("<Point><coordinates>" + getLongitude() + "," + getLatitude() + "," + getAltitude() + "</coordinates></Point>"); | |
143 | ||
144 | /*Element coordinatesElement = xmlDocument.createElement("coordinates"); | |
145 | coordinatesElement.appendChild(xmlDocument.createTextNode(getLongitude() + "," + getLatitude() + "," + getAltitude())); | |
146 | pointElement.appendChild(coordinatesElement); | |
147 | ||
148 | if (extrude != null) { | |
149 | Element extrudeElement = xmlDocument.createElement("extrude"); | |
150 | extrudeElement.appendChild(xmlDocument.createTextNode((extrude) ? "1" : "0")); | |
151 | pointElement.appendChild(extrudeElement); | |
152 | } | |
153 | ||
154 | if (tessellate != null) { | |
155 | Element tessellateElement = xmlDocument.createElement("tessellate"); | |
156 | tessellateElement.appendChild(xmlDocument.createTextNode((tessellate) ? "1" : "0")); | |
157 | pointElement.appendChild(tessellateElement); | |
158 | } | |
159 | ||
160 | if (altitudeMode!= null) { | |
161 | Element altitudeModeElement = xmlDocument.createElement("altitudeMode"); | |
162 | altitudeModeElement.appendChild(xmlDocument.createTextNode(altitudeMode.toString())); | |
163 | pointElement.appendChild(altitudeModeElement); | |
164 | } | |
165 | ||
166 | parentElement.appendChild(pointElement);*/ | |
167 | } | |
168 | ||
169 | public double getRadius() { | |
170 | return altitude + EARTHRADIUS; | |
171 | } | |
172 | ||
173 | public CartesianCoordinate toCartesianCoordinate() { | |
174 | CartesianCoordinate cartesianCoordinate = new CartesianCoordinate(); | |
175 | cartesianCoordinate.setX(getRadius() * Math.sin(Math.PI/2 - latitude*(Math.PI/180)) * Math.cos(longitude*(Math.PI/180))); | |
176 | cartesianCoordinate.setY(getRadius() * Math.sin(Math.PI/2 - latitude*(Math.PI/180)) * Math.sin(longitude*(Math.PI/180))); | |
177 | cartesianCoordinate.setZ(getRadius() * Math.cos(Math.PI/2 - latitude*(Math.PI/180))); | |
178 | return cartesianCoordinate; | |
179 | } | |
180 | ||
181 | public double distanceTo(EarthCoordinate earthCoordinate) { | |
182 | return toCartesianCoordinate().distanceTo(earthCoordinate.toCartesianCoordinate()); | |
183 | } | |
184 | ||
185 | public String toString() { | |
186 | return "[" + altitude + ", " + latitude + ", " + longitude + "]"; | |
187 | } | |
188 | ||
189 | public EarthCoordinate toEarthCoordinate(EarthCoordinate earthCoordinate, Double rotation, CartesianCoordinate localReferenceCoordinate, CartesianCoordinate scale) { | |
190 | return this; | |
191 | } | |
192 | ||
193 | } |
0 | package org.boehn.gef.coordinates; | |
1 | ||
2 | import java.util.Date; | |
3 | ||
4 | ||
5 | public class TimeAndPlace { | |
6 | ||
7 | private EarthCoordinate place; | |
8 | private Date time; | |
9 | ||
10 | public TimeAndPlace(EarthCoordinate place, Date time) { | |
11 | this.place = place; | |
12 | this.time = time; | |
13 | } | |
14 | ||
15 | public EarthCoordinate getPlace() { | |
16 | return place; | |
17 | } | |
18 | ||
19 | public void setPlace(EarthCoordinate place) { | |
20 | this.place = place; | |
21 | } | |
22 | ||
23 | public Date getTime() { | |
24 | return time; | |
25 | } | |
26 | ||
27 | public void setTime(Date time) { | |
28 | this.time = time; | |
29 | } | |
30 | ||
31 | } |
0 | package org.boehn.gef.examples; | |
1 | ||
2 | import java.io.IOException; | |
3 | import java.util.ArrayList; | |
4 | import java.util.Calendar; | |
5 | import java.util.GregorianCalendar; | |
6 | import java.util.List; | |
7 | ||
8 | import org.boehn.gef.GraphicalModel; | |
9 | import org.boehn.gef.MapObject; | |
10 | import org.boehn.gef.MapObjectClass; | |
11 | import org.boehn.gef.Model; | |
12 | import org.boehn.gef.ModelException; | |
13 | import org.boehn.gef.Polygon; | |
14 | import org.boehn.gef.coordinates.CartesianCoordinate; | |
15 | import org.boehn.gef.coordinates.Coordinate; | |
16 | import org.boehn.gef.coordinates.EarthCoordinate; | |
17 | import org.boehn.gef.coordinates.TimeAndPlace; | |
18 | ||
19 | public class GraphicalMapObjectExample { | |
20 | ||
21 | public static void main(String[] args) throws ModelException, IOException { | |
22 | ||
23 | // We create a model | |
24 | Model model = new Model(); | |
25 | ||
26 | // We define a MapObjectClass for a boat | |
27 | MapObjectClass boatClass = new MapObjectClass("boat"); | |
28 | GraphicalModel boatModel = new GraphicalModel(); | |
29 | List<Coordinate> coordinates = new ArrayList<Coordinate>(); | |
30 | coordinates.add(new CartesianCoordinate(0, 0, 1)); | |
31 | coordinates.add(new CartesianCoordinate(1, 0, 1)); | |
32 | coordinates.add(new CartesianCoordinate(1, 0.7, 1)); | |
33 | coordinates.add(new CartesianCoordinate(0.5, 1, 1)); | |
34 | coordinates.add(new CartesianCoordinate(0, 0.7, 1)); | |
35 | coordinates.add(new CartesianCoordinate(0, 0, 1)); | |
36 | Polygon polygon = new Polygon(coordinates); | |
37 | boatModel.addGraphicalModelElement(polygon); | |
38 | boatClass.addModel(boatModel); | |
39 | ||
40 | // We create a boat object | |
41 | MapObject boat = new MapObject("Titanic II"); | |
42 | boat.setLocation(new EarthCoordinate(59.8959, 10.6406)); | |
43 | boat.setMapObjectClass(boatClass); | |
44 | // We define the size of the boat | |
45 | boat.setScale(new CartesianCoordinate(30, 150, 30)); | |
46 | // We define the direction of the boat. 0 is North | |
47 | boat.setRotation(Math.toRadians(45d)); | |
48 | // We define the gps position in the boat (according to the 3D model of the boat | |
49 | boat.setLocalReferenceCoordinate(new CartesianCoordinate(2, 13, 0)); | |
50 | ||
51 | // We define how the boat has been moving the last period of time. This will draw a tail after the boat | |
52 | GregorianCalendar calendar = new GregorianCalendar(); | |
53 | calendar.add(Calendar.MINUTE, -15); | |
54 | boat.addMovement(new TimeAndPlace(new EarthCoordinate(59.895018, 10.638732), calendar.getTime())); | |
55 | calendar.add(Calendar.MINUTE, -15); | |
56 | boat.addMovement(new TimeAndPlace(new EarthCoordinate(59.892980, 10.638991), calendar.getTime())); | |
57 | calendar.add(Calendar.MINUTE, -15); | |
58 | boat.addMovement(new TimeAndPlace(new EarthCoordinate(59.891171, 10.640006), calendar.getTime())); | |
59 | calendar.add(Calendar.MINUTE, -15); | |
60 | boat.addMovement(new TimeAndPlace(new EarthCoordinate(59.890575, 10.645234), calendar.getTime())); | |
61 | calendar.add(Calendar.MINUTE, -15); | |
62 | boat.addMovement(new TimeAndPlace(new EarthCoordinate(59.889318, 10.644650), calendar.getTime())); | |
63 | ||
64 | // We add the object to the model | |
65 | model.add(boat); | |
66 | ||
67 | // In order to make the kml more human readable we may activate indenting | |
68 | model.XML_INDENT = true; | |
69 | ||
70 | // We generate the kml file | |
71 | model.write("boat.kml"); | |
72 | ||
73 | System.out.println("The kml file was generated."); | |
74 | } | |
75 | ||
76 | } |
0 | package org.boehn.gef.examples; | |
1 | ||
2 | import java.io.IOException; | |
3 | ||
4 | import org.boehn.gef.MapObject; | |
5 | import org.boehn.gef.Model; | |
6 | import org.boehn.gef.ModelException; | |
7 | import org.boehn.gef.ModelObjectFactory; | |
8 | import org.boehn.gef.coordinates.CartesianCoordinate; | |
9 | import org.boehn.gef.coordinates.EarthCoordinate; | |
10 | ||
11 | public class ModelObjectFactoryExample { | |
12 | ||
13 | public static void main(String[] args) throws ModelException, IOException { | |
14 | ||
15 | try { | |
16 | ||
17 | // We create a model | |
18 | Model model = new Model(); | |
19 | ||
20 | // We create a ModelObjectFactory from a symbol file | |
21 | ModelObjectFactory modelObjectFactory = new ModelObjectFactory("resources/symbols/symbols.xml"); | |
22 | ||
23 | // We create a boat object | |
24 | MapObject boat = modelObjectFactory.createMapObject("boat"); | |
25 | boat.setLocation(new EarthCoordinate(59.8959, 10.6406)); | |
26 | // We define the size of the boat | |
27 | boat.setScale(new CartesianCoordinate(30, 150, 30)); | |
28 | // We define the direction of the boat. 0 is North | |
29 | boat.setRotation(Math.toRadians(45d)); | |
30 | // We define the gps position in the boat (according to the 3D model of the boat | |
31 | boat.setLocalReferenceCoordinate(new CartesianCoordinate(2, 13, 0)); | |
32 | ||
33 | // We add the object to the model | |
34 | model.add(boat); | |
35 | ||
36 | // We generate the kml file | |
37 | model.write("boat.kml"); | |
38 | ||
39 | System.out.println("The kml file was generated."); | |
40 | ||
41 | } catch (Exception e) { | |
42 | e.printStackTrace(); | |
43 | } | |
44 | } | |
45 | ||
46 | } |
0 | package org.boehn.gef.examples; | |
1 | ||
2 | import java.io.IOException; | |
3 | ||
4 | import org.boehn.gef.MapObject; | |
5 | import org.boehn.gef.Model; | |
6 | import org.boehn.gef.ModelException; | |
7 | import org.boehn.gef.coordinates.EarthCoordinate; | |
8 | ||
9 | public class SimpleExample { | |
10 | ||
11 | public static void main(String[] args) throws ModelException, IOException { | |
12 | ||
13 | // We create a model | |
14 | Model model = new Model(); | |
15 | ||
16 | // We create an object for the Department of Informatics at the university of Oslo | |
17 | MapObject ifi = new MapObject("Department of Informatics"); | |
18 | ifi.setDescription("Web: http://www.ifi.uio.no<br/>Phone: +47 22852410"); | |
19 | ifi.setLocation(new EarthCoordinate(59.943355, 10.717344)); | |
20 | ||
21 | // We add the object to the model | |
22 | model.add(ifi); | |
23 | ||
24 | // We generate the kml file | |
25 | model.write("Ifi.kml"); | |
26 | ||
27 | System.out.println("The kml file was generated."); | |
28 | } | |
29 | ||
30 | } |
0 | package org.boehn.gef.examples; | |
1 | ||
2 | import java.io.IOException; | |
3 | ||
4 | import javax.servlet.ServletException; | |
5 | import javax.servlet.http.HttpServlet; | |
6 | import javax.servlet.http.HttpServletRequest; | |
7 | import javax.servlet.http.HttpServletResponse; | |
8 | ||
9 | import org.boehn.gef.MapObject; | |
10 | import org.boehn.gef.coordinates.EarthCoordinate; | |
11 | import org.boehn.gef.servlet.HttpServletModel; | |
12 | ||
13 | public class SimpleExampleServlet extends HttpServlet { | |
14 | ||
15 | private static final long serialVersionUID = 1L; | |
16 | ||
17 | @Override | |
18 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { | |
19 | try { | |
20 | // We create a model | |
21 | HttpServletModel model = new HttpServletModel(request, response); | |
22 | ||
23 | // We create an object for the Department of Informatics at the university of Oslo | |
24 | MapObject ifi = new MapObject("Department of Informatics"); | |
25 | ifi.setDescription("Web: http://www.ifi.uio.no<br/>Phone: +47 22852410"); | |
26 | ifi.setLocation(new EarthCoordinate(59.943355, 10.717344)); | |
27 | ||
28 | // We add the object to the model | |
29 | model.add(ifi); | |
30 | ||
31 | // We generate the kml file | |
32 | model.write(); | |
33 | ||
34 | } catch (Exception e) { | |
35 | throw new ServletException(e); | |
36 | } | |
37 | } | |
38 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Address { | |
3 | ||
4 | private String address; | |
5 | private String id; | |
6 | ||
7 | public Address() { | |
8 | } | |
9 | ||
10 | public Address(String address, String id) { | |
11 | this.address = address; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getAddress() { | |
16 | return this.address; | |
17 | } | |
18 | ||
19 | public void SetAddress(String address) { | |
20 | this.address = address; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("address"); | |
33 | if (this.address != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.address)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class AdsEnable { | |
3 | ||
4 | private String adsEnable; | |
5 | private String id; | |
6 | ||
7 | public AdsEnable() { | |
8 | } | |
9 | ||
10 | public AdsEnable(String adsEnable, String id) { | |
11 | this.adsEnable = adsEnable; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getAdsEnable() { | |
16 | return this.adsEnable; | |
17 | } | |
18 | ||
19 | public void SetAdsEnable(String adsEnable) { | |
20 | this.adsEnable = adsEnable; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("adsEnable"); | |
33 | if (this.adsEnable != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.adsEnable)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Adwords { | |
3 | ||
4 | private String adwords; | |
5 | private String id; | |
6 | ||
7 | public Adwords() { | |
8 | } | |
9 | ||
10 | public Adwords(String adwords, String id) { | |
11 | this.adwords = adwords; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getAdwords() { | |
16 | return this.adwords; | |
17 | } | |
18 | ||
19 | public void SetAdwords(String adwords) { | |
20 | this.adwords = adwords; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("adwords"); | |
33 | if (this.adwords != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.adwords)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class AltitudeMode { | |
3 | ||
4 | private String altitudeMode; | |
5 | private String id; | |
6 | ||
7 | public AltitudeMode() { | |
8 | } | |
9 | ||
10 | public AltitudeMode(String altitudeMode, String id) { | |
11 | this.altitudeMode = altitudeMode; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getAltitudeMode() { | |
16 | return this.altitudeMode; | |
17 | } | |
18 | ||
19 | public void SetAltitudeMode(String altitudeMode) { | |
20 | this.altitudeMode = altitudeMode; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("altitudeMode"); | |
33 | if (this.altitudeMode != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.altitudeMode)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Antialias { | |
3 | ||
4 | private String antialias; | |
5 | private String id; | |
6 | ||
7 | public Antialias() { | |
8 | } | |
9 | ||
10 | public Antialias(String antialias, String id) { | |
11 | this.antialias = antialias; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getAntialias() { | |
16 | return this.antialias; | |
17 | } | |
18 | ||
19 | public void SetAntialias(String antialias) { | |
20 | this.antialias = antialias; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("antialias"); | |
33 | if (this.antialias != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.antialias)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class BalloonStyle { | |
3 | ||
4 | private String id; | |
5 | private Color color; | |
6 | private Text text; | |
7 | ||
8 | public BalloonStyle() { | |
9 | } | |
10 | ||
11 | public BalloonStyle(String id, Color color, Text text) { | |
12 | this.id = id; | |
13 | this.color = color; | |
14 | this.text = text; | |
15 | } | |
16 | ||
17 | public String getId() { | |
18 | return this.id; | |
19 | } | |
20 | ||
21 | public void SetId(String id) { | |
22 | this.id = id; | |
23 | } | |
24 | ||
25 | public Color getColor() { | |
26 | return this.color; | |
27 | } | |
28 | ||
29 | public void setColor(Color color) { | |
30 | this.color = color; | |
31 | } | |
32 | ||
33 | public Text getText() { | |
34 | return this.text; | |
35 | } | |
36 | ||
37 | public void setText(Text text) { | |
38 | this.text = text; | |
39 | } | |
40 | ||
41 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
42 | org.w3c.dom.Element element = xmlDocument.createElement("BalloonStyle"); | |
43 | if (this.id != null) { | |
44 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
45 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
46 | element.appendChild(attribute); | |
47 | } | |
48 | if (this.color != null) { | |
49 | element.appendChild(this.color.getElement(xmlDocument)); | |
50 | } | |
51 | if (this.text != null) { | |
52 | element.appendChild(this.text.getElement(xmlDocument)); | |
53 | } | |
54 | ||
55 | return element; | |
56 | } | |
57 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Begin { | |
3 | ||
4 | private String id; | |
5 | private TimeInstant timeInstant; | |
6 | ||
7 | public Begin() { | |
8 | } | |
9 | ||
10 | public Begin(String id, TimeInstant timeInstant) { | |
11 | this.id = id; | |
12 | this.timeInstant = timeInstant; | |
13 | } | |
14 | ||
15 | public String getId() { | |
16 | return this.id; | |
17 | } | |
18 | ||
19 | public void SetId(String id) { | |
20 | this.id = id; | |
21 | } | |
22 | ||
23 | public TimeInstant getTimeInstant() { | |
24 | return this.timeInstant; | |
25 | } | |
26 | ||
27 | public void setTimeInstant(TimeInstant timeInstant) { | |
28 | this.timeInstant = timeInstant; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("begin"); | |
33 | if (this.id != null) { | |
34 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
35 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
36 | element.appendChild(attribute); | |
37 | } | |
38 | if (this.timeInstant != null) { | |
39 | element.appendChild(this.timeInstant.getElement(xmlDocument)); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Channel { | |
3 | ||
4 | private String id; | |
5 | private Adwords adwords; | |
6 | private AdsEnable adsEnable; | |
7 | private Description description; | |
8 | private LayerIndex layerIndex; | |
9 | private Name name; | |
10 | private PreserveTextLevel preserveTextLevel; | |
11 | private ShowState showState; | |
12 | private Snippet snippet; | |
13 | ||
14 | public Channel() { | |
15 | } | |
16 | ||
17 | public Channel(String id, Adwords adwords, AdsEnable adsEnable, Description description, LayerIndex layerIndex, Name name, PreserveTextLevel preserveTextLevel, ShowState showState, Snippet snippet) { | |
18 | this.id = id; | |
19 | this.adwords = adwords; | |
20 | this.adsEnable = adsEnable; | |
21 | this.description = description; | |
22 | this.layerIndex = layerIndex; | |
23 | this.name = name; | |
24 | this.preserveTextLevel = preserveTextLevel; | |
25 | this.showState = showState; | |
26 | this.snippet = snippet; | |
27 | } | |
28 | ||
29 | public String getId() { | |
30 | return this.id; | |
31 | } | |
32 | ||
33 | public void SetId(String id) { | |
34 | this.id = id; | |
35 | } | |
36 | ||
37 | public Adwords getAdwords() { | |
38 | return this.adwords; | |
39 | } | |
40 | ||
41 | public void setAdwords(Adwords adwords) { | |
42 | this.adwords = adwords; | |
43 | } | |
44 | ||
45 | public AdsEnable getAdsEnable() { | |
46 | return this.adsEnable; | |
47 | } | |
48 | ||
49 | public void setAdsEnable(AdsEnable adsEnable) { | |
50 | this.adsEnable = adsEnable; | |
51 | } | |
52 | ||
53 | public Description getDescription() { | |
54 | return this.description; | |
55 | } | |
56 | ||
57 | public void setDescription(Description description) { | |
58 | this.description = description; | |
59 | } | |
60 | ||
61 | public LayerIndex getLayerIndex() { | |
62 | return this.layerIndex; | |
63 | } | |
64 | ||
65 | public void setLayerIndex(LayerIndex layerIndex) { | |
66 | this.layerIndex = layerIndex; | |
67 | } | |
68 | ||
69 | public Name getName() { | |
70 | return this.name; | |
71 | } | |
72 | ||
73 | public void setName(Name name) { | |
74 | this.name = name; | |
75 | } | |
76 | ||
77 | public PreserveTextLevel getPreserveTextLevel() { | |
78 | return this.preserveTextLevel; | |
79 | } | |
80 | ||
81 | public void setPreserveTextLevel(PreserveTextLevel preserveTextLevel) { | |
82 | this.preserveTextLevel = preserveTextLevel; | |
83 | } | |
84 | ||
85 | public ShowState getShowState() { | |
86 | return this.showState; | |
87 | } | |
88 | ||
89 | public void setShowState(ShowState showState) { | |
90 | this.showState = showState; | |
91 | } | |
92 | ||
93 | public Snippet getSnippet() { | |
94 | return this.snippet; | |
95 | } | |
96 | ||
97 | public void setSnippet(Snippet snippet) { | |
98 | this.snippet = snippet; | |
99 | } | |
100 | ||
101 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
102 | org.w3c.dom.Element element = xmlDocument.createElement("Channel"); | |
103 | if (this.id != null) { | |
104 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
105 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
106 | element.appendChild(attribute); | |
107 | } | |
108 | if (this.adwords != null) { | |
109 | element.appendChild(this.adwords.getElement(xmlDocument)); | |
110 | } | |
111 | if (this.adsEnable != null) { | |
112 | element.appendChild(this.adsEnable.getElement(xmlDocument)); | |
113 | } | |
114 | if (this.description != null) { | |
115 | element.appendChild(this.description.getElement(xmlDocument)); | |
116 | } | |
117 | if (this.layerIndex != null) { | |
118 | element.appendChild(this.layerIndex.getElement(xmlDocument)); | |
119 | } | |
120 | if (this.name != null) { | |
121 | element.appendChild(this.name.getElement(xmlDocument)); | |
122 | } | |
123 | if (this.preserveTextLevel != null) { | |
124 | element.appendChild(this.preserveTextLevel.getElement(xmlDocument)); | |
125 | } | |
126 | if (this.showState != null) { | |
127 | element.appendChild(this.showState.getElement(xmlDocument)); | |
128 | } | |
129 | if (this.snippet != null) { | |
130 | element.appendChild(this.snippet.getElement(xmlDocument)); | |
131 | } | |
132 | ||
133 | return element; | |
134 | } | |
135 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Color { | |
3 | ||
4 | private String color; | |
5 | private String id; | |
6 | ||
7 | public Color() { | |
8 | } | |
9 | ||
10 | public Color(String color, String id) { | |
11 | this.color = color; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getColor() { | |
16 | return this.color; | |
17 | } | |
18 | ||
19 | public void SetColor(String color) { | |
20 | this.color = color; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("color"); | |
33 | if (this.color != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.color)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class ColorMode { | |
3 | ||
4 | private String colorMode; | |
5 | private String id; | |
6 | ||
7 | public ColorMode() { | |
8 | } | |
9 | ||
10 | public ColorMode(String colorMode, String id) { | |
11 | this.colorMode = colorMode; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getColorMode() { | |
16 | return this.colorMode; | |
17 | } | |
18 | ||
19 | public void SetColorMode(String colorMode) { | |
20 | this.colorMode = colorMode; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("colorMode"); | |
33 | if (this.colorMode != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.colorMode)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class ColorStyle { | |
3 | ||
4 | private String id; | |
5 | private Antialias antialias; | |
6 | private Color color; | |
7 | private ColorMode colorMode; | |
8 | ||
9 | public ColorStyle() { | |
10 | } | |
11 | ||
12 | public ColorStyle(String id, Antialias antialias, Color color, ColorMode colorMode) { | |
13 | this.id = id; | |
14 | this.antialias = antialias; | |
15 | this.color = color; | |
16 | this.colorMode = colorMode; | |
17 | } | |
18 | ||
19 | public String getId() { | |
20 | return this.id; | |
21 | } | |
22 | ||
23 | public void SetId(String id) { | |
24 | this.id = id; | |
25 | } | |
26 | ||
27 | public Antialias getAntialias() { | |
28 | return this.antialias; | |
29 | } | |
30 | ||
31 | public void setAntialias(Antialias antialias) { | |
32 | this.antialias = antialias; | |
33 | } | |
34 | ||
35 | public Color getColor() { | |
36 | return this.color; | |
37 | } | |
38 | ||
39 | public void setColor(Color color) { | |
40 | this.color = color; | |
41 | } | |
42 | ||
43 | public ColorMode getColorMode() { | |
44 | return this.colorMode; | |
45 | } | |
46 | ||
47 | public void setColorMode(ColorMode colorMode) { | |
48 | this.colorMode = colorMode; | |
49 | } | |
50 | ||
51 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
52 | org.w3c.dom.Element element = xmlDocument.createElement("ColorStyle"); | |
53 | if (this.id != null) { | |
54 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
55 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
56 | element.appendChild(attribute); | |
57 | } | |
58 | if (this.antialias != null) { | |
59 | element.appendChild(this.antialias.getElement(xmlDocument)); | |
60 | } | |
61 | if (this.color != null) { | |
62 | element.appendChild(this.color.getElement(xmlDocument)); | |
63 | } | |
64 | if (this.colorMode != null) { | |
65 | element.appendChild(this.colorMode.getElement(xmlDocument)); | |
66 | } | |
67 | ||
68 | return element; | |
69 | } | |
70 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Cookie { | |
3 | ||
4 | private String cookie; | |
5 | private String id; | |
6 | ||
7 | public Cookie() { | |
8 | } | |
9 | ||
10 | public Cookie(String cookie, String id) { | |
11 | this.cookie = cookie; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getCookie() { | |
16 | return this.cookie; | |
17 | } | |
18 | ||
19 | public void SetCookie(String cookie) { | |
20 | this.cookie = cookie; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("cookie"); | |
33 | if (this.cookie != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.cookie)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Coordinates { | |
3 | ||
4 | private String coordinates; | |
5 | private String id; | |
6 | ||
7 | public Coordinates() { | |
8 | } | |
9 | ||
10 | public Coordinates(String coordinates, String id) { | |
11 | this.coordinates = coordinates; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getCoordinates() { | |
16 | return this.coordinates; | |
17 | } | |
18 | ||
19 | public void SetCoordinates(String coordinates) { | |
20 | this.coordinates = coordinates; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("coordinates"); | |
33 | if (this.coordinates != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.coordinates)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Description { | |
3 | ||
4 | private String description; | |
5 | private String id; | |
6 | ||
7 | public Description() { | |
8 | } | |
9 | ||
10 | public Description(String description, String id) { | |
11 | this.description = description; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getDescription() { | |
16 | return this.description; | |
17 | } | |
18 | ||
19 | public void SetDescription(String description) { | |
20 | this.description = description; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("description"); | |
33 | if (this.description != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.description)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class Document { | |
5 | ||
6 | private String id; | |
7 | private Collection<Channel> channels; | |
8 | private Collection<Document> documents; | |
9 | private Collection<Folder> folders; | |
10 | private Collection<GroundOverlay> groundOverlays; | |
11 | private LookAt lookAt; | |
12 | private Collection<NetworkLink> networkLinks; | |
13 | private Collection<Placemark> placemarks; | |
14 | private Collection<Schema> schemas; | |
15 | private Collection<ScreenOverlay> screenOverlays; | |
16 | private Collection<Search> searchs; | |
17 | private Snippet snippet; | |
18 | private Collection<Style> styles; | |
19 | private Collection<StyleBlinker> styleBlinkers; | |
20 | private Collection<StyleMap> styleMaps; | |
21 | private Description description; | |
22 | private Name name; | |
23 | private Visibility visibility; | |
24 | ||
25 | public Document() { | |
26 | } | |
27 | ||
28 | public Document(String id, Collection<Channel> channels, Collection<Document> documents, Collection<Folder> folders, Collection<GroundOverlay> groundOverlays, LookAt lookAt, Collection<NetworkLink> networkLinks, Collection<Placemark> placemarks, Collection<Schema> schemas, Collection<ScreenOverlay> screenOverlays, Collection<Search> searchs, Snippet snippet, Collection<Style> styles, Collection<StyleBlinker> styleBlinkers, Collection<StyleMap> styleMaps, Description description, Name name, Visibility visibility) { | |
29 | this.id = id; | |
30 | this.channels = channels; | |
31 | this.documents = documents; | |
32 | this.folders = folders; | |
33 | this.groundOverlays = groundOverlays; | |
34 | this.lookAt = lookAt; | |
35 | this.networkLinks = networkLinks; | |
36 | this.placemarks = placemarks; | |
37 | this.schemas = schemas; | |
38 | this.screenOverlays = screenOverlays; | |
39 | this.searchs = searchs; | |
40 | this.snippet = snippet; | |
41 | this.styles = styles; | |
42 | this.styleBlinkers = styleBlinkers; | |
43 | this.styleMaps = styleMaps; | |
44 | this.description = description; | |
45 | this.name = name; | |
46 | this.visibility = visibility; | |
47 | } | |
48 | ||
49 | public String getId() { | |
50 | return this.id; | |
51 | } | |
52 | ||
53 | public void SetId(String id) { | |
54 | this.id = id; | |
55 | } | |
56 | ||
57 | public Collection<Channel> getChannels() { | |
58 | return this.channels; | |
59 | } | |
60 | ||
61 | public void setChannels(Collection<Channel> channels) { | |
62 | this.channels = channels; | |
63 | } | |
64 | ||
65 | public Collection<Document> getDocuments() { | |
66 | return this.documents; | |
67 | } | |
68 | ||
69 | public void setDocuments(Collection<Document> documents) { | |
70 | this.documents = documents; | |
71 | } | |
72 | ||
73 | public Collection<Folder> getFolders() { | |
74 | return this.folders; | |
75 | } | |
76 | ||
77 | public void setFolders(Collection<Folder> folders) { | |
78 | this.folders = folders; | |
79 | } | |
80 | ||
81 | public Collection<GroundOverlay> getGroundOverlays() { | |
82 | return this.groundOverlays; | |
83 | } | |
84 | ||
85 | public void setGroundOverlays(Collection<GroundOverlay> groundOverlays) { | |
86 | this.groundOverlays = groundOverlays; | |
87 | } | |
88 | ||
89 | public LookAt getLookAt() { | |
90 | return this.lookAt; | |
91 | } | |
92 | ||
93 | public void setLookAt(LookAt lookAt) { | |
94 | this.lookAt = lookAt; | |
95 | } | |
96 | ||
97 | public Collection<NetworkLink> getNetworkLinks() { | |
98 | return this.networkLinks; | |
99 | } | |
100 | ||
101 | public void setNetworkLinks(Collection<NetworkLink> networkLinks) { | |
102 | this.networkLinks = networkLinks; | |
103 | } | |
104 | ||
105 | public Collection<Placemark> getPlacemarks() { | |
106 | return this.placemarks; | |
107 | } | |
108 | ||
109 | public void setPlacemarks(Collection<Placemark> placemarks) { | |
110 | this.placemarks = placemarks; | |
111 | } | |
112 | ||
113 | public Collection<Schema> getSchemas() { | |
114 | return this.schemas; | |
115 | } | |
116 | ||
117 | public void setSchemas(Collection<Schema> schemas) { | |
118 | this.schemas = schemas; | |
119 | } | |
120 | ||
121 | public Collection<ScreenOverlay> getScreenOverlays() { | |
122 | return this.screenOverlays; | |
123 | } | |
124 | ||
125 | public void setScreenOverlays(Collection<ScreenOverlay> screenOverlays) { | |
126 | this.screenOverlays = screenOverlays; | |
127 | } | |
128 | ||
129 | public Collection<Search> getSearchs() { | |
130 | return this.searchs; | |
131 | } | |
132 | ||
133 | public void setSearchs(Collection<Search> searchs) { | |
134 | this.searchs = searchs; | |
135 | } | |
136 | ||
137 | public Snippet getSnippet() { | |
138 | return this.snippet; | |
139 | } | |
140 | ||
141 | public void setSnippet(Snippet snippet) { | |
142 | this.snippet = snippet; | |
143 | } | |
144 | ||
145 | public Collection<Style> getStyles() { | |
146 | return this.styles; | |
147 | } | |
148 | ||
149 | public void setStyles(Collection<Style> styles) { | |
150 | this.styles = styles; | |
151 | } | |
152 | ||
153 | public Collection<StyleBlinker> getStyleBlinkers() { | |
154 | return this.styleBlinkers; | |
155 | } | |
156 | ||
157 | public void setStyleBlinkers(Collection<StyleBlinker> styleBlinkers) { | |
158 | this.styleBlinkers = styleBlinkers; | |
159 | } | |
160 | ||
161 | public Collection<StyleMap> getStyleMaps() { | |
162 | return this.styleMaps; | |
163 | } | |
164 | ||
165 | public void setStyleMaps(Collection<StyleMap> styleMaps) { | |
166 | this.styleMaps = styleMaps; | |
167 | } | |
168 | ||
169 | public Description getDescription() { | |
170 | return this.description; | |
171 | } | |
172 | ||
173 | public void setDescription(Description description) { | |
174 | this.description = description; | |
175 | } | |
176 | ||
177 | public Name getName() { | |
178 | return this.name; | |
179 | } | |
180 | ||
181 | public void setName(Name name) { | |
182 | this.name = name; | |
183 | } | |
184 | ||
185 | public Visibility getVisibility() { | |
186 | return this.visibility; | |
187 | } | |
188 | ||
189 | public void setVisibility(Visibility visibility) { | |
190 | this.visibility = visibility; | |
191 | } | |
192 | ||
193 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
194 | org.w3c.dom.Element element = xmlDocument.createElement("Document"); | |
195 | if (this.id != null) { | |
196 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
197 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
198 | element.appendChild(attribute); | |
199 | } | |
200 | if (this.channels != null) { | |
201 | for (Channel channel: this.channels) { | |
202 | element.appendChild(channel.getElement(xmlDocument)); | |
203 | } | |
204 | } | |
205 | if (this.documents != null) { | |
206 | for (Document document: this.documents) { | |
207 | element.appendChild(document.getElement(xmlDocument)); | |
208 | } | |
209 | } | |
210 | if (this.folders != null) { | |
211 | for (Folder folder: this.folders) { | |
212 | element.appendChild(folder.getElement(xmlDocument)); | |
213 | } | |
214 | } | |
215 | if (this.groundOverlays != null) { | |
216 | for (GroundOverlay groundOverlay: this.groundOverlays) { | |
217 | element.appendChild(groundOverlay.getElement(xmlDocument)); | |
218 | } | |
219 | } | |
220 | if (this.lookAt != null) { | |
221 | element.appendChild(this.lookAt.getElement(xmlDocument)); | |
222 | } | |
223 | if (this.networkLinks != null) { | |
224 | for (NetworkLink networkLink: this.networkLinks) { | |
225 | element.appendChild(networkLink.getElement(xmlDocument)); | |
226 | } | |
227 | } | |
228 | if (this.placemarks != null) { | |
229 | for (Placemark placemark: this.placemarks) { | |
230 | element.appendChild(placemark.getElement(xmlDocument)); | |
231 | } | |
232 | } | |
233 | if (this.schemas != null) { | |
234 | for (Schema schema: this.schemas) { | |
235 | element.appendChild(schema.getElement(xmlDocument)); | |
236 | } | |
237 | } | |
238 | if (this.screenOverlays != null) { | |
239 | for (ScreenOverlay screenOverlay: this.screenOverlays) { | |
240 | element.appendChild(screenOverlay.getElement(xmlDocument)); | |
241 | } | |
242 | } | |
243 | if (this.searchs != null) { | |
244 | for (Search search: this.searchs) { | |
245 | element.appendChild(search.getElement(xmlDocument)); | |
246 | } | |
247 | } | |
248 | if (this.snippet != null) { | |
249 | element.appendChild(this.snippet.getElement(xmlDocument)); | |
250 | } | |
251 | if (this.styles != null) { | |
252 | for (Style style: this.styles) { | |
253 | element.appendChild(style.getElement(xmlDocument)); | |
254 | } | |
255 | } | |
256 | if (this.styleBlinkers != null) { | |
257 | for (StyleBlinker styleBlinker: this.styleBlinkers) { | |
258 | element.appendChild(styleBlinker.getElement(xmlDocument)); | |
259 | } | |
260 | } | |
261 | if (this.styleMaps != null) { | |
262 | for (StyleMap styleMap: this.styleMaps) { | |
263 | element.appendChild(styleMap.getElement(xmlDocument)); | |
264 | } | |
265 | } | |
266 | if (this.description != null) { | |
267 | element.appendChild(this.description.getElement(xmlDocument)); | |
268 | } | |
269 | if (this.name != null) { | |
270 | element.appendChild(this.name.getElement(xmlDocument)); | |
271 | } | |
272 | if (this.visibility != null) { | |
273 | element.appendChild(this.visibility.getElement(xmlDocument)); | |
274 | } | |
275 | ||
276 | return element; | |
277 | } | |
278 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class DrawOrder { | |
3 | ||
4 | private String drawOrder; | |
5 | private String id; | |
6 | ||
7 | public DrawOrder() { | |
8 | } | |
9 | ||
10 | public DrawOrder(String drawOrder, String id) { | |
11 | this.drawOrder = drawOrder; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getDrawOrder() { | |
16 | return this.drawOrder; | |
17 | } | |
18 | ||
19 | public void SetDrawOrder(String drawOrder) { | |
20 | this.drawOrder = drawOrder; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("drawOrder"); | |
33 | if (this.drawOrder != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.drawOrder)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Duration { | |
3 | ||
4 | private String duration; | |
5 | private String id; | |
6 | ||
7 | public Duration() { | |
8 | } | |
9 | ||
10 | public Duration(String duration, String id) { | |
11 | this.duration = duration; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getDuration() { | |
16 | return this.duration; | |
17 | } | |
18 | ||
19 | public void SetDuration(String duration) { | |
20 | this.duration = duration; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("duration"); | |
33 | if (this.duration != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.duration)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class East { | |
3 | ||
4 | private String east; | |
5 | private String id; | |
6 | ||
7 | public East() { | |
8 | } | |
9 | ||
10 | public East(String east, String id) { | |
11 | this.east = east; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getEast() { | |
16 | return this.east; | |
17 | } | |
18 | ||
19 | public void SetEast(String east) { | |
20 | this.east = east; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("east"); | |
33 | if (this.east != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.east)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class End { | |
3 | ||
4 | private String id; | |
5 | private TimeInstant timeInstant; | |
6 | ||
7 | public End() { | |
8 | } | |
9 | ||
10 | public End(String id, TimeInstant timeInstant) { | |
11 | this.id = id; | |
12 | this.timeInstant = timeInstant; | |
13 | } | |
14 | ||
15 | public String getId() { | |
16 | return this.id; | |
17 | } | |
18 | ||
19 | public void SetId(String id) { | |
20 | this.id = id; | |
21 | } | |
22 | ||
23 | public TimeInstant getTimeInstant() { | |
24 | return this.timeInstant; | |
25 | } | |
26 | ||
27 | public void setTimeInstant(TimeInstant timeInstant) { | |
28 | this.timeInstant = timeInstant; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("end"); | |
33 | if (this.id != null) { | |
34 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
35 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
36 | element.appendChild(attribute); | |
37 | } | |
38 | if (this.timeInstant != null) { | |
39 | element.appendChild(this.timeInstant.getElement(xmlDocument)); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Extrude { | |
3 | ||
4 | private String extrude; | |
5 | private String id; | |
6 | ||
7 | public Extrude() { | |
8 | } | |
9 | ||
10 | public Extrude(String extrude, String id) { | |
11 | this.extrude = extrude; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getExtrude() { | |
16 | return this.extrude; | |
17 | } | |
18 | ||
19 | public void SetExtrude(String extrude) { | |
20 | this.extrude = extrude; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("extrude"); | |
33 | if (this.extrude != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.extrude)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Fill { | |
3 | ||
4 | private String fill; | |
5 | private String id; | |
6 | ||
7 | public Fill() { | |
8 | } | |
9 | ||
10 | public Fill(String fill, String id) { | |
11 | this.fill = fill; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getFill() { | |
16 | return this.fill; | |
17 | } | |
18 | ||
19 | public void SetFill(String fill) { | |
20 | this.fill = fill; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("fill"); | |
33 | if (this.fill != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.fill)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class FlyToView { | |
3 | ||
4 | private String flyToView; | |
5 | private String id; | |
6 | ||
7 | public FlyToView() { | |
8 | } | |
9 | ||
10 | public FlyToView(String flyToView, String id) { | |
11 | this.flyToView = flyToView; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getFlyToView() { | |
16 | return this.flyToView; | |
17 | } | |
18 | ||
19 | public void SetFlyToView(String flyToView) { | |
20 | this.flyToView = flyToView; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("flyToView"); | |
33 | if (this.flyToView != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.flyToView)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class Folder { | |
5 | ||
6 | private String id; | |
7 | private Collection<Channel> channels; | |
8 | private Collection<Folder> folders; | |
9 | private Collection<GroundOverlay> groundOverlays; | |
10 | private LookAt lookAt; | |
11 | private Collection<NetworkLink> networkLinks; | |
12 | private Collection<Placemark> placemarks; | |
13 | private Collection<ScreenOverlay> screenOverlays; | |
14 | private Collection<Search> searchs; | |
15 | private Snippet snippet; | |
16 | private Collection<Style> styles; | |
17 | private Description description; | |
18 | private Name name; | |
19 | private Open open; | |
20 | private Visibility visibility; | |
21 | ||
22 | public Folder() { | |
23 | } | |
24 | ||
25 | public Folder(String id, Collection<Channel> channels, Collection<Folder> folders, Collection<GroundOverlay> groundOverlays, LookAt lookAt, Collection<NetworkLink> networkLinks, Collection<Placemark> placemarks, Collection<ScreenOverlay> screenOverlays, Collection<Search> searchs, Snippet snippet, Collection<Style> styles, Description description, Name name, Open open, Visibility visibility) { | |
26 | this.id = id; | |
27 | this.channels = channels; | |
28 | this.folders = folders; | |
29 | this.groundOverlays = groundOverlays; | |
30 | this.lookAt = lookAt; | |
31 | this.networkLinks = networkLinks; | |
32 | this.placemarks = placemarks; | |
33 | this.screenOverlays = screenOverlays; | |
34 | this.searchs = searchs; | |
35 | this.snippet = snippet; | |
36 | this.styles = styles; | |
37 | this.description = description; | |
38 | this.name = name; | |
39 | this.open = open; | |
40 | this.visibility = visibility; | |
41 | } | |
42 | ||
43 | public String getId() { | |
44 | return this.id; | |
45 | } | |
46 | ||
47 | public void SetId(String id) { | |
48 | this.id = id; | |
49 | } | |
50 | ||
51 | public Collection<Channel> getChannels() { | |
52 | return this.channels; | |
53 | } | |
54 | ||
55 | public void setChannels(Collection<Channel> channels) { | |
56 | this.channels = channels; | |
57 | } | |
58 | ||
59 | public Collection<Folder> getFolders() { | |
60 | return this.folders; | |
61 | } | |
62 | ||
63 | public void setFolders(Collection<Folder> folders) { | |
64 | this.folders = folders; | |
65 | } | |
66 | ||
67 | public Collection<GroundOverlay> getGroundOverlays() { | |
68 | return this.groundOverlays; | |
69 | } | |
70 | ||
71 | public void setGroundOverlays(Collection<GroundOverlay> groundOverlays) { | |
72 | this.groundOverlays = groundOverlays; | |
73 | } | |
74 | ||
75 | public LookAt getLookAt() { | |
76 | return this.lookAt; | |
77 | } | |
78 | ||
79 | public void setLookAt(LookAt lookAt) { | |
80 | this.lookAt = lookAt; | |
81 | } | |
82 | ||
83 | public Collection<NetworkLink> getNetworkLinks() { | |
84 | return this.networkLinks; | |
85 | } | |
86 | ||
87 | public void setNetworkLinks(Collection<NetworkLink> networkLinks) { | |
88 | this.networkLinks = networkLinks; | |
89 | } | |
90 | ||
91 | public Collection<Placemark> getPlacemarks() { | |
92 | return this.placemarks; | |
93 | } | |
94 | ||
95 | public void setPlacemarks(Collection<Placemark> placemarks) { | |
96 | this.placemarks = placemarks; | |
97 | } | |
98 | ||
99 | public Collection<ScreenOverlay> getScreenOverlays() { | |
100 | return this.screenOverlays; | |
101 | } | |
102 | ||
103 | public void setScreenOverlays(Collection<ScreenOverlay> screenOverlays) { | |
104 | this.screenOverlays = screenOverlays; | |
105 | } | |
106 | ||
107 | public Collection<Search> getSearchs() { | |
108 | return this.searchs; | |
109 | } | |
110 | ||
111 | public void setSearchs(Collection<Search> searchs) { | |
112 | this.searchs = searchs; | |
113 | } | |
114 | ||
115 | public Snippet getSnippet() { | |
116 | return this.snippet; | |
117 | } | |
118 | ||
119 | public void setSnippet(Snippet snippet) { | |
120 | this.snippet = snippet; | |
121 | } | |
122 | ||
123 | public Collection<Style> getStyles() { | |
124 | return this.styles; | |
125 | } | |
126 | ||
127 | public void setStyles(Collection<Style> styles) { | |
128 | this.styles = styles; | |
129 | } | |
130 | ||
131 | public Description getDescription() { | |
132 | return this.description; | |
133 | } | |
134 | ||
135 | public void setDescription(Description description) { | |
136 | this.description = description; | |
137 | } | |
138 | ||
139 | public Name getName() { | |
140 | return this.name; | |
141 | } | |
142 | ||
143 | public void setName(Name name) { | |
144 | this.name = name; | |
145 | } | |
146 | ||
147 | public Open getOpen() { | |
148 | return this.open; | |
149 | } | |
150 | ||
151 | public void setOpen(Open open) { | |
152 | this.open = open; | |
153 | } | |
154 | ||
155 | public Visibility getVisibility() { | |
156 | return this.visibility; | |
157 | } | |
158 | ||
159 | public void setVisibility(Visibility visibility) { | |
160 | this.visibility = visibility; | |
161 | } | |
162 | ||
163 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
164 | org.w3c.dom.Element element = xmlDocument.createElement("Folder"); | |
165 | if (this.id != null) { | |
166 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
167 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
168 | element.appendChild(attribute); | |
169 | } | |
170 | if (this.channels != null) { | |
171 | for (Channel channel: this.channels) { | |
172 | element.appendChild(channel.getElement(xmlDocument)); | |
173 | } | |
174 | } | |
175 | if (this.folders != null) { | |
176 | for (Folder folder: this.folders) { | |
177 | element.appendChild(folder.getElement(xmlDocument)); | |
178 | } | |
179 | } | |
180 | if (this.groundOverlays != null) { | |
181 | for (GroundOverlay groundOverlay: this.groundOverlays) { | |
182 | element.appendChild(groundOverlay.getElement(xmlDocument)); | |
183 | } | |
184 | } | |
185 | if (this.lookAt != null) { | |
186 | element.appendChild(this.lookAt.getElement(xmlDocument)); | |
187 | } | |
188 | if (this.networkLinks != null) { | |
189 | for (NetworkLink networkLink: this.networkLinks) { | |
190 | element.appendChild(networkLink.getElement(xmlDocument)); | |
191 | } | |
192 | } | |
193 | if (this.placemarks != null) { | |
194 | for (Placemark placemark: this.placemarks) { | |
195 | element.appendChild(placemark.getElement(xmlDocument)); | |
196 | } | |
197 | } | |
198 | if (this.screenOverlays != null) { | |
199 | for (ScreenOverlay screenOverlay: this.screenOverlays) { | |
200 | element.appendChild(screenOverlay.getElement(xmlDocument)); | |
201 | } | |
202 | } | |
203 | if (this.searchs != null) { | |
204 | for (Search search: this.searchs) { | |
205 | element.appendChild(search.getElement(xmlDocument)); | |
206 | } | |
207 | } | |
208 | if (this.snippet != null) { | |
209 | element.appendChild(this.snippet.getElement(xmlDocument)); | |
210 | } | |
211 | if (this.styles != null) { | |
212 | for (Style style: this.styles) { | |
213 | element.appendChild(style.getElement(xmlDocument)); | |
214 | } | |
215 | } | |
216 | if (this.description != null) { | |
217 | element.appendChild(this.description.getElement(xmlDocument)); | |
218 | } | |
219 | if (this.name != null) { | |
220 | element.appendChild(this.name.getElement(xmlDocument)); | |
221 | } | |
222 | if (this.open != null) { | |
223 | element.appendChild(this.open.getElement(xmlDocument)); | |
224 | } | |
225 | if (this.visibility != null) { | |
226 | element.appendChild(this.visibility.getElement(xmlDocument)); | |
227 | } | |
228 | ||
229 | return element; | |
230 | } | |
231 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class GeomColor { | |
3 | ||
4 | private String geomColor; | |
5 | private String id; | |
6 | ||
7 | public GeomColor() { | |
8 | } | |
9 | ||
10 | public GeomColor(String geomColor, String id) { | |
11 | this.geomColor = geomColor; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getGeomColor() { | |
16 | return this.geomColor; | |
17 | } | |
18 | ||
19 | public void SetGeomColor(String geomColor) { | |
20 | this.geomColor = geomColor; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("geomColor"); | |
33 | if (this.geomColor != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.geomColor)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class GeomScale { | |
3 | ||
4 | private String geomScale; | |
5 | private String id; | |
6 | ||
7 | public GeomScale() { | |
8 | } | |
9 | ||
10 | public GeomScale(String geomScale, String id) { | |
11 | this.geomScale = geomScale; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getGeomScale() { | |
16 | return this.geomScale; | |
17 | } | |
18 | ||
19 | public void SetGeomScale(String geomScale) { | |
20 | this.geomScale = geomScale; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("geomScale"); | |
33 | if (this.geomScale != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.geomScale)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class GeometryCollection { | |
3 | ||
4 | private String geometryCollection; | |
5 | private String id; | |
6 | ||
7 | public GeometryCollection() { | |
8 | } | |
9 | ||
10 | public GeometryCollection(String geometryCollection, String id) { | |
11 | this.geometryCollection = geometryCollection; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getGeometryCollection() { | |
16 | return this.geometryCollection; | |
17 | } | |
18 | ||
19 | public void SetGeometryCollection(String geometryCollection) { | |
20 | this.geometryCollection = geometryCollection; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("GeometryCollection"); | |
33 | if (this.geometryCollection != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.geometryCollection)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class GroundOverlay { | |
5 | ||
6 | private String id; | |
7 | private Collection<Icon> icons; | |
8 | private Collection<LatLonBox> latLonBoxs; | |
9 | private LookAt lookAt; | |
10 | private Color color; | |
11 | private DrawOrder drawOrder; | |
12 | private Name name; | |
13 | private Opacity opacity; | |
14 | private Rotation rotation; | |
15 | private TexMat texMat; | |
16 | private Visibility visibility; | |
17 | ||
18 | public GroundOverlay() { | |
19 | } | |
20 | ||
21 | public GroundOverlay(String id, Collection<Icon> icons, Collection<LatLonBox> latLonBoxs, LookAt lookAt, Color color, DrawOrder drawOrder, Name name, Opacity opacity, Rotation rotation, TexMat texMat, Visibility visibility) { | |
22 | this.id = id; | |
23 | this.icons = icons; | |
24 | this.latLonBoxs = latLonBoxs; | |
25 | this.lookAt = lookAt; | |
26 | this.color = color; | |
27 | this.drawOrder = drawOrder; | |
28 | this.name = name; | |
29 | this.opacity = opacity; | |
30 | this.rotation = rotation; | |
31 | this.texMat = texMat; | |
32 | this.visibility = visibility; | |
33 | } | |
34 | ||
35 | public String getId() { | |
36 | return this.id; | |
37 | } | |
38 | ||
39 | public void SetId(String id) { | |
40 | this.id = id; | |
41 | } | |
42 | ||
43 | public Collection<Icon> getIcons() { | |
44 | return this.icons; | |
45 | } | |
46 | ||
47 | public void setIcons(Collection<Icon> icons) { | |
48 | this.icons = icons; | |
49 | } | |
50 | ||
51 | public Collection<LatLonBox> getLatLonBoxs() { | |
52 | return this.latLonBoxs; | |
53 | } | |
54 | ||
55 | public void setLatLonBoxs(Collection<LatLonBox> latLonBoxs) { | |
56 | this.latLonBoxs = latLonBoxs; | |
57 | } | |
58 | ||
59 | public LookAt getLookAt() { | |
60 | return this.lookAt; | |
61 | } | |
62 | ||
63 | public void setLookAt(LookAt lookAt) { | |
64 | this.lookAt = lookAt; | |
65 | } | |
66 | ||
67 | public Color getColor() { | |
68 | return this.color; | |
69 | } | |
70 | ||
71 | public void setColor(Color color) { | |
72 | this.color = color; | |
73 | } | |
74 | ||
75 | public DrawOrder getDrawOrder() { | |
76 | return this.drawOrder; | |
77 | } | |
78 | ||
79 | public void setDrawOrder(DrawOrder drawOrder) { | |
80 | this.drawOrder = drawOrder; | |
81 | } | |
82 | ||
83 | public Name getName() { | |
84 | return this.name; | |
85 | } | |
86 | ||
87 | public void setName(Name name) { | |
88 | this.name = name; | |
89 | } | |
90 | ||
91 | public Opacity getOpacity() { | |
92 | return this.opacity; | |
93 | } | |
94 | ||
95 | public void setOpacity(Opacity opacity) { | |
96 | this.opacity = opacity; | |
97 | } | |
98 | ||
99 | public Rotation getRotation() { | |
100 | return this.rotation; | |
101 | } | |
102 | ||
103 | public void setRotation(Rotation rotation) { | |
104 | this.rotation = rotation; | |
105 | } | |
106 | ||
107 | public TexMat getTexMat() { | |
108 | return this.texMat; | |
109 | } | |
110 | ||
111 | public void setTexMat(TexMat texMat) { | |
112 | this.texMat = texMat; | |
113 | } | |
114 | ||
115 | public Visibility getVisibility() { | |
116 | return this.visibility; | |
117 | } | |
118 | ||
119 | public void setVisibility(Visibility visibility) { | |
120 | this.visibility = visibility; | |
121 | } | |
122 | ||
123 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
124 | org.w3c.dom.Element element = xmlDocument.createElement("GroundOverlay"); | |
125 | if (this.id != null) { | |
126 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
127 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
128 | element.appendChild(attribute); | |
129 | } | |
130 | if (this.icons != null) { | |
131 | for (Icon icon: this.icons) { | |
132 | element.appendChild(icon.getElement(xmlDocument)); | |
133 | } | |
134 | } | |
135 | if (this.latLonBoxs != null) { | |
136 | for (LatLonBox latLonBox: this.latLonBoxs) { | |
137 | element.appendChild(latLonBox.getElement(xmlDocument)); | |
138 | } | |
139 | } | |
140 | if (this.lookAt != null) { | |
141 | element.appendChild(this.lookAt.getElement(xmlDocument)); | |
142 | } | |
143 | if (this.color != null) { | |
144 | element.appendChild(this.color.getElement(xmlDocument)); | |
145 | } | |
146 | if (this.drawOrder != null) { | |
147 | element.appendChild(this.drawOrder.getElement(xmlDocument)); | |
148 | } | |
149 | if (this.name != null) { | |
150 | element.appendChild(this.name.getElement(xmlDocument)); | |
151 | } | |
152 | if (this.opacity != null) { | |
153 | element.appendChild(this.opacity.getElement(xmlDocument)); | |
154 | } | |
155 | if (this.rotation != null) { | |
156 | element.appendChild(this.rotation.getElement(xmlDocument)); | |
157 | } | |
158 | if (this.texMat != null) { | |
159 | element.appendChild(this.texMat.getElement(xmlDocument)); | |
160 | } | |
161 | if (this.visibility != null) { | |
162 | element.appendChild(this.visibility.getElement(xmlDocument)); | |
163 | } | |
164 | ||
165 | return element; | |
166 | } | |
167 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class H { | |
3 | ||
4 | private String h; | |
5 | private String id; | |
6 | ||
7 | public H() { | |
8 | } | |
9 | ||
10 | public H(String h, String id) { | |
11 | this.h = h; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getH() { | |
16 | return this.h; | |
17 | } | |
18 | ||
19 | public void SetH(String h) { | |
20 | this.h = h; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("h"); | |
33 | if (this.h != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.h)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Heading { | |
3 | ||
4 | private String heading; | |
5 | private String id; | |
6 | ||
7 | public Heading() { | |
8 | } | |
9 | ||
10 | public Heading(String heading, String id) { | |
11 | this.heading = heading; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getHeading() { | |
16 | return this.heading; | |
17 | } | |
18 | ||
19 | public void SetHeading(String heading) { | |
20 | this.heading = heading; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("heading"); | |
33 | if (this.heading != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.heading)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Href { | |
3 | ||
4 | private String href; | |
5 | private String id; | |
6 | ||
7 | public Href() { | |
8 | } | |
9 | ||
10 | public Href(String href, String id) { | |
11 | this.href = href; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getHref() { | |
16 | return this.href; | |
17 | } | |
18 | ||
19 | public void SetHref(String href) { | |
20 | this.href = href; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("href"); | |
33 | if (this.href != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.href)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class Icon { | |
5 | ||
6 | private String id; | |
7 | private Collection<Href> hrefs; | |
8 | private H h; | |
9 | private RefreshMode refreshMode; | |
10 | private RefreshInterval refreshInterval; | |
11 | private ViewFormat viewFormat; | |
12 | private ViewRefreshMode viewRefreshMode; | |
13 | private ViewBoundScale viewBoundScale; | |
14 | private W w; | |
15 | private X x; | |
16 | private Y y; | |
17 | ||
18 | public Icon() { | |
19 | } | |
20 | ||
21 | public Icon(String id, Collection<Href> hrefs, H h, RefreshMode refreshMode, RefreshInterval refreshInterval, ViewFormat viewFormat, ViewRefreshMode viewRefreshMode, ViewBoundScale viewBoundScale, W w, X x, Y y) { | |
22 | this.id = id; | |
23 | this.hrefs = hrefs; | |
24 | this.h = h; | |
25 | this.refreshMode = refreshMode; | |
26 | this.refreshInterval = refreshInterval; | |
27 | this.viewFormat = viewFormat; | |
28 | this.viewRefreshMode = viewRefreshMode; | |
29 | this.viewBoundScale = viewBoundScale; | |
30 | this.w = w; | |
31 | this.x = x; | |
32 | this.y = y; | |
33 | } | |
34 | ||
35 | public String getId() { | |
36 | return this.id; | |
37 | } | |
38 | ||
39 | public void SetId(String id) { | |
40 | this.id = id; | |
41 | } | |
42 | ||
43 | public Collection<Href> getHrefs() { | |
44 | return this.hrefs; | |
45 | } | |
46 | ||
47 | public void setHrefs(Collection<Href> hrefs) { | |
48 | this.hrefs = hrefs; | |
49 | } | |
50 | ||
51 | public H getH() { | |
52 | return this.h; | |
53 | } | |
54 | ||
55 | public void setH(H h) { | |
56 | this.h = h; | |
57 | } | |
58 | ||
59 | public RefreshMode getRefreshMode() { | |
60 | return this.refreshMode; | |
61 | } | |
62 | ||
63 | public void setRefreshMode(RefreshMode refreshMode) { | |
64 | this.refreshMode = refreshMode; | |
65 | } | |
66 | ||
67 | public RefreshInterval getRefreshInterval() { | |
68 | return this.refreshInterval; | |
69 | } | |
70 | ||
71 | public void setRefreshInterval(RefreshInterval refreshInterval) { | |
72 | this.refreshInterval = refreshInterval; | |
73 | } | |
74 | ||
75 | public ViewFormat getViewFormat() { | |
76 | return this.viewFormat; | |
77 | } | |
78 | ||
79 | public void setViewFormat(ViewFormat viewFormat) { | |
80 | this.viewFormat = viewFormat; | |
81 | } | |
82 | ||
83 | public ViewRefreshMode getViewRefreshMode() { | |
84 | return this.viewRefreshMode; | |
85 | } | |
86 | ||
87 | public void setViewRefreshMode(ViewRefreshMode viewRefreshMode) { | |
88 | this.viewRefreshMode = viewRefreshMode; | |
89 | } | |
90 | ||
91 | public ViewBoundScale getViewBoundScale() { | |
92 | return this.viewBoundScale; | |
93 | } | |
94 | ||
95 | public void setViewBoundScale(ViewBoundScale viewBoundScale) { | |
96 | this.viewBoundScale = viewBoundScale; | |
97 | } | |
98 | ||
99 | public W getW() { | |
100 | return this.w; | |
101 | } | |
102 | ||
103 | public void setW(W w) { | |
104 | this.w = w; | |
105 | } | |
106 | ||
107 | public X getX() { | |
108 | return this.x; | |
109 | } | |
110 | ||
111 | public void setX(X x) { | |
112 | this.x = x; | |
113 | } | |
114 | ||
115 | public Y getY() { | |
116 | return this.y; | |
117 | } | |
118 | ||
119 | public void setY(Y y) { | |
120 | this.y = y; | |
121 | } | |
122 | ||
123 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
124 | org.w3c.dom.Element element = xmlDocument.createElement("Icon"); | |
125 | if (this.id != null) { | |
126 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
127 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
128 | element.appendChild(attribute); | |
129 | } | |
130 | if (this.hrefs != null) { | |
131 | for (Href href: this.hrefs) { | |
132 | element.appendChild(href.getElement(xmlDocument)); | |
133 | } | |
134 | } | |
135 | if (this.h != null) { | |
136 | element.appendChild(this.h.getElement(xmlDocument)); | |
137 | } | |
138 | if (this.refreshMode != null) { | |
139 | element.appendChild(this.refreshMode.getElement(xmlDocument)); | |
140 | } | |
141 | if (this.refreshInterval != null) { | |
142 | element.appendChild(this.refreshInterval.getElement(xmlDocument)); | |
143 | } | |
144 | if (this.viewFormat != null) { | |
145 | element.appendChild(this.viewFormat.getElement(xmlDocument)); | |
146 | } | |
147 | if (this.viewRefreshMode != null) { | |
148 | element.appendChild(this.viewRefreshMode.getElement(xmlDocument)); | |
149 | } | |
150 | if (this.viewBoundScale != null) { | |
151 | element.appendChild(this.viewBoundScale.getElement(xmlDocument)); | |
152 | } | |
153 | if (this.w != null) { | |
154 | element.appendChild(this.w.getElement(xmlDocument)); | |
155 | } | |
156 | if (this.x != null) { | |
157 | element.appendChild(this.x.getElement(xmlDocument)); | |
158 | } | |
159 | if (this.y != null) { | |
160 | element.appendChild(this.y.getElement(xmlDocument)); | |
161 | } | |
162 | ||
163 | return element; | |
164 | } | |
165 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class IconStyle { | |
5 | ||
6 | private String id; | |
7 | private Collection<Icon> icons; | |
8 | private Color color; | |
9 | private ColorMode colorMode; | |
10 | private Heading heading; | |
11 | private Scale scale; | |
12 | ||
13 | public IconStyle() { | |
14 | } | |
15 | ||
16 | public IconStyle(String id, Collection<Icon> icons, Color color, ColorMode colorMode, Heading heading, Scale scale) { | |
17 | this.id = id; | |
18 | this.icons = icons; | |
19 | this.color = color; | |
20 | this.colorMode = colorMode; | |
21 | this.heading = heading; | |
22 | this.scale = scale; | |
23 | } | |
24 | ||
25 | public String getId() { | |
26 | return this.id; | |
27 | } | |
28 | ||
29 | public void SetId(String id) { | |
30 | this.id = id; | |
31 | } | |
32 | ||
33 | public Collection<Icon> getIcons() { | |
34 | return this.icons; | |
35 | } | |
36 | ||
37 | public void setIcons(Collection<Icon> icons) { | |
38 | this.icons = icons; | |
39 | } | |
40 | ||
41 | public Color getColor() { | |
42 | return this.color; | |
43 | } | |
44 | ||
45 | public void setColor(Color color) { | |
46 | this.color = color; | |
47 | } | |
48 | ||
49 | public ColorMode getColorMode() { | |
50 | return this.colorMode; | |
51 | } | |
52 | ||
53 | public void setColorMode(ColorMode colorMode) { | |
54 | this.colorMode = colorMode; | |
55 | } | |
56 | ||
57 | public Heading getHeading() { | |
58 | return this.heading; | |
59 | } | |
60 | ||
61 | public void setHeading(Heading heading) { | |
62 | this.heading = heading; | |
63 | } | |
64 | ||
65 | public Scale getScale() { | |
66 | return this.scale; | |
67 | } | |
68 | ||
69 | public void setScale(Scale scale) { | |
70 | this.scale = scale; | |
71 | } | |
72 | ||
73 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
74 | org.w3c.dom.Element element = xmlDocument.createElement("IconStyle"); | |
75 | if (this.id != null) { | |
76 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
77 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
78 | element.appendChild(attribute); | |
79 | } | |
80 | if (this.icons != null) { | |
81 | for (Icon icon: this.icons) { | |
82 | element.appendChild(icon.getElement(xmlDocument)); | |
83 | } | |
84 | } | |
85 | if (this.color != null) { | |
86 | element.appendChild(this.color.getElement(xmlDocument)); | |
87 | } | |
88 | if (this.colorMode != null) { | |
89 | element.appendChild(this.colorMode.getElement(xmlDocument)); | |
90 | } | |
91 | if (this.heading != null) { | |
92 | element.appendChild(this.heading.getElement(xmlDocument)); | |
93 | } | |
94 | if (this.scale != null) { | |
95 | element.appendChild(this.scale.getElement(xmlDocument)); | |
96 | } | |
97 | ||
98 | return element; | |
99 | } | |
100 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class ImageLink { | |
3 | ||
4 | private String id; | |
5 | private H h; | |
6 | private W w; | |
7 | private X x; | |
8 | private Y y; | |
9 | ||
10 | public ImageLink() { | |
11 | } | |
12 | ||
13 | public ImageLink(String id, H h, W w, X x, Y y) { | |
14 | this.id = id; | |
15 | this.h = h; | |
16 | this.w = w; | |
17 | this.x = x; | |
18 | this.y = y; | |
19 | } | |
20 | ||
21 | public String getId() { | |
22 | return this.id; | |
23 | } | |
24 | ||
25 | public void SetId(String id) { | |
26 | this.id = id; | |
27 | } | |
28 | ||
29 | public H getH() { | |
30 | return this.h; | |
31 | } | |
32 | ||
33 | public void setH(H h) { | |
34 | this.h = h; | |
35 | } | |
36 | ||
37 | public W getW() { | |
38 | return this.w; | |
39 | } | |
40 | ||
41 | public void setW(W w) { | |
42 | this.w = w; | |
43 | } | |
44 | ||
45 | public X getX() { | |
46 | return this.x; | |
47 | } | |
48 | ||
49 | public void setX(X x) { | |
50 | this.x = x; | |
51 | } | |
52 | ||
53 | public Y getY() { | |
54 | return this.y; | |
55 | } | |
56 | ||
57 | public void setY(Y y) { | |
58 | this.y = y; | |
59 | } | |
60 | ||
61 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
62 | org.w3c.dom.Element element = xmlDocument.createElement("ImageLink"); | |
63 | if (this.id != null) { | |
64 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
65 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
66 | element.appendChild(attribute); | |
67 | } | |
68 | if (this.h != null) { | |
69 | element.appendChild(this.h.getElement(xmlDocument)); | |
70 | } | |
71 | if (this.w != null) { | |
72 | element.appendChild(this.w.getElement(xmlDocument)); | |
73 | } | |
74 | if (this.x != null) { | |
75 | element.appendChild(this.x.getElement(xmlDocument)); | |
76 | } | |
77 | if (this.y != null) { | |
78 | element.appendChild(this.y.getElement(xmlDocument)); | |
79 | } | |
80 | ||
81 | return element; | |
82 | } | |
83 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class InnerBoundaryIs { | |
5 | ||
6 | private String id; | |
7 | private Collection<LinearRing> linearRings; | |
8 | ||
9 | public InnerBoundaryIs() { | |
10 | } | |
11 | ||
12 | public InnerBoundaryIs(String id, Collection<LinearRing> linearRings) { | |
13 | this.id = id; | |
14 | this.linearRings = linearRings; | |
15 | } | |
16 | ||
17 | public String getId() { | |
18 | return this.id; | |
19 | } | |
20 | ||
21 | public void SetId(String id) { | |
22 | this.id = id; | |
23 | } | |
24 | ||
25 | public Collection<LinearRing> getLinearRings() { | |
26 | return this.linearRings; | |
27 | } | |
28 | ||
29 | public void setLinearRings(Collection<LinearRing> linearRings) { | |
30 | this.linearRings = linearRings; | |
31 | } | |
32 | ||
33 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
34 | org.w3c.dom.Element element = xmlDocument.createElement("innerBoundaryIs"); | |
35 | if (this.id != null) { | |
36 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
37 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
38 | element.appendChild(attribute); | |
39 | } | |
40 | if (this.linearRings != null) { | |
41 | for (LinearRing linearRing: this.linearRings) { | |
42 | element.appendChild(linearRing.getElement(xmlDocument)); | |
43 | } | |
44 | } | |
45 | ||
46 | return element; | |
47 | } | |
48 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Key { | |
3 | ||
4 | private String key; | |
5 | private String id; | |
6 | ||
7 | public Key() { | |
8 | } | |
9 | ||
10 | public Key(String key, String id) { | |
11 | this.key = key; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getKey() { | |
16 | return this.key; | |
17 | } | |
18 | ||
19 | public void SetKey(String key) { | |
20 | this.key = key; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("key"); | |
33 | if (this.key != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.key)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class Kml { | |
5 | ||
6 | private String id; | |
7 | private Collection<NetworkLinkControl> networkLinkControls; | |
8 | private Channel channel; | |
9 | private Document document; | |
10 | private Folder folder; | |
11 | private GroundOverlay groundOverlay; | |
12 | private LookAt lookAt; | |
13 | private NetworkLink networkLink; | |
14 | private Placemark placemark; | |
15 | private Search search; | |
16 | private ScreenOverlay screenOverlay; | |
17 | ||
18 | public Kml() { | |
19 | } | |
20 | ||
21 | public Kml(String id, Collection<NetworkLinkControl> networkLinkControls, Channel channel, Document document, Folder folder, GroundOverlay groundOverlay, LookAt lookAt, NetworkLink networkLink, Placemark placemark, Search search, ScreenOverlay screenOverlay) { | |
22 | this.id = id; | |
23 | this.networkLinkControls = networkLinkControls; | |
24 | this.channel = channel; | |
25 | this.document = document; | |
26 | this.folder = folder; | |
27 | this.groundOverlay = groundOverlay; | |
28 | this.lookAt = lookAt; | |
29 | this.networkLink = networkLink; | |
30 | this.placemark = placemark; | |
31 | this.search = search; | |
32 | this.screenOverlay = screenOverlay; | |
33 | } | |
34 | ||
35 | public String getId() { | |
36 | return this.id; | |
37 | } | |
38 | ||
39 | public void SetId(String id) { | |
40 | this.id = id; | |
41 | } | |
42 | ||
43 | public Collection<NetworkLinkControl> getNetworkLinkControls() { | |
44 | return this.networkLinkControls; | |
45 | } | |
46 | ||
47 | public void setNetworkLinkControls(Collection<NetworkLinkControl> networkLinkControls) { | |
48 | this.networkLinkControls = networkLinkControls; | |
49 | } | |
50 | ||
51 | public Channel getChannel() { | |
52 | return this.channel; | |
53 | } | |
54 | ||
55 | public void setChannel(Channel channel) { | |
56 | this.channel = channel; | |
57 | } | |
58 | ||
59 | public Document getDocument() { | |
60 | return this.document; | |
61 | } | |
62 | ||
63 | public void setDocument(Document document) { | |
64 | this.document = document; | |
65 | } | |
66 | ||
67 | public Folder getFolder() { | |
68 | return this.folder; | |
69 | } | |
70 | ||
71 | public void setFolder(Folder folder) { | |
72 | this.folder = folder; | |
73 | } | |
74 | ||
75 | public GroundOverlay getGroundOverlay() { | |
76 | return this.groundOverlay; | |
77 | } | |
78 | ||
79 | public void setGroundOverlay(GroundOverlay groundOverlay) { | |
80 | this.groundOverlay = groundOverlay; | |
81 | } | |
82 | ||
83 | public LookAt getLookAt() { | |
84 | return this.lookAt; | |
85 | } | |
86 | ||
87 | public void setLookAt(LookAt lookAt) { | |
88 | this.lookAt = lookAt; | |
89 | } | |
90 | ||
91 | public NetworkLink getNetworkLink() { | |
92 | return this.networkLink; | |
93 | } | |
94 | ||
95 | public void setNetworkLink(NetworkLink networkLink) { | |
96 | this.networkLink = networkLink; | |
97 | } | |
98 | ||
99 | public Placemark getPlacemark() { | |
100 | return this.placemark; | |
101 | } | |
102 | ||
103 | public void setPlacemark(Placemark placemark) { | |
104 | this.placemark = placemark; | |
105 | } | |
106 | ||
107 | public Search getSearch() { | |
108 | return this.search; | |
109 | } | |
110 | ||
111 | public void setSearch(Search search) { | |
112 | this.search = search; | |
113 | } | |
114 | ||
115 | public ScreenOverlay getScreenOverlay() { | |
116 | return this.screenOverlay; | |
117 | } | |
118 | ||
119 | public void setScreenOverlay(ScreenOverlay screenOverlay) { | |
120 | this.screenOverlay = screenOverlay; | |
121 | } | |
122 | ||
123 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
124 | org.w3c.dom.Element element = xmlDocument.createElement("kml"); | |
125 | if (this.id != null) { | |
126 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
127 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
128 | element.appendChild(attribute); | |
129 | } | |
130 | if (this.networkLinkControls != null) { | |
131 | for (NetworkLinkControl networkLinkControl: this.networkLinkControls) { | |
132 | element.appendChild(networkLinkControl.getElement(xmlDocument)); | |
133 | } | |
134 | } | |
135 | if (this.channel != null) { | |
136 | element.appendChild(this.channel.getElement(xmlDocument)); | |
137 | } | |
138 | if (this.document != null) { | |
139 | element.appendChild(this.document.getElement(xmlDocument)); | |
140 | } | |
141 | if (this.folder != null) { | |
142 | element.appendChild(this.folder.getElement(xmlDocument)); | |
143 | } | |
144 | if (this.groundOverlay != null) { | |
145 | element.appendChild(this.groundOverlay.getElement(xmlDocument)); | |
146 | } | |
147 | if (this.lookAt != null) { | |
148 | element.appendChild(this.lookAt.getElement(xmlDocument)); | |
149 | } | |
150 | if (this.networkLink != null) { | |
151 | element.appendChild(this.networkLink.getElement(xmlDocument)); | |
152 | } | |
153 | if (this.placemark != null) { | |
154 | element.appendChild(this.placemark.getElement(xmlDocument)); | |
155 | } | |
156 | if (this.search != null) { | |
157 | element.appendChild(this.search.getElement(xmlDocument)); | |
158 | } | |
159 | if (this.screenOverlay != null) { | |
160 | element.appendChild(this.screenOverlay.getElement(xmlDocument)); | |
161 | } | |
162 | ||
163 | return element; | |
164 | } | |
165 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class LabelColor { | |
3 | ||
4 | private String labelColor; | |
5 | private String id; | |
6 | ||
7 | public LabelColor() { | |
8 | } | |
9 | ||
10 | public LabelColor(String labelColor, String id) { | |
11 | this.labelColor = labelColor; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getLabelColor() { | |
16 | return this.labelColor; | |
17 | } | |
18 | ||
19 | public void SetLabelColor(String labelColor) { | |
20 | this.labelColor = labelColor; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("labelColor"); | |
33 | if (this.labelColor != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.labelColor)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class LabelPlacement { | |
3 | ||
4 | private String labelPlacement; | |
5 | private String id; | |
6 | ||
7 | public LabelPlacement() { | |
8 | } | |
9 | ||
10 | public LabelPlacement(String labelPlacement, String id) { | |
11 | this.labelPlacement = labelPlacement; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getLabelPlacement() { | |
16 | return this.labelPlacement; | |
17 | } | |
18 | ||
19 | public void SetLabelPlacement(String labelPlacement) { | |
20 | this.labelPlacement = labelPlacement; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("labelPlacement"); | |
33 | if (this.labelPlacement != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.labelPlacement)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class LabelStyle { | |
3 | ||
4 | private String id; | |
5 | private Color color; | |
6 | private ColorMode colorMode; | |
7 | private Scale scale; | |
8 | ||
9 | public LabelStyle() { | |
10 | } | |
11 | ||
12 | public LabelStyle(String id, Color color, ColorMode colorMode, Scale scale) { | |
13 | this.id = id; | |
14 | this.color = color; | |
15 | this.colorMode = colorMode; | |
16 | this.scale = scale; | |
17 | } | |
18 | ||
19 | public String getId() { | |
20 | return this.id; | |
21 | } | |
22 | ||
23 | public void SetId(String id) { | |
24 | this.id = id; | |
25 | } | |
26 | ||
27 | public Color getColor() { | |
28 | return this.color; | |
29 | } | |
30 | ||
31 | public void setColor(Color color) { | |
32 | this.color = color; | |
33 | } | |
34 | ||
35 | public ColorMode getColorMode() { | |
36 | return this.colorMode; | |
37 | } | |
38 | ||
39 | public void setColorMode(ColorMode colorMode) { | |
40 | this.colorMode = colorMode; | |
41 | } | |
42 | ||
43 | public Scale getScale() { | |
44 | return this.scale; | |
45 | } | |
46 | ||
47 | public void setScale(Scale scale) { | |
48 | this.scale = scale; | |
49 | } | |
50 | ||
51 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
52 | org.w3c.dom.Element element = xmlDocument.createElement("LabelStyle"); | |
53 | if (this.id != null) { | |
54 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
55 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
56 | element.appendChild(attribute); | |
57 | } | |
58 | if (this.color != null) { | |
59 | element.appendChild(this.color.getElement(xmlDocument)); | |
60 | } | |
61 | if (this.colorMode != null) { | |
62 | element.appendChild(this.colorMode.getElement(xmlDocument)); | |
63 | } | |
64 | if (this.scale != null) { | |
65 | element.appendChild(this.scale.getElement(xmlDocument)); | |
66 | } | |
67 | ||
68 | return element; | |
69 | } | |
70 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class LatLonBox { | |
5 | ||
6 | private String id; | |
7 | private Collection<East> easts; | |
8 | private Collection<North> norths; | |
9 | private Collection<South> souths; | |
10 | private Collection<West> wests; | |
11 | private Rotation rotation; | |
12 | ||
13 | public LatLonBox() { | |
14 | } | |
15 | ||
16 | public LatLonBox(String id, Collection<East> easts, Collection<North> norths, Collection<South> souths, Collection<West> wests, Rotation rotation) { | |
17 | this.id = id; | |
18 | this.easts = easts; | |
19 | this.norths = norths; | |
20 | this.souths = souths; | |
21 | this.wests = wests; | |
22 | this.rotation = rotation; | |
23 | } | |
24 | ||
25 | public String getId() { | |
26 | return this.id; | |
27 | } | |
28 | ||
29 | public void SetId(String id) { | |
30 | this.id = id; | |
31 | } | |
32 | ||
33 | public Collection<East> getEasts() { | |
34 | return this.easts; | |
35 | } | |
36 | ||
37 | public void setEasts(Collection<East> easts) { | |
38 | this.easts = easts; | |
39 | } | |
40 | ||
41 | public Collection<North> getNorths() { | |
42 | return this.norths; | |
43 | } | |
44 | ||
45 | public void setNorths(Collection<North> norths) { | |
46 | this.norths = norths; | |
47 | } | |
48 | ||
49 | public Collection<South> getSouths() { | |
50 | return this.souths; | |
51 | } | |
52 | ||
53 | public void setSouths(Collection<South> souths) { | |
54 | this.souths = souths; | |
55 | } | |
56 | ||
57 | public Collection<West> getWests() { | |
58 | return this.wests; | |
59 | } | |
60 | ||
61 | public void setWests(Collection<West> wests) { | |
62 | this.wests = wests; | |
63 | } | |
64 | ||
65 | public Rotation getRotation() { | |
66 | return this.rotation; | |
67 | } | |
68 | ||
69 | public void setRotation(Rotation rotation) { | |
70 | this.rotation = rotation; | |
71 | } | |
72 | ||
73 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
74 | org.w3c.dom.Element element = xmlDocument.createElement("LatLonBox"); | |
75 | if (this.id != null) { | |
76 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
77 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
78 | element.appendChild(attribute); | |
79 | } | |
80 | if (this.easts != null) { | |
81 | for (East east: this.easts) { | |
82 | element.appendChild(east.getElement(xmlDocument)); | |
83 | } | |
84 | } | |
85 | if (this.norths != null) { | |
86 | for (North north: this.norths) { | |
87 | element.appendChild(north.getElement(xmlDocument)); | |
88 | } | |
89 | } | |
90 | if (this.souths != null) { | |
91 | for (South south: this.souths) { | |
92 | element.appendChild(south.getElement(xmlDocument)); | |
93 | } | |
94 | } | |
95 | if (this.wests != null) { | |
96 | for (West west: this.wests) { | |
97 | element.appendChild(west.getElement(xmlDocument)); | |
98 | } | |
99 | } | |
100 | if (this.rotation != null) { | |
101 | element.appendChild(this.rotation.getElement(xmlDocument)); | |
102 | } | |
103 | ||
104 | return element; | |
105 | } | |
106 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class LatLonXform { | |
3 | ||
4 | private String id; | |
5 | private Rotation rotation; | |
6 | ||
7 | public LatLonXform() { | |
8 | } | |
9 | ||
10 | public LatLonXform(String id, Rotation rotation) { | |
11 | this.id = id; | |
12 | this.rotation = rotation; | |
13 | } | |
14 | ||
15 | public String getId() { | |
16 | return this.id; | |
17 | } | |
18 | ||
19 | public void SetId(String id) { | |
20 | this.id = id; | |
21 | } | |
22 | ||
23 | public Rotation getRotation() { | |
24 | return this.rotation; | |
25 | } | |
26 | ||
27 | public void setRotation(Rotation rotation) { | |
28 | this.rotation = rotation; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("LatLonXform"); | |
33 | if (this.id != null) { | |
34 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
35 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
36 | element.appendChild(attribute); | |
37 | } | |
38 | if (this.rotation != null) { | |
39 | element.appendChild(this.rotation.getElement(xmlDocument)); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Latitude { | |
3 | ||
4 | private String latitude; | |
5 | private String id; | |
6 | ||
7 | public Latitude() { | |
8 | } | |
9 | ||
10 | public Latitude(String latitude, String id) { | |
11 | this.latitude = latitude; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getLatitude() { | |
16 | return this.latitude; | |
17 | } | |
18 | ||
19 | public void SetLatitude(String latitude) { | |
20 | this.latitude = latitude; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("latitude"); | |
33 | if (this.latitude != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.latitude)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class LayerIndex { | |
3 | ||
4 | private String layerIndex; | |
5 | private String id; | |
6 | ||
7 | public LayerIndex() { | |
8 | } | |
9 | ||
10 | public LayerIndex(String layerIndex, String id) { | |
11 | this.layerIndex = layerIndex; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getLayerIndex() { | |
16 | return this.layerIndex; | |
17 | } | |
18 | ||
19 | public void SetLayerIndex(String layerIndex) { | |
20 | this.layerIndex = layerIndex; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("layerIndex"); | |
33 | if (this.layerIndex != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.layerIndex)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class LineString { | |
5 | ||
6 | private String id; | |
7 | private Collection<Coordinates> coordinatess; | |
8 | private AltitudeMode altitudeMode; | |
9 | private Extrude extrude; | |
10 | private Tessellate tessellate; | |
11 | ||
12 | public LineString() { | |
13 | } | |
14 | ||
15 | public LineString(String id, Collection<Coordinates> coordinatess, AltitudeMode altitudeMode, Extrude extrude, Tessellate tessellate) { | |
16 | this.id = id; | |
17 | this.coordinatess = coordinatess; | |
18 | this.altitudeMode = altitudeMode; | |
19 | this.extrude = extrude; | |
20 | this.tessellate = tessellate; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public Collection<Coordinates> getCoordinates() { | |
32 | return this.coordinatess; | |
33 | } | |
34 | ||
35 | public void setCoordinates(Collection<Coordinates> coordinatess) { | |
36 | this.coordinatess = coordinatess; | |
37 | } | |
38 | ||
39 | public AltitudeMode getAltitudeMode() { | |
40 | return this.altitudeMode; | |
41 | } | |
42 | ||
43 | public void setAltitudeMode(AltitudeMode altitudeMode) { | |
44 | this.altitudeMode = altitudeMode; | |
45 | } | |
46 | ||
47 | public Extrude getExtrude() { | |
48 | return this.extrude; | |
49 | } | |
50 | ||
51 | public void setExtrude(Extrude extrude) { | |
52 | this.extrude = extrude; | |
53 | } | |
54 | ||
55 | public Tessellate getTessellate() { | |
56 | return this.tessellate; | |
57 | } | |
58 | ||
59 | public void setTessellate(Tessellate tessellate) { | |
60 | this.tessellate = tessellate; | |
61 | } | |
62 | ||
63 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
64 | org.w3c.dom.Element element = xmlDocument.createElement("LineString"); | |
65 | if (this.id != null) { | |
66 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
67 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
68 | element.appendChild(attribute); | |
69 | } | |
70 | if (this.coordinatess != null) { | |
71 | for (Coordinates coordinates: this.coordinatess) { | |
72 | element.appendChild(coordinates.getElement(xmlDocument)); | |
73 | } | |
74 | } | |
75 | if (this.altitudeMode != null) { | |
76 | element.appendChild(this.altitudeMode.getElement(xmlDocument)); | |
77 | } | |
78 | if (this.extrude != null) { | |
79 | element.appendChild(this.extrude.getElement(xmlDocument)); | |
80 | } | |
81 | if (this.tessellate != null) { | |
82 | element.appendChild(this.tessellate.getElement(xmlDocument)); | |
83 | } | |
84 | ||
85 | return element; | |
86 | } | |
87 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class LineStyle { | |
3 | ||
4 | private String id; | |
5 | private Color color; | |
6 | private ColorMode colorMode; | |
7 | private Width width; | |
8 | ||
9 | public LineStyle() { | |
10 | } | |
11 | ||
12 | public LineStyle(String id, Color color, ColorMode colorMode, Width width) { | |
13 | this.id = id; | |
14 | this.color = color; | |
15 | this.colorMode = colorMode; | |
16 | this.width = width; | |
17 | } | |
18 | ||
19 | public String getId() { | |
20 | return this.id; | |
21 | } | |
22 | ||
23 | public void SetId(String id) { | |
24 | this.id = id; | |
25 | } | |
26 | ||
27 | public Color getColor() { | |
28 | return this.color; | |
29 | } | |
30 | ||
31 | public void setColor(Color color) { | |
32 | this.color = color; | |
33 | } | |
34 | ||
35 | public ColorMode getColorMode() { | |
36 | return this.colorMode; | |
37 | } | |
38 | ||
39 | public void setColorMode(ColorMode colorMode) { | |
40 | this.colorMode = colorMode; | |
41 | } | |
42 | ||
43 | public Width getWidth() { | |
44 | return this.width; | |
45 | } | |
46 | ||
47 | public void setWidth(Width width) { | |
48 | this.width = width; | |
49 | } | |
50 | ||
51 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
52 | org.w3c.dom.Element element = xmlDocument.createElement("LineStyle"); | |
53 | if (this.id != null) { | |
54 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
55 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
56 | element.appendChild(attribute); | |
57 | } | |
58 | if (this.color != null) { | |
59 | element.appendChild(this.color.getElement(xmlDocument)); | |
60 | } | |
61 | if (this.colorMode != null) { | |
62 | element.appendChild(this.colorMode.getElement(xmlDocument)); | |
63 | } | |
64 | if (this.width != null) { | |
65 | element.appendChild(this.width.getElement(xmlDocument)); | |
66 | } | |
67 | ||
68 | return element; | |
69 | } | |
70 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class LinearRing { | |
5 | ||
6 | private String id; | |
7 | private Collection<Coordinates> coordinatess; | |
8 | ||
9 | public LinearRing() { | |
10 | } | |
11 | ||
12 | public LinearRing(String id, Collection<Coordinates> coordinatess) { | |
13 | this.id = id; | |
14 | this.coordinatess = coordinatess; | |
15 | } | |
16 | ||
17 | public String getId() { | |
18 | return this.id; | |
19 | } | |
20 | ||
21 | public void SetId(String id) { | |
22 | this.id = id; | |
23 | } | |
24 | ||
25 | public Collection<Coordinates> getCoordinates() { | |
26 | return this.coordinatess; | |
27 | } | |
28 | ||
29 | public void setCoordinates(Collection<Coordinates> coordinatess) { | |
30 | this.coordinatess = coordinatess; | |
31 | } | |
32 | ||
33 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
34 | org.w3c.dom.Element element = xmlDocument.createElement("LinearRing"); | |
35 | if (this.id != null) { | |
36 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
37 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
38 | element.appendChild(attribute); | |
39 | } | |
40 | if (this.coordinatess != null) { | |
41 | for (Coordinates coordinates: this.coordinatess) { | |
42 | element.appendChild(coordinates.getElement(xmlDocument)); | |
43 | } | |
44 | } | |
45 | ||
46 | return element; | |
47 | } | |
48 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Link { | |
3 | ||
4 | private String id; | |
5 | private Name name; | |
6 | private Description description; | |
7 | private Snippet snippet; | |
8 | private RefreshCounter refreshCounter; | |
9 | private RefreshInterval refreshInterval; | |
10 | private RefreshMode refreshMode; | |
11 | private RefreshPeriod refreshPeriod; | |
12 | private Url url; | |
13 | private ViewFormat viewFormat; | |
14 | private ViewRefreshMode viewRefreshMode; | |
15 | private ViewRefreshTime viewRefreshTime; | |
16 | private ViewBoundScale viewBoundScale; | |
17 | ||
18 | public Link() { | |
19 | } | |
20 | ||
21 | public Link(String id, Name name, Description description, Snippet snippet, RefreshCounter refreshCounter, RefreshInterval refreshInterval, RefreshMode refreshMode, RefreshPeriod refreshPeriod, Url url, ViewFormat viewFormat, ViewRefreshMode viewRefreshMode, ViewRefreshTime viewRefreshTime, ViewBoundScale viewBoundScale) { | |
22 | this.id = id; | |
23 | this.name = name; | |
24 | this.description = description; | |
25 | this.snippet = snippet; | |
26 | this.refreshCounter = refreshCounter; | |
27 | this.refreshInterval = refreshInterval; | |
28 | this.refreshMode = refreshMode; | |
29 | this.refreshPeriod = refreshPeriod; | |
30 | this.url = url; | |
31 | this.viewFormat = viewFormat; | |
32 | this.viewRefreshMode = viewRefreshMode; | |
33 | this.viewRefreshTime = viewRefreshTime; | |
34 | this.viewBoundScale = viewBoundScale; | |
35 | } | |
36 | ||
37 | public String getId() { | |
38 | return this.id; | |
39 | } | |
40 | ||
41 | public void SetId(String id) { | |
42 | this.id = id; | |
43 | } | |
44 | ||
45 | public Name getName() { | |
46 | return this.name; | |
47 | } | |
48 | ||
49 | public void setName(Name name) { | |
50 | this.name = name; | |
51 | } | |
52 | ||
53 | public Description getDescription() { | |
54 | return this.description; | |
55 | } | |
56 | ||
57 | public void setDescription(Description description) { | |
58 | this.description = description; | |
59 | } | |
60 | ||
61 | public Snippet getSnippet() { | |
62 | return this.snippet; | |
63 | } | |
64 | ||
65 | public void setSnippet(Snippet snippet) { | |
66 | this.snippet = snippet; | |
67 | } | |
68 | ||
69 | public RefreshCounter getRefreshCounter() { | |
70 | return this.refreshCounter; | |
71 | } | |
72 | ||
73 | public void setRefreshCounter(RefreshCounter refreshCounter) { | |
74 | this.refreshCounter = refreshCounter; | |
75 | } | |
76 | ||
77 | public RefreshInterval getRefreshInterval() { | |
78 | return this.refreshInterval; | |
79 | } | |
80 | ||
81 | public void setRefreshInterval(RefreshInterval refreshInterval) { | |
82 | this.refreshInterval = refreshInterval; | |
83 | } | |
84 | ||
85 | public RefreshMode getRefreshMode() { | |
86 | return this.refreshMode; | |
87 | } | |
88 | ||
89 | public void setRefreshMode(RefreshMode refreshMode) { | |
90 | this.refreshMode = refreshMode; | |
91 | } | |
92 | ||
93 | public RefreshPeriod getRefreshPeriod() { | |
94 | return this.refreshPeriod; | |
95 | } | |
96 | ||
97 | public void setRefreshPeriod(RefreshPeriod refreshPeriod) { | |
98 | this.refreshPeriod = refreshPeriod; | |
99 | } | |
100 | ||
101 | public Url getUrl() { | |
102 | return this.url; | |
103 | } | |
104 | ||
105 | public void setUrl(Url url) { | |
106 | this.url = url; | |
107 | } | |
108 | ||
109 | public ViewFormat getViewFormat() { | |
110 | return this.viewFormat; | |
111 | } | |
112 | ||
113 | public void setViewFormat(ViewFormat viewFormat) { | |
114 | this.viewFormat = viewFormat; | |
115 | } | |
116 | ||
117 | public ViewRefreshMode getViewRefreshMode() { | |
118 | return this.viewRefreshMode; | |
119 | } | |
120 | ||
121 | public void setViewRefreshMode(ViewRefreshMode viewRefreshMode) { | |
122 | this.viewRefreshMode = viewRefreshMode; | |
123 | } | |
124 | ||
125 | public ViewRefreshTime getViewRefreshTime() { | |
126 | return this.viewRefreshTime; | |
127 | } | |
128 | ||
129 | public void setViewRefreshTime(ViewRefreshTime viewRefreshTime) { | |
130 | this.viewRefreshTime = viewRefreshTime; | |
131 | } | |
132 | ||
133 | public ViewBoundScale getViewBoundScale() { | |
134 | return this.viewBoundScale; | |
135 | } | |
136 | ||
137 | public void setViewBoundScale(ViewBoundScale viewBoundScale) { | |
138 | this.viewBoundScale = viewBoundScale; | |
139 | } | |
140 | ||
141 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
142 | org.w3c.dom.Element element = xmlDocument.createElement("Link"); | |
143 | if (this.id != null) { | |
144 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
145 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
146 | element.appendChild(attribute); | |
147 | } | |
148 | if (this.name != null) { | |
149 | element.appendChild(this.name.getElement(xmlDocument)); | |
150 | } | |
151 | if (this.description != null) { | |
152 | element.appendChild(this.description.getElement(xmlDocument)); | |
153 | } | |
154 | if (this.snippet != null) { | |
155 | element.appendChild(this.snippet.getElement(xmlDocument)); | |
156 | } | |
157 | if (this.refreshCounter != null) { | |
158 | element.appendChild(this.refreshCounter.getElement(xmlDocument)); | |
159 | } | |
160 | if (this.refreshInterval != null) { | |
161 | element.appendChild(this.refreshInterval.getElement(xmlDocument)); | |
162 | } | |
163 | if (this.refreshMode != null) { | |
164 | element.appendChild(this.refreshMode.getElement(xmlDocument)); | |
165 | } | |
166 | if (this.refreshPeriod != null) { | |
167 | element.appendChild(this.refreshPeriod.getElement(xmlDocument)); | |
168 | } | |
169 | if (this.url != null) { | |
170 | element.appendChild(this.url.getElement(xmlDocument)); | |
171 | } | |
172 | if (this.viewFormat != null) { | |
173 | element.appendChild(this.viewFormat.getElement(xmlDocument)); | |
174 | } | |
175 | if (this.viewRefreshMode != null) { | |
176 | element.appendChild(this.viewRefreshMode.getElement(xmlDocument)); | |
177 | } | |
178 | if (this.viewRefreshTime != null) { | |
179 | element.appendChild(this.viewRefreshTime.getElement(xmlDocument)); | |
180 | } | |
181 | if (this.viewBoundScale != null) { | |
182 | element.appendChild(this.viewBoundScale.getElement(xmlDocument)); | |
183 | } | |
184 | ||
185 | return element; | |
186 | } | |
187 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class LinkDescription { | |
3 | ||
4 | private String linkDescription; | |
5 | private String id; | |
6 | ||
7 | public LinkDescription() { | |
8 | } | |
9 | ||
10 | public LinkDescription(String linkDescription, String id) { | |
11 | this.linkDescription = linkDescription; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getLinkDescription() { | |
16 | return this.linkDescription; | |
17 | } | |
18 | ||
19 | public void SetLinkDescription(String linkDescription) { | |
20 | this.linkDescription = linkDescription; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("linkDescription"); | |
33 | if (this.linkDescription != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.linkDescription)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class LinkName { | |
3 | ||
4 | private String linkName; | |
5 | private String id; | |
6 | ||
7 | public LinkName() { | |
8 | } | |
9 | ||
10 | public LinkName(String linkName, String id) { | |
11 | this.linkName = linkName; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getLinkName() { | |
16 | return this.linkName; | |
17 | } | |
18 | ||
19 | public void SetLinkName(String linkName) { | |
20 | this.linkName = linkName; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("linkName"); | |
33 | if (this.linkName != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.linkName)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class LinkSnippet { | |
3 | ||
4 | private String linkSnippet; | |
5 | private String id; | |
6 | ||
7 | public LinkSnippet() { | |
8 | } | |
9 | ||
10 | public LinkSnippet(String linkSnippet, String id) { | |
11 | this.linkSnippet = linkSnippet; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getLinkSnippet() { | |
16 | return this.linkSnippet; | |
17 | } | |
18 | ||
19 | public void SetLinkSnippet(String linkSnippet) { | |
20 | this.linkSnippet = linkSnippet; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("linkSnippet"); | |
33 | if (this.linkSnippet != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.linkSnippet)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Longitude { | |
3 | ||
4 | private String longitude; | |
5 | private String id; | |
6 | ||
7 | public Longitude() { | |
8 | } | |
9 | ||
10 | public Longitude(String longitude, String id) { | |
11 | this.longitude = longitude; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getLongitude() { | |
16 | return this.longitude; | |
17 | } | |
18 | ||
19 | public void SetLongitude(String longitude) { | |
20 | this.longitude = longitude; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("longitude"); | |
33 | if (this.longitude != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.longitude)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class LookAt { | |
5 | ||
6 | private String id; | |
7 | private Collection<Heading> headings; | |
8 | private Collection<Latitude> latitudes; | |
9 | private Collection<Longitude> longitudes; | |
10 | private Collection<Range> ranges; | |
11 | private Tilt tilt; | |
12 | ||
13 | public LookAt() { | |
14 | } | |
15 | ||
16 | public LookAt(String id, Collection<Heading> headings, Collection<Latitude> latitudes, Collection<Longitude> longitudes, Collection<Range> ranges, Tilt tilt) { | |
17 | this.id = id; | |
18 | this.headings = headings; | |
19 | this.latitudes = latitudes; | |
20 | this.longitudes = longitudes; | |
21 | this.ranges = ranges; | |
22 | this.tilt = tilt; | |
23 | } | |
24 | ||
25 | public String getId() { | |
26 | return this.id; | |
27 | } | |
28 | ||
29 | public void SetId(String id) { | |
30 | this.id = id; | |
31 | } | |
32 | ||
33 | public Collection<Heading> getHeadings() { | |
34 | return this.headings; | |
35 | } | |
36 | ||
37 | public void setHeadings(Collection<Heading> headings) { | |
38 | this.headings = headings; | |
39 | } | |
40 | ||
41 | public Collection<Latitude> getLatitudes() { | |
42 | return this.latitudes; | |
43 | } | |
44 | ||
45 | public void setLatitudes(Collection<Latitude> latitudes) { | |
46 | this.latitudes = latitudes; | |
47 | } | |
48 | ||
49 | public Collection<Longitude> getLongitudes() { | |
50 | return this.longitudes; | |
51 | } | |
52 | ||
53 | public void setLongitudes(Collection<Longitude> longitudes) { | |
54 | this.longitudes = longitudes; | |
55 | } | |
56 | ||
57 | public Collection<Range> getRanges() { | |
58 | return this.ranges; | |
59 | } | |
60 | ||
61 | public void setRanges(Collection<Range> ranges) { | |
62 | this.ranges = ranges; | |
63 | } | |
64 | ||
65 | public Tilt getTilt() { | |
66 | return this.tilt; | |
67 | } | |
68 | ||
69 | public void setTilt(Tilt tilt) { | |
70 | this.tilt = tilt; | |
71 | } | |
72 | ||
73 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
74 | org.w3c.dom.Element element = xmlDocument.createElement("LookAt"); | |
75 | if (this.id != null) { | |
76 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
77 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
78 | element.appendChild(attribute); | |
79 | } | |
80 | if (this.headings != null) { | |
81 | for (Heading heading: this.headings) { | |
82 | element.appendChild(heading.getElement(xmlDocument)); | |
83 | } | |
84 | } | |
85 | if (this.latitudes != null) { | |
86 | for (Latitude latitude: this.latitudes) { | |
87 | element.appendChild(latitude.getElement(xmlDocument)); | |
88 | } | |
89 | } | |
90 | if (this.longitudes != null) { | |
91 | for (Longitude longitude: this.longitudes) { | |
92 | element.appendChild(longitude.getElement(xmlDocument)); | |
93 | } | |
94 | } | |
95 | if (this.ranges != null) { | |
96 | for (Range range: this.ranges) { | |
97 | element.appendChild(range.getElement(xmlDocument)); | |
98 | } | |
99 | } | |
100 | if (this.tilt != null) { | |
101 | element.appendChild(this.tilt.getElement(xmlDocument)); | |
102 | } | |
103 | ||
104 | return element; | |
105 | } | |
106 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Message { | |
3 | ||
4 | private String message; | |
5 | private String id; | |
6 | ||
7 | public Message() { | |
8 | } | |
9 | ||
10 | public Message(String message, String id) { | |
11 | this.message = message; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getMessage() { | |
16 | return this.message; | |
17 | } | |
18 | ||
19 | public void SetMessage(String message) { | |
20 | this.message = message; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("message"); | |
33 | if (this.message != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.message)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class MinRefreshPeriod { | |
3 | ||
4 | private String minRefreshPeriod; | |
5 | private String id; | |
6 | ||
7 | public MinRefreshPeriod() { | |
8 | } | |
9 | ||
10 | public MinRefreshPeriod(String minRefreshPeriod, String id) { | |
11 | this.minRefreshPeriod = minRefreshPeriod; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getMinRefreshPeriod() { | |
16 | return this.minRefreshPeriod; | |
17 | } | |
18 | ||
19 | public void SetMinRefreshPeriod(String minRefreshPeriod) { | |
20 | this.minRefreshPeriod = minRefreshPeriod; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("minRefreshPeriod"); | |
33 | if (this.minRefreshPeriod != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.minRefreshPeriod)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class MultiGeometry { | |
5 | ||
6 | private String id; | |
7 | private AltitudeMode altitudeMode; | |
8 | private Extrude extrude; | |
9 | private Tessellate tessellate; | |
10 | private Collection<LinearRing> linearRings; | |
11 | private Collection<LineString> lineStrings; | |
12 | private Collection<MultiGeometry> multiGeometrys; | |
13 | private Collection<MultiLineString> multiLineStrings; | |
14 | private Collection<MultiPoint> multiPoints; | |
15 | private Collection<MultiPolygon> multiPolygons; | |
16 | private Collection<Point> points; | |
17 | private Collection<Polygon> polygons; | |
18 | ||
19 | public MultiGeometry() { | |
20 | } | |
21 | ||
22 | public MultiGeometry(String id, AltitudeMode altitudeMode, Extrude extrude, Tessellate tessellate, Collection<LinearRing> linearRings, Collection<LineString> lineStrings, Collection<MultiGeometry> multiGeometrys, Collection<MultiLineString> multiLineStrings, Collection<MultiPoint> multiPoints, Collection<MultiPolygon> multiPolygons, Collection<Point> points, Collection<Polygon> polygons) { | |
23 | this.id = id; | |
24 | this.altitudeMode = altitudeMode; | |
25 | this.extrude = extrude; | |
26 | this.tessellate = tessellate; | |
27 | this.linearRings = linearRings; | |
28 | this.lineStrings = lineStrings; | |
29 | this.multiGeometrys = multiGeometrys; | |
30 | this.multiLineStrings = multiLineStrings; | |
31 | this.multiPoints = multiPoints; | |
32 | this.multiPolygons = multiPolygons; | |
33 | this.points = points; | |
34 | this.polygons = polygons; | |
35 | } | |
36 | ||
37 | public String getId() { | |
38 | return this.id; | |
39 | } | |
40 | ||
41 | public void SetId(String id) { | |
42 | this.id = id; | |
43 | } | |
44 | ||
45 | public AltitudeMode getAltitudeMode() { | |
46 | return this.altitudeMode; | |
47 | } | |
48 | ||
49 | public void setAltitudeMode(AltitudeMode altitudeMode) { | |
50 | this.altitudeMode = altitudeMode; | |
51 | } | |
52 | ||
53 | public Extrude getExtrude() { | |
54 | return this.extrude; | |
55 | } | |
56 | ||
57 | public void setExtrude(Extrude extrude) { | |
58 | this.extrude = extrude; | |
59 | } | |
60 | ||
61 | public Tessellate getTessellate() { | |
62 | return this.tessellate; | |
63 | } | |
64 | ||
65 | public void setTessellate(Tessellate tessellate) { | |
66 | this.tessellate = tessellate; | |
67 | } | |
68 | ||
69 | public Collection<LinearRing> getLinearRings() { | |
70 | return this.linearRings; | |
71 | } | |
72 | ||
73 | public void setLinearRings(Collection<LinearRing> linearRings) { | |
74 | this.linearRings = linearRings; | |
75 | } | |
76 | ||
77 | public Collection<LineString> getLineStrings() { | |
78 | return this.lineStrings; | |
79 | } | |
80 | ||
81 | public void setLineStrings(Collection<LineString> lineStrings) { | |
82 | this.lineStrings = lineStrings; | |
83 | } | |
84 | ||
85 | public Collection<MultiGeometry> getMultiGeometrys() { | |
86 | return this.multiGeometrys; | |
87 | } | |
88 | ||
89 | public void setMultiGeometrys(Collection<MultiGeometry> multiGeometrys) { | |
90 | this.multiGeometrys = multiGeometrys; | |
91 | } | |
92 | ||
93 | public Collection<MultiLineString> getMultiLineStrings() { | |
94 | return this.multiLineStrings; | |
95 | } | |
96 | ||
97 | public void setMultiLineStrings(Collection<MultiLineString> multiLineStrings) { | |
98 | this.multiLineStrings = multiLineStrings; | |
99 | } | |
100 | ||
101 | public Collection<MultiPoint> getMultiPoints() { | |
102 | return this.multiPoints; | |
103 | } | |
104 | ||
105 | public void setMultiPoints(Collection<MultiPoint> multiPoints) { | |
106 | this.multiPoints = multiPoints; | |
107 | } | |
108 | ||
109 | public Collection<MultiPolygon> getMultiPolygons() { | |
110 | return this.multiPolygons; | |
111 | } | |
112 | ||
113 | public void setMultiPolygons(Collection<MultiPolygon> multiPolygons) { | |
114 | this.multiPolygons = multiPolygons; | |
115 | } | |
116 | ||
117 | public Collection<Point> getPoints() { | |
118 | return this.points; | |
119 | } | |
120 | ||
121 | public void setPoints(Collection<Point> points) { | |
122 | this.points = points; | |
123 | } | |
124 | ||
125 | public Collection<Polygon> getPolygons() { | |
126 | return this.polygons; | |
127 | } | |
128 | ||
129 | public void setPolygons(Collection<Polygon> polygons) { | |
130 | this.polygons = polygons; | |
131 | } | |
132 | ||
133 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
134 | org.w3c.dom.Element element = xmlDocument.createElement("MultiGeometry"); | |
135 | if (this.id != null) { | |
136 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
137 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
138 | element.appendChild(attribute); | |
139 | } | |
140 | if (this.altitudeMode != null) { | |
141 | element.appendChild(this.altitudeMode.getElement(xmlDocument)); | |
142 | } | |
143 | if (this.extrude != null) { | |
144 | element.appendChild(this.extrude.getElement(xmlDocument)); | |
145 | } | |
146 | if (this.tessellate != null) { | |
147 | element.appendChild(this.tessellate.getElement(xmlDocument)); | |
148 | } | |
149 | if (this.linearRings != null) { | |
150 | for (LinearRing linearRing: this.linearRings) { | |
151 | element.appendChild(linearRing.getElement(xmlDocument)); | |
152 | } | |
153 | } | |
154 | if (this.lineStrings != null) { | |
155 | for (LineString lineString: this.lineStrings) { | |
156 | element.appendChild(lineString.getElement(xmlDocument)); | |
157 | } | |
158 | } | |
159 | if (this.multiGeometrys != null) { | |
160 | for (MultiGeometry multiGeometry: this.multiGeometrys) { | |
161 | element.appendChild(multiGeometry.getElement(xmlDocument)); | |
162 | } | |
163 | } | |
164 | if (this.multiLineStrings != null) { | |
165 | for (MultiLineString multiLineString: this.multiLineStrings) { | |
166 | element.appendChild(multiLineString.getElement(xmlDocument)); | |
167 | } | |
168 | } | |
169 | if (this.multiPoints != null) { | |
170 | for (MultiPoint multiPoint: this.multiPoints) { | |
171 | element.appendChild(multiPoint.getElement(xmlDocument)); | |
172 | } | |
173 | } | |
174 | if (this.multiPolygons != null) { | |
175 | for (MultiPolygon multiPolygon: this.multiPolygons) { | |
176 | element.appendChild(multiPolygon.getElement(xmlDocument)); | |
177 | } | |
178 | } | |
179 | if (this.points != null) { | |
180 | for (Point point: this.points) { | |
181 | element.appendChild(point.getElement(xmlDocument)); | |
182 | } | |
183 | } | |
184 | if (this.polygons != null) { | |
185 | for (Polygon polygon: this.polygons) { | |
186 | element.appendChild(polygon.getElement(xmlDocument)); | |
187 | } | |
188 | } | |
189 | ||
190 | return element; | |
191 | } | |
192 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class MultiLineString { | |
5 | ||
6 | private String id; | |
7 | private Collection<LineString> lineStrings; | |
8 | private Extrude extrude; | |
9 | ||
10 | public MultiLineString() { | |
11 | } | |
12 | ||
13 | public MultiLineString(String id, Collection<LineString> lineStrings, Extrude extrude) { | |
14 | this.id = id; | |
15 | this.lineStrings = lineStrings; | |
16 | this.extrude = extrude; | |
17 | } | |
18 | ||
19 | public String getId() { | |
20 | return this.id; | |
21 | } | |
22 | ||
23 | public void SetId(String id) { | |
24 | this.id = id; | |
25 | } | |
26 | ||
27 | public Collection<LineString> getLineStrings() { | |
28 | return this.lineStrings; | |
29 | } | |
30 | ||
31 | public void setLineStrings(Collection<LineString> lineStrings) { | |
32 | this.lineStrings = lineStrings; | |
33 | } | |
34 | ||
35 | public Extrude getExtrude() { | |
36 | return this.extrude; | |
37 | } | |
38 | ||
39 | public void setExtrude(Extrude extrude) { | |
40 | this.extrude = extrude; | |
41 | } | |
42 | ||
43 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
44 | org.w3c.dom.Element element = xmlDocument.createElement("MultiLineString"); | |
45 | if (this.id != null) { | |
46 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
47 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
48 | element.appendChild(attribute); | |
49 | } | |
50 | if (this.lineStrings != null) { | |
51 | for (LineString lineString: this.lineStrings) { | |
52 | element.appendChild(lineString.getElement(xmlDocument)); | |
53 | } | |
54 | } | |
55 | if (this.extrude != null) { | |
56 | element.appendChild(this.extrude.getElement(xmlDocument)); | |
57 | } | |
58 | ||
59 | return element; | |
60 | } | |
61 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class MultiPoint { | |
5 | ||
6 | private String id; | |
7 | private Collection<Point> points; | |
8 | private Extrude extrude; | |
9 | ||
10 | public MultiPoint() { | |
11 | } | |
12 | ||
13 | public MultiPoint(String id, Collection<Point> points, Extrude extrude) { | |
14 | this.id = id; | |
15 | this.points = points; | |
16 | this.extrude = extrude; | |
17 | } | |
18 | ||
19 | public String getId() { | |
20 | return this.id; | |
21 | } | |
22 | ||
23 | public void SetId(String id) { | |
24 | this.id = id; | |
25 | } | |
26 | ||
27 | public Collection<Point> getPoints() { | |
28 | return this.points; | |
29 | } | |
30 | ||
31 | public void setPoints(Collection<Point> points) { | |
32 | this.points = points; | |
33 | } | |
34 | ||
35 | public Extrude getExtrude() { | |
36 | return this.extrude; | |
37 | } | |
38 | ||
39 | public void setExtrude(Extrude extrude) { | |
40 | this.extrude = extrude; | |
41 | } | |
42 | ||
43 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
44 | org.w3c.dom.Element element = xmlDocument.createElement("MultiPoint"); | |
45 | if (this.id != null) { | |
46 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
47 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
48 | element.appendChild(attribute); | |
49 | } | |
50 | if (this.points != null) { | |
51 | for (Point point: this.points) { | |
52 | element.appendChild(point.getElement(xmlDocument)); | |
53 | } | |
54 | } | |
55 | if (this.extrude != null) { | |
56 | element.appendChild(this.extrude.getElement(xmlDocument)); | |
57 | } | |
58 | ||
59 | return element; | |
60 | } | |
61 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class MultiPolygon { | |
5 | ||
6 | private String id; | |
7 | private Collection<Polygon> polygons; | |
8 | private Extrude extrude; | |
9 | ||
10 | public MultiPolygon() { | |
11 | } | |
12 | ||
13 | public MultiPolygon(String id, Collection<Polygon> polygons, Extrude extrude) { | |
14 | this.id = id; | |
15 | this.polygons = polygons; | |
16 | this.extrude = extrude; | |
17 | } | |
18 | ||
19 | public String getId() { | |
20 | return this.id; | |
21 | } | |
22 | ||
23 | public void SetId(String id) { | |
24 | this.id = id; | |
25 | } | |
26 | ||
27 | public Collection<Polygon> getPolygons() { | |
28 | return this.polygons; | |
29 | } | |
30 | ||
31 | public void setPolygons(Collection<Polygon> polygons) { | |
32 | this.polygons = polygons; | |
33 | } | |
34 | ||
35 | public Extrude getExtrude() { | |
36 | return this.extrude; | |
37 | } | |
38 | ||
39 | public void setExtrude(Extrude extrude) { | |
40 | this.extrude = extrude; | |
41 | } | |
42 | ||
43 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
44 | org.w3c.dom.Element element = xmlDocument.createElement("MultiPolygon"); | |
45 | if (this.id != null) { | |
46 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
47 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
48 | element.appendChild(attribute); | |
49 | } | |
50 | if (this.polygons != null) { | |
51 | for (Polygon polygon: this.polygons) { | |
52 | element.appendChild(polygon.getElement(xmlDocument)); | |
53 | } | |
54 | } | |
55 | if (this.extrude != null) { | |
56 | element.appendChild(this.extrude.getElement(xmlDocument)); | |
57 | } | |
58 | ||
59 | return element; | |
60 | } | |
61 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Name { | |
3 | ||
4 | private String name; | |
5 | private String id; | |
6 | ||
7 | public Name() { | |
8 | } | |
9 | ||
10 | public Name(String name, String id) { | |
11 | this.name = name; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getName() { | |
16 | return this.name; | |
17 | } | |
18 | ||
19 | public void SetName(String name) { | |
20 | this.name = name; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("name"); | |
33 | if (this.name != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.name)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class NetworkLink { | |
3 | ||
4 | private String id; | |
5 | private Url url; | |
6 | private FlyToView flyToView; | |
7 | private Name name; | |
8 | private RefreshVisibility refreshVisibility; | |
9 | private Snippet snippet; | |
10 | private Visibility visibility; | |
11 | ||
12 | public NetworkLink() { | |
13 | } | |
14 | ||
15 | public NetworkLink(String id, Url url, FlyToView flyToView, Name name, RefreshVisibility refreshVisibility, Snippet snippet, Visibility visibility) { | |
16 | this.id = id; | |
17 | this.url = url; | |
18 | this.flyToView = flyToView; | |
19 | this.name = name; | |
20 | this.refreshVisibility = refreshVisibility; | |
21 | this.snippet = snippet; | |
22 | this.visibility = visibility; | |
23 | } | |
24 | ||
25 | public String getId() { | |
26 | return this.id; | |
27 | } | |
28 | ||
29 | public void SetId(String id) { | |
30 | this.id = id; | |
31 | } | |
32 | ||
33 | public Url getUrl() { | |
34 | return this.url; | |
35 | } | |
36 | ||
37 | public void setUrl(Url url) { | |
38 | this.url = url; | |
39 | } | |
40 | ||
41 | public FlyToView getFlyToView() { | |
42 | return this.flyToView; | |
43 | } | |
44 | ||
45 | public void setFlyToView(FlyToView flyToView) { | |
46 | this.flyToView = flyToView; | |
47 | } | |
48 | ||
49 | public Name getName() { | |
50 | return this.name; | |
51 | } | |
52 | ||
53 | public void setName(Name name) { | |
54 | this.name = name; | |
55 | } | |
56 | ||
57 | public RefreshVisibility getRefreshVisibility() { | |
58 | return this.refreshVisibility; | |
59 | } | |
60 | ||
61 | public void setRefreshVisibility(RefreshVisibility refreshVisibility) { | |
62 | this.refreshVisibility = refreshVisibility; | |
63 | } | |
64 | ||
65 | public Snippet getSnippet() { | |
66 | return this.snippet; | |
67 | } | |
68 | ||
69 | public void setSnippet(Snippet snippet) { | |
70 | this.snippet = snippet; | |
71 | } | |
72 | ||
73 | public Visibility getVisibility() { | |
74 | return this.visibility; | |
75 | } | |
76 | ||
77 | public void setVisibility(Visibility visibility) { | |
78 | this.visibility = visibility; | |
79 | } | |
80 | ||
81 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
82 | org.w3c.dom.Element element = xmlDocument.createElement("NetworkLink"); | |
83 | if (this.id != null) { | |
84 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
85 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
86 | element.appendChild(attribute); | |
87 | } | |
88 | if (this.url != null) { | |
89 | element.appendChild(this.url.getElement(xmlDocument)); | |
90 | } | |
91 | if (this.flyToView != null) { | |
92 | element.appendChild(this.flyToView.getElement(xmlDocument)); | |
93 | } | |
94 | if (this.name != null) { | |
95 | element.appendChild(this.name.getElement(xmlDocument)); | |
96 | } | |
97 | if (this.refreshVisibility != null) { | |
98 | element.appendChild(this.refreshVisibility.getElement(xmlDocument)); | |
99 | } | |
100 | if (this.snippet != null) { | |
101 | element.appendChild(this.snippet.getElement(xmlDocument)); | |
102 | } | |
103 | if (this.visibility != null) { | |
104 | element.appendChild(this.visibility.getElement(xmlDocument)); | |
105 | } | |
106 | ||
107 | return element; | |
108 | } | |
109 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class NetworkLinkControl { | |
3 | ||
4 | private String id; | |
5 | private Cookie cookie; | |
6 | private LinkName linkName; | |
7 | private LinkDescription linkDescription; | |
8 | private LinkSnippet linkSnippet; | |
9 | private Message message; | |
10 | private MinRefreshPeriod minRefreshPeriod; | |
11 | ||
12 | public NetworkLinkControl() { | |
13 | } | |
14 | ||
15 | public NetworkLinkControl(String id, Cookie cookie, LinkName linkName, LinkDescription linkDescription, LinkSnippet linkSnippet, Message message, MinRefreshPeriod minRefreshPeriod) { | |
16 | this.id = id; | |
17 | this.cookie = cookie; | |
18 | this.linkName = linkName; | |
19 | this.linkDescription = linkDescription; | |
20 | this.linkSnippet = linkSnippet; | |
21 | this.message = message; | |
22 | this.minRefreshPeriod = minRefreshPeriod; | |
23 | } | |
24 | ||
25 | public String getId() { | |
26 | return this.id; | |
27 | } | |
28 | ||
29 | public void SetId(String id) { | |
30 | this.id = id; | |
31 | } | |
32 | ||
33 | public Cookie getCookie() { | |
34 | return this.cookie; | |
35 | } | |
36 | ||
37 | public void setCookie(Cookie cookie) { | |
38 | this.cookie = cookie; | |
39 | } | |
40 | ||
41 | public LinkName getLinkName() { | |
42 | return this.linkName; | |
43 | } | |
44 | ||
45 | public void setLinkName(LinkName linkName) { | |
46 | this.linkName = linkName; | |
47 | } | |
48 | ||
49 | public LinkDescription getLinkDescription() { | |
50 | return this.linkDescription; | |
51 | } | |
52 | ||
53 | public void setLinkDescription(LinkDescription linkDescription) { | |
54 | this.linkDescription = linkDescription; | |
55 | } | |
56 | ||
57 | public LinkSnippet getLinkSnippet() { | |
58 | return this.linkSnippet; | |
59 | } | |
60 | ||
61 | public void setLinkSnippet(LinkSnippet linkSnippet) { | |
62 | this.linkSnippet = linkSnippet; | |
63 | } | |
64 | ||
65 | public Message getMessage() { | |
66 | return this.message; | |
67 | } | |
68 | ||
69 | public void setMessage(Message message) { | |
70 | this.message = message; | |
71 | } | |
72 | ||
73 | public MinRefreshPeriod getMinRefreshPeriod() { | |
74 | return this.minRefreshPeriod; | |
75 | } | |
76 | ||
77 | public void setMinRefreshPeriod(MinRefreshPeriod minRefreshPeriod) { | |
78 | this.minRefreshPeriod = minRefreshPeriod; | |
79 | } | |
80 | ||
81 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
82 | org.w3c.dom.Element element = xmlDocument.createElement("NetworkLinkControl"); | |
83 | if (this.id != null) { | |
84 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
85 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
86 | element.appendChild(attribute); | |
87 | } | |
88 | if (this.cookie != null) { | |
89 | element.appendChild(this.cookie.getElement(xmlDocument)); | |
90 | } | |
91 | if (this.linkName != null) { | |
92 | element.appendChild(this.linkName.getElement(xmlDocument)); | |
93 | } | |
94 | if (this.linkDescription != null) { | |
95 | element.appendChild(this.linkDescription.getElement(xmlDocument)); | |
96 | } | |
97 | if (this.linkSnippet != null) { | |
98 | element.appendChild(this.linkSnippet.getElement(xmlDocument)); | |
99 | } | |
100 | if (this.message != null) { | |
101 | element.appendChild(this.message.getElement(xmlDocument)); | |
102 | } | |
103 | if (this.minRefreshPeriod != null) { | |
104 | element.appendChild(this.minRefreshPeriod.getElement(xmlDocument)); | |
105 | } | |
106 | ||
107 | return element; | |
108 | } | |
109 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class North { | |
3 | ||
4 | private String north; | |
5 | private String id; | |
6 | ||
7 | public North() { | |
8 | } | |
9 | ||
10 | public North(String north, String id) { | |
11 | this.north = north; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getNorth() { | |
16 | return this.north; | |
17 | } | |
18 | ||
19 | public void SetNorth(String north) { | |
20 | this.north = north; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("north"); | |
33 | if (this.north != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.north)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class NumCycles { | |
3 | ||
4 | private String numCycles; | |
5 | private String id; | |
6 | ||
7 | public NumCycles() { | |
8 | } | |
9 | ||
10 | public NumCycles(String numCycles, String id) { | |
11 | this.numCycles = numCycles; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getNumCycles() { | |
16 | return this.numCycles; | |
17 | } | |
18 | ||
19 | public void SetNumCycles(String numCycles) { | |
20 | this.numCycles = numCycles; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("numCycles"); | |
33 | if (this.numCycles != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.numCycles)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class ObjArrayField { | |
3 | ||
4 | private String id; | |
5 | private Name name; | |
6 | private Type type; | |
7 | ||
8 | public ObjArrayField() { | |
9 | } | |
10 | ||
11 | public ObjArrayField(String id, Name name, Type type) { | |
12 | this.id = id; | |
13 | this.name = name; | |
14 | this.type = type; | |
15 | } | |
16 | ||
17 | public String getId() { | |
18 | return this.id; | |
19 | } | |
20 | ||
21 | public void SetId(String id) { | |
22 | this.id = id; | |
23 | } | |
24 | ||
25 | public Name getName() { | |
26 | return this.name; | |
27 | } | |
28 | ||
29 | public void setName(Name name) { | |
30 | this.name = name; | |
31 | } | |
32 | ||
33 | public Type getType() { | |
34 | return this.type; | |
35 | } | |
36 | ||
37 | public void setType(Type type) { | |
38 | this.type = type; | |
39 | } | |
40 | ||
41 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
42 | org.w3c.dom.Element element = xmlDocument.createElement("ObjArrayField"); | |
43 | if (this.id != null) { | |
44 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
45 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
46 | element.appendChild(attribute); | |
47 | } | |
48 | if (this.name != null) { | |
49 | element.appendChild(this.name.getElement(xmlDocument)); | |
50 | } | |
51 | if (this.type != null) { | |
52 | element.appendChild(this.type.getElement(xmlDocument)); | |
53 | } | |
54 | ||
55 | return element; | |
56 | } | |
57 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class ObjField { | |
3 | ||
4 | private String id; | |
5 | private Name name; | |
6 | private Type type; | |
7 | ||
8 | public ObjField() { | |
9 | } | |
10 | ||
11 | public ObjField(String id, Name name, Type type) { | |
12 | this.id = id; | |
13 | this.name = name; | |
14 | this.type = type; | |
15 | } | |
16 | ||
17 | public String getId() { | |
18 | return this.id; | |
19 | } | |
20 | ||
21 | public void SetId(String id) { | |
22 | this.id = id; | |
23 | } | |
24 | ||
25 | public Name getName() { | |
26 | return this.name; | |
27 | } | |
28 | ||
29 | public void setName(Name name) { | |
30 | this.name = name; | |
31 | } | |
32 | ||
33 | public Type getType() { | |
34 | return this.type; | |
35 | } | |
36 | ||
37 | public void setType(Type type) { | |
38 | this.type = type; | |
39 | } | |
40 | ||
41 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
42 | org.w3c.dom.Element element = xmlDocument.createElement("ObjField"); | |
43 | if (this.id != null) { | |
44 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
45 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
46 | element.appendChild(attribute); | |
47 | } | |
48 | if (this.name != null) { | |
49 | element.appendChild(this.name.getElement(xmlDocument)); | |
50 | } | |
51 | if (this.type != null) { | |
52 | element.appendChild(this.type.getElement(xmlDocument)); | |
53 | } | |
54 | ||
55 | return element; | |
56 | } | |
57 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Opacity { | |
3 | ||
4 | private String opacity; | |
5 | private String id; | |
6 | ||
7 | public Opacity() { | |
8 | } | |
9 | ||
10 | public Opacity(String opacity, String id) { | |
11 | this.opacity = opacity; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getOpacity() { | |
16 | return this.opacity; | |
17 | } | |
18 | ||
19 | public void SetOpacity(String opacity) { | |
20 | this.opacity = opacity; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("opacity"); | |
33 | if (this.opacity != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.opacity)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Open { | |
3 | ||
4 | private String open; | |
5 | private String id; | |
6 | ||
7 | public Open() { | |
8 | } | |
9 | ||
10 | public Open(String open, String id) { | |
11 | this.open = open; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getOpen() { | |
16 | return this.open; | |
17 | } | |
18 | ||
19 | public void SetOpen(String open) { | |
20 | this.open = open; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("open"); | |
33 | if (this.open != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.open)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class OuterBoundaryIs { | |
5 | ||
6 | private String id; | |
7 | private Collection<LinearRing> linearRings; | |
8 | ||
9 | public OuterBoundaryIs() { | |
10 | } | |
11 | ||
12 | public OuterBoundaryIs(String id, Collection<LinearRing> linearRings) { | |
13 | this.id = id; | |
14 | this.linearRings = linearRings; | |
15 | } | |
16 | ||
17 | public String getId() { | |
18 | return this.id; | |
19 | } | |
20 | ||
21 | public void SetId(String id) { | |
22 | this.id = id; | |
23 | } | |
24 | ||
25 | public Collection<LinearRing> getLinearRings() { | |
26 | return this.linearRings; | |
27 | } | |
28 | ||
29 | public void setLinearRings(Collection<LinearRing> linearRings) { | |
30 | this.linearRings = linearRings; | |
31 | } | |
32 | ||
33 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
34 | org.w3c.dom.Element element = xmlDocument.createElement("outerBoundaryIs"); | |
35 | if (this.id != null) { | |
36 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
37 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
38 | element.appendChild(attribute); | |
39 | } | |
40 | if (this.linearRings != null) { | |
41 | for (LinearRing linearRing: this.linearRings) { | |
42 | element.appendChild(linearRing.getElement(xmlDocument)); | |
43 | } | |
44 | } | |
45 | ||
46 | return element; | |
47 | } | |
48 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Outline { | |
3 | ||
4 | private String outline; | |
5 | private String id; | |
6 | ||
7 | public Outline() { | |
8 | } | |
9 | ||
10 | public Outline(String outline, String id) { | |
11 | this.outline = outline; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getOutline() { | |
16 | return this.outline; | |
17 | } | |
18 | ||
19 | public void SetOutline(String outline) { | |
20 | this.outline = outline; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("outline"); | |
33 | if (this.outline != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.outline)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class OverlayXY { | |
3 | ||
4 | private String id; | |
5 | private String x; | |
6 | private String y; | |
7 | private XunitsOptions xunits; | |
8 | private YunitsOptions yunits; | |
9 | ||
10 | public enum XunitsOptions { pixels, insetPixels, fraction } | |
11 | public enum YunitsOptions { pixels, insetPixels, fraction } | |
12 | ||
13 | public OverlayXY() { | |
14 | } | |
15 | ||
16 | public OverlayXY(String id, String x, String y, XunitsOptions xunits, YunitsOptions yunits) { | |
17 | this.id = id; | |
18 | this.x = x; | |
19 | this.y = y; | |
20 | this.xunits = xunits; | |
21 | this.yunits = yunits; | |
22 | } | |
23 | ||
24 | public String getId() { | |
25 | return this.id; | |
26 | } | |
27 | ||
28 | public void SetId(String id) { | |
29 | this.id = id; | |
30 | } | |
31 | ||
32 | public String getX() { | |
33 | return this.x; | |
34 | } | |
35 | ||
36 | public void SetX(String x) { | |
37 | this.x = x; | |
38 | } | |
39 | ||
40 | public String getY() { | |
41 | return this.y; | |
42 | } | |
43 | ||
44 | public void SetY(String y) { | |
45 | this.y = y; | |
46 | } | |
47 | ||
48 | public XunitsOptions getXunits() { | |
49 | return this.xunits; | |
50 | } | |
51 | ||
52 | public void SetXunits(XunitsOptions xunits) { | |
53 | this.xunits = xunits; | |
54 | } | |
55 | ||
56 | public YunitsOptions getYunits() { | |
57 | return this.yunits; | |
58 | } | |
59 | ||
60 | public void SetYunits(YunitsOptions yunits) { | |
61 | this.yunits = yunits; | |
62 | } | |
63 | ||
64 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
65 | org.w3c.dom.Element element = xmlDocument.createElement("overlayXY"); | |
66 | if (this.id != null) { | |
67 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
68 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
69 | element.appendChild(attribute); | |
70 | } | |
71 | if (this.x != null) { | |
72 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("x"); | |
73 | attribute.appendChild(xmlDocument.createTextNode(this.x.toString())); | |
74 | element.appendChild(attribute); | |
75 | } | |
76 | if (this.y != null) { | |
77 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("y"); | |
78 | attribute.appendChild(xmlDocument.createTextNode(this.y.toString())); | |
79 | element.appendChild(attribute); | |
80 | } | |
81 | if (this.xunits != null) { | |
82 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("xunits"); | |
83 | attribute.appendChild(xmlDocument.createTextNode(this.xunits.toString())); | |
84 | element.appendChild(attribute); | |
85 | } | |
86 | if (this.yunits != null) { | |
87 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("yunits"); | |
88 | attribute.appendChild(xmlDocument.createTextNode(this.yunits.toString())); | |
89 | element.appendChild(attribute); | |
90 | } | |
91 | ||
92 | return element; | |
93 | } | |
94 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class Pair { | |
5 | ||
6 | private String id; | |
7 | private Collection<Key> keys; | |
8 | private Collection<StyleUrl> styleUrls; | |
9 | ||
10 | public Pair() { | |
11 | } | |
12 | ||
13 | public Pair(String id, Collection<Key> keys, Collection<StyleUrl> styleUrls) { | |
14 | this.id = id; | |
15 | this.keys = keys; | |
16 | this.styleUrls = styleUrls; | |
17 | } | |
18 | ||
19 | public String getId() { | |
20 | return this.id; | |
21 | } | |
22 | ||
23 | public void SetId(String id) { | |
24 | this.id = id; | |
25 | } | |
26 | ||
27 | public Collection<Key> getKeys() { | |
28 | return this.keys; | |
29 | } | |
30 | ||
31 | public void setKeys(Collection<Key> keys) { | |
32 | this.keys = keys; | |
33 | } | |
34 | ||
35 | public Collection<StyleUrl> getStyleUrls() { | |
36 | return this.styleUrls; | |
37 | } | |
38 | ||
39 | public void setStyleUrls(Collection<StyleUrl> styleUrls) { | |
40 | this.styleUrls = styleUrls; | |
41 | } | |
42 | ||
43 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
44 | org.w3c.dom.Element element = xmlDocument.createElement("Pair"); | |
45 | if (this.id != null) { | |
46 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
47 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
48 | element.appendChild(attribute); | |
49 | } | |
50 | if (this.keys != null) { | |
51 | for (Key key: this.keys) { | |
52 | element.appendChild(key.getElement(xmlDocument)); | |
53 | } | |
54 | } | |
55 | if (this.styleUrls != null) { | |
56 | for (StyleUrl styleUrl: this.styleUrls) { | |
57 | element.appendChild(styleUrl.getElement(xmlDocument)); | |
58 | } | |
59 | } | |
60 | ||
61 | return element; | |
62 | } | |
63 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Parent { | |
3 | ||
4 | private String id; | |
5 | ||
6 | public Parent() { | |
7 | } | |
8 | ||
9 | public Parent(String id) { | |
10 | this.id = id; | |
11 | } | |
12 | ||
13 | public String getId() { | |
14 | return this.id; | |
15 | } | |
16 | ||
17 | public void SetId(String id) { | |
18 | this.id = id; | |
19 | } | |
20 | ||
21 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
22 | org.w3c.dom.Element element = xmlDocument.createElement("parent"); | |
23 | if (this.id != null) { | |
24 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
25 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
26 | element.appendChild(attribute); | |
27 | } | |
28 | ||
29 | return element; | |
30 | } | |
31 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class Placemark { | |
5 | ||
6 | private String id; | |
7 | private Collection<GeometryCollection> geometryCollections; | |
8 | private Collection<LineString> lineStrings; | |
9 | private LookAt lookAt; | |
10 | private Collection<MultiGeometry> multiGeometrys; | |
11 | private Collection<MultiLineString> multiLineStrings; | |
12 | private Collection<MultiPoint> multiPoints; | |
13 | private Collection<MultiPolygon> multiPolygons; | |
14 | private Collection<Point> points; | |
15 | private Collection<Polygon> polygons; | |
16 | private Collection<Style> styles; | |
17 | private Collection<TimePeriod> timePeriods; | |
18 | private Address address; | |
19 | private Description description; | |
20 | private Name name; | |
21 | private Open open; | |
22 | private Snippet snippet; | |
23 | private StyleUrl styleUrl; | |
24 | private Visibility visibility; | |
25 | ||
26 | public Placemark() { | |
27 | } | |
28 | ||
29 | public Placemark(String id, Collection<GeometryCollection> geometryCollections, Collection<LineString> lineStrings, LookAt lookAt, Collection<MultiGeometry> multiGeometrys, Collection<MultiLineString> multiLineStrings, Collection<MultiPoint> multiPoints, Collection<MultiPolygon> multiPolygons, Collection<Point> points, Collection<Polygon> polygons, Collection<Style> styles, Collection<TimePeriod> timePeriods, Address address, Description description, Name name, Open open, Snippet snippet, StyleUrl styleUrl, Visibility visibility) { | |
30 | this.id = id; | |
31 | this.geometryCollections = geometryCollections; | |
32 | this.lineStrings = lineStrings; | |
33 | this.lookAt = lookAt; | |
34 | this.multiGeometrys = multiGeometrys; | |
35 | this.multiLineStrings = multiLineStrings; | |
36 | this.multiPoints = multiPoints; | |
37 | this.multiPolygons = multiPolygons; | |
38 | this.points = points; | |
39 | this.polygons = polygons; | |
40 | this.styles = styles; | |
41 | this.timePeriods = timePeriods; | |
42 | this.address = address; | |
43 | this.description = description; | |
44 | this.name = name; | |
45 | this.open = open; | |
46 | this.snippet = snippet; | |
47 | this.styleUrl = styleUrl; | |
48 | this.visibility = visibility; | |
49 | } | |
50 | ||
51 | public String getId() { | |
52 | return this.id; | |
53 | } | |
54 | ||
55 | public void SetId(String id) { | |
56 | this.id = id; | |
57 | } | |
58 | ||
59 | public Collection<GeometryCollection> getGeometryCollections() { | |
60 | return this.geometryCollections; | |
61 | } | |
62 | ||
63 | public void setGeometryCollections(Collection<GeometryCollection> geometryCollections) { | |
64 | this.geometryCollections = geometryCollections; | |
65 | } | |
66 | ||
67 | public Collection<LineString> getLineStrings() { | |
68 | return this.lineStrings; | |
69 | } | |
70 | ||
71 | public void setLineStrings(Collection<LineString> lineStrings) { | |
72 | this.lineStrings = lineStrings; | |
73 | } | |
74 | ||
75 | public LookAt getLookAt() { | |
76 | return this.lookAt; | |
77 | } | |
78 | ||
79 | public void setLookAt(LookAt lookAt) { | |
80 | this.lookAt = lookAt; | |
81 | } | |
82 | ||
83 | public Collection<MultiGeometry> getMultiGeometrys() { | |
84 | return this.multiGeometrys; | |
85 | } | |
86 | ||
87 | public void setMultiGeometrys(Collection<MultiGeometry> multiGeometrys) { | |
88 | this.multiGeometrys = multiGeometrys; | |
89 | } | |
90 | ||
91 | public Collection<MultiLineString> getMultiLineStrings() { | |
92 | return this.multiLineStrings; | |
93 | } | |
94 | ||
95 | public void setMultiLineStrings(Collection<MultiLineString> multiLineStrings) { | |
96 | this.multiLineStrings = multiLineStrings; | |
97 | } | |
98 | ||
99 | public Collection<MultiPoint> getMultiPoints() { | |
100 | return this.multiPoints; | |
101 | } | |
102 | ||
103 | public void setMultiPoints(Collection<MultiPoint> multiPoints) { | |
104 | this.multiPoints = multiPoints; | |
105 | } | |
106 | ||
107 | public Collection<MultiPolygon> getMultiPolygons() { | |
108 | return this.multiPolygons; | |
109 | } | |
110 | ||
111 | public void setMultiPolygons(Collection<MultiPolygon> multiPolygons) { | |
112 | this.multiPolygons = multiPolygons; | |
113 | } | |
114 | ||
115 | public Collection<Point> getPoints() { | |
116 | return this.points; | |
117 | } | |
118 | ||
119 | public void setPoints(Collection<Point> points) { | |
120 | this.points = points; | |
121 | } | |
122 | ||
123 | public Collection<Polygon> getPolygons() { | |
124 | return this.polygons; | |
125 | } | |
126 | ||
127 | public void setPolygons(Collection<Polygon> polygons) { | |
128 | this.polygons = polygons; | |
129 | } | |
130 | ||
131 | public Collection<Style> getStyles() { | |
132 | return this.styles; | |
133 | } | |
134 | ||
135 | public void setStyles(Collection<Style> styles) { | |
136 | this.styles = styles; | |
137 | } | |
138 | ||
139 | public Collection<TimePeriod> getTimePeriods() { | |
140 | return this.timePeriods; | |
141 | } | |
142 | ||
143 | public void setTimePeriods(Collection<TimePeriod> timePeriods) { | |
144 | this.timePeriods = timePeriods; | |
145 | } | |
146 | ||
147 | public Address getAddress() { | |
148 | return this.address; | |
149 | } | |
150 | ||
151 | public void setAddress(Address address) { | |
152 | this.address = address; | |
153 | } | |
154 | ||
155 | public Description getDescription() { | |
156 | return this.description; | |
157 | } | |
158 | ||
159 | public void setDescription(Description description) { | |
160 | this.description = description; | |
161 | } | |
162 | ||
163 | public Name getName() { | |
164 | return this.name; | |
165 | } | |
166 | ||
167 | public void setName(Name name) { | |
168 | this.name = name; | |
169 | } | |
170 | ||
171 | public Open getOpen() { | |
172 | return this.open; | |
173 | } | |
174 | ||
175 | public void setOpen(Open open) { | |
176 | this.open = open; | |
177 | } | |
178 | ||
179 | public Snippet getSnippet() { | |
180 | return this.snippet; | |
181 | } | |
182 | ||
183 | public void setSnippet(Snippet snippet) { | |
184 | this.snippet = snippet; | |
185 | } | |
186 | ||
187 | public StyleUrl getStyleUrl() { | |
188 | return this.styleUrl; | |
189 | } | |
190 | ||
191 | public void setStyleUrl(StyleUrl styleUrl) { | |
192 | this.styleUrl = styleUrl; | |
193 | } | |
194 | ||
195 | public Visibility getVisibility() { | |
196 | return this.visibility; | |
197 | } | |
198 | ||
199 | public void setVisibility(Visibility visibility) { | |
200 | this.visibility = visibility; | |
201 | } | |
202 | ||
203 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
204 | org.w3c.dom.Element element = xmlDocument.createElement("Placemark"); | |
205 | if (this.id != null) { | |
206 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
207 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
208 | element.appendChild(attribute); | |
209 | } | |
210 | if (this.geometryCollections != null) { | |
211 | for (GeometryCollection geometryCollection: this.geometryCollections) { | |
212 | element.appendChild(geometryCollection.getElement(xmlDocument)); | |
213 | } | |
214 | } | |
215 | if (this.lineStrings != null) { | |
216 | for (LineString lineString: this.lineStrings) { | |
217 | element.appendChild(lineString.getElement(xmlDocument)); | |
218 | } | |
219 | } | |
220 | if (this.lookAt != null) { | |
221 | element.appendChild(this.lookAt.getElement(xmlDocument)); | |
222 | } | |
223 | if (this.multiGeometrys != null) { | |
224 | for (MultiGeometry multiGeometry: this.multiGeometrys) { | |
225 | element.appendChild(multiGeometry.getElement(xmlDocument)); | |
226 | } | |
227 | } | |
228 | if (this.multiLineStrings != null) { | |
229 | for (MultiLineString multiLineString: this.multiLineStrings) { | |
230 | element.appendChild(multiLineString.getElement(xmlDocument)); | |
231 | } | |
232 | } | |
233 | if (this.multiPoints != null) { | |
234 | for (MultiPoint multiPoint: this.multiPoints) { | |
235 | element.appendChild(multiPoint.getElement(xmlDocument)); | |
236 | } | |
237 | } | |
238 | if (this.multiPolygons != null) { | |
239 | for (MultiPolygon multiPolygon: this.multiPolygons) { | |
240 | element.appendChild(multiPolygon.getElement(xmlDocument)); | |
241 | } | |
242 | } | |
243 | if (this.points != null) { | |
244 | for (Point point: this.points) { | |
245 | element.appendChild(point.getElement(xmlDocument)); | |
246 | } | |
247 | } | |
248 | if (this.polygons != null) { | |
249 | for (Polygon polygon: this.polygons) { | |
250 | element.appendChild(polygon.getElement(xmlDocument)); | |
251 | } | |
252 | } | |
253 | if (this.styles != null) { | |
254 | for (Style style: this.styles) { | |
255 | element.appendChild(style.getElement(xmlDocument)); | |
256 | } | |
257 | } | |
258 | if (this.timePeriods != null) { | |
259 | for (TimePeriod timePeriod: this.timePeriods) { | |
260 | element.appendChild(timePeriod.getElement(xmlDocument)); | |
261 | } | |
262 | } | |
263 | if (this.address != null) { | |
264 | element.appendChild(this.address.getElement(xmlDocument)); | |
265 | } | |
266 | if (this.description != null) { | |
267 | element.appendChild(this.description.getElement(xmlDocument)); | |
268 | } | |
269 | if (this.name != null) { | |
270 | element.appendChild(this.name.getElement(xmlDocument)); | |
271 | } | |
272 | if (this.open != null) { | |
273 | element.appendChild(this.open.getElement(xmlDocument)); | |
274 | } | |
275 | if (this.snippet != null) { | |
276 | element.appendChild(this.snippet.getElement(xmlDocument)); | |
277 | } | |
278 | if (this.styleUrl != null) { | |
279 | element.appendChild(this.styleUrl.getElement(xmlDocument)); | |
280 | } | |
281 | if (this.visibility != null) { | |
282 | element.appendChild(this.visibility.getElement(xmlDocument)); | |
283 | } | |
284 | ||
285 | return element; | |
286 | } | |
287 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class Point { | |
5 | ||
6 | private String id; | |
7 | private Collection<Coordinates> coordinatess; | |
8 | private AltitudeMode altitudeMode; | |
9 | private Extrude extrude; | |
10 | ||
11 | public Point() { | |
12 | } | |
13 | ||
14 | public Point(String id, Collection<Coordinates> coordinatess, AltitudeMode altitudeMode, Extrude extrude) { | |
15 | this.id = id; | |
16 | this.coordinatess = coordinatess; | |
17 | this.altitudeMode = altitudeMode; | |
18 | this.extrude = extrude; | |
19 | } | |
20 | ||
21 | public String getId() { | |
22 | return this.id; | |
23 | } | |
24 | ||
25 | public void SetId(String id) { | |
26 | this.id = id; | |
27 | } | |
28 | ||
29 | public Collection<Coordinates> getCoordinates() { | |
30 | return this.coordinatess; | |
31 | } | |
32 | ||
33 | public void setCoordinates(Collection<Coordinates> coordinatess) { | |
34 | this.coordinatess = coordinatess; | |
35 | } | |
36 | ||
37 | public AltitudeMode getAltitudeMode() { | |
38 | return this.altitudeMode; | |
39 | } | |
40 | ||
41 | public void setAltitudeMode(AltitudeMode altitudeMode) { | |
42 | this.altitudeMode = altitudeMode; | |
43 | } | |
44 | ||
45 | public Extrude getExtrude() { | |
46 | return this.extrude; | |
47 | } | |
48 | ||
49 | public void setExtrude(Extrude extrude) { | |
50 | this.extrude = extrude; | |
51 | } | |
52 | ||
53 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
54 | org.w3c.dom.Element element = xmlDocument.createElement("Point"); | |
55 | if (this.id != null) { | |
56 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
57 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
58 | element.appendChild(attribute); | |
59 | } | |
60 | if (this.coordinatess != null) { | |
61 | for (Coordinates coordinates: this.coordinatess) { | |
62 | element.appendChild(coordinates.getElement(xmlDocument)); | |
63 | } | |
64 | } | |
65 | if (this.altitudeMode != null) { | |
66 | element.appendChild(this.altitudeMode.getElement(xmlDocument)); | |
67 | } | |
68 | if (this.extrude != null) { | |
69 | element.appendChild(this.extrude.getElement(xmlDocument)); | |
70 | } | |
71 | ||
72 | return element; | |
73 | } | |
74 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class PolyStyle { | |
3 | ||
4 | private String id; | |
5 | private Color color; | |
6 | private ColorMode colorMode; | |
7 | private Fill fill; | |
8 | private Outline outline; | |
9 | ||
10 | public PolyStyle() { | |
11 | } | |
12 | ||
13 | public PolyStyle(String id, Color color, ColorMode colorMode, Fill fill, Outline outline) { | |
14 | this.id = id; | |
15 | this.color = color; | |
16 | this.colorMode = colorMode; | |
17 | this.fill = fill; | |
18 | this.outline = outline; | |
19 | } | |
20 | ||
21 | public String getId() { | |
22 | return this.id; | |
23 | } | |
24 | ||
25 | public void SetId(String id) { | |
26 | this.id = id; | |
27 | } | |
28 | ||
29 | public Color getColor() { | |
30 | return this.color; | |
31 | } | |
32 | ||
33 | public void setColor(Color color) { | |
34 | this.color = color; | |
35 | } | |
36 | ||
37 | public ColorMode getColorMode() { | |
38 | return this.colorMode; | |
39 | } | |
40 | ||
41 | public void setColorMode(ColorMode colorMode) { | |
42 | this.colorMode = colorMode; | |
43 | } | |
44 | ||
45 | public Fill getFill() { | |
46 | return this.fill; | |
47 | } | |
48 | ||
49 | public void setFill(Fill fill) { | |
50 | this.fill = fill; | |
51 | } | |
52 | ||
53 | public Outline getOutline() { | |
54 | return this.outline; | |
55 | } | |
56 | ||
57 | public void setOutline(Outline outline) { | |
58 | this.outline = outline; | |
59 | } | |
60 | ||
61 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
62 | org.w3c.dom.Element element = xmlDocument.createElement("PolyStyle"); | |
63 | if (this.id != null) { | |
64 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
65 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
66 | element.appendChild(attribute); | |
67 | } | |
68 | if (this.color != null) { | |
69 | element.appendChild(this.color.getElement(xmlDocument)); | |
70 | } | |
71 | if (this.colorMode != null) { | |
72 | element.appendChild(this.colorMode.getElement(xmlDocument)); | |
73 | } | |
74 | if (this.fill != null) { | |
75 | element.appendChild(this.fill.getElement(xmlDocument)); | |
76 | } | |
77 | if (this.outline != null) { | |
78 | element.appendChild(this.outline.getElement(xmlDocument)); | |
79 | } | |
80 | ||
81 | return element; | |
82 | } | |
83 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class Polygon { | |
5 | ||
6 | private String id; | |
7 | private Collection<InnerBoundaryIs> innerBoundaryIss; | |
8 | private Collection<LinearRing> linearRings; | |
9 | private Collection<OuterBoundaryIs> outerBoundaryIss; | |
10 | private AltitudeMode altitudeMode; | |
11 | private Extrude extrude; | |
12 | ||
13 | public Polygon() { | |
14 | } | |
15 | ||
16 | public Polygon(String id, Collection<InnerBoundaryIs> innerBoundaryIss, Collection<LinearRing> linearRings, Collection<OuterBoundaryIs> outerBoundaryIss, AltitudeMode altitudeMode, Extrude extrude) { | |
17 | this.id = id; | |
18 | this.innerBoundaryIss = innerBoundaryIss; | |
19 | this.linearRings = linearRings; | |
20 | this.outerBoundaryIss = outerBoundaryIss; | |
21 | this.altitudeMode = altitudeMode; | |
22 | this.extrude = extrude; | |
23 | } | |
24 | ||
25 | public String getId() { | |
26 | return this.id; | |
27 | } | |
28 | ||
29 | public void SetId(String id) { | |
30 | this.id = id; | |
31 | } | |
32 | ||
33 | public Collection<InnerBoundaryIs> getInnerBoundaryIs() { | |
34 | return this.innerBoundaryIss; | |
35 | } | |
36 | ||
37 | public void setInnerBoundaryIs(Collection<InnerBoundaryIs> innerBoundaryIss) { | |
38 | this.innerBoundaryIss = innerBoundaryIss; | |
39 | } | |
40 | ||
41 | public Collection<LinearRing> getLinearRings() { | |
42 | return this.linearRings; | |
43 | } | |
44 | ||
45 | public void setLinearRings(Collection<LinearRing> linearRings) { | |
46 | this.linearRings = linearRings; | |
47 | } | |
48 | ||
49 | public Collection<OuterBoundaryIs> getOuterBoundaryIs() { | |
50 | return this.outerBoundaryIss; | |
51 | } | |
52 | ||
53 | public void setOuterBoundaryIs(Collection<OuterBoundaryIs> outerBoundaryIss) { | |
54 | this.outerBoundaryIss = outerBoundaryIss; | |
55 | } | |
56 | ||
57 | public AltitudeMode getAltitudeMode() { | |
58 | return this.altitudeMode; | |
59 | } | |
60 | ||
61 | public void setAltitudeMode(AltitudeMode altitudeMode) { | |
62 | this.altitudeMode = altitudeMode; | |
63 | } | |
64 | ||
65 | public Extrude getExtrude() { | |
66 | return this.extrude; | |
67 | } | |
68 | ||
69 | public void setExtrude(Extrude extrude) { | |
70 | this.extrude = extrude; | |
71 | } | |
72 | ||
73 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
74 | org.w3c.dom.Element element = xmlDocument.createElement("Polygon"); | |
75 | if (this.id != null) { | |
76 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
77 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
78 | element.appendChild(attribute); | |
79 | } | |
80 | if (this.innerBoundaryIss != null) { | |
81 | for (InnerBoundaryIs innerBoundaryIs: this.innerBoundaryIss) { | |
82 | element.appendChild(innerBoundaryIs.getElement(xmlDocument)); | |
83 | } | |
84 | } | |
85 | if (this.linearRings != null) { | |
86 | for (LinearRing linearRing: this.linearRings) { | |
87 | element.appendChild(linearRing.getElement(xmlDocument)); | |
88 | } | |
89 | } | |
90 | if (this.outerBoundaryIss != null) { | |
91 | for (OuterBoundaryIs outerBoundaryIs: this.outerBoundaryIss) { | |
92 | element.appendChild(outerBoundaryIs.getElement(xmlDocument)); | |
93 | } | |
94 | } | |
95 | if (this.altitudeMode != null) { | |
96 | element.appendChild(this.altitudeMode.getElement(xmlDocument)); | |
97 | } | |
98 | if (this.extrude != null) { | |
99 | element.appendChild(this.extrude.getElement(xmlDocument)); | |
100 | } | |
101 | ||
102 | return element; | |
103 | } | |
104 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class PreserveTextLevel { | |
3 | ||
4 | private String preserveTextLevel; | |
5 | private String id; | |
6 | ||
7 | public PreserveTextLevel() { | |
8 | } | |
9 | ||
10 | public PreserveTextLevel(String preserveTextLevel, String id) { | |
11 | this.preserveTextLevel = preserveTextLevel; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getPreserveTextLevel() { | |
16 | return this.preserveTextLevel; | |
17 | } | |
18 | ||
19 | public void SetPreserveTextLevel(String preserveTextLevel) { | |
20 | this.preserveTextLevel = preserveTextLevel; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("preserveTextLevel"); | |
33 | if (this.preserveTextLevel != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.preserveTextLevel)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class QueryString { | |
3 | ||
4 | private String queryString; | |
5 | private String id; | |
6 | ||
7 | public QueryString() { | |
8 | } | |
9 | ||
10 | public QueryString(String queryString, String id) { | |
11 | this.queryString = queryString; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getQueryString() { | |
16 | return this.queryString; | |
17 | } | |
18 | ||
19 | public void SetQueryString(String queryString) { | |
20 | this.queryString = queryString; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("queryString"); | |
33 | if (this.queryString != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.queryString)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Range { | |
3 | ||
4 | private String range; | |
5 | private String id; | |
6 | ||
7 | public Range() { | |
8 | } | |
9 | ||
10 | public Range(String range, String id) { | |
11 | this.range = range; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getRange() { | |
16 | return this.range; | |
17 | } | |
18 | ||
19 | public void SetRange(String range) { | |
20 | this.range = range; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("range"); | |
33 | if (this.range != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.range)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class RefreshCounter { | |
3 | ||
4 | private String refreshCounter; | |
5 | private String id; | |
6 | ||
7 | public RefreshCounter() { | |
8 | } | |
9 | ||
10 | public RefreshCounter(String refreshCounter, String id) { | |
11 | this.refreshCounter = refreshCounter; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getRefreshCounter() { | |
16 | return this.refreshCounter; | |
17 | } | |
18 | ||
19 | public void SetRefreshCounter(String refreshCounter) { | |
20 | this.refreshCounter = refreshCounter; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("refreshCounter"); | |
33 | if (this.refreshCounter != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.refreshCounter)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class RefreshInterval { | |
3 | ||
4 | private String refreshInterval; | |
5 | private String id; | |
6 | ||
7 | public RefreshInterval() { | |
8 | } | |
9 | ||
10 | public RefreshInterval(String refreshInterval, String id) { | |
11 | this.refreshInterval = refreshInterval; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getRefreshInterval() { | |
16 | return this.refreshInterval; | |
17 | } | |
18 | ||
19 | public void SetRefreshInterval(String refreshInterval) { | |
20 | this.refreshInterval = refreshInterval; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("refreshInterval"); | |
33 | if (this.refreshInterval != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.refreshInterval)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class RefreshMode { | |
3 | ||
4 | private String refreshMode; | |
5 | private String id; | |
6 | ||
7 | public RefreshMode() { | |
8 | } | |
9 | ||
10 | public RefreshMode(String refreshMode, String id) { | |
11 | this.refreshMode = refreshMode; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getRefreshMode() { | |
16 | return this.refreshMode; | |
17 | } | |
18 | ||
19 | public void SetRefreshMode(String refreshMode) { | |
20 | this.refreshMode = refreshMode; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("refreshMode"); | |
33 | if (this.refreshMode != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.refreshMode)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class RefreshPeriod { | |
3 | ||
4 | private String refreshPeriod; | |
5 | private String id; | |
6 | ||
7 | public RefreshPeriod() { | |
8 | } | |
9 | ||
10 | public RefreshPeriod(String refreshPeriod, String id) { | |
11 | this.refreshPeriod = refreshPeriod; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getRefreshPeriod() { | |
16 | return this.refreshPeriod; | |
17 | } | |
18 | ||
19 | public void SetRefreshPeriod(String refreshPeriod) { | |
20 | this.refreshPeriod = refreshPeriod; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("refreshPeriod"); | |
33 | if (this.refreshPeriod != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.refreshPeriod)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class RefreshVisibility { | |
3 | ||
4 | private String refreshVisibility; | |
5 | private String id; | |
6 | ||
7 | public RefreshVisibility() { | |
8 | } | |
9 | ||
10 | public RefreshVisibility(String refreshVisibility, String id) { | |
11 | this.refreshVisibility = refreshVisibility; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getRefreshVisibility() { | |
16 | return this.refreshVisibility; | |
17 | } | |
18 | ||
19 | public void SetRefreshVisibility(String refreshVisibility) { | |
20 | this.refreshVisibility = refreshVisibility; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("refreshVisibility"); | |
33 | if (this.refreshVisibility != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.refreshVisibility)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Rotation { | |
3 | ||
4 | private String rotation; | |
5 | private String id; | |
6 | ||
7 | public Rotation() { | |
8 | } | |
9 | ||
10 | public Rotation(String rotation, String id) { | |
11 | this.rotation = rotation; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getRotation() { | |
16 | return this.rotation; | |
17 | } | |
18 | ||
19 | public void SetRotation(String rotation) { | |
20 | this.rotation = rotation; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("rotation"); | |
33 | if (this.rotation != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.rotation)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class RotationXY { | |
3 | ||
4 | private String rotationXY; | |
5 | private String id; | |
6 | ||
7 | public RotationXY() { | |
8 | } | |
9 | ||
10 | public RotationXY(String rotationXY, String id) { | |
11 | this.rotationXY = rotationXY; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getRotationXY() { | |
16 | return this.rotationXY; | |
17 | } | |
18 | ||
19 | public void SetRotationXY(String rotationXY) { | |
20 | this.rotationXY = rotationXY; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("rotationXY"); | |
33 | if (this.rotationXY != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.rotationXY)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Scale { | |
3 | ||
4 | private String scale; | |
5 | private String id; | |
6 | ||
7 | public Scale() { | |
8 | } | |
9 | ||
10 | public Scale(String scale, String id) { | |
11 | this.scale = scale; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getScale() { | |
16 | return this.scale; | |
17 | } | |
18 | ||
19 | public void SetScale(String scale) { | |
20 | this.scale = scale; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("scale"); | |
33 | if (this.scale != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.scale)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class Schema { | |
5 | ||
6 | private String id; | |
7 | private Collection<ObjArrayField> objArrayFields; | |
8 | private Collection<ObjField> objFields; | |
9 | private Collection<SimpleArrayField> simpleArrayFields; | |
10 | private Collection<SimpleField> simpleFields; | |
11 | private Name name; | |
12 | private Parent parent; | |
13 | ||
14 | public Schema() { | |
15 | } | |
16 | ||
17 | public Schema(String id, Collection<ObjArrayField> objArrayFields, Collection<ObjField> objFields, Collection<SimpleArrayField> simpleArrayFields, Collection<SimpleField> simpleFields, Name name, Parent parent) { | |
18 | this.id = id; | |
19 | this.objArrayFields = objArrayFields; | |
20 | this.objFields = objFields; | |
21 | this.simpleArrayFields = simpleArrayFields; | |
22 | this.simpleFields = simpleFields; | |
23 | this.name = name; | |
24 | this.parent = parent; | |
25 | } | |
26 | ||
27 | public String getId() { | |
28 | return this.id; | |
29 | } | |
30 | ||
31 | public void SetId(String id) { | |
32 | this.id = id; | |
33 | } | |
34 | ||
35 | public Collection<ObjArrayField> getObjArrayFields() { | |
36 | return this.objArrayFields; | |
37 | } | |
38 | ||
39 | public void setObjArrayFields(Collection<ObjArrayField> objArrayFields) { | |
40 | this.objArrayFields = objArrayFields; | |
41 | } | |
42 | ||
43 | public Collection<ObjField> getObjFields() { | |
44 | return this.objFields; | |
45 | } | |
46 | ||
47 | public void setObjFields(Collection<ObjField> objFields) { | |
48 | this.objFields = objFields; | |
49 | } | |
50 | ||
51 | public Collection<SimpleArrayField> getSimpleArrayFields() { | |
52 | return this.simpleArrayFields; | |
53 | } | |
54 | ||
55 | public void setSimpleArrayFields(Collection<SimpleArrayField> simpleArrayFields) { | |
56 | this.simpleArrayFields = simpleArrayFields; | |
57 | } | |
58 | ||
59 | public Collection<SimpleField> getSimpleFields() { | |
60 | return this.simpleFields; | |
61 | } | |
62 | ||
63 | public void setSimpleFields(Collection<SimpleField> simpleFields) { | |
64 | this.simpleFields = simpleFields; | |
65 | } | |
66 | ||
67 | public Name getName() { | |
68 | return this.name; | |
69 | } | |
70 | ||
71 | public void setName(Name name) { | |
72 | this.name = name; | |
73 | } | |
74 | ||
75 | public Parent getParent() { | |
76 | return this.parent; | |
77 | } | |
78 | ||
79 | public void setParent(Parent parent) { | |
80 | this.parent = parent; | |
81 | } | |
82 | ||
83 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
84 | org.w3c.dom.Element element = xmlDocument.createElement("Schema"); | |
85 | if (this.id != null) { | |
86 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
87 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
88 | element.appendChild(attribute); | |
89 | } | |
90 | if (this.objArrayFields != null) { | |
91 | for (ObjArrayField objArrayField: this.objArrayFields) { | |
92 | element.appendChild(objArrayField.getElement(xmlDocument)); | |
93 | } | |
94 | } | |
95 | if (this.objFields != null) { | |
96 | for (ObjField objField: this.objFields) { | |
97 | element.appendChild(objField.getElement(xmlDocument)); | |
98 | } | |
99 | } | |
100 | if (this.simpleArrayFields != null) { | |
101 | for (SimpleArrayField simpleArrayField: this.simpleArrayFields) { | |
102 | element.appendChild(simpleArrayField.getElement(xmlDocument)); | |
103 | } | |
104 | } | |
105 | if (this.simpleFields != null) { | |
106 | for (SimpleField simpleField: this.simpleFields) { | |
107 | element.appendChild(simpleField.getElement(xmlDocument)); | |
108 | } | |
109 | } | |
110 | if (this.name != null) { | |
111 | element.appendChild(this.name.getElement(xmlDocument)); | |
112 | } | |
113 | if (this.parent != null) { | |
114 | element.appendChild(this.parent.getElement(xmlDocument)); | |
115 | } | |
116 | ||
117 | return element; | |
118 | } | |
119 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class ScreenOverlay { | |
5 | ||
6 | private String id; | |
7 | private Collection<Icon> icons; | |
8 | private DrawOrder drawOrder; | |
9 | private Name name; | |
10 | private Opacity opacity; | |
11 | private OverlayXY overlayXY; | |
12 | private Rotation rotation; | |
13 | private RotationXY rotationXY; | |
14 | private ScreenXY screenXY; | |
15 | private Size size; | |
16 | private TexMat texMat; | |
17 | private Visibility visibility; | |
18 | ||
19 | public ScreenOverlay() { | |
20 | } | |
21 | ||
22 | public ScreenOverlay(String id, Collection<Icon> icons, DrawOrder drawOrder, Name name, Opacity opacity, OverlayXY overlayXY, Rotation rotation, RotationXY rotationXY, ScreenXY screenXY, Size size, TexMat texMat, Visibility visibility) { | |
23 | this.id = id; | |
24 | this.icons = icons; | |
25 | this.drawOrder = drawOrder; | |
26 | this.name = name; | |
27 | this.opacity = opacity; | |
28 | this.overlayXY = overlayXY; | |
29 | this.rotation = rotation; | |
30 | this.rotationXY = rotationXY; | |
31 | this.screenXY = screenXY; | |
32 | this.size = size; | |
33 | this.texMat = texMat; | |
34 | this.visibility = visibility; | |
35 | } | |
36 | ||
37 | public String getId() { | |
38 | return this.id; | |
39 | } | |
40 | ||
41 | public void SetId(String id) { | |
42 | this.id = id; | |
43 | } | |
44 | ||
45 | public Collection<Icon> getIcons() { | |
46 | return this.icons; | |
47 | } | |
48 | ||
49 | public void setIcons(Collection<Icon> icons) { | |
50 | this.icons = icons; | |
51 | } | |
52 | ||
53 | public DrawOrder getDrawOrder() { | |
54 | return this.drawOrder; | |
55 | } | |
56 | ||
57 | public void setDrawOrder(DrawOrder drawOrder) { | |
58 | this.drawOrder = drawOrder; | |
59 | } | |
60 | ||
61 | public Name getName() { | |
62 | return this.name; | |
63 | } | |
64 | ||
65 | public void setName(Name name) { | |
66 | this.name = name; | |
67 | } | |
68 | ||
69 | public Opacity getOpacity() { | |
70 | return this.opacity; | |
71 | } | |
72 | ||
73 | public void setOpacity(Opacity opacity) { | |
74 | this.opacity = opacity; | |
75 | } | |
76 | ||
77 | public OverlayXY getOverlayXY() { | |
78 | return this.overlayXY; | |
79 | } | |
80 | ||
81 | public void setOverlayXY(OverlayXY overlayXY) { | |
82 | this.overlayXY = overlayXY; | |
83 | } | |
84 | ||
85 | public Rotation getRotation() { | |
86 | return this.rotation; | |
87 | } | |
88 | ||
89 | public void setRotation(Rotation rotation) { | |
90 | this.rotation = rotation; | |
91 | } | |
92 | ||
93 | public RotationXY getRotationXY() { | |
94 | return this.rotationXY; | |
95 | } | |
96 | ||
97 | public void setRotationXY(RotationXY rotationXY) { | |
98 | this.rotationXY = rotationXY; | |
99 | } | |
100 | ||
101 | public ScreenXY getScreenXY() { | |
102 | return this.screenXY; | |
103 | } | |
104 | ||
105 | public void setScreenXY(ScreenXY screenXY) { | |
106 | this.screenXY = screenXY; | |
107 | } | |
108 | ||
109 | public Size getSize() { | |
110 | return this.size; | |
111 | } | |
112 | ||
113 | public void setSize(Size size) { | |
114 | this.size = size; | |
115 | } | |
116 | ||
117 | public TexMat getTexMat() { | |
118 | return this.texMat; | |
119 | } | |
120 | ||
121 | public void setTexMat(TexMat texMat) { | |
122 | this.texMat = texMat; | |
123 | } | |
124 | ||
125 | public Visibility getVisibility() { | |
126 | return this.visibility; | |
127 | } | |
128 | ||
129 | public void setVisibility(Visibility visibility) { | |
130 | this.visibility = visibility; | |
131 | } | |
132 | ||
133 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
134 | org.w3c.dom.Element element = xmlDocument.createElement("ScreenOverlay"); | |
135 | if (this.id != null) { | |
136 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
137 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
138 | element.appendChild(attribute); | |
139 | } | |
140 | if (this.icons != null) { | |
141 | for (Icon icon: this.icons) { | |
142 | element.appendChild(icon.getElement(xmlDocument)); | |
143 | } | |
144 | } | |
145 | if (this.drawOrder != null) { | |
146 | element.appendChild(this.drawOrder.getElement(xmlDocument)); | |
147 | } | |
148 | if (this.name != null) { | |
149 | element.appendChild(this.name.getElement(xmlDocument)); | |
150 | } | |
151 | if (this.opacity != null) { | |
152 | element.appendChild(this.opacity.getElement(xmlDocument)); | |
153 | } | |
154 | if (this.overlayXY != null) { | |
155 | element.appendChild(this.overlayXY.getElement(xmlDocument)); | |
156 | } | |
157 | if (this.rotation != null) { | |
158 | element.appendChild(this.rotation.getElement(xmlDocument)); | |
159 | } | |
160 | if (this.rotationXY != null) { | |
161 | element.appendChild(this.rotationXY.getElement(xmlDocument)); | |
162 | } | |
163 | if (this.screenXY != null) { | |
164 | element.appendChild(this.screenXY.getElement(xmlDocument)); | |
165 | } | |
166 | if (this.size != null) { | |
167 | element.appendChild(this.size.getElement(xmlDocument)); | |
168 | } | |
169 | if (this.texMat != null) { | |
170 | element.appendChild(this.texMat.getElement(xmlDocument)); | |
171 | } | |
172 | if (this.visibility != null) { | |
173 | element.appendChild(this.visibility.getElement(xmlDocument)); | |
174 | } | |
175 | ||
176 | return element; | |
177 | } | |
178 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class ScreenXY { | |
3 | ||
4 | private String id; | |
5 | private String x; | |
6 | private String y; | |
7 | private XunitsOptions xunits; | |
8 | private YunitsOptions yunits; | |
9 | ||
10 | public enum XunitsOptions { pixels, insetPixels, fraction } | |
11 | public enum YunitsOptions { pixels, insetPixels, fraction } | |
12 | ||
13 | public ScreenXY() { | |
14 | } | |
15 | ||
16 | public ScreenXY(String id, String x, String y, XunitsOptions xunits, YunitsOptions yunits) { | |
17 | this.id = id; | |
18 | this.x = x; | |
19 | this.y = y; | |
20 | this.xunits = xunits; | |
21 | this.yunits = yunits; | |
22 | } | |
23 | ||
24 | public String getId() { | |
25 | return this.id; | |
26 | } | |
27 | ||
28 | public void SetId(String id) { | |
29 | this.id = id; | |
30 | } | |
31 | ||
32 | public String getX() { | |
33 | return this.x; | |
34 | } | |
35 | ||
36 | public void SetX(String x) { | |
37 | this.x = x; | |
38 | } | |
39 | ||
40 | public String getY() { | |
41 | return this.y; | |
42 | } | |
43 | ||
44 | public void SetY(String y) { | |
45 | this.y = y; | |
46 | } | |
47 | ||
48 | public XunitsOptions getXunits() { | |
49 | return this.xunits; | |
50 | } | |
51 | ||
52 | public void SetXunits(XunitsOptions xunits) { | |
53 | this.xunits = xunits; | |
54 | } | |
55 | ||
56 | public YunitsOptions getYunits() { | |
57 | return this.yunits; | |
58 | } | |
59 | ||
60 | public void SetYunits(YunitsOptions yunits) { | |
61 | this.yunits = yunits; | |
62 | } | |
63 | ||
64 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
65 | org.w3c.dom.Element element = xmlDocument.createElement("screenXY"); | |
66 | if (this.id != null) { | |
67 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
68 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
69 | element.appendChild(attribute); | |
70 | } | |
71 | if (this.x != null) { | |
72 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("x"); | |
73 | attribute.appendChild(xmlDocument.createTextNode(this.x.toString())); | |
74 | element.appendChild(attribute); | |
75 | } | |
76 | if (this.y != null) { | |
77 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("y"); | |
78 | attribute.appendChild(xmlDocument.createTextNode(this.y.toString())); | |
79 | element.appendChild(attribute); | |
80 | } | |
81 | if (this.xunits != null) { | |
82 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("xunits"); | |
83 | attribute.appendChild(xmlDocument.createTextNode(this.xunits.toString())); | |
84 | element.appendChild(attribute); | |
85 | } | |
86 | if (this.yunits != null) { | |
87 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("yunits"); | |
88 | attribute.appendChild(xmlDocument.createTextNode(this.yunits.toString())); | |
89 | element.appendChild(attribute); | |
90 | } | |
91 | ||
92 | return element; | |
93 | } | |
94 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Search { | |
3 | ||
4 | private String id; | |
5 | private Description description; | |
6 | private Name name; | |
7 | private QueryString queryString; | |
8 | private SearchString searchString; | |
9 | private ServerUrl serverUrl; | |
10 | private Snippet snippet; | |
11 | ||
12 | public Search() { | |
13 | } | |
14 | ||
15 | public Search(String id, Description description, Name name, QueryString queryString, SearchString searchString, ServerUrl serverUrl, Snippet snippet) { | |
16 | this.id = id; | |
17 | this.description = description; | |
18 | this.name = name; | |
19 | this.queryString = queryString; | |
20 | this.searchString = searchString; | |
21 | this.serverUrl = serverUrl; | |
22 | this.snippet = snippet; | |
23 | } | |
24 | ||
25 | public String getId() { | |
26 | return this.id; | |
27 | } | |
28 | ||
29 | public void SetId(String id) { | |
30 | this.id = id; | |
31 | } | |
32 | ||
33 | public Description getDescription() { | |
34 | return this.description; | |
35 | } | |
36 | ||
37 | public void setDescription(Description description) { | |
38 | this.description = description; | |
39 | } | |
40 | ||
41 | public Name getName() { | |
42 | return this.name; | |
43 | } | |
44 | ||
45 | public void setName(Name name) { | |
46 | this.name = name; | |
47 | } | |
48 | ||
49 | public QueryString getQueryString() { | |
50 | return this.queryString; | |
51 | } | |
52 | ||
53 | public void setQueryString(QueryString queryString) { | |
54 | this.queryString = queryString; | |
55 | } | |
56 | ||
57 | public SearchString getSearchString() { | |
58 | return this.searchString; | |
59 | } | |
60 | ||
61 | public void setSearchString(SearchString searchString) { | |
62 | this.searchString = searchString; | |
63 | } | |
64 | ||
65 | public ServerUrl getServerUrl() { | |
66 | return this.serverUrl; | |
67 | } | |
68 | ||
69 | public void setServerUrl(ServerUrl serverUrl) { | |
70 | this.serverUrl = serverUrl; | |
71 | } | |
72 | ||
73 | public Snippet getSnippet() { | |
74 | return this.snippet; | |
75 | } | |
76 | ||
77 | public void setSnippet(Snippet snippet) { | |
78 | this.snippet = snippet; | |
79 | } | |
80 | ||
81 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
82 | org.w3c.dom.Element element = xmlDocument.createElement("Search"); | |
83 | if (this.id != null) { | |
84 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
85 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
86 | element.appendChild(attribute); | |
87 | } | |
88 | if (this.description != null) { | |
89 | element.appendChild(this.description.getElement(xmlDocument)); | |
90 | } | |
91 | if (this.name != null) { | |
92 | element.appendChild(this.name.getElement(xmlDocument)); | |
93 | } | |
94 | if (this.queryString != null) { | |
95 | element.appendChild(this.queryString.getElement(xmlDocument)); | |
96 | } | |
97 | if (this.searchString != null) { | |
98 | element.appendChild(this.searchString.getElement(xmlDocument)); | |
99 | } | |
100 | if (this.serverUrl != null) { | |
101 | element.appendChild(this.serverUrl.getElement(xmlDocument)); | |
102 | } | |
103 | if (this.snippet != null) { | |
104 | element.appendChild(this.snippet.getElement(xmlDocument)); | |
105 | } | |
106 | ||
107 | return element; | |
108 | } | |
109 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class SearchString { | |
3 | ||
4 | private String searchString; | |
5 | private String id; | |
6 | ||
7 | public SearchString() { | |
8 | } | |
9 | ||
10 | public SearchString(String searchString, String id) { | |
11 | this.searchString = searchString; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getSearchString() { | |
16 | return this.searchString; | |
17 | } | |
18 | ||
19 | public void SetSearchString(String searchString) { | |
20 | this.searchString = searchString; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("searchString"); | |
33 | if (this.searchString != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.searchString)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class ServerUrl { | |
3 | ||
4 | private String serverUrl; | |
5 | private String id; | |
6 | ||
7 | public ServerUrl() { | |
8 | } | |
9 | ||
10 | public ServerUrl(String serverUrl, String id) { | |
11 | this.serverUrl = serverUrl; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getServerUrl() { | |
16 | return this.serverUrl; | |
17 | } | |
18 | ||
19 | public void SetServerUrl(String serverUrl) { | |
20 | this.serverUrl = serverUrl; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("serverUrl"); | |
33 | if (this.serverUrl != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.serverUrl)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class ShowState { | |
3 | ||
4 | private String showState; | |
5 | private String id; | |
6 | ||
7 | public ShowState() { | |
8 | } | |
9 | ||
10 | public ShowState(String showState, String id) { | |
11 | this.showState = showState; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getShowState() { | |
16 | return this.showState; | |
17 | } | |
18 | ||
19 | public void SetShowState(String showState) { | |
20 | this.showState = showState; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("showState"); | |
33 | if (this.showState != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.showState)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class SimpleArrayField { | |
3 | ||
4 | private String id; | |
5 | private Name name; | |
6 | private Type type; | |
7 | ||
8 | public SimpleArrayField() { | |
9 | } | |
10 | ||
11 | public SimpleArrayField(String id, Name name, Type type) { | |
12 | this.id = id; | |
13 | this.name = name; | |
14 | this.type = type; | |
15 | } | |
16 | ||
17 | public String getId() { | |
18 | return this.id; | |
19 | } | |
20 | ||
21 | public void SetId(String id) { | |
22 | this.id = id; | |
23 | } | |
24 | ||
25 | public Name getName() { | |
26 | return this.name; | |
27 | } | |
28 | ||
29 | public void setName(Name name) { | |
30 | this.name = name; | |
31 | } | |
32 | ||
33 | public Type getType() { | |
34 | return this.type; | |
35 | } | |
36 | ||
37 | public void setType(Type type) { | |
38 | this.type = type; | |
39 | } | |
40 | ||
41 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
42 | org.w3c.dom.Element element = xmlDocument.createElement("SimpleArrayField"); | |
43 | if (this.id != null) { | |
44 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
45 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
46 | element.appendChild(attribute); | |
47 | } | |
48 | if (this.name != null) { | |
49 | element.appendChild(this.name.getElement(xmlDocument)); | |
50 | } | |
51 | if (this.type != null) { | |
52 | element.appendChild(this.type.getElement(xmlDocument)); | |
53 | } | |
54 | ||
55 | return element; | |
56 | } | |
57 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class SimpleField { | |
3 | ||
4 | private String id; | |
5 | private Name name; | |
6 | private Type type; | |
7 | ||
8 | public SimpleField() { | |
9 | } | |
10 | ||
11 | public SimpleField(String id, Name name, Type type) { | |
12 | this.id = id; | |
13 | this.name = name; | |
14 | this.type = type; | |
15 | } | |
16 | ||
17 | public String getId() { | |
18 | return this.id; | |
19 | } | |
20 | ||
21 | public void SetId(String id) { | |
22 | this.id = id; | |
23 | } | |
24 | ||
25 | public Name getName() { | |
26 | return this.name; | |
27 | } | |
28 | ||
29 | public void setName(Name name) { | |
30 | this.name = name; | |
31 | } | |
32 | ||
33 | public Type getType() { | |
34 | return this.type; | |
35 | } | |
36 | ||
37 | public void setType(Type type) { | |
38 | this.type = type; | |
39 | } | |
40 | ||
41 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
42 | org.w3c.dom.Element element = xmlDocument.createElement("SimpleField"); | |
43 | if (this.id != null) { | |
44 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
45 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
46 | element.appendChild(attribute); | |
47 | } | |
48 | if (this.name != null) { | |
49 | element.appendChild(this.name.getElement(xmlDocument)); | |
50 | } | |
51 | if (this.type != null) { | |
52 | element.appendChild(this.type.getElement(xmlDocument)); | |
53 | } | |
54 | ||
55 | return element; | |
56 | } | |
57 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Size { | |
3 | ||
4 | private String id; | |
5 | private String x; | |
6 | private String y; | |
7 | private XunitsOptions xunits; | |
8 | private YunitsOptions yunits; | |
9 | ||
10 | public enum XunitsOptions { pixels, insetPixels, fraction } | |
11 | public enum YunitsOptions { pixels, insetPixels, fraction } | |
12 | ||
13 | public Size() { | |
14 | } | |
15 | ||
16 | public Size(String id, String x, String y, XunitsOptions xunits, YunitsOptions yunits) { | |
17 | this.id = id; | |
18 | this.x = x; | |
19 | this.y = y; | |
20 | this.xunits = xunits; | |
21 | this.yunits = yunits; | |
22 | } | |
23 | ||
24 | public String getId() { | |
25 | return this.id; | |
26 | } | |
27 | ||
28 | public void SetId(String id) { | |
29 | this.id = id; | |
30 | } | |
31 | ||
32 | public String getX() { | |
33 | return this.x; | |
34 | } | |
35 | ||
36 | public void SetX(String x) { | |
37 | this.x = x; | |
38 | } | |
39 | ||
40 | public String getY() { | |
41 | return this.y; | |
42 | } | |
43 | ||
44 | public void SetY(String y) { | |
45 | this.y = y; | |
46 | } | |
47 | ||
48 | public XunitsOptions getXunits() { | |
49 | return this.xunits; | |
50 | } | |
51 | ||
52 | public void SetXunits(XunitsOptions xunits) { | |
53 | this.xunits = xunits; | |
54 | } | |
55 | ||
56 | public YunitsOptions getYunits() { | |
57 | return this.yunits; | |
58 | } | |
59 | ||
60 | public void SetYunits(YunitsOptions yunits) { | |
61 | this.yunits = yunits; | |
62 | } | |
63 | ||
64 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
65 | org.w3c.dom.Element element = xmlDocument.createElement("size"); | |
66 | if (this.id != null) { | |
67 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
68 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
69 | element.appendChild(attribute); | |
70 | } | |
71 | if (this.x != null) { | |
72 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("x"); | |
73 | attribute.appendChild(xmlDocument.createTextNode(this.x.toString())); | |
74 | element.appendChild(attribute); | |
75 | } | |
76 | if (this.y != null) { | |
77 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("y"); | |
78 | attribute.appendChild(xmlDocument.createTextNode(this.y.toString())); | |
79 | element.appendChild(attribute); | |
80 | } | |
81 | if (this.xunits != null) { | |
82 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("xunits"); | |
83 | attribute.appendChild(xmlDocument.createTextNode(this.xunits.toString())); | |
84 | element.appendChild(attribute); | |
85 | } | |
86 | if (this.yunits != null) { | |
87 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("yunits"); | |
88 | attribute.appendChild(xmlDocument.createTextNode(this.yunits.toString())); | |
89 | element.appendChild(attribute); | |
90 | } | |
91 | ||
92 | return element; | |
93 | } | |
94 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Snippet { | |
3 | ||
4 | private String id; | |
5 | private String maxLines; | |
6 | private Text text; | |
7 | ||
8 | public Snippet() { | |
9 | } | |
10 | ||
11 | public Snippet(String id, String maxLines, Text text) { | |
12 | this.id = id; | |
13 | this.maxLines = maxLines; | |
14 | this.text = text; | |
15 | } | |
16 | ||
17 | public String getId() { | |
18 | return this.id; | |
19 | } | |
20 | ||
21 | public void SetId(String id) { | |
22 | this.id = id; | |
23 | } | |
24 | ||
25 | public String getMaxLines() { | |
26 | return this.maxLines; | |
27 | } | |
28 | ||
29 | public void SetMaxLines(String maxLines) { | |
30 | this.maxLines = maxLines; | |
31 | } | |
32 | ||
33 | public Text getText() { | |
34 | return this.text; | |
35 | } | |
36 | ||
37 | public void setText(Text text) { | |
38 | this.text = text; | |
39 | } | |
40 | ||
41 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
42 | org.w3c.dom.Element element = xmlDocument.createElement("Snippet"); | |
43 | if (this.id != null) { | |
44 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
45 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
46 | element.appendChild(attribute); | |
47 | } | |
48 | if (this.maxLines != null) { | |
49 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("maxLines"); | |
50 | attribute.appendChild(xmlDocument.createTextNode(this.maxLines.toString())); | |
51 | element.appendChild(attribute); | |
52 | } | |
53 | if (this.text != null) { | |
54 | element.appendChild(this.text.getElement(xmlDocument)); | |
55 | } | |
56 | ||
57 | return element; | |
58 | } | |
59 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class South { | |
3 | ||
4 | private String south; | |
5 | private String id; | |
6 | ||
7 | public South() { | |
8 | } | |
9 | ||
10 | public South(String south, String id) { | |
11 | this.south = south; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getSouth() { | |
16 | return this.south; | |
17 | } | |
18 | ||
19 | public void SetSouth(String south) { | |
20 | this.south = south; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("south"); | |
33 | if (this.south != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.south)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class State { | |
5 | ||
6 | private String id; | |
7 | private Collection<Duration> durations; | |
8 | private Collection<Key> keys; | |
9 | private Collection<StyleUrl> styleUrls; | |
10 | ||
11 | public State() { | |
12 | } | |
13 | ||
14 | public State(String id, Collection<Duration> durations, Collection<Key> keys, Collection<StyleUrl> styleUrls) { | |
15 | this.id = id; | |
16 | this.durations = durations; | |
17 | this.keys = keys; | |
18 | this.styleUrls = styleUrls; | |
19 | } | |
20 | ||
21 | public String getId() { | |
22 | return this.id; | |
23 | } | |
24 | ||
25 | public void SetId(String id) { | |
26 | this.id = id; | |
27 | } | |
28 | ||
29 | public Collection<Duration> getDurations() { | |
30 | return this.durations; | |
31 | } | |
32 | ||
33 | public void setDurations(Collection<Duration> durations) { | |
34 | this.durations = durations; | |
35 | } | |
36 | ||
37 | public Collection<Key> getKeys() { | |
38 | return this.keys; | |
39 | } | |
40 | ||
41 | public void setKeys(Collection<Key> keys) { | |
42 | this.keys = keys; | |
43 | } | |
44 | ||
45 | public Collection<StyleUrl> getStyleUrls() { | |
46 | return this.styleUrls; | |
47 | } | |
48 | ||
49 | public void setStyleUrls(Collection<StyleUrl> styleUrls) { | |
50 | this.styleUrls = styleUrls; | |
51 | } | |
52 | ||
53 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
54 | org.w3c.dom.Element element = xmlDocument.createElement("State"); | |
55 | if (this.id != null) { | |
56 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
57 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
58 | element.appendChild(attribute); | |
59 | } | |
60 | if (this.durations != null) { | |
61 | for (Duration duration: this.durations) { | |
62 | element.appendChild(duration.getElement(xmlDocument)); | |
63 | } | |
64 | } | |
65 | if (this.keys != null) { | |
66 | for (Key key: this.keys) { | |
67 | element.appendChild(key.getElement(xmlDocument)); | |
68 | } | |
69 | } | |
70 | if (this.styleUrls != null) { | |
71 | for (StyleUrl styleUrl: this.styleUrls) { | |
72 | element.appendChild(styleUrl.getElement(xmlDocument)); | |
73 | } | |
74 | } | |
75 | ||
76 | return element; | |
77 | } | |
78 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class Style { | |
5 | ||
6 | private String id; | |
7 | private BalloonStyle balloonStyle; | |
8 | private ColorStyle colorStyle; | |
9 | private Collection<Icon> icons; | |
10 | private IconStyle iconStyle; | |
11 | private LabelStyle labelStyle; | |
12 | private LineStyle lineStyle; | |
13 | private PolyStyle polyStyle; | |
14 | private GeomScale geomScale; | |
15 | private GeomColor geomColor; | |
16 | ||
17 | public Style() { | |
18 | } | |
19 | ||
20 | public Style(String id, BalloonStyle balloonStyle, ColorStyle colorStyle, Collection<Icon> icons, IconStyle iconStyle, LabelStyle labelStyle, LineStyle lineStyle, PolyStyle polyStyle, GeomScale geomScale, GeomColor geomColor) { | |
21 | this.id = id; | |
22 | this.balloonStyle = balloonStyle; | |
23 | this.colorStyle = colorStyle; | |
24 | this.icons = icons; | |
25 | this.iconStyle = iconStyle; | |
26 | this.labelStyle = labelStyle; | |
27 | this.lineStyle = lineStyle; | |
28 | this.polyStyle = polyStyle; | |
29 | this.geomScale = geomScale; | |
30 | this.geomColor = geomColor; | |
31 | } | |
32 | ||
33 | public String getId() { | |
34 | return this.id; | |
35 | } | |
36 | ||
37 | public void SetId(String id) { | |
38 | this.id = id; | |
39 | } | |
40 | ||
41 | public BalloonStyle getBalloonStyle() { | |
42 | return this.balloonStyle; | |
43 | } | |
44 | ||
45 | public void setBalloonStyle(BalloonStyle balloonStyle) { | |
46 | this.balloonStyle = balloonStyle; | |
47 | } | |
48 | ||
49 | public ColorStyle getColorStyle() { | |
50 | return this.colorStyle; | |
51 | } | |
52 | ||
53 | public void setColorStyle(ColorStyle colorStyle) { | |
54 | this.colorStyle = colorStyle; | |
55 | } | |
56 | ||
57 | public Collection<Icon> getIcons() { | |
58 | return this.icons; | |
59 | } | |
60 | ||
61 | public void setIcons(Collection<Icon> icons) { | |
62 | this.icons = icons; | |
63 | } | |
64 | ||
65 | public IconStyle getIconStyle() { | |
66 | return this.iconStyle; | |
67 | } | |
68 | ||
69 | public void setIconStyle(IconStyle iconStyle) { | |
70 | this.iconStyle = iconStyle; | |
71 | } | |
72 | ||
73 | public LabelStyle getLabelStyle() { | |
74 | return this.labelStyle; | |
75 | } | |
76 | ||
77 | public void setLabelStyle(LabelStyle labelStyle) { | |
78 | this.labelStyle = labelStyle; | |
79 | } | |
80 | ||
81 | public LineStyle getLineStyle() { | |
82 | return this.lineStyle; | |
83 | } | |
84 | ||
85 | public void setLineStyle(LineStyle lineStyle) { | |
86 | this.lineStyle = lineStyle; | |
87 | } | |
88 | ||
89 | public PolyStyle getPolyStyle() { | |
90 | return this.polyStyle; | |
91 | } | |
92 | ||
93 | public void setPolyStyle(PolyStyle polyStyle) { | |
94 | this.polyStyle = polyStyle; | |
95 | } | |
96 | ||
97 | public GeomScale getGeomScale() { | |
98 | return this.geomScale; | |
99 | } | |
100 | ||
101 | public void setGeomScale(GeomScale geomScale) { | |
102 | this.geomScale = geomScale; | |
103 | } | |
104 | ||
105 | public GeomColor getGeomColor() { | |
106 | return this.geomColor; | |
107 | } | |
108 | ||
109 | public void setGeomColor(GeomColor geomColor) { | |
110 | this.geomColor = geomColor; | |
111 | } | |
112 | ||
113 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
114 | org.w3c.dom.Element element = xmlDocument.createElement("Style"); | |
115 | if (this.id != null) { | |
116 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
117 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
118 | element.appendChild(attribute); | |
119 | } | |
120 | if (this.balloonStyle != null) { | |
121 | element.appendChild(this.balloonStyle.getElement(xmlDocument)); | |
122 | } | |
123 | if (this.colorStyle != null) { | |
124 | element.appendChild(this.colorStyle.getElement(xmlDocument)); | |
125 | } | |
126 | if (this.icons != null) { | |
127 | for (Icon icon: this.icons) { | |
128 | element.appendChild(icon.getElement(xmlDocument)); | |
129 | } | |
130 | } | |
131 | if (this.iconStyle != null) { | |
132 | element.appendChild(this.iconStyle.getElement(xmlDocument)); | |
133 | } | |
134 | if (this.labelStyle != null) { | |
135 | element.appendChild(this.labelStyle.getElement(xmlDocument)); | |
136 | } | |
137 | if (this.lineStyle != null) { | |
138 | element.appendChild(this.lineStyle.getElement(xmlDocument)); | |
139 | } | |
140 | if (this.polyStyle != null) { | |
141 | element.appendChild(this.polyStyle.getElement(xmlDocument)); | |
142 | } | |
143 | if (this.geomScale != null) { | |
144 | element.appendChild(this.geomScale.getElement(xmlDocument)); | |
145 | } | |
146 | if (this.geomColor != null) { | |
147 | element.appendChild(this.geomColor.getElement(xmlDocument)); | |
148 | } | |
149 | ||
150 | return element; | |
151 | } | |
152 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class StyleBlinker { | |
5 | ||
6 | private String id; | |
7 | private Collection<State> states; | |
8 | private NumCycles numCycles; | |
9 | ||
10 | public StyleBlinker() { | |
11 | } | |
12 | ||
13 | public StyleBlinker(String id, Collection<State> states, NumCycles numCycles) { | |
14 | this.id = id; | |
15 | this.states = states; | |
16 | this.numCycles = numCycles; | |
17 | } | |
18 | ||
19 | public String getId() { | |
20 | return this.id; | |
21 | } | |
22 | ||
23 | public void SetId(String id) { | |
24 | this.id = id; | |
25 | } | |
26 | ||
27 | public Collection<State> getStates() { | |
28 | return this.states; | |
29 | } | |
30 | ||
31 | public void setStates(Collection<State> states) { | |
32 | this.states = states; | |
33 | } | |
34 | ||
35 | public NumCycles getNumCycles() { | |
36 | return this.numCycles; | |
37 | } | |
38 | ||
39 | public void setNumCycles(NumCycles numCycles) { | |
40 | this.numCycles = numCycles; | |
41 | } | |
42 | ||
43 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
44 | org.w3c.dom.Element element = xmlDocument.createElement("StyleBlinker"); | |
45 | if (this.id != null) { | |
46 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
47 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
48 | element.appendChild(attribute); | |
49 | } | |
50 | if (this.states != null) { | |
51 | for (State state: this.states) { | |
52 | element.appendChild(state.getElement(xmlDocument)); | |
53 | } | |
54 | } | |
55 | if (this.numCycles != null) { | |
56 | element.appendChild(this.numCycles.getElement(xmlDocument)); | |
57 | } | |
58 | ||
59 | return element; | |
60 | } | |
61 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class StyleMap { | |
5 | ||
6 | private String id; | |
7 | private Collection<Pair> pairs; | |
8 | ||
9 | public StyleMap() { | |
10 | } | |
11 | ||
12 | public StyleMap(String id, Collection<Pair> pairs) { | |
13 | this.id = id; | |
14 | this.pairs = pairs; | |
15 | } | |
16 | ||
17 | public String getId() { | |
18 | return this.id; | |
19 | } | |
20 | ||
21 | public void SetId(String id) { | |
22 | this.id = id; | |
23 | } | |
24 | ||
25 | public Collection<Pair> getPairs() { | |
26 | return this.pairs; | |
27 | } | |
28 | ||
29 | public void setPairs(Collection<Pair> pairs) { | |
30 | this.pairs = pairs; | |
31 | } | |
32 | ||
33 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
34 | org.w3c.dom.Element element = xmlDocument.createElement("StyleMap"); | |
35 | if (this.id != null) { | |
36 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
37 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
38 | element.appendChild(attribute); | |
39 | } | |
40 | if (this.pairs != null) { | |
41 | for (Pair pair: this.pairs) { | |
42 | element.appendChild(pair.getElement(xmlDocument)); | |
43 | } | |
44 | } | |
45 | ||
46 | return element; | |
47 | } | |
48 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class StyleUrl { | |
3 | ||
4 | private String id; | |
5 | ||
6 | public StyleUrl() { | |
7 | } | |
8 | ||
9 | public StyleUrl(String id) { | |
10 | this.id = id; | |
11 | } | |
12 | ||
13 | public String getId() { | |
14 | return this.id; | |
15 | } | |
16 | ||
17 | public void SetId(String id) { | |
18 | this.id = id; | |
19 | } | |
20 | ||
21 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
22 | org.w3c.dom.Element element = xmlDocument.createElement("styleUrl"); | |
23 | if (this.id != null) { | |
24 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
25 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
26 | element.appendChild(attribute); | |
27 | } | |
28 | ||
29 | return element; | |
30 | } | |
31 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Tessellate { | |
3 | ||
4 | private String tessellate; | |
5 | private String id; | |
6 | ||
7 | public Tessellate() { | |
8 | } | |
9 | ||
10 | public Tessellate(String tessellate, String id) { | |
11 | this.tessellate = tessellate; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getTessellate() { | |
16 | return this.tessellate; | |
17 | } | |
18 | ||
19 | public void SetTessellate(String tessellate) { | |
20 | this.tessellate = tessellate; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("tessellate"); | |
33 | if (this.tessellate != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.tessellate)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class TexMat { | |
3 | ||
4 | private String texMat; | |
5 | private String id; | |
6 | ||
7 | public TexMat() { | |
8 | } | |
9 | ||
10 | public TexMat(String texMat, String id) { | |
11 | this.texMat = texMat; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getTexMat() { | |
16 | return this.texMat; | |
17 | } | |
18 | ||
19 | public void SetTexMat(String texMat) { | |
20 | this.texMat = texMat; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("texMat"); | |
33 | if (this.texMat != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.texMat)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Text { | |
3 | ||
4 | private String text; | |
5 | private String id; | |
6 | ||
7 | public Text() { | |
8 | } | |
9 | ||
10 | public Text(String text, String id) { | |
11 | this.text = text; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getText() { | |
16 | return this.text; | |
17 | } | |
18 | ||
19 | public void SetText(String text) { | |
20 | this.text = text; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("text"); | |
33 | if (this.text != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.text)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Theme { | |
3 | ||
4 | private String id; | |
5 | ||
6 | public Theme() { | |
7 | } | |
8 | ||
9 | public Theme(String id) { | |
10 | this.id = id; | |
11 | } | |
12 | ||
13 | public String getId() { | |
14 | return this.id; | |
15 | } | |
16 | ||
17 | public void SetId(String id) { | |
18 | this.id = id; | |
19 | } | |
20 | ||
21 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
22 | org.w3c.dom.Element element = xmlDocument.createElement("Theme"); | |
23 | if (this.id != null) { | |
24 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
25 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
26 | element.appendChild(attribute); | |
27 | } | |
28 | ||
29 | return element; | |
30 | } | |
31 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class ThemePalette { | |
3 | ||
4 | private String id; | |
5 | ||
6 | public ThemePalette() { | |
7 | } | |
8 | ||
9 | public ThemePalette(String id) { | |
10 | this.id = id; | |
11 | } | |
12 | ||
13 | public String getId() { | |
14 | return this.id; | |
15 | } | |
16 | ||
17 | public void SetId(String id) { | |
18 | this.id = id; | |
19 | } | |
20 | ||
21 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
22 | org.w3c.dom.Element element = xmlDocument.createElement("ThemePalette"); | |
23 | if (this.id != null) { | |
24 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
25 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
26 | element.appendChild(attribute); | |
27 | } | |
28 | ||
29 | return element; | |
30 | } | |
31 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Tilt { | |
3 | ||
4 | private String tilt; | |
5 | private String id; | |
6 | ||
7 | public Tilt() { | |
8 | } | |
9 | ||
10 | public Tilt(String tilt, String id) { | |
11 | this.tilt = tilt; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getTilt() { | |
16 | return this.tilt; | |
17 | } | |
18 | ||
19 | public void SetTilt(String tilt) { | |
20 | this.tilt = tilt; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("tilt"); | |
33 | if (this.tilt != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.tilt)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Time { | |
3 | ||
4 | private String id; | |
5 | ||
6 | public Time() { | |
7 | } | |
8 | ||
9 | public Time(String id) { | |
10 | this.id = id; | |
11 | } | |
12 | ||
13 | public String getId() { | |
14 | return this.id; | |
15 | } | |
16 | ||
17 | public void SetId(String id) { | |
18 | this.id = id; | |
19 | } | |
20 | ||
21 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
22 | org.w3c.dom.Element element = xmlDocument.createElement("Time"); | |
23 | if (this.id != null) { | |
24 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
25 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
26 | element.appendChild(attribute); | |
27 | } | |
28 | ||
29 | return element; | |
30 | } | |
31 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class TimeInstant { | |
5 | ||
6 | private String id; | |
7 | private Collection<TimePosition> timePositions; | |
8 | ||
9 | public TimeInstant() { | |
10 | } | |
11 | ||
12 | public TimeInstant(String id, Collection<TimePosition> timePositions) { | |
13 | this.id = id; | |
14 | this.timePositions = timePositions; | |
15 | } | |
16 | ||
17 | public String getId() { | |
18 | return this.id; | |
19 | } | |
20 | ||
21 | public void SetId(String id) { | |
22 | this.id = id; | |
23 | } | |
24 | ||
25 | public Collection<TimePosition> getTimePositions() { | |
26 | return this.timePositions; | |
27 | } | |
28 | ||
29 | public void setTimePositions(Collection<TimePosition> timePositions) { | |
30 | this.timePositions = timePositions; | |
31 | } | |
32 | ||
33 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
34 | org.w3c.dom.Element element = xmlDocument.createElement("TimeInstant"); | |
35 | if (this.id != null) { | |
36 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
37 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
38 | element.appendChild(attribute); | |
39 | } | |
40 | if (this.timePositions != null) { | |
41 | for (TimePosition timePosition: this.timePositions) { | |
42 | element.appendChild(timePosition.getElement(xmlDocument)); | |
43 | } | |
44 | } | |
45 | ||
46 | return element; | |
47 | } | |
48 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class TimePeriod { | |
3 | ||
4 | private String id; | |
5 | private Begin begin; | |
6 | private End end; | |
7 | ||
8 | public TimePeriod() { | |
9 | } | |
10 | ||
11 | public TimePeriod(String id, Begin begin, End end) { | |
12 | this.id = id; | |
13 | this.begin = begin; | |
14 | this.end = end; | |
15 | } | |
16 | ||
17 | public String getId() { | |
18 | return this.id; | |
19 | } | |
20 | ||
21 | public void SetId(String id) { | |
22 | this.id = id; | |
23 | } | |
24 | ||
25 | public Begin getBegin() { | |
26 | return this.begin; | |
27 | } | |
28 | ||
29 | public void setBegin(Begin begin) { | |
30 | this.begin = begin; | |
31 | } | |
32 | ||
33 | public End getEnd() { | |
34 | return this.end; | |
35 | } | |
36 | ||
37 | public void setEnd(End end) { | |
38 | this.end = end; | |
39 | } | |
40 | ||
41 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
42 | org.w3c.dom.Element element = xmlDocument.createElement("TimePeriod"); | |
43 | if (this.id != null) { | |
44 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
45 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
46 | element.appendChild(attribute); | |
47 | } | |
48 | if (this.begin != null) { | |
49 | element.appendChild(this.begin.getElement(xmlDocument)); | |
50 | } | |
51 | if (this.end != null) { | |
52 | element.appendChild(this.end.getElement(xmlDocument)); | |
53 | } | |
54 | ||
55 | return element; | |
56 | } | |
57 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class TimePosition { | |
3 | ||
4 | private String timePosition; | |
5 | private String id; | |
6 | ||
7 | public TimePosition() { | |
8 | } | |
9 | ||
10 | public TimePosition(String timePosition, String id) { | |
11 | this.timePosition = timePosition; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getTimePosition() { | |
16 | return this.timePosition; | |
17 | } | |
18 | ||
19 | public void SetTimePosition(String timePosition) { | |
20 | this.timePosition = timePosition; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("timePosition"); | |
33 | if (this.timePosition != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.timePosition)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Type { | |
3 | ||
4 | private String type; | |
5 | private String id; | |
6 | ||
7 | public Type() { | |
8 | } | |
9 | ||
10 | public Type(String type, String id) { | |
11 | this.type = type; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getType() { | |
16 | return this.type; | |
17 | } | |
18 | ||
19 | public void SetType(String type) { | |
20 | this.type = type; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("type"); | |
33 | if (this.type != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.type)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | import java.util.Collection; | |
3 | ||
4 | public class Url { | |
5 | ||
6 | private String id; | |
7 | private Collection<Href> hrefs; | |
8 | private RefreshInterval refreshInterval; | |
9 | private RefreshMode refreshMode; | |
10 | private ViewFormat viewFormat; | |
11 | private ViewRefreshMode viewRefreshMode; | |
12 | private ViewRefreshTime viewRefreshTime; | |
13 | ||
14 | public Url() { | |
15 | } | |
16 | ||
17 | public Url(String id, Collection<Href> hrefs, RefreshInterval refreshInterval, RefreshMode refreshMode, ViewFormat viewFormat, ViewRefreshMode viewRefreshMode, ViewRefreshTime viewRefreshTime) { | |
18 | this.id = id; | |
19 | this.hrefs = hrefs; | |
20 | this.refreshInterval = refreshInterval; | |
21 | this.refreshMode = refreshMode; | |
22 | this.viewFormat = viewFormat; | |
23 | this.viewRefreshMode = viewRefreshMode; | |
24 | this.viewRefreshTime = viewRefreshTime; | |
25 | } | |
26 | ||
27 | public String getId() { | |
28 | return this.id; | |
29 | } | |
30 | ||
31 | public void SetId(String id) { | |
32 | this.id = id; | |
33 | } | |
34 | ||
35 | public Collection<Href> getHrefs() { | |
36 | return this.hrefs; | |
37 | } | |
38 | ||
39 | public void setHrefs(Collection<Href> hrefs) { | |
40 | this.hrefs = hrefs; | |
41 | } | |
42 | ||
43 | public RefreshInterval getRefreshInterval() { | |
44 | return this.refreshInterval; | |
45 | } | |
46 | ||
47 | public void setRefreshInterval(RefreshInterval refreshInterval) { | |
48 | this.refreshInterval = refreshInterval; | |
49 | } | |
50 | ||
51 | public RefreshMode getRefreshMode() { | |
52 | return this.refreshMode; | |
53 | } | |
54 | ||
55 | public void setRefreshMode(RefreshMode refreshMode) { | |
56 | this.refreshMode = refreshMode; | |
57 | } | |
58 | ||
59 | public ViewFormat getViewFormat() { | |
60 | return this.viewFormat; | |
61 | } | |
62 | ||
63 | public void setViewFormat(ViewFormat viewFormat) { | |
64 | this.viewFormat = viewFormat; | |
65 | } | |
66 | ||
67 | public ViewRefreshMode getViewRefreshMode() { | |
68 | return this.viewRefreshMode; | |
69 | } | |
70 | ||
71 | public void setViewRefreshMode(ViewRefreshMode viewRefreshMode) { | |
72 | this.viewRefreshMode = viewRefreshMode; | |
73 | } | |
74 | ||
75 | public ViewRefreshTime getViewRefreshTime() { | |
76 | return this.viewRefreshTime; | |
77 | } | |
78 | ||
79 | public void setViewRefreshTime(ViewRefreshTime viewRefreshTime) { | |
80 | this.viewRefreshTime = viewRefreshTime; | |
81 | } | |
82 | ||
83 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
84 | org.w3c.dom.Element element = xmlDocument.createElement("Url"); | |
85 | if (this.id != null) { | |
86 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
87 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
88 | element.appendChild(attribute); | |
89 | } | |
90 | if (this.hrefs != null) { | |
91 | for (Href href: this.hrefs) { | |
92 | element.appendChild(href.getElement(xmlDocument)); | |
93 | } | |
94 | } | |
95 | if (this.refreshInterval != null) { | |
96 | element.appendChild(this.refreshInterval.getElement(xmlDocument)); | |
97 | } | |
98 | if (this.refreshMode != null) { | |
99 | element.appendChild(this.refreshMode.getElement(xmlDocument)); | |
100 | } | |
101 | if (this.viewFormat != null) { | |
102 | element.appendChild(this.viewFormat.getElement(xmlDocument)); | |
103 | } | |
104 | if (this.viewRefreshMode != null) { | |
105 | element.appendChild(this.viewRefreshMode.getElement(xmlDocument)); | |
106 | } | |
107 | if (this.viewRefreshTime != null) { | |
108 | element.appendChild(this.viewRefreshTime.getElement(xmlDocument)); | |
109 | } | |
110 | ||
111 | return element; | |
112 | } | |
113 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class View { | |
3 | ||
4 | private String view; | |
5 | private String id; | |
6 | ||
7 | public View() { | |
8 | } | |
9 | ||
10 | public View(String view, String id) { | |
11 | this.view = view; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getView() { | |
16 | return this.view; | |
17 | } | |
18 | ||
19 | public void SetView(String view) { | |
20 | this.view = view; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("View"); | |
33 | if (this.view != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.view)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class ViewBoundScale { | |
3 | ||
4 | private String id; | |
5 | ||
6 | public ViewBoundScale() { | |
7 | } | |
8 | ||
9 | public ViewBoundScale(String id) { | |
10 | this.id = id; | |
11 | } | |
12 | ||
13 | public String getId() { | |
14 | return this.id; | |
15 | } | |
16 | ||
17 | public void SetId(String id) { | |
18 | this.id = id; | |
19 | } | |
20 | ||
21 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
22 | org.w3c.dom.Element element = xmlDocument.createElement("viewBoundScale"); | |
23 | if (this.id != null) { | |
24 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
25 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
26 | element.appendChild(attribute); | |
27 | } | |
28 | ||
29 | return element; | |
30 | } | |
31 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class ViewFormat { | |
3 | ||
4 | private String viewFormat; | |
5 | private String id; | |
6 | ||
7 | public ViewFormat() { | |
8 | } | |
9 | ||
10 | public ViewFormat(String viewFormat, String id) { | |
11 | this.viewFormat = viewFormat; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getViewFormat() { | |
16 | return this.viewFormat; | |
17 | } | |
18 | ||
19 | public void SetViewFormat(String viewFormat) { | |
20 | this.viewFormat = viewFormat; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("viewFormat"); | |
33 | if (this.viewFormat != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.viewFormat)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class ViewRefreshMode { | |
3 | ||
4 | private String viewRefreshMode; | |
5 | private String id; | |
6 | ||
7 | public ViewRefreshMode() { | |
8 | } | |
9 | ||
10 | public ViewRefreshMode(String viewRefreshMode, String id) { | |
11 | this.viewRefreshMode = viewRefreshMode; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getViewRefreshMode() { | |
16 | return this.viewRefreshMode; | |
17 | } | |
18 | ||
19 | public void SetViewRefreshMode(String viewRefreshMode) { | |
20 | this.viewRefreshMode = viewRefreshMode; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("viewRefreshMode"); | |
33 | if (this.viewRefreshMode != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.viewRefreshMode)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class ViewRefreshTime { | |
3 | ||
4 | private String viewRefreshTime; | |
5 | private String id; | |
6 | ||
7 | public ViewRefreshTime() { | |
8 | } | |
9 | ||
10 | public ViewRefreshTime(String viewRefreshTime, String id) { | |
11 | this.viewRefreshTime = viewRefreshTime; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getViewRefreshTime() { | |
16 | return this.viewRefreshTime; | |
17 | } | |
18 | ||
19 | public void SetViewRefreshTime(String viewRefreshTime) { | |
20 | this.viewRefreshTime = viewRefreshTime; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("viewRefreshTime"); | |
33 | if (this.viewRefreshTime != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.viewRefreshTime)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Visibility { | |
3 | ||
4 | private String visibility; | |
5 | private String id; | |
6 | ||
7 | public Visibility() { | |
8 | } | |
9 | ||
10 | public Visibility(String visibility, String id) { | |
11 | this.visibility = visibility; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getVisibility() { | |
16 | return this.visibility; | |
17 | } | |
18 | ||
19 | public void SetVisibility(String visibility) { | |
20 | this.visibility = visibility; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("visibility"); | |
33 | if (this.visibility != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.visibility)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class W { | |
3 | ||
4 | private String w; | |
5 | private String id; | |
6 | ||
7 | public W() { | |
8 | } | |
9 | ||
10 | public W(String w, String id) { | |
11 | this.w = w; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getW() { | |
16 | return this.w; | |
17 | } | |
18 | ||
19 | public void SetW(String w) { | |
20 | this.w = w; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("w"); | |
33 | if (this.w != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.w)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class West { | |
3 | ||
4 | private String west; | |
5 | private String id; | |
6 | ||
7 | public West() { | |
8 | } | |
9 | ||
10 | public West(String west, String id) { | |
11 | this.west = west; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getWest() { | |
16 | return this.west; | |
17 | } | |
18 | ||
19 | public void SetWest(String west) { | |
20 | this.west = west; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("west"); | |
33 | if (this.west != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.west)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Width { | |
3 | ||
4 | private String width; | |
5 | private String id; | |
6 | ||
7 | public Width() { | |
8 | } | |
9 | ||
10 | public Width(String width, String id) { | |
11 | this.width = width; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getWidth() { | |
16 | return this.width; | |
17 | } | |
18 | ||
19 | public void SetWidth(String width) { | |
20 | this.width = width; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("width"); | |
33 | if (this.width != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.width)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class X { | |
3 | ||
4 | private String x; | |
5 | private String id; | |
6 | ||
7 | public X() { | |
8 | } | |
9 | ||
10 | public X(String x, String id) { | |
11 | this.x = x; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getX() { | |
16 | return this.x; | |
17 | } | |
18 | ||
19 | public void SetX(String x) { | |
20 | this.x = x; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("x"); | |
33 | if (this.x != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.x)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.modelgenerated; | |
1 | ||
2 | public class Y { | |
3 | ||
4 | private String y; | |
5 | private String id; | |
6 | ||
7 | public Y() { | |
8 | } | |
9 | ||
10 | public Y(String y, String id) { | |
11 | this.y = y; | |
12 | this.id = id; | |
13 | } | |
14 | ||
15 | public String getY() { | |
16 | return this.y; | |
17 | } | |
18 | ||
19 | public void SetY(String y) { | |
20 | this.y = y; | |
21 | } | |
22 | ||
23 | public String getId() { | |
24 | return this.id; | |
25 | } | |
26 | ||
27 | public void SetId(String id) { | |
28 | this.id = id; | |
29 | } | |
30 | ||
31 | public org.w3c.dom.Element getElement(org.w3c.dom.Document xmlDocument) { | |
32 | org.w3c.dom.Element element = xmlDocument.createElement("y"); | |
33 | if (this.y != null) { | |
34 | element.appendChild(xmlDocument.createCDATASection(this.y)); | |
35 | } | |
36 | if (this.id != null) { | |
37 | org.w3c.dom.Attr attribute = xmlDocument.createAttribute("id"); | |
38 | attribute.appendChild(xmlDocument.createTextNode(this.id.toString())); | |
39 | element.appendChild(attribute); | |
40 | } | |
41 | ||
42 | return element; | |
43 | } | |
44 | } |
0 | package org.boehn.gef.overlays; | |
1 | ||
2 | import java.io.IOException; | |
3 | import java.io.Writer; | |
4 | ||
5 | import org.boehn.gef.BoundingBox; | |
6 | import org.boehn.gef.ModelException; | |
7 | import org.boehn.gef.Model; | |
8 | import org.boehn.gef.ViewPosition; | |
9 | import org.w3c.dom.Document; | |
10 | import org.w3c.dom.Element; | |
11 | import org.xmlpull.v1.XmlSerializer; | |
12 | ||
13 | public class GroundOverlay extends Overlay { | |
14 | ||
15 | private ViewPosition viewPosition; | |
16 | private String color; | |
17 | private BoundingBox boundingBox; | |
18 | ||
19 | public GroundOverlay() {} | |
20 | ||
21 | public BoundingBox getBoundingBox() { | |
22 | return boundingBox; | |
23 | } | |
24 | ||
25 | public void setBoundingBox(BoundingBox boundingBox) { | |
26 | this.boundingBox = boundingBox; | |
27 | } | |
28 | ||
29 | public String getColor() { | |
30 | return color; | |
31 | } | |
32 | ||
33 | public void setColor(String color) { | |
34 | this.color = color; | |
35 | } | |
36 | ||
37 | public ViewPosition getViewPosition() { | |
38 | return viewPosition; | |
39 | } | |
40 | ||
41 | public void setViewPosition(ViewPosition viewPosition) { | |
42 | this.viewPosition = viewPosition; | |
43 | } | |
44 | ||
45 | public void addKml(Element parentElement, Model model, Document xmlDocument) throws ModelException { | |
46 | Element groundOverlayElement = xmlDocument.createElement("GroundOverlay"); | |
47 | ||
48 | if (name != null) { | |
49 | Element nameElement = xmlDocument.createElement("name"); | |
50 | nameElement.appendChild(xmlDocument.createTextNode(name)); | |
51 | groundOverlayElement.appendChild(nameElement); | |
52 | } | |
53 | ||
54 | if (description != null) { | |
55 | Element descriptionElement = xmlDocument.createElement("description"); | |
56 | descriptionElement.appendChild(xmlDocument.createCDATASection(description)); | |
57 | groundOverlayElement.appendChild(descriptionElement); | |
58 | } | |
59 | ||
60 | if (color != null) { | |
61 | Element colorElement = xmlDocument.createElement("color"); | |
62 | colorElement.appendChild(xmlDocument.createTextNode(color)); | |
63 | groundOverlayElement.appendChild(colorElement); | |
64 | } | |
65 | ||
66 | if (viewPosition != null) { | |
67 | viewPosition.addKml(groundOverlayElement, model, xmlDocument); | |
68 | } | |
69 | ||
70 | if (boundingBox != null) { | |
71 | Element latLonBoxElement = xmlDocument.createElement("LatLonBox"); | |
72 | if (boundingBox.getNorth() != null) { | |
73 | Element northElement = xmlDocument.createElement("north"); | |
74 | northElement.appendChild(xmlDocument.createTextNode(boundingBox.getNorth().toString())); | |
75 | latLonBoxElement.appendChild(northElement); | |
76 | } | |
77 | if (boundingBox.getSouth() != null) { | |
78 | Element southElement = xmlDocument.createElement("south"); | |
79 | southElement.appendChild(xmlDocument.createTextNode(boundingBox.getSouth().toString())); | |
80 | latLonBoxElement.appendChild(southElement); | |
81 | } | |
82 | if (boundingBox.getWest() != null) { | |
83 | Element westElement = xmlDocument.createElement("west"); | |
84 | westElement.appendChild(xmlDocument.createTextNode(boundingBox.getWest().toString())); | |
85 | latLonBoxElement.appendChild(westElement); | |
86 | } | |
87 | if (boundingBox.getEast() != null) { | |
88 | Element eastElement = xmlDocument.createElement("east"); | |
89 | eastElement.appendChild(xmlDocument.createTextNode(boundingBox.getEast().toString())); | |
90 | latLonBoxElement.appendChild(eastElement); | |
91 | } | |
92 | ||
93 | if (icon != null) { | |
94 | icon.addKml(groundOverlayElement, model, xmlDocument); | |
95 | } | |
96 | ||
97 | if (drawOrder != null) { | |
98 | Element drawOrderElement = xmlDocument.createElement("drawOrder"); | |
99 | drawOrderElement.appendChild(xmlDocument.createTextNode(drawOrder.toString())); | |
100 | groundOverlayElement.appendChild(drawOrderElement); | |
101 | } | |
102 | ||
103 | if (visibility != null) { | |
104 | Element visibilityElement = xmlDocument.createElement("visibility"); | |
105 | visibilityElement.appendChild(xmlDocument.createTextNode((visibility) ? "1" : "0")); | |
106 | groundOverlayElement.appendChild(visibilityElement); | |
107 | } | |
108 | groundOverlayElement.appendChild(latLonBoxElement); | |
109 | } | |
110 | ||
111 | parentElement.appendChild(groundOverlayElement); | |
112 | } | |
113 | ||
114 | public void addKmlXPP(Model model, XmlSerializer serializer) { | |
115 | // TODO Auto-generated method stub | |
116 | ||
117 | } | |
118 | ||
119 | public void addKmlDirect(Model model, Writer writer) throws IOException { | |
120 | // TODO Auto-generated method stub | |
121 | ||
122 | } | |
123 | ||
124 | ||
125 | } |
0 | package org.boehn.gef.overlays; | |
1 | ||
2 | import org.boehn.gef.ModelException; | |
3 | import org.boehn.gef.Model; | |
4 | import org.w3c.dom.Document; | |
5 | import org.w3c.dom.Element; | |
6 | ||
7 | public class Icon { | |
8 | ||
9 | private String url; | |
10 | private Integer x; | |
11 | private Integer y; | |
12 | private Integer width; | |
13 | private Integer height; | |
14 | ||
15 | public Icon() {} | |
16 | ||
17 | public Icon(String url) { | |
18 | this.url = url; | |
19 | } | |
20 | ||
21 | public Icon(String url, Integer x, Integer y, Integer width, Integer height) { | |
22 | this.url = url; | |
23 | this.x = x; | |
24 | this.y = y; | |
25 | this.width = width; | |
26 | this.height = height; | |
27 | } | |
28 | ||
29 | public Integer getHeight() { | |
30 | return height; | |
31 | } | |
32 | ||
33 | public void setHeight(Integer height) { | |
34 | this.height = height; | |
35 | } | |
36 | ||
37 | public String getUrl() { | |
38 | return url; | |
39 | } | |
40 | ||
41 | public void setUrl(String url) { | |
42 | this.url = url; | |
43 | } | |
44 | ||
45 | public Integer getWidth() { | |
46 | return width; | |
47 | } | |
48 | ||
49 | public void setWidth(Integer width) { | |
50 | this.width = width; | |
51 | } | |
52 | ||
53 | public Integer getX() { | |
54 | return x; | |
55 | } | |
56 | ||
57 | public void setX(Integer x) { | |
58 | this.x = x; | |
59 | } | |
60 | ||
61 | public Integer getY() { | |
62 | return y; | |
63 | } | |
64 | ||
65 | public void setY(Integer y) { | |
66 | this.y = y; | |
67 | } | |
68 | ||
69 | public void addKml(Element parentElement, Model model, Document xmlDocument) throws ModelException { | |
70 | Element iconElement = xmlDocument.createElement("Icon"); | |
71 | ||
72 | if (url != null) { | |
73 | Element urlElement = xmlDocument.createElement("href"); | |
74 | urlElement.appendChild(xmlDocument.createTextNode(url)); | |
75 | iconElement.appendChild(urlElement); | |
76 | } | |
77 | ||
78 | if (x != null) { | |
79 | Element xElement = xmlDocument.createElement("x"); | |
80 | xElement.appendChild(xmlDocument.createTextNode(x.toString())); | |
81 | iconElement.appendChild(xElement); | |
82 | } | |
83 | ||
84 | if (y != null) { | |
85 | Element yElement = xmlDocument.createElement("y"); | |
86 | yElement.appendChild(xmlDocument.createTextNode(y.toString())); | |
87 | iconElement.appendChild(yElement); | |
88 | } | |
89 | ||
90 | if (width != null) { | |
91 | Element widthElement = xmlDocument.createElement("w"); | |
92 | widthElement.appendChild(xmlDocument.createTextNode(width.toString())); | |
93 | iconElement.appendChild(widthElement); | |
94 | } | |
95 | ||
96 | if (height != null) { | |
97 | Element heightElement = xmlDocument.createElement("h"); | |
98 | heightElement.appendChild(xmlDocument.createTextNode(height.toString())); | |
99 | iconElement.appendChild(heightElement); | |
100 | } | |
101 | ||
102 | parentElement.appendChild(iconElement); | |
103 | } | |
104 | ||
105 | } |
0 | package org.boehn.gef.overlays; | |
1 | ||
2 | import org.boehn.gef.ModelElement; | |
3 | ||
4 | public abstract class Overlay implements ModelElement { | |
5 | ||
6 | protected String name; | |
7 | protected String description; | |
8 | protected Icon icon; | |
9 | protected Integer drawOrder; | |
10 | protected Boolean visibility; | |
11 | ||
12 | public String getDescription() { | |
13 | return description; | |
14 | } | |
15 | ||
16 | public void setDescription(String description) { | |
17 | this.description = description; | |
18 | } | |
19 | ||
20 | public Integer getDrawOrder() { | |
21 | return drawOrder; | |
22 | } | |
23 | ||
24 | public void setDrawOrder(Integer drawOrder) { | |
25 | this.drawOrder = drawOrder; | |
26 | } | |
27 | ||
28 | public Icon getIcon() { | |
29 | return icon; | |
30 | } | |
31 | ||
32 | public void setIcon(Icon icon) { | |
33 | this.icon = icon; | |
34 | } | |
35 | ||
36 | public String getName() { | |
37 | return name; | |
38 | } | |
39 | ||
40 | public void setName(String name) { | |
41 | this.name = name; | |
42 | } | |
43 | ||
44 | public Boolean getVisibility() { | |
45 | return visibility; | |
46 | } | |
47 | ||
48 | public void setVisibility(Boolean visibility) { | |
49 | this.visibility = visibility; | |
50 | } | |
51 | ||
52 | } |
0 | package org.boehn.gef.overlays; | |
1 | ||
2 | public class OverlayXY extends ScreenOverlayUnitsCapsule { | |
3 | ||
4 | public OverlayXY(Double x, Double y, Units xUnits, Units yUnits) { | |
5 | super("overlayXY", x, y, xUnits, yUnits); | |
6 | } | |
7 | } |
0 | package org.boehn.gef.overlays; | |
1 | ||
2 | import java.io.IOException; | |
3 | import java.io.Writer; | |
4 | ||
5 | import org.boehn.gef.ModelException; | |
6 | import org.boehn.gef.Model; | |
7 | import org.w3c.dom.Document; | |
8 | import org.w3c.dom.Element; | |
9 | import org.xmlpull.v1.XmlSerializer; | |
10 | ||
11 | public class ScreenOverlay extends Overlay { | |
12 | ||
13 | private OverlayXY overlayXY; | |
14 | private ScreenXY screenXY; | |
15 | private Size size; | |
16 | private Double rotation; | |
17 | ||
18 | public ScreenOverlay() {} | |
19 | ||
20 | public ScreenOverlayUnitsCapsule getOverlayXY() { | |
21 | return overlayXY; | |
22 | } | |
23 | ||
24 | public Double getRotation() { | |
25 | return rotation; | |
26 | } | |
27 | ||
28 | public void setRotation(Double rotation) { | |
29 | this.rotation = rotation; | |
30 | } | |
31 | ||
32 | public ScreenXY getScreenXY() { | |
33 | return screenXY; | |
34 | } | |
35 | ||
36 | public void setScreenXY(ScreenXY screenXY) { | |
37 | this.screenXY = screenXY; | |
38 | } | |
39 | ||
40 | public Size getSize() { | |
41 | return size; | |
42 | } | |
43 | ||
44 | public void setSize(Size size) { | |
45 | this.size = size; | |
46 | } | |
47 | ||
48 | public void setOverlayXY(OverlayXY overlayXY) { | |
49 | this.overlayXY = overlayXY; | |
50 | } | |
51 | ||
52 | public void addKml(Element parentElement, Model model, Document xmlDocument) throws ModelException { | |
53 | Element screenOverlayElement = xmlDocument.createElement("ScreenOverlay"); | |
54 | ||
55 | if (name != null) { | |
56 | Element nameElement = xmlDocument.createElement("name"); | |
57 | nameElement.appendChild(xmlDocument.createTextNode(name)); | |
58 | screenOverlayElement.appendChild(nameElement); | |
59 | } | |
60 | ||
61 | if (description != null) { | |
62 | Element descriptionElement = xmlDocument.createElement("description"); | |
63 | descriptionElement.appendChild(xmlDocument.createCDATASection(description)); | |
64 | screenOverlayElement.appendChild(descriptionElement); | |
65 | } | |
66 | ||
67 | if (rotation != null) { | |
68 | Element rotationElement = xmlDocument.createElement("rotation"); | |
69 | rotationElement.appendChild(xmlDocument.createTextNode(rotation.toString())); | |
70 | screenOverlayElement.appendChild(rotationElement); | |
71 | } | |
72 | ||
73 | if (overlayXY != null) { | |
74 | overlayXY.addKml(screenOverlayElement, model, xmlDocument); | |
75 | } | |
76 | ||
77 | if (screenXY != null) { | |
78 | screenXY.addKml(screenOverlayElement, model, xmlDocument); | |
79 | } | |
80 | ||
81 | if (size != null) { | |
82 | size.addKml(screenOverlayElement, model, xmlDocument); | |
83 | } | |
84 | ||
85 | if (icon != null) { | |
86 | icon.addKml(screenOverlayElement, model, xmlDocument); | |
87 | } | |
88 | ||
89 | if (drawOrder != null) { | |
90 | Element drawOrderElement = xmlDocument.createElement("drawOrder"); | |
91 | drawOrderElement.appendChild(xmlDocument.createTextNode(drawOrder.toString())); | |
92 | screenOverlayElement.appendChild(drawOrderElement); | |
93 | } | |
94 | ||
95 | if (visibility != null) { | |
96 | Element visibilityElement = xmlDocument.createElement("visibility"); | |
97 | visibilityElement.appendChild(xmlDocument.createTextNode((visibility) ? "1" : "0")); | |
98 | screenOverlayElement.appendChild(visibilityElement); | |
99 | } | |
100 | ||
101 | parentElement.appendChild(screenOverlayElement); | |
102 | } | |
103 | ||
104 | public void addKmlXPP(Model model, XmlSerializer serializer) { | |
105 | // TODO Auto-generated method stub | |
106 | ||
107 | } | |
108 | ||
109 | public void addKmlDirect(Model model, Writer writer) throws IOException { | |
110 | // TODO Auto-generated method stub | |
111 | ||
112 | } | |
113 | ||
114 | } |
0 | package org.boehn.gef.overlays; | |
1 | ||
2 | import org.boehn.gef.ModelException; | |
3 | import org.boehn.gef.Model; | |
4 | import org.w3c.dom.Document; | |
5 | import org.w3c.dom.Element; | |
6 | ||
7 | public abstract class ScreenOverlayUnitsCapsule { | |
8 | ||
9 | private String name; | |
10 | private Double x; | |
11 | private Double y; | |
12 | private Units xUnits; | |
13 | private Units yUnits; | |
14 | ||
15 | public ScreenOverlayUnitsCapsule() {} | |
16 | ||
17 | public ScreenOverlayUnitsCapsule(String name, Double x, Double y, Units xUnits, Units yUnits) { | |
18 | this.name = name; | |
19 | this.x = x; | |
20 | this.y = y; | |
21 | this.xUnits = xUnits; | |
22 | this.yUnits = yUnits; | |
23 | } | |
24 | ||
25 | public String getName() { | |
26 | return name; | |
27 | } | |
28 | ||
29 | public void setName(String name) { | |
30 | this.name = name; | |
31 | } | |
32 | ||
33 | public Double getX() { | |
34 | return x; | |
35 | } | |
36 | ||
37 | public void setX(Double x) { | |
38 | this.x = x; | |
39 | } | |
40 | ||
41 | public Units getXUnits() { | |
42 | return xUnits; | |
43 | } | |
44 | ||
45 | public void setXUnits(Units units) { | |
46 | xUnits = units; | |
47 | } | |
48 | ||
49 | public Double getY() { | |
50 | return y; | |
51 | } | |
52 | ||
53 | public void setY(Double y) { | |
54 | this.y = y; | |
55 | } | |
56 | ||
57 | public Units getYUnits() { | |
58 | return yUnits; | |
59 | } | |
60 | ||
61 | public void setYUnits(Units units) { | |
62 | yUnits = units; | |
63 | } | |
64 | ||
65 | public void addKml(Element parentElement, Model model, Document xmlDocument) throws ModelException { | |
66 | Element element = xmlDocument.createElement(name); | |
67 | if (x != null) { | |
68 | element.setAttribute("x", x.toString()); | |
69 | } | |
70 | if (y != null) { | |
71 | element.setAttribute("y", y.toString()); | |
72 | } | |
73 | if (xUnits != null) { | |
74 | element.setAttribute("xunits", xUnits.toString()); | |
75 | } | |
76 | if (yUnits != null) { | |
77 | element.setAttribute("yunits", yUnits.toString()); | |
78 | } | |
79 | parentElement.appendChild(element); | |
80 | } | |
81 | ||
82 | }⏎ |
0 | package org.boehn.gef.overlays; | |
1 | ||
2 | public class ScreenXY extends ScreenOverlayUnitsCapsule { | |
3 | ||
4 | public ScreenXY(Double x, Double y, Units xUnits, Units yUnits) { | |
5 | super("screenXY", x, y, xUnits, yUnits); | |
6 | } | |
7 | } |
0 | package org.boehn.gef.overlays; | |
1 | ||
2 | public class Size extends ScreenOverlayUnitsCapsule { | |
3 | ||
4 | public Size(Double x, Double y, Units xUnits, Units yUnits) { | |
5 | super("size", x, y, xUnits, yUnits); | |
6 | } | |
7 | } |
0 | package org.boehn.gef.servlet; | |
1 | ||
2 | import java.io.IOException; | |
3 | import java.util.StringTokenizer; | |
4 | ||
5 | import javax.servlet.ServletOutputStream; | |
6 | import javax.servlet.http.HttpServletRequest; | |
7 | import javax.servlet.http.HttpServletResponse; | |
8 | import javax.xml.parsers.DocumentBuilderFactory; | |
9 | import javax.xml.parsers.ParserConfigurationException; | |
10 | ||
11 | import org.boehn.gef.BoundingBox; | |
12 | import org.boehn.gef.ModelElement; | |
13 | import org.boehn.gef.ModelException; | |
14 | import org.boehn.gef.Model; | |
15 | import org.boehn.gef.ViewPosition; | |
16 | import org.boehn.gef.style.Style; | |
17 | import org.w3c.dom.Document; | |
18 | import org.w3c.dom.Element; | |
19 | ||
20 | public class HttpServletModel extends Model { | |
21 | ||
22 | private NetworkLinkControl networkLinkControl; | |
23 | private String baseUrl; | |
24 | private HttpServletRequest request; | |
25 | private HttpServletResponse response; | |
26 | private String sessionId; | |
27 | ||
28 | public boolean DISABLEHTTPCACHE = true; | |
29 | ||
30 | public HttpServletModel(HttpServletRequest request, HttpServletResponse response) { | |
31 | this(request, response, true); | |
32 | } | |
33 | ||
34 | public HttpServletModel(HttpServletRequest request, HttpServletResponse response, boolean handleTransactions) { | |
35 | this.request = request; | |
36 | this.response = response; | |
37 | if (handleTransactions) { | |
38 | networkLinkControl = new NetworkLinkControl(); | |
39 | networkLinkControl.setCookie("jsessionid=" + request.getSession().getId()); | |
40 | } | |
41 | } | |
42 | ||
43 | ||
44 | public NetworkLinkControl getNetworkLinkControl() { | |
45 | return networkLinkControl; | |
46 | } | |
47 | ||
48 | public void setNetworkLinkControl(NetworkLinkControl networkLinkControl) { | |
49 | this.networkLinkControl = networkLinkControl; | |
50 | } | |
51 | ||
52 | public String getBaseUrl() { | |
53 | if (baseUrl != null) { | |
54 | return baseUrl; | |
55 | } else { | |
56 | return "http://" + request.getLocalName() + ":" + request.getLocalPort() + request.getContextPath(); | |
57 | } | |
58 | } | |
59 | ||
60 | @Override | |
61 | public Observer getObserver() { | |
62 | if (super.getObserver() == null && request != null) { | |
63 | try { | |
64 | // We try to read the parameters from the http get | |
65 | StringTokenizer parameters = new StringTokenizer(request.getParameter("gefObserver"), ","); | |
66 | ||
67 | BoundingBox boundingBox = new BoundingBox(Double.parseDouble(parameters.nextToken().replace(' ', '+')), Double.parseDouble(parameters.nextToken().replace(' ', '+')), Double.parseDouble(parameters.nextToken().replace(' ', '+')), Double.parseDouble(parameters.nextToken().replace(' ', '+'))); | |
68 | ViewPosition viewPosition = new ViewPosition(Double.parseDouble(parameters.nextToken().replace(' ', '+')), Double.parseDouble(parameters.nextToken().replace(' ', '+')), Double.parseDouble(parameters.nextToken().replace(' ', '+')), Double.parseDouble(parameters.nextToken().replace(' ', '+')), Double.parseDouble(parameters.nextToken().replace(' ', '+'))); | |
69 | setObserver(new Observer(boundingBox, viewPosition)); | |
70 | } catch (Exception e) { | |
71 | //log.warn("Could not create observer because of missing information in the http get."); | |
72 | } | |
73 | } | |
74 | return super.getObserver(); | |
75 | } | |
76 | ||
77 | public void setBaseUrl(String baseUrl) { | |
78 | this.baseUrl = baseUrl; | |
79 | } | |
80 | ||
81 | public HttpServletRequest getRequest() { | |
82 | return request; | |
83 | } | |
84 | ||
85 | public void setRequest(HttpServletRequest request) { | |
86 | this.request = request; | |
87 | setObserver(null); | |
88 | } | |
89 | ||
90 | public HttpServletResponse getResponse() { | |
91 | return response; | |
92 | } | |
93 | ||
94 | public void setResponse(HttpServletResponse response) { | |
95 | this.response = response; | |
96 | } | |
97 | ||
98 | public String getSessionId() { | |
99 | return sessionId; | |
100 | } | |
101 | ||
102 | public void setSessionId(String sessionId) { | |
103 | this.sessionId = sessionId; | |
104 | } | |
105 | ||
106 | @Override | |
107 | public Document generateXmlDocument() throws ModelException { | |
108 | Document xmlDocument; | |
109 | try { | |
110 | xmlDocument = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); | |
111 | } catch (ParserConfigurationException e) { | |
112 | throw new ModelException(e); | |
113 | } | |
114 | ||
115 | Element kmlElement = xmlDocument.createElement("kml"); | |
116 | kmlElement.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", "http://earth.google.com/kml/2.0"); | |
117 | xmlDocument.appendChild(kmlElement); | |
118 | ||
119 | if (networkLinkControl != null) { | |
120 | networkLinkControl.addKml(kmlElement, this, xmlDocument); | |
121 | } | |
122 | ||
123 | Element documentElement = xmlDocument.createElement("Document"); | |
124 | kmlElement.appendChild(documentElement); | |
125 | ||
126 | if (getStyles() != null) { | |
127 | for (Style style: getStyles().values()) { | |
128 | style.addKml(documentElement, this, xmlDocument); | |
129 | } | |
130 | } | |
131 | if (getModelElements() != null) { | |
132 | for (ModelElement modelElement: getModelElements()) | |
133 | modelElement.addKml(documentElement, this, xmlDocument); | |
134 | } | |
135 | ||
136 | return xmlDocument; | |
137 | } | |
138 | ||
139 | public void write() throws ModelException, IOException { | |
140 | response.setContentType("text/html"); | |
141 | ||
142 | if (DISABLEHTTPCACHE) { | |
143 | response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 | |
144 | response.setHeader("Pragma","no-cache"); //HTTP 1.0 | |
145 | response.setDateHeader ("Expires", 0); | |
146 | } | |
147 | ||
148 | ServletOutputStream out = response.getOutputStream(); | |
149 | this.write(out); | |
150 | out.close(); | |
151 | } | |
152 | ||
153 | } |
0 | package org.boehn.gef.servlet; | |
1 | ||
2 | import java.io.IOException; | |
3 | import java.io.Writer; | |
4 | ||
5 | import org.boehn.gef.ModelException; | |
6 | import org.boehn.gef.Model; | |
7 | import org.boehn.gef.ModelElement; | |
8 | import org.w3c.dom.Document; | |
9 | import org.w3c.dom.Element; | |
10 | import org.xmlpull.v1.XmlSerializer; | |
11 | ||
12 | public class NetworkLink implements ModelElement { | |
13 | ||
14 | private String name; | |
15 | private Boolean flyToView; | |
16 | private String url; | |
17 | private RefreshModes refreshMode; | |
18 | private Integer refreshInterval; | |
19 | private ViewRefreshModes viewRefreshMode; | |
20 | private Integer viewRefreshTime; | |
21 | private String viewFormat; | |
22 | private Boolean refreshVisibility; | |
23 | private Boolean open; | |
24 | ||
25 | public NetworkLink() { | |
26 | // We set the default values | |
27 | viewFormat = "gefObserver=[bboxNorth],[bboxEast],[bboxSouth],[bboxWest],[lookatLat],[lookatLon],[lookatRange],[lookatTilt],[lookatHeading]"; | |
28 | refreshMode = RefreshModes.once; | |
29 | viewRefreshMode = ViewRefreshModes.onStop; | |
30 | viewRefreshTime = 0; | |
31 | open = true; | |
32 | } | |
33 | ||
34 | public NetworkLink(String url, String name) { | |
35 | this(); | |
36 | this.url = url; | |
37 | this.name = name; | |
38 | } | |
39 | ||
40 | public Boolean getFlyToView() { | |
41 | return flyToView; | |
42 | } | |
43 | ||
44 | public void setFlyToView(Boolean flyToView) { | |
45 | this.flyToView = flyToView; | |
46 | } | |
47 | ||
48 | public String getName() { | |
49 | return name; | |
50 | } | |
51 | ||
52 | public void setName(String name) { | |
53 | this.name = name; | |
54 | } | |
55 | ||
56 | public RefreshModes getRefreshMode() { | |
57 | return refreshMode; | |
58 | } | |
59 | ||
60 | public void setRefreshMode(RefreshModes refreshMode) { | |
61 | this.refreshMode = refreshMode; | |
62 | } | |
63 | ||
64 | public Integer getRefreshInterval() { | |
65 | return refreshInterval; | |
66 | } | |
67 | ||
68 | public void setRefreshInterval(Integer refreshInterval) { | |
69 | this.refreshInterval = refreshInterval; | |
70 | } | |
71 | ||
72 | public String getUrl() { | |
73 | return url; | |
74 | } | |
75 | ||
76 | public void setUrl(String url) { | |
77 | this.url = url; | |
78 | } | |
79 | ||
80 | public String getViewFormat() { | |
81 | return viewFormat; | |
82 | } | |
83 | ||
84 | public void setViewFormat(String viewFormat) { | |
85 | this.viewFormat = viewFormat; | |
86 | } | |
87 | ||
88 | public ViewRefreshModes getViewRefreshMode() { | |
89 | return viewRefreshMode; | |
90 | } | |
91 | ||
92 | public void setViewRefreshMode(ViewRefreshModes viewRefreshMode) { | |
93 | this.viewRefreshMode = viewRefreshMode; | |
94 | } | |
95 | ||
96 | public Integer getViewRefreshTime() { | |
97 | return viewRefreshTime; | |
98 | } | |
99 | ||
100 | public void setViewRefreshTime(Integer viewRefreshTime) { | |
101 | this.viewRefreshTime = viewRefreshTime; | |
102 | } | |
103 | ||
104 | public Boolean getRefreshVisibility() { | |
105 | return refreshVisibility; | |
106 | } | |
107 | ||
108 | public void setRefreshVisibility(Boolean refreshVisibility) { | |
109 | this.refreshVisibility = refreshVisibility; | |
110 | } | |
111 | ||
112 | public Boolean getOpen() { | |
113 | return open; | |
114 | } | |
115 | ||
116 | public void setOpen(Boolean open) { | |
117 | this.open = open; | |
118 | } | |
119 | ||
120 | public static void main(String[] args) throws ModelException, IOException { | |
121 | if (args.length != 3) { | |
122 | System.err.println("Usage: java org.boehn.gef.elements.NetworkLink <url> <name> <destinationFile>"); | |
123 | System.exit(-1); | |
124 | } else { | |
125 | Model model = new Model(); | |
126 | model.add(new NetworkLink(args[0], args[1])); | |
127 | model.write(args[2]); | |
128 | } | |
129 | } | |
130 | ||
131 | public void addKml(Element parentElement, Model model, Document xmlDocument) throws ModelException { | |
132 | ||
133 | Element networkLinkElement = xmlDocument.createElement("NetworkLink"); | |
134 | ||
135 | if (name != null) { | |
136 | Element nameElement = xmlDocument.createElement("name"); | |
137 | nameElement.appendChild(xmlDocument.createTextNode(name)); | |
138 | networkLinkElement.appendChild(nameElement); | |
139 | } | |
140 | ||
141 | if (open != null) { | |
142 | Element openElement = xmlDocument.createElement("open"); | |
143 | openElement.appendChild(xmlDocument.createTextNode((open) ? "1" : "0")); | |
144 | networkLinkElement.appendChild(openElement); | |
145 | } | |
146 | ||
147 | if (flyToView != null) { | |
148 | Element flyToViewElement = xmlDocument.createElement("flyToView"); | |
149 | flyToViewElement.appendChild(xmlDocument.createTextNode((flyToView) ? "1" : "0")); | |
150 | networkLinkElement.appendChild(flyToViewElement); | |
151 | } | |
152 | ||
153 | if (refreshVisibility != null) { | |
154 | Element refreshVisibilityElement = xmlDocument.createElement("refreshVisibility"); | |
155 | refreshVisibilityElement.appendChild(xmlDocument.createTextNode((refreshVisibility) ? "1" : "0")); | |
156 | networkLinkElement.appendChild(refreshVisibilityElement); | |
157 | } | |
158 | ||
159 | if (url != null) { | |
160 | Element urlElement = xmlDocument.createElement("Url"); | |
161 | Element hrefElement = xmlDocument.createElement("href"); | |
162 | hrefElement.appendChild(xmlDocument.createTextNode(url)); | |
163 | urlElement.appendChild(hrefElement); | |
164 | if (refreshMode != null) { | |
165 | Element refreshModeElement = xmlDocument.createElement("refreshMode"); | |
166 | refreshModeElement.appendChild(xmlDocument.createTextNode(refreshMode.toString())); | |
167 | urlElement.appendChild(refreshModeElement); | |
168 | } | |
169 | if (refreshInterval != null) { | |
170 | Element refreshIntervalElement = xmlDocument.createElement("refreshInterval"); | |
171 | refreshIntervalElement.appendChild(xmlDocument.createTextNode(refreshInterval.toString())); | |
172 | urlElement.appendChild(refreshIntervalElement); | |
173 | } | |
174 | if (viewRefreshMode != null) { | |
175 | Element viewRefreshModeElement = xmlDocument.createElement("viewRefreshMode"); | |
176 | viewRefreshModeElement.appendChild(xmlDocument.createTextNode(viewRefreshMode.toString())); | |
177 | urlElement.appendChild(viewRefreshModeElement); | |
178 | } | |
179 | if (viewRefreshTime != null) { | |
180 | Element viewRefreshTimeElement = xmlDocument.createElement("viewRefreshTime"); | |
181 | viewRefreshTimeElement.appendChild(xmlDocument.createTextNode(viewRefreshTime.toString())); | |
182 | urlElement.appendChild(viewRefreshTimeElement); | |
183 | } | |
184 | if (viewFormat != null) { | |
185 | Element viewFormatElement = xmlDocument.createElement("viewFormat"); | |
186 | viewFormatElement.appendChild(xmlDocument.createTextNode(viewFormat)); | |
187 | urlElement.appendChild(viewFormatElement); | |
188 | } | |
189 | networkLinkElement.appendChild(urlElement); | |
190 | } | |
191 | parentElement.appendChild(networkLinkElement); | |
192 | } | |
193 | ||
194 | public void addKmlXPP(Model model, XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException { | |
195 | // TODO Auto-generated method stub | |
196 | ||
197 | } | |
198 | ||
199 | public void addKmlDirect(Model model, Writer writer) throws IOException { | |
200 | // TODO Auto-generated method stub | |
201 | ||
202 | } | |
203 | } |
0 | package org.boehn.gef.servlet; | |
1 | ||
2 | import org.boehn.gef.ModelException; | |
3 | import org.boehn.gef.Model; | |
4 | import org.w3c.dom.Document; | |
5 | import org.w3c.dom.Element; | |
6 | ||
7 | public class NetworkLinkControl { | |
8 | ||
9 | private String message; | |
10 | private String cookie; | |
11 | private String linkName; | |
12 | private String linkDescription; | |
13 | private Integer minRefreshPeriod; | |
14 | ||
15 | public NetworkLinkControl() {} | |
16 | ||
17 | public NetworkLinkControl(String message, String cookie, String linkName, String linkDescription, Integer minRefreshPeriod) { | |
18 | this.message = message; | |
19 | this.cookie = cookie; | |
20 | this.linkName = linkName; | |
21 | this.linkDescription = linkDescription; | |
22 | this.minRefreshPeriod = minRefreshPeriod; | |
23 | } | |
24 | ||
25 | public String getCookie() { | |
26 | return cookie; | |
27 | } | |
28 | ||
29 | public void setCookie(String cookie) { | |
30 | this.cookie = cookie; | |
31 | } | |
32 | ||
33 | public String getLinkDescription() { | |
34 | return linkDescription; | |
35 | } | |
36 | ||
37 | public void setLinkDescription(String linkDescription) { | |
38 | this.linkDescription = linkDescription; | |
39 | } | |
40 | ||
41 | public String getLinkName() { | |
42 | return linkName; | |
43 | } | |
44 | ||
45 | public void setLinkName(String linkName) { | |
46 | this.linkName = linkName; | |
47 | } | |
48 | ||
49 | public String getMessage() { | |
50 | return message; | |
51 | } | |
52 | ||
53 | public void setMessage(String message) { | |
54 | this.message = message; | |
55 | } | |
56 | ||
57 | public Integer getMinRefreshPeriod() { | |
58 | return minRefreshPeriod; | |
59 | } | |
60 | ||
61 | public void setMinRefreshPeriod(Integer minRefreshPeriod) { | |
62 | this.minRefreshPeriod = minRefreshPeriod; | |
63 | } | |
64 | ||
65 | public void addKml(Element parentElement, Model model, Document xmlDocument) throws ModelException { | |
66 | Element networkLinkControlElement = xmlDocument.createElement("NetworkLinkControl"); | |
67 | ||
68 | if (cookie != null) { | |
69 | Element cookieElement = xmlDocument.createElement("cookie"); | |
70 | cookieElement.appendChild(xmlDocument.createCDATASection(cookie)); | |
71 | networkLinkControlElement.appendChild(cookieElement); | |
72 | } | |
73 | ||
74 | if (linkDescription != null) { | |
75 | Element linkDescriptionElement = xmlDocument.createElement("linkDescription"); | |
76 | linkDescriptionElement.appendChild(xmlDocument.createCDATASection(linkDescription)); | |
77 | networkLinkControlElement.appendChild(linkDescriptionElement); | |
78 | } | |
79 | ||
80 | if (linkName != null) { | |
81 | Element linkNameElement = xmlDocument.createElement("linkName"); | |
82 | linkNameElement.appendChild(xmlDocument.createCDATASection(linkName)); | |
83 | networkLinkControlElement.appendChild(linkNameElement); | |
84 | } | |
85 | ||
86 | if (message != null) { | |
87 | Element messageElement = xmlDocument.createElement("message"); | |
88 | messageElement.appendChild(xmlDocument.createCDATASection(message)); | |
89 | networkLinkControlElement.appendChild(messageElement); | |
90 | } | |
91 | ||
92 | if (minRefreshPeriod != null) { | |
93 | Element minRefreshPeriodElement = xmlDocument.createElement("minRefreshPeriod"); | |
94 | minRefreshPeriodElement.appendChild(xmlDocument.createTextNode(minRefreshPeriod.toString())); | |
95 | networkLinkControlElement.appendChild(minRefreshPeriodElement); | |
96 | } | |
97 | parentElement.appendChild(networkLinkControlElement); | |
98 | } | |
99 | ||
100 | } |
0 | package org.boehn.gef.servlet; | |
1 | ||
2 | import org.apache.log4j.Logger; | |
3 | import org.boehn.gef.BoundingBox; | |
4 | import org.boehn.gef.ViewPosition; | |
5 | import org.boehn.gef.coordinates.CartesianCoordinate; | |
6 | import org.boehn.gef.coordinates.EarthCoordinate; | |
7 | ||
8 | public class Observer { | |
9 | ||
10 | private BoundingBox boundingBox; | |
11 | private ViewPosition viewPosition; | |
12 | private CartesianCoordinate observerCoordinate; | |
13 | ||
14 | private static Logger log = Logger.getLogger(Observer.class); | |
15 | ||
16 | public Observer() {} | |
17 | ||
18 | public Observer(BoundingBox boundingBox, ViewPosition viewPosition) { | |
19 | this.boundingBox = boundingBox; | |
20 | this.viewPosition = viewPosition; | |
21 | } | |
22 | ||
23 | public Boolean isVisibleToObserver(EarthCoordinate earthCoordinate) { | |
24 | if (boundingBox != null) { | |
25 | return boundingBox.isInsideBoundingBox(earthCoordinate); | |
26 | } else { | |
27 | return null; | |
28 | } | |
29 | } | |
30 | ||
31 | public Double distanceTo(EarthCoordinate earthCoordinate) { | |
32 | if (earthCoordinate != null) { | |
33 | return distanceTo(earthCoordinate.toCartesianCoordinate()); | |
34 | } else { | |
35 | return null; | |
36 | } | |
37 | } | |
38 | ||
39 | public Double distanceTo(CartesianCoordinate cartesianCoordinate) { | |
40 | if (cartesianCoordinate != null) { | |
41 | return getObserverCoordinate().distanceTo(cartesianCoordinate); | |
42 | } else { | |
43 | return null; | |
44 | } | |
45 | } | |
46 | ||
47 | public CartesianCoordinate getObserverCoordinate() { | |
48 | if (observerCoordinate == null) { | |
49 | ||
50 | if (viewPosition != null && viewPosition.getRange() != null && viewPosition.getTilt() != null && viewPosition.getHeading() != null) { | |
51 | // We make the vector starting in 0,0,0 and going straig up with the length = lookAtRange | |
52 | observerCoordinate = new CartesianCoordinate(0, 0, viewPosition.getRange()); | |
53 | ||
54 | // We rotate the vector around the Z axis to get the correct tilt | |
55 | observerCoordinate.rotateAroundZAxis(viewPosition.getTilt()); | |
56 | ||
57 | // We rotate the vector around the Y axis to get the correct heading | |
58 | observerCoordinate.rotateAroundYAxis(viewPosition.getHeading()); | |
59 | ||
60 | // Now we have our vector finish in the local coordinate system. Now we have to place it out on the earth | |
61 | ||
62 | // First we have to rotate our local coordinate system to the surface of the earth | |
63 | observerCoordinate.rotateAroundZAxis(Math.toRadians(viewPosition.getLatitude())); | |
64 | observerCoordinate.rotateAroundYAxis(Math.toRadians(viewPosition.getLongitude())); | |
65 | ||
66 | // Now our vector has the correct length and direction. We only have to place it out at the lookAt coordinate | |
67 | observerCoordinate.add(new EarthCoordinate(viewPosition.getLatitude(), viewPosition.getLongitude()).toCartesianCoordinate()); | |
68 | } else { | |
69 | log.warn("The observer coordinate is being requested, but the observer has not defined sufficient data for calculating this."); | |
70 | } | |
71 | } | |
72 | return observerCoordinate; | |
73 | } | |
74 | ||
75 | public BoundingBox getBoundingBox() { | |
76 | return boundingBox; | |
77 | } | |
78 | ||
79 | public void setBoundingBox(BoundingBox boundingBox) { | |
80 | this.boundingBox = boundingBox; | |
81 | } | |
82 | ||
83 | public void setViewPosition(ViewPosition viewPosition) { | |
84 | this.viewPosition = viewPosition; | |
85 | observerCoordinate = null; | |
86 | } | |
87 | ||
88 | public ViewPosition getViewPosition() { | |
89 | return viewPosition; | |
90 | } | |
91 | ||
92 | }⏎ |
0 | package org.boehn.gef.servlet.kmz; | |
1 | ||
2 | import java.io.IOException; | |
3 | import javax.servlet.Filter; | |
4 | import javax.servlet.FilterChain; | |
5 | import javax.servlet.FilterConfig; | |
6 | import javax.servlet.ServletException; | |
7 | import javax.servlet.ServletRequest; | |
8 | import javax.servlet.ServletResponse; | |
9 | import javax.servlet.http.HttpServletRequest; | |
10 | import javax.servlet.http.HttpServletResponse; | |
11 | ||
12 | ||
13 | public class KmzFilter implements Filter { | |
14 | ||
15 | public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { | |
16 | if (req instanceof HttpServletRequest) { | |
17 | HttpServletRequest request = (HttpServletRequest) req; | |
18 | HttpServletResponse response = (HttpServletResponse) res; | |
19 | ||
20 | String servletPath = request.getServletPath(); | |
21 | String kmlFileName=""; | |
22 | int extension = servletPath.indexOf("."); | |
23 | if (extension >= 0) { | |
24 | // strip extension so that kmz contains a file ending in kml | |
25 | kmlFileName = servletPath.substring(1, extension) + ".kml"; | |
26 | } | |
27 | KmzResponseWrapper wrappedResponse = | |
28 | new KmzResponseWrapper(response); | |
29 | wrappedResponse.setKMLFileName(kmlFileName); | |
30 | chain.doFilter(req, wrappedResponse); | |
31 | wrappedResponse.finishResponse(); | |
32 | return; | |
33 | } | |
34 | } | |
35 | ||
36 | public void init(FilterConfig filterConfig) { | |
37 | // Nothing to do here | |
38 | } | |
39 | ||
40 | public void destroy() { | |
41 | // Nothing to do here | |
42 | } | |
43 | }⏎ |
0 | package org.boehn.gef.servlet.kmz; | |
1 | ||
2 | import java.io.IOException; | |
3 | import java.util.zip.ZipEntry; | |
4 | import java.util.zip.ZipOutputStream; | |
5 | import javax.servlet.ServletOutputStream; | |
6 | import javax.servlet.http.HttpServletResponse; | |
7 | ||
8 | public class KmzResponseStream extends ServletOutputStream { | |
9 | ||
10 | protected ZipOutputStream zipstream = null; | |
11 | protected boolean closed = false; | |
12 | protected HttpServletResponse response = null; | |
13 | protected ServletOutputStream output = null; | |
14 | private String kmlFileName="index.kml"; | |
15 | ||
16 | protected int bufferCount = 0; | |
17 | protected byte[] buffer = null; | |
18 | protected int length = -1; | |
19 | ||
20 | ||
21 | public KmzResponseStream(HttpServletResponse response) throws IOException { | |
22 | super(); | |
23 | closed = false; | |
24 | this.response = response; | |
25 | this.output = response.getOutputStream(); | |
26 | buffer = new byte[128]; | |
27 | } | |
28 | ||
29 | public void setKMLFileName(String kml){ | |
30 | kmlFileName = kml; | |
31 | } | |
32 | ||
33 | public void close() throws IOException { | |
34 | if (closed) { | |
35 | throw new IOException("This output stream has already been closed"); | |
36 | } | |
37 | ||
38 | if (zipstream!=null) { | |
39 | flushToZip(); | |
40 | zipstream.close(); | |
41 | zipstream = null; | |
42 | } else { | |
43 | if (bufferCount>0) { | |
44 | output.write(buffer, 0, bufferCount); | |
45 | bufferCount=0; | |
46 | } | |
47 | } | |
48 | ||
49 | output.close(); | |
50 | closed = true; | |
51 | } | |
52 | ||
53 | public void flush() throws IOException { | |
54 | if (closed) { | |
55 | throw new IOException("Cannot flush a closed output stream"); | |
56 | } | |
57 | ||
58 | if (zipstream != null) { | |
59 | zipstream.flush(); | |
60 | } | |
61 | } | |
62 | ||
63 | public void flushToZip() throws IOException { | |
64 | if (bufferCount > 0) { | |
65 | writeToZip(buffer, 0, bufferCount); | |
66 | bufferCount = 0; | |
67 | } | |
68 | } | |
69 | ||
70 | ||
71 | public void write(int b) throws IOException { | |
72 | if (closed) { | |
73 | throw new IOException("Cannot write to a closed output stream"); | |
74 | } | |
75 | if (bufferCount >= buffer.length) { | |
76 | flushToZip(); | |
77 | } | |
78 | buffer[bufferCount++] = (byte) b; | |
79 | } | |
80 | ||
81 | public void write(byte b[]) throws IOException { | |
82 | write(b, 0, b.length); | |
83 | } | |
84 | ||
85 | public void write(byte b[], int off, int len) throws IOException { | |
86 | if (closed) { | |
87 | throw new IOException("Cannot write to a closed output stream"); | |
88 | } | |
89 | ||
90 | if (len == 0) | |
91 | return; | |
92 | ||
93 | // Can we write into buffer ? | |
94 | if (len <= (buffer.length - bufferCount)) { | |
95 | System.arraycopy(b, off, buffer, bufferCount, len); | |
96 | bufferCount += len; | |
97 | return; | |
98 | } | |
99 | ||
100 | // There is not enough space in buffer. Flush it ... | |
101 | flushToZip(); | |
102 | ||
103 | // ... and try again. Note, that bufferCount = 0 here ! | |
104 | if (len <= (buffer.length - bufferCount)) { | |
105 | System.arraycopy(b, off, buffer, bufferCount, len); | |
106 | bufferCount += len; | |
107 | return; | |
108 | } | |
109 | ||
110 | // write direct to zip | |
111 | writeToZip(b, off, len); | |
112 | } | |
113 | ||
114 | public void writeToZip(byte b[], int off, int len) throws IOException { | |
115 | ||
116 | if (zipstream == null) { | |
117 | //System.out.println("Content-Length: " + Integer.toString(b.length)); | |
118 | //response.setContentLength(b.length); | |
119 | response.setContentType("application/vnd.google-earth.kmzl; charset=UTF-8"); | |
120 | zipstream = new ZipOutputStream(output); | |
121 | zipstream.putNextEntry(new ZipEntry(kmlFileName)); | |
122 | } | |
123 | zipstream.write(b, off, len); | |
124 | } | |
125 | ||
126 | ||
127 | public boolean closed() { | |
128 | return (this.closed); | |
129 | } | |
130 | ||
131 | public void reset() { | |
132 | // Nothing to do here | |
133 | } | |
134 | }⏎ |
0 | package org.boehn.gef.servlet.kmz; | |
1 | ||
2 | import java.io.IOException; | |
3 | import java.io.OutputStreamWriter; | |
4 | import java.io.PrintWriter; | |
5 | import javax.servlet.ServletOutputStream; | |
6 | import javax.servlet.http.HttpServletResponse; | |
7 | import javax.servlet.http.HttpServletResponseWrapper; | |
8 | ||
9 | public class KmzResponseWrapper extends HttpServletResponseWrapper { | |
10 | protected HttpServletResponse origResponse = null; | |
11 | protected ServletOutputStream stream = null; | |
12 | protected PrintWriter writer = null; | |
13 | private String kmlFileName="index.kml"; | |
14 | ||
15 | public KmzResponseWrapper(HttpServletResponse response) { | |
16 | super(response); | |
17 | origResponse = response; | |
18 | } | |
19 | ||
20 | public ServletOutputStream createOutputStream() throws IOException { | |
21 | KmzResponseStream krs = new KmzResponseStream(origResponse); | |
22 | krs.setKMLFileName(kmlFileName); | |
23 | return (krs); | |
24 | } | |
25 | ||
26 | public void setKMLFileName(String kml) { | |
27 | kmlFileName = kml; | |
28 | } | |
29 | ||
30 | public void finishResponse() { | |
31 | try { | |
32 | if (writer != null) { | |
33 | writer.close(); | |
34 | } else { | |
35 | if (stream != null) { | |
36 | stream.close(); | |
37 | } | |
38 | } | |
39 | } catch (IOException e) {} | |
40 | } | |
41 | ||
42 | public void flushBuffer() throws IOException { | |
43 | stream.flush(); | |
44 | } | |
45 | ||
46 | public ServletOutputStream getOutputStream() throws IOException { | |
47 | if (writer != null) { | |
48 | throw new IllegalStateException("getWriter() has already been called!"); | |
49 | } | |
50 | ||
51 | if (stream == null) | |
52 | stream = createOutputStream(); | |
53 | return (stream); | |
54 | } | |
55 | ||
56 | public PrintWriter getWriter() throws IOException { | |
57 | if (writer != null) { | |
58 | return (writer); | |
59 | } | |
60 | ||
61 | if (stream != null) { | |
62 | throw new IllegalStateException("getOutputStream() has already been called!"); | |
63 | } | |
64 | ||
65 | stream = createOutputStream(); | |
66 | writer = new PrintWriter(new OutputStreamWriter(stream, "UTF-8")); | |
67 | return (writer); | |
68 | } | |
69 | ||
70 | public void setContentLength(int length) {} | |
71 | }⏎ |
0 | package org.boehn.gef.style; | |
1 | ||
2 | public class Color { | |
3 | ||
4 | private int r; | |
5 | private int g; | |
6 | private int b; | |
7 | private int alpha; | |
8 | ||
9 | public static Color black = new Color(0, 0, 0); | |
10 | public static Color blue = new Color(0, 0, 255); | |
11 | public static Color cyan = new Color(0, 173, 239); | |
12 | public static Color darkGrey = new Color(64, 64, 64); | |
13 | public static Color gray = new Color(128, 128, 128); | |
14 | public static Color green = new Color(0, 255, 0); | |
15 | public static Color lightGray = new Color(191, 191, 191); | |
16 | public static Color magenta = new Color(255, 0, 255); | |
17 | public static Color orange = new Color(255, 127, 0); | |
18 | public static Color pink = new Color(255, 127, 255); | |
19 | public static Color red = new Color(255, 0, 0); | |
20 | public static Color white = new Color(255, 255, 255); | |
21 | public static Color yellow = new Color(255, 255, 0); | |
22 | ||
23 | public Color() {} | |
24 | ||
25 | public Color(int red, int green, int blue) { | |
26 | this(red, green, blue, 255); | |
27 | } | |
28 | ||
29 | public Color(int red, int green, int blue, int alpha) { | |
30 | setRed(red); | |
31 | setGreen(green); | |
32 | setBlue(blue); | |
33 | setAlpha(alpha); | |
34 | } | |
35 | ||
36 | public int getAlpha() { | |
37 | return alpha; | |
38 | } | |
39 | ||
40 | public void setAlpha(int alpha) { | |
41 | verifyValue(alpha); | |
42 | this.alpha = alpha; | |
43 | } | |
44 | ||
45 | public int getBlue() { | |
46 | return b; | |
47 | } | |
48 | ||
49 | public void setBlue(int blue) { | |
50 | verifyValue(blue); | |
51 | this.b = blue; | |
52 | } | |
53 | ||
54 | public int getGreen() { | |
55 | return g; | |
56 | } | |
57 | ||
58 | public void setGreen(int green) { | |
59 | verifyValue(green); | |
60 | this.g = green; | |
61 | } | |
62 | ||
63 | public int getRed() { | |
64 | return r; | |
65 | } | |
66 | ||
67 | public void setRed(int red) { | |
68 | verifyValue(red); | |
69 | this.r = red; | |
70 | } | |
71 | ||
72 | public String toHexString() { | |
73 | String result = ""; | |
74 | ||
75 | if (alpha < 16) { | |
76 | result += "0"; | |
77 | } | |
78 | result += Integer.toHexString(alpha); | |
79 | ||
80 | if (b < 16) { | |
81 | result += "0"; | |
82 | } | |
83 | result += Integer.toHexString(b); | |
84 | ||
85 | if (g < 16) { | |
86 | result += "0"; | |
87 | } | |
88 | result += Integer.toHexString(g); | |
89 | ||
90 | if (r < 16) { | |
91 | result += "0"; | |
92 | } | |
93 | result += Integer.toHexString(r); | |
94 | ||
95 | return result; | |
96 | } | |
97 | ||
98 | private static void verifyValue(int value) { | |
99 | if (value < 0 || value > 255) { | |
100 | throw new IllegalArgumentException("Value must be in the range (0 - 255). " + value + " is not valid."); | |
101 | } | |
102 | } | |
103 | ||
104 | } |
0 | package org.boehn.gef.style; | |
1 | ||
2 | import org.boehn.gef.Model; | |
3 | import org.boehn.gef.ModelException; | |
4 | import org.boehn.gef.overlays.Icon; | |
5 | import org.w3c.dom.Document; | |
6 | import org.w3c.dom.Element; | |
7 | ||
8 | public class Style { | |
9 | ||
10 | private String id; | |
11 | private Color balloonTextColor; | |
12 | private String balloonText; | |
13 | private Color balloonColor; | |
14 | private Color iconColor; | |
15 | private ColorModes iconColorMode; | |
16 | private Double iconHeading; | |
17 | private Icon icon; | |
18 | private Double iconScale; | |
19 | private Color labelColor; | |
20 | private ColorModes labelColorMode; | |
21 | private Double labelScale; | |
22 | private Color lineColor; | |
23 | private ColorModes lineColorMode; | |
24 | private Integer lineWidth; | |
25 | private Color polygonColor; | |
26 | private ColorModes polygonColorMode; | |
27 | private Boolean polygonFill; | |
28 | private Boolean polygonOutline; | |
29 | ||
30 | public Style() { | |
31 | } | |
32 | ||
33 | public Style(String id) { | |
34 | this.id = id; | |
35 | } | |
36 | ||
37 | public void addKml(Element parentElement, Model model, Document xmlDocument) throws ModelException { | |
38 | ||
39 | Element styleElement = xmlDocument.createElement("Style"); | |
40 | ||
41 | if (id != null) { | |
42 | styleElement.setAttribute("id", id); | |
43 | } | |
44 | ||
45 | // We check if a balloon style should be added | |
46 | if (balloonText != null || balloonColor != null || balloonTextColor != null) { | |
47 | Element balloonStyleElement = xmlDocument.createElement("BalloonStyle"); | |
48 | if (balloonText != null) { | |
49 | Element ballonTextElement = xmlDocument.createElement("text"); | |
50 | ballonTextElement.appendChild(xmlDocument.createTextNode(balloonText)); | |
51 | balloonStyleElement.appendChild(ballonTextElement); | |
52 | } | |
53 | if (balloonTextColor != null) { | |
54 | Element ballonTextColorElement = xmlDocument.createElement("textColor"); | |
55 | ballonTextColorElement.appendChild(xmlDocument.createTextNode(balloonTextColor.toHexString())); | |
56 | balloonStyleElement.appendChild(ballonTextColorElement); | |
57 | } | |
58 | if (balloonColor != null) { | |
59 | Element ballonColorElement = xmlDocument.createElement("color"); | |
60 | ballonColorElement.appendChild(xmlDocument.createTextNode(balloonColor.toHexString())); | |
61 | balloonStyleElement.appendChild(ballonColorElement); | |
62 | } | |
63 | styleElement.appendChild(balloonStyleElement); | |
64 | } | |
65 | ||
66 | // We check if an icon style should be added (icon is required for this to be added) | |
67 | if (icon != null) { | |
68 | Element iconStyleElement = xmlDocument.createElement("IconStyle"); | |
69 | if (iconColor != null) { | |
70 | Element iconColorElement = xmlDocument.createElement("color"); | |
71 | iconColorElement.appendChild(xmlDocument.createTextNode(iconColor.toHexString())); | |
72 | iconStyleElement.appendChild(iconColorElement); | |
73 | } | |
74 | if (iconColorMode != null) { | |
75 | Element iconColorModeElement = xmlDocument.createElement("colorMode"); | |
76 | iconColorModeElement.appendChild(xmlDocument.createTextNode(iconColorMode.toString())); | |
77 | iconStyleElement.appendChild(iconColorModeElement); | |
78 | } | |
79 | if (iconHeading != null) { | |
80 | Element iconHeadingElement = xmlDocument.createElement("heading"); | |
81 | iconHeadingElement.appendChild(xmlDocument.createTextNode(iconHeading.toString())); | |
82 | iconStyleElement.appendChild(iconHeadingElement); | |
83 | } | |
84 | icon.addKml(iconStyleElement, model, xmlDocument); | |
85 | if (iconScale != null) { | |
86 | Element iconScaleElement = xmlDocument.createElement("scale"); | |
87 | iconScaleElement.appendChild(xmlDocument.createTextNode(iconScale.toString())); | |
88 | iconStyleElement.appendChild(iconScaleElement); | |
89 | } | |
90 | styleElement.appendChild(iconStyleElement); | |
91 | } | |
92 | ||
93 | // We check if a label style should be added | |
94 | if (labelColor != null || labelColorMode != null || labelScale != null) { | |
95 | Element labelStyleElement = xmlDocument.createElement("LabelStyle"); | |
96 | if (labelColor != null) { | |
97 | Element labelColorElement = xmlDocument.createElement("color"); | |
98 | labelColorElement.appendChild(xmlDocument.createTextNode(labelColor.toHexString())); | |
99 | labelStyleElement.appendChild(labelColorElement); | |
100 | } | |
101 | if (labelColorMode != null) { | |
102 | Element labelColorModeElement = xmlDocument.createElement("colorMode"); | |
103 | labelColorModeElement.appendChild(xmlDocument.createTextNode(labelColorMode.toString())); | |
104 | labelStyleElement.appendChild(labelColorModeElement); | |
105 | } | |
106 | if (labelScale != null) { | |
107 | Element labelScaleElement = xmlDocument.createElement("scale"); | |
108 | labelScaleElement.appendChild(xmlDocument.createTextNode(labelScale.toString())); | |
109 | labelStyleElement.appendChild(labelScaleElement); | |
110 | } | |
111 | styleElement.appendChild(labelStyleElement); | |
112 | } | |
113 | ||
114 | // We check if a line style should be added | |
115 | if (lineColor != null || lineColorMode != null || lineWidth != null) { | |
116 | Element lineStyleElement = xmlDocument.createElement("LineStyle"); | |
117 | if (lineColor != null) { | |
118 | Element lineColorElement = xmlDocument.createElement("color"); | |
119 | lineColorElement.appendChild(xmlDocument.createTextNode(lineColor.toHexString())); | |
120 | lineStyleElement.appendChild(lineColorElement); | |
121 | } | |
122 | if (lineColorMode != null) { | |
123 | Element lineColorModeElement = xmlDocument.createElement("colorMode"); | |
124 | lineColorModeElement.appendChild(xmlDocument.createTextNode(lineColorMode.toString())); | |
125 | lineStyleElement.appendChild(lineColorModeElement); | |
126 | } | |
127 | if (lineWidth != null) { | |
128 | Element lineWidthElement = xmlDocument.createElement("width"); | |
129 | lineWidthElement.appendChild(xmlDocument.createTextNode(lineWidth.toString())); | |
130 | lineStyleElement.appendChild(lineWidthElement); | |
131 | } | |
132 | styleElement.appendChild(lineStyleElement); | |
133 | } | |
134 | ||
135 | // We check if a poly style should be added | |
136 | if (polygonColor != null || polygonColorMode != null || polygonFill != null || polygonOutline != null) { | |
137 | Element polyStyleElement = xmlDocument.createElement("PolyStyle"); | |
138 | if (polygonColor != null) { | |
139 | Element polygonColorElement = xmlDocument.createElement("color"); | |
140 | polygonColorElement.appendChild(xmlDocument.createTextNode(polygonColor.toHexString())); | |
141 | polyStyleElement.appendChild(polygonColorElement); | |
142 | } | |
143 | if (polygonColorMode != null) { | |
144 | Element polygonColorModeElement = xmlDocument.createElement("colorMode"); | |
145 | polygonColorModeElement.appendChild(xmlDocument.createTextNode(polygonColorMode.toString())); | |
146 | polyStyleElement.appendChild(polygonColorModeElement); | |
147 | } | |
148 | if (polygonFill != null) { | |
149 | Element polygonFillElement = xmlDocument.createElement("fill"); | |
150 | polygonFillElement.appendChild(xmlDocument.createTextNode((polygonFill? "1" : "0"))); | |
151 | polyStyleElement.appendChild(polygonFillElement); | |
152 | } | |
153 | if (polygonOutline != null) { | |
154 | Element polygonOutlineElement = xmlDocument.createElement("outline"); | |
155 | polygonOutlineElement.appendChild(xmlDocument.createTextNode((polygonOutline? "1" : "0"))); | |
156 | polyStyleElement.appendChild(polygonOutlineElement); | |
157 | } | |
158 | styleElement.appendChild(polyStyleElement); | |
159 | } | |
160 | ||
161 | parentElement.appendChild(styleElement); | |
162 | } | |
163 | ||
164 | public Color getBalloonColor() { | |
165 | return balloonColor; | |
166 | } | |
167 | ||
168 | public void setBalloonColor(Color balloonColor) { | |
169 | this.balloonColor = balloonColor; | |
170 | } | |
171 | ||
172 | public String getBalloonText() { | |
173 | return balloonText; | |
174 | } | |
175 | ||
176 | public void setBalloonText(String balloonText) { | |
177 | this.balloonText = balloonText; | |
178 | } | |
179 | ||
180 | public Icon getIcon() { | |
181 | return icon; | |
182 | } | |
183 | ||
184 | public void setIcon(Icon icon) { | |
185 | this.icon = icon; | |
186 | } | |
187 | ||
188 | public Color getIconColor() { | |
189 | return iconColor; | |
190 | } | |
191 | ||
192 | public void setIconColor(Color iconColor) { | |
193 | this.iconColor = iconColor; | |
194 | } | |
195 | ||
196 | public ColorModes getIconColorMode() { | |
197 | return iconColorMode; | |
198 | } | |
199 | ||
200 | public void setIconColorMode(ColorModes iconColorMode) { | |
201 | this.iconColorMode = iconColorMode; | |
202 | } | |
203 | ||
204 | public Double getIconHeading() { | |
205 | return iconHeading; | |
206 | } | |
207 | ||
208 | public void setIconHeading(Double iconHeading) { | |
209 | this.iconHeading = iconHeading; | |
210 | } | |
211 | ||
212 | public Double getIconScale() { | |
213 | return iconScale; | |
214 | } | |
215 | ||
216 | public void setIconScale(Double iconScale) { | |
217 | this.iconScale = iconScale; | |
218 | } | |
219 | ||
220 | public String getId() { | |
221 | return id; | |
222 | } | |
223 | ||
224 | public void setId(String id) { | |
225 | this.id = id; | |
226 | } | |
227 | ||
228 | public Color getLabelColor() { | |
229 | return labelColor; | |
230 | } | |
231 | ||
232 | public void setLabelColor(Color labelColor) { | |
233 | this.labelColor = labelColor; | |
234 | } | |
235 | ||
236 | public ColorModes getLabelColorMode() { | |
237 | return labelColorMode; | |
238 | } | |
239 | ||
240 | public void setLabelColorMode(ColorModes labelColorMode) { | |
241 | this.labelColorMode = labelColorMode; | |
242 | } | |
243 | ||
244 | public Double getLabelScale() { | |
245 | return labelScale; | |
246 | } | |
247 | ||
248 | public void setLabelScale(Double labelScale) { | |
249 | this.labelScale = labelScale; | |
250 | } | |
251 | ||
252 | public Color getLineColor() { | |
253 | return lineColor; | |
254 | } | |
255 | ||
256 | public void setLineColor(Color lineColor) { | |
257 | this.lineColor = lineColor; | |
258 | } | |
259 | ||
260 | public ColorModes getLineColorMode() { | |
261 | return lineColorMode; | |
262 | } | |
263 | ||
264 | public void setLineColorMode(ColorModes lineColorMode) { | |
265 | this.lineColorMode = lineColorMode; | |
266 | } | |
267 | ||
268 | public Integer getLineWidth() { | |
269 | return lineWidth; | |
270 | } | |
271 | ||
272 | public void setLineWidth(Integer lineWidth) { | |
273 | this.lineWidth = lineWidth; | |
274 | } | |
275 | ||
276 | public Color getPolygonColor() { | |
277 | return polygonColor; | |
278 | } | |
279 | ||
280 | public void setPolygonColor(Color polygonColor) { | |
281 | this.polygonColor = polygonColor; | |
282 | } | |
283 | ||
284 | public ColorModes getPolygonColorMode() { | |
285 | return polygonColorMode; | |
286 | } | |
287 | ||
288 | public void setPolygonColorMode(ColorModes polygonColorMode) { | |
289 | this.polygonColorMode = polygonColorMode; | |
290 | } | |
291 | ||
292 | public Boolean getPolygonFill() { | |
293 | return polygonFill; | |
294 | } | |
295 | ||
296 | public void setPolygonFill(Boolean polygonFill) { | |
297 | this.polygonFill = polygonFill; | |
298 | } | |
299 | ||
300 | public Boolean getPolygonOutline() { | |
301 | return polygonOutline; | |
302 | } | |
303 | ||
304 | public void setPolygonOutline(Boolean polygonOutline) { | |
305 | this.polygonOutline = polygonOutline; | |
306 | } | |
307 | ||
308 | public Color getBalloonTextColor() { | |
309 | return balloonTextColor; | |
310 | } | |
311 | ||
312 | public void setBalloonTextColor(Color textColor) { | |
313 | this.balloonTextColor = textColor; | |
314 | } | |
315 | ||
316 | } |
0 | package org.boehn.gef.utils; | |
1 | ||
2 | public class Ellipsoid { | |
3 | ||
4 | private static double K1; | |
5 | private static double K2; | |
6 | private static double Eps2; | |
7 | ||
8 | static { | |
9 | Init(); | |
10 | } | |
11 | ||
12 | public static void Init(double a, double f) { | |
13 | CreateConstants(a, f); | |
14 | } | |
15 | ||
16 | public static void Init() { | |
17 | CreateConstants(6378137, 298.257223563); // default to wgs 84 | |
18 | } | |
19 | ||
20 | public static double foo() { | |
21 | return 1d; | |
22 | } | |
23 | ||
24 | protected static void CreateConstants(double a, double f) { | |
25 | double fInverted = 1 / f; | |
26 | Eps2 = (fInverted) * (2d - fInverted); | |
27 | K1 = Math.toRadians(a * (1d - Eps2)); | |
28 | K2 = Math.toRadians(a); | |
29 | } | |
30 | ||
31 | /** | |
32 | * Convert meter to longitude at ref latitude | |
33 | */ | |
34 | public static final double meterToLongitude(double latitude) { | |
35 | return 1.0 / longitudeToMeter(latitude); | |
36 | } | |
37 | ||
38 | /** | |
39 | * Convert meter to latitude at ref latitude | |
40 | */ | |
41 | public static final double meterToLatitude(double latitude) { | |
42 | return 1.0 / latitudeToMeter(latitude); | |
43 | } | |
44 | ||
45 | /** | |
46 | * Convert longitude to meter at ref latitude | |
47 | */ | |
48 | public static final double longitudeToMeter(double latitude) { | |
49 | return (Math.cos(Math.toRadians(latitude)) * K2) / Math.sqrt(getDiv0(latitude)); | |
50 | } | |
51 | ||
52 | /** | |
53 | * Convert latitude to meter at ref latitude | |
54 | */ | |
55 | public static final double latitudeToMeter(double latitude) { | |
56 | return (K1 / Math.sqrt(Math.pow(getDiv0(latitude), 3))); | |
57 | } | |
58 | ||
59 | private static final double getDiv0(double latitude) { | |
60 | return 1.0 - Eps2 * Math.pow(Math.sin(Math.toRadians(latitude)), 2); | |
61 | } | |
62 | ||
63 | }⏎ |
0 | package org.boehn.gef.utils; | |
1 | ||
2 | public class MathUtils { | |
3 | ||
4 | public static double degreesToDecimal(String input) { | |
5 | // TODO this method should be made more robust in order to handle different syntax, or? | |
6 | char direction = input.charAt(0); | |
7 | int degrees; | |
8 | int minutes; | |
9 | int seconds; | |
10 | if (direction == 'E' || direction == 'W') { | |
11 | degrees = Integer.parseInt(input.substring(1,4)); | |
12 | minutes = Integer.parseInt(input.substring(4,6)); | |
13 | seconds = Integer.parseInt(input.substring(6)); | |
14 | } else { | |
15 | degrees = Integer.parseInt(input.substring(1,3)); | |
16 | minutes = Integer.parseInt(input.substring(3,5)); | |
17 | seconds = Integer.parseInt(input.substring(5)); | |
18 | } | |
19 | ||
20 | double decimal = degrees + (float) minutes / 60 + (float) seconds / 3600; | |
21 | ||
22 | if (direction == 'W' || direction == 'S') { | |
23 | decimal *= -1; | |
24 | } | |
25 | return decimal; | |
26 | } | |
27 | } |