├── .envrc ├── .gitignore ├── src ├── main │ ├── resources │ │ ├── de │ │ │ └── micromata │ │ │ │ └── opengis │ │ │ │ └── kml │ │ │ │ └── v_2_2_0 │ │ │ │ └── jaxb.index │ │ └── schema │ │ │ ├── kmljavadocs.xsd │ │ │ ├── xmlrootelemets.xsd │ │ │ ├── ogckml │ │ │ ├── atom-author-link.xsd │ │ │ ├── JAK_binding.xjb │ │ │ └── kml22gx.xsd │ │ │ └── xmlrootelemets.xml │ └── java │ │ └── de │ │ └── micromata │ │ └── opengis │ │ └── kml │ │ └── v_2_2_0 │ │ ├── annotations │ │ └── Obvious.java │ │ ├── atom │ │ ├── package-info.java │ │ └── Author.java │ │ ├── package-info.java │ │ ├── gx │ │ ├── package-info.java │ │ ├── PlayMode.java │ │ ├── FlyToMode.java │ │ ├── TourPrimitive.java │ │ ├── Wait.java │ │ ├── Option.java │ │ ├── TourControl.java │ │ ├── SoundCue.java │ │ └── ViewerOptions.java │ │ ├── xal │ │ ├── package-info.java │ │ ├── AddressLine.java │ │ ├── CountryName.java │ │ ├── ThoroughfareName.java │ │ ├── ThoroughfareLeadingType.java │ │ ├── ThoroughfareTrailingType.java │ │ ├── ThoroughfarePreDirection.java │ │ ├── ThoroughfarePostDirection.java │ │ ├── PremiseNumberPrefix.java │ │ ├── PremiseNumberSuffix.java │ │ └── BuildingName.java │ │ ├── util │ │ └── DoubleCompare.java │ │ ├── BooleanConverter.java │ │ ├── DisplayMode.java │ │ ├── ColorMode.java │ │ ├── GridOrigin.java │ │ ├── Shape.java │ │ ├── Units.java │ │ ├── RefreshMode.java │ │ ├── CoordinatesConverter.java │ │ ├── ViewRefreshMode.java │ │ ├── AltitudeMode.java │ │ ├── ItemIconState.java │ │ ├── ListItemType.java │ │ ├── StyleState.java │ │ ├── Metadata.java │ │ ├── NamespaceFilterXMLReader.java │ │ ├── NamespaceFilterHandler.java │ │ ├── Snippet.java │ │ ├── Coordinate.java │ │ ├── Vec2.java │ │ └── SimpleData.java └── test │ ├── java │ └── de │ │ └── micromata │ │ ├── opengis │ │ └── kml │ │ │ └── v_2_2_0 │ │ │ ├── IconTest.java │ │ │ └── CoordinatesConverterTest.java │ │ └── jak │ │ ├── incubator │ │ ├── JustAType.java │ │ └── KmzTest.java │ │ ├── AlternativeKmlSpecTest.java │ │ ├── examples │ │ ├── ReadCsvFileTest.java │ │ ├── Example1.java │ │ ├── Example3.java │ │ ├── CloneTest.java │ │ ├── Example2.java │ │ └── Example4.java │ │ ├── AtsConformanceLevel3Test.java │ │ └── internal │ │ └── IAtsConformanceLevel3.java │ └── resources │ ├── log4j2.xml │ └── exampledata │ └── mobile_phone_2008.csv ├── NOTICE.txt ├── .mvn └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── .settings ├── org.eclipse.core.resources.prefs └── com.cenqua.clover.core.prefs ├── project-suppression.xml ├── .classpath ├── .project ├── LICENSE.txt └── README.md /.envrc: -------------------------------------------------------------------------------- 1 | GPG_TTY=$(tty) 2 | export GPG_TTY 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .metadata/ 3 | /.idea/ 4 | -------------------------------------------------------------------------------- /src/main/resources/de/micromata/opengis/kml/v_2_2_0/jaxb.index: -------------------------------------------------------------------------------- 1 | Kml 2 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | This product includes software developed by Micromata GmbH. 2 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/urbancamo/javaapiforkml/HEAD/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Tue Nov 11 15:38:08 CET 2008 2 | eclipse.preferences.version=1 3 | encoding/=UTF-8 4 | -------------------------------------------------------------------------------- /project-suppression.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/annotations/Obvious.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0.annotations; 3 | 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Target; 6 | 7 | @Target(ElementType.METHOD) 8 | public @interface Obvious { 9 | 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/atom/package-info.java: -------------------------------------------------------------------------------- 1 | @jakarta.xml.bind.annotation.XmlSchema(namespace = "http://www.w3.org/2005/Atom", xmlns = { 2 | @jakarta.xml.bind.annotation.XmlNs( prefix = "atom", namespaceURI = "http://www.w3.org/2005/Atom" ) 3 | }, elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) 4 | package de.micromata.opengis.kml.v_2_2_0.atom; 5 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/package-info.java: -------------------------------------------------------------------------------- 1 | @jakarta.xml.bind.annotation.XmlSchema(namespace = "http://www.opengis.net/kml/2.2", xmlns = { 2 | @jakarta.xml.bind.annotation.XmlNs( prefix = "kml", namespaceURI = "http://www.opengis.net/kml/2.2" ) 3 | }, 4 | elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) 5 | package de.micromata.opengis.kml.v_2_2_0; 6 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/gx/package-info.java: -------------------------------------------------------------------------------- 1 | @jakarta.xml.bind.annotation.XmlSchema(namespace = "http://www.google.com/kml/ext/2.2", xmlns = { 2 | @jakarta.xml.bind.annotation.XmlNs( prefix = "gx", namespaceURI = "http://www.google.com/kml/ext/2.2" ) 3 | }, 4 | elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) 5 | package de.micromata.opengis.kml.v_2_2_0.gx; 6 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/xal/package-info.java: -------------------------------------------------------------------------------- 1 | @jakarta.xml.bind.annotation.XmlSchema(namespace = "urn:oasis:names:tc:ciq:xsdschema:xAL:2.0", xmlns = { 2 | @jakarta.xml.bind.annotation.XmlNs( prefix = "xal", namespaceURI = "urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" ) 3 | }, elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) 4 | package de.micromata.opengis.kml.v_2_2_0.xal; 5 | -------------------------------------------------------------------------------- /src/test/java/de/micromata/opengis/kml/v_2_2_0/IconTest.java: -------------------------------------------------------------------------------- 1 | package de.micromata.opengis.kml.v_2_2_0; 2 | 3 | import org.junit.Test; 4 | 5 | public class IconTest { 6 | @Test 7 | public void hashCodeTest() { 8 | Icon icon1 = new Icon(); 9 | Icon icon2 = new Icon(); 10 | 11 | // Ensure we don't get an NPE 12 | assert(icon1.hashCode() == icon2.hashCode()); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/util/DoubleCompare.java: -------------------------------------------------------------------------------- 1 | package de.micromata.opengis.kml.v_2_2_0.util; 2 | 3 | public class DoubleCompare { 4 | private final static double EPSILON = 0.000001d; 5 | 6 | public static boolean equal(Double d1, Double d2) { 7 | return d1 != null && d2 != null && Math.abs(d1 - d2) < EPSILON; 8 | } 9 | 10 | public static boolean notEqual(Double d1, Double d2) { 11 | return !equal(d1, d2); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/BooleanConverter.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0; 3 | 4 | import jakarta.xml.bind.annotation.adapters.XmlAdapter; 5 | 6 | public final class BooleanConverter 7 | extends XmlAdapter 8 | { 9 | 10 | 11 | @Override 12 | public Boolean unmarshal(final Integer i) 13 | throws Exception 14 | { 15 | return ((i == null)?null:(i == 1)); 16 | } 17 | 18 | @Override 19 | public Integer marshal(final Boolean b) 20 | throws Exception 21 | { 22 | return ((b == null)?null:(b? 1 : 0)); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/test/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/test/java/de/micromata/jak/incubator/JustAType.java: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////////// 2 | // 3 | // $RCSfile: $ 4 | // 5 | // Project JavaAPIforKML 6 | // 7 | // Author Flori (f.bachmann@micromata.de) 8 | // Created Aug 17, 2009 9 | // Copyright Micromata Aug 17, 2009 10 | // 11 | // $Id: $ 12 | // $Revision: $ 13 | // $Date: $ 14 | // 15 | ///////////////////////////////////////////////////////////////////////////// 16 | package de.micromata.jak.incubator; 17 | 18 | public class JustAType { 19 | private boolean foo; 20 | 21 | public void setFoo(boolean foo) { 22 | this.foo = foo; 23 | } 24 | 25 | public boolean isFoo() { 26 | return foo; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/resources/schema/kmljavadocs.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/resources/schema/xmlrootelemets.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | JavaAPIforKML 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | ca.mcgill.sable.clone.markers.cloneProblemMarkingBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.jdt.core.javanature 26 | org.eclipse.m2e.core.maven2Nature 27 | ca.mcgill.sable.clone.nature 28 | 29 | 30 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.8/apache-maven-3.8.8-bin.zip 18 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar 19 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/DisplayMode.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0; 3 | 4 | import jakarta.xml.bind.annotation.XmlEnum; 5 | import jakarta.xml.bind.annotation.XmlEnumValue; 6 | import jakarta.xml.bind.annotation.XmlType; 7 | 8 | 9 | /** 10 | * DisplayMode 11 | *

12 | * default, hide 13 | *

14 | * 15 | * See Also: 16 | * See {@code } 17 | * 18 | * 19 | * 20 | */ 21 | @XmlType(name = "displayModeEnumType") 22 | @XmlEnum 23 | public enum DisplayMode { 24 | 25 | @XmlEnumValue("default") 26 | DEFAULT("default"), 27 | @XmlEnumValue("hide") 28 | HIDE("hide"); 29 | private final String value; 30 | 31 | DisplayMode(String v) { 32 | value = v; 33 | } 34 | 35 | public String value() { 36 | return value; 37 | } 38 | 39 | public static DisplayMode fromValue(String v) { 40 | for (DisplayMode c: DisplayMode.values()) { 41 | if (c.value.equals(v)) { 42 | return c; 43 | } 44 | } 45 | throw new IllegalArgumentException(v); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/ColorMode.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0; 3 | 4 | import jakarta.xml.bind.annotation.XmlEnum; 5 | import jakarta.xml.bind.annotation.XmlEnumValue; 6 | import jakarta.xml.bind.annotation.XmlType; 7 | 8 | 9 | /** 10 | * ColorMode 11 | *

12 | * normal, random 13 | *

14 | * 15 | * See Also: 16 | * See any element that extends {@code } 17 | * 18 | * 19 | * 20 | */ 21 | @XmlType(name = "colorModeEnumType") 22 | @XmlEnum 23 | public enum ColorMode { 24 | 25 | @XmlEnumValue("normal") 26 | NORMAL("normal"), 27 | @XmlEnumValue("random") 28 | RANDOM("random"); 29 | private final String value; 30 | 31 | ColorMode(String v) { 32 | value = v; 33 | } 34 | 35 | public String value() { 36 | return value; 37 | } 38 | 39 | public static ColorMode fromValue(String v) { 40 | for (ColorMode c: ColorMode.values()) { 41 | if (c.value.equals(v)) { 42 | return c; 43 | } 44 | } 45 | throw new IllegalArgumentException(v); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/GridOrigin.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0; 3 | 4 | import jakarta.xml.bind.annotation.XmlEnum; 5 | import jakarta.xml.bind.annotation.XmlEnumValue; 6 | import jakarta.xml.bind.annotation.XmlType; 7 | 8 | 9 | /** 10 | * GridOrigin 11 | *

12 | * lowerLeft, upperLeft 13 | *

14 | * 15 | * See Also: 16 | * See {@code } 17 | * 18 | * 19 | * 20 | */ 21 | @XmlType(name = "gridOriginEnumType") 22 | @XmlEnum 23 | public enum GridOrigin { 24 | 25 | @XmlEnumValue("lowerLeft") 26 | LOWER_LEFT("lowerLeft"), 27 | @XmlEnumValue("upperLeft") 28 | UPPER_LEFT("upperLeft"); 29 | private final String value; 30 | 31 | GridOrigin(String v) { 32 | value = v; 33 | } 34 | 35 | public String value() { 36 | return value; 37 | } 38 | 39 | public static GridOrigin fromValue(String v) { 40 | for (GridOrigin c: GridOrigin.values()) { 41 | if (c.value.equals(v)) { 42 | return c; 43 | } 44 | } 45 | throw new IllegalArgumentException(v); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/Shape.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0; 3 | 4 | import jakarta.xml.bind.annotation.XmlEnum; 5 | import jakarta.xml.bind.annotation.XmlEnumValue; 6 | import jakarta.xml.bind.annotation.XmlType; 7 | 8 | 9 | /** 10 | * Shape 11 | *

12 | * rectangle, cylinder, sphere 13 | *

14 | * 15 | * See Also: 16 | * See {@code } 17 | * 18 | * 19 | * 20 | */ 21 | @XmlType(name = "shapeEnumType") 22 | @XmlEnum 23 | public enum Shape { 24 | 25 | @XmlEnumValue("rectangle") 26 | RECTANGLE("rectangle"), 27 | @XmlEnumValue("cylinder") 28 | CYLINDER("cylinder"), 29 | @XmlEnumValue("sphere") 30 | SPHERE("sphere"); 31 | private final String value; 32 | 33 | Shape(String v) { 34 | value = v; 35 | } 36 | 37 | public String value() { 38 | return value; 39 | } 40 | 41 | public static Shape fromValue(String v) { 42 | for (Shape c: Shape.values()) { 43 | if (c.value.equals(v)) { 44 | return c; 45 | } 46 | } 47 | throw new IllegalArgumentException(v); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /.settings/com.cenqua.clover.core.prefs: -------------------------------------------------------------------------------- 1 | #Mon Nov 23 16:06:25 CET 2009 2 | block_filters=SourceDirective, static, private 3 | eclipse.preferences.version=1 4 | exclude_filter=**/de/micromata/jak/**,**/de/micromata/opengis/kml/v_2_2_0/annotations/**,**/de/micromata/opengis/kml/v_2_2_0/atom/**,**/de/micromata/opengis/kml/v_2_2_0/xal/** 5 | flush_interval=1000 6 | flush_policy=0 7 | include_filter=**/*.java 8 | init_string=.clover/coverage.db 9 | init_string_default=true 10 | init_string_project_relative=true 11 | instrument_selected_source_folders=false 12 | instrumentation_enabled=true 13 | instrumentation_level=STATEMENT 14 | instrumented_source_folder_patterns[0]=src/main/java\n**/*.java\n\ndisabled 15 | instrumented_source_folder_patterns[1]=src/main/resources\n**/*.java\n\ndisabled 16 | instrumented_source_folder_patterns[2]=src/test/java\n**/*.java\n\ndisabled 17 | output_root=.clover/bin 18 | output_root_same_as_project=true 19 | recreate_output_dirs=true 20 | should_qualify_java_lang=true 21 | test_exclude_filter=**/de/micromata/jak/jugh/**,**/de/micromata/jak/incubator/**,**/de/micromata/jak/internal/** 22 | test_include_filter=**/*Test.java,**/Test*.java 23 | test_source_folders=0 24 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/Units.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0; 3 | 4 | import jakarta.xml.bind.annotation.XmlEnum; 5 | import jakarta.xml.bind.annotation.XmlEnumValue; 6 | import jakarta.xml.bind.annotation.XmlType; 7 | 8 | 9 | /** 10 | * Units 11 | *

12 | * fraction, pixels, insetPixels 13 | *

14 | * 15 | * See Also: 16 | * See {@code } in {@code }, {@code } 17 | * 18 | * 19 | * 20 | */ 21 | @XmlType(name = "unitsEnumType") 22 | @XmlEnum 23 | public enum Units { 24 | 25 | @XmlEnumValue("fraction") 26 | FRACTION("fraction"), 27 | @XmlEnumValue("pixels") 28 | PIXELS("pixels"), 29 | @XmlEnumValue("insetPixels") 30 | INSET_PIXELS("insetPixels"); 31 | private final String value; 32 | 33 | Units(String v) { 34 | value = v; 35 | } 36 | 37 | public String value() { 38 | return value; 39 | } 40 | 41 | public static Units fromValue(String v) { 42 | for (Units c: Units.values()) { 43 | if (c.value.equals(v)) { 44 | return c; 45 | } 46 | } 47 | throw new IllegalArgumentException(v); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/RefreshMode.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0; 3 | 4 | import jakarta.xml.bind.annotation.XmlEnum; 5 | import jakarta.xml.bind.annotation.XmlEnumValue; 6 | import jakarta.xml.bind.annotation.XmlType; 7 | 8 | 9 | /** 10 | * RefreshMode 11 | *

12 | * onChange, onInterval, onExpire 13 | *

14 | * 15 | * See Also: 16 | * See {@code } 17 | * 18 | * 19 | * 20 | */ 21 | @XmlType(name = "refreshModeEnumType") 22 | @XmlEnum 23 | public enum RefreshMode { 24 | 25 | @XmlEnumValue("onChange") 26 | ON_CHANGE("onChange"), 27 | @XmlEnumValue("onInterval") 28 | ON_INTERVAL("onInterval"), 29 | @XmlEnumValue("onExpire") 30 | ON_EXPIRE("onExpire"); 31 | private final String value; 32 | 33 | RefreshMode(String v) { 34 | value = v; 35 | } 36 | 37 | public String value() { 38 | return value; 39 | } 40 | 41 | public static RefreshMode fromValue(String v) { 42 | for (RefreshMode c: RefreshMode.values()) { 43 | if (c.value.equals(v)) { 44 | return c; 45 | } 46 | } 47 | throw new IllegalArgumentException(v); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/gx/PlayMode.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0.gx; 3 | 4 | import jakarta.xml.bind.annotation.XmlEnum; 5 | import jakarta.xml.bind.annotation.XmlEnumValue; 6 | import jakarta.xml.bind.annotation.XmlType; 7 | 8 | 9 | /** 10 | *

Java class for playModeEnumType.

11 | * 12 | *

The following schema fragment specifies the expected content contained within this class. 13 | *

14 | * {@code 15 | * 16 | * 17 | * 18 | * 19 | * 20 | * } 21 | * 22 | */ 23 | @XmlType(name = "playModeEnumType") 24 | @XmlEnum 25 | public enum PlayMode { 26 | 27 | @XmlEnumValue("pause") 28 | PAUSE("pause"); 29 | private final String value; 30 | 31 | PlayMode(String v) { 32 | value = v; 33 | } 34 | 35 | public String value() { 36 | return value; 37 | } 38 | 39 | public static PlayMode fromValue(String v) { 40 | for (PlayMode c: PlayMode.values()) { 41 | if (c.value.equals(v)) { 42 | return c; 43 | } 44 | } 45 | throw new IllegalArgumentException(v); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/CoordinatesConverter.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0; 3 | 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | import java.util.regex.Matcher; 7 | import java.util.regex.Pattern; 8 | 9 | import jakarta.xml.bind.annotation.adapters.XmlAdapter; 10 | 11 | public final class CoordinatesConverter 12 | extends XmlAdapter> 13 | { 14 | private static final Pattern COORDINATE_GROUP = Pattern.compile("(?<=,|\\s|^)([-.\\d]+,[-.\\d]+(?:,[-.\\d]+)?)"); 15 | 16 | @Override 17 | public String marshal(final List dt) 18 | throws Exception 19 | { 20 | StringBuilder sb = new StringBuilder(); 21 | for (Coordinate coord: dt) { 22 | sb.append(coord).append(" "); 23 | } 24 | return sb.toString().trim(); 25 | } 26 | 27 | 28 | @Override 29 | public List unmarshal(final String s) 30 | throws Exception 31 | { 32 | List coordinates = new ArrayList(); 33 | Matcher matcher = COORDINATE_GROUP.matcher(s); 34 | while (matcher.find()) { 35 | coordinates.add(new Coordinate(matcher.group())); 36 | } 37 | return coordinates; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/ViewRefreshMode.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0; 3 | 4 | import jakarta.xml.bind.annotation.XmlEnum; 5 | import jakarta.xml.bind.annotation.XmlEnumValue; 6 | import jakarta.xml.bind.annotation.XmlType; 7 | 8 | 9 | /** 10 | * ViewRefreshMode 11 | *

12 | * never, onRequest, onStop, onRegion 13 | *

14 | * 15 | * See Also: 16 | * See {@code } 17 | * 18 | * 19 | * 20 | */ 21 | @XmlType(name = "viewRefreshModeEnumType") 22 | @XmlEnum 23 | public enum ViewRefreshMode { 24 | 25 | @XmlEnumValue("never") 26 | NEVER("never"), 27 | @XmlEnumValue("onRequest") 28 | ON_REQUEST("onRequest"), 29 | @XmlEnumValue("onStop") 30 | ON_STOP("onStop"), 31 | @XmlEnumValue("onRegion") 32 | ON_REGION("onRegion"); 33 | private final String value; 34 | 35 | ViewRefreshMode(String v) { 36 | value = v; 37 | } 38 | 39 | public String value() { 40 | return value; 41 | } 42 | 43 | public static ViewRefreshMode fromValue(String v) { 44 | for (ViewRefreshMode c: ViewRefreshMode.values()) { 45 | if (c.value.equals(v)) { 46 | return c; 47 | } 48 | } 49 | throw new IllegalArgumentException(v); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/test/java/de/micromata/jak/AlternativeKmlSpecTest.java: -------------------------------------------------------------------------------- 1 | package de.micromata.jak; 2 | 3 | import de.micromata.opengis.kml.v_2_2_0.Kml; 4 | import de.micromata.opengis.kml.v_2_2_0.NamespaceFilterHandler; 5 | import org.junit.Assert; 6 | import org.junit.Test; 7 | 8 | /** 9 | * Tests {@link NamespaceFilterHandler} allows registration of 3rd party KML specifications. 10 | *
11 | * This can be used by 3rd parties that have KML 2.X complaint specifications with minor tweaks 12 | * not related to data model structure. 13 | */ 14 | public class AlternativeKmlSpecTest { 15 | @Test 16 | public void test() { 17 | String impl = "http://example.com/kml/2.X"; 18 | String content = "\n" 19 | + "\n" 20 | + " \n" 21 | + " NDBC BuoyCAM Stations\n" 22 | + " 1\n" 23 | + " \n" 24 | + "\n"; 25 | try { 26 | Assert.assertNull("Expected unknown KML spec to fail initially", Kml.unmarshal(content)); 27 | NamespaceFilterHandler.addKml2SpecUri(impl); 28 | Assert.assertNotNull(Kml.unmarshal(content)); 29 | } catch (Exception ex) { 30 | Assert.fail(ex.getMessage()); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/gx/FlyToMode.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0.gx; 3 | 4 | import jakarta.xml.bind.annotation.XmlEnum; 5 | import jakarta.xml.bind.annotation.XmlEnumValue; 6 | import jakarta.xml.bind.annotation.XmlType; 7 | 8 | 9 | /** 10 | *

Java class for flyToModeEnumType. 11 | *

12 | *

The following schema fragment specifies the expected content contained within this class. 13 | *

14 | * {@code 15 | * 16 | * 17 | * 18 | * 19 | * 20 | * 21 | * } 22 | * 23 | */ 24 | @XmlType(name = "flyToModeEnumType") 25 | @XmlEnum 26 | public enum FlyToMode { 27 | 28 | @XmlEnumValue("bounce") 29 | BOUNCE("bounce"), 30 | @XmlEnumValue("smooth") 31 | SMOOTH("smooth"); 32 | private final String value; 33 | 34 | FlyToMode(String v) { 35 | value = v; 36 | } 37 | 38 | public String value() { 39 | return value; 40 | } 41 | 42 | public static FlyToMode fromValue(String v) { 43 | for (FlyToMode c: FlyToMode.values()) { 44 | if (c.value.equals(v)) { 45 | return c; 46 | } 47 | } 48 | throw new IllegalArgumentException(v); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/AltitudeMode.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0; 3 | 4 | import jakarta.xml.bind.annotation.XmlEnum; 5 | import jakarta.xml.bind.annotation.XmlEnumValue; 6 | import jakarta.xml.bind.annotation.XmlType; 7 | 8 | 9 | /** 10 | * AltitudeMode 11 | *

12 | * clampToGround, relativeToGround, absolute 13 | *

14 | * 15 | * See Also: 16 | * See LookAt and Region 17 | * 18 | * 19 | * 20 | */ 21 | @XmlType(name = "altitudeModeEnumType") 22 | @XmlEnum 23 | public enum AltitudeMode { 24 | 25 | @XmlEnumValue("clampToGround") 26 | CLAMP_TO_GROUND("clampToGround"), 27 | @XmlEnumValue("relativeToGround") 28 | RELATIVE_TO_GROUND("relativeToGround"), 29 | @XmlEnumValue("absolute") 30 | ABSOLUTE("absolute"), 31 | @XmlEnumValue("clampToSeaFloor") 32 | CLAMP_TO_SEA_FLOOR("clampToSeaFloor"), 33 | @XmlEnumValue("relativeToSeaFloor") 34 | RELATIVE_TO_SEA_FLOOR("relativeToSeaFloor"); 35 | private final String value; 36 | 37 | AltitudeMode(String v) { 38 | value = v; 39 | } 40 | 41 | public String value() { 42 | return value; 43 | } 44 | 45 | public static AltitudeMode fromValue(String v) { 46 | for (AltitudeMode c: AltitudeMode.values()) { 47 | if (c.value.equals(v)) { 48 | return c; 49 | } 50 | } 51 | throw new IllegalArgumentException(v); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009, Micromata GmbH 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, 5 | with or without modification, are permitted provided 6 | that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above 9 | copyright notice, this list of conditions and the following 10 | disclaimer. 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in 13 | the documentation and/or other materials provided with the 14 | distribution. 15 | 3. Neither the name of the Micromata GmbH nor the names of its contributors 16 | may be used to endorse or promote products derived from this software 17 | without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY Micromata GmbH ''AS IS'' AND ANY EXPRESS OR 20 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | IN NO EVENT SHALL Micromata GmbH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 25 | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 27 | OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 28 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/ItemIconState.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0; 3 | 4 | import jakarta.xml.bind.annotation.XmlEnum; 5 | import jakarta.xml.bind.annotation.XmlEnumValue; 6 | import jakarta.xml.bind.annotation.XmlType; 7 | 8 | 9 | /** 10 | * {@code } 11 | *

12 | * {@code } Specifies the current state of the NetworkLink or Folder. Possible values 13 | * are open, closed, error, fetching0, fetching1, and fetching2. These values can be 14 | * combined by inserting a space between two values (no comma). {@code }Specifies the 15 | * URI of the image used in the List View for the Feature. 16 | *

17 | *

18 | * Icon used in the List view that reflects the state of a Folder or Link fetch. Icons 19 | * associated with the open and closed modes are used for Folders and Network Links. 20 | * Icons associated with the error and fetching0, fetching1, and fetching2 modes are 21 | * used for Network Links. The following screen capture illustrates the Google Earth 22 | * icons for these states: 23 | *

24 | * 25 | * 26 | * 27 | */ 28 | @XmlType(name = "itemIconStateEnumType") 29 | @XmlEnum 30 | public enum ItemIconState { 31 | 32 | @XmlEnumValue("open") 33 | OPEN("open"), 34 | @XmlEnumValue("closed") 35 | CLOSED("closed"), 36 | @XmlEnumValue("error") 37 | ERROR("error"), 38 | @XmlEnumValue("fetching0") 39 | FETCHING_0("fetching0"), 40 | @XmlEnumValue("fetching1") 41 | FETCHING_1("fetching1"), 42 | @XmlEnumValue("fetching2") 43 | FETCHING_2("fetching2"); 44 | private final String value; 45 | 46 | ItemIconState(String v) { 47 | value = v; 48 | } 49 | 50 | public String value() { 51 | return value; 52 | } 53 | 54 | public static ItemIconState fromValue(String v) { 55 | for (ItemIconState c: ItemIconState.values()) { 56 | if (c.value.equals(v)) { 57 | return c; 58 | } 59 | } 60 | throw new IllegalArgumentException(v); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/ListItemType.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0; 3 | 4 | import jakarta.xml.bind.annotation.XmlEnum; 5 | import jakarta.xml.bind.annotation.XmlEnumValue; 6 | import jakarta.xml.bind.annotation.XmlType; 7 | 8 | 9 | /** 10 | * {@code } 11 | *

12 | * Specifies how a Feature is displayed in the list view. Possible values are: check 13 | * (default) - The Feature's visibility is tied to its item's checkbox. radioFolder 14 | * - When specified for a Container, only one of the Container's items is visible at 15 | * a time checkOffOnly - When specified for a Container or Network Link, prevents all 16 | * items from being made visible at once—that is, the user can turn everything in the 17 | * Container or Network Link off but cannot turn everything on at the same time. This 18 | * setting is useful for Containers or Network Links containing large amounts of data. 19 | * checkHideChildren - Use a normal checkbox for visibility but do not display the 20 | * Container or Network Link's children in the list view. A checkbox allows the user 21 | * to toggle visibility of the child objects in the viewer. 22 | *

23 | * 24 | * 25 | * 26 | */ 27 | @XmlType(name = "listItemTypeEnumType") 28 | @XmlEnum 29 | public enum ListItemType { 30 | 31 | @XmlEnumValue("radioFolder") 32 | RADIO_FOLDER("radioFolder"), 33 | @XmlEnumValue("check") 34 | CHECK("check"), 35 | @XmlEnumValue("checkHideChildren") 36 | CHECK_HIDE_CHILDREN("checkHideChildren"), 37 | @XmlEnumValue("checkOffOnly") 38 | CHECK_OFF_ONLY("checkOffOnly"); 39 | private final String value; 40 | 41 | ListItemType(String v) { 42 | value = v; 43 | } 44 | 45 | public String value() { 46 | return value; 47 | } 48 | 49 | public static ListItemType fromValue(String v) { 50 | for (ListItemType c: ListItemType.values()) { 51 | if (c.value.equals(v)) { 52 | return c; 53 | } 54 | } 55 | throw new IllegalArgumentException(v); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/gx/TourPrimitive.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0.gx; 3 | 4 | import de.micromata.opengis.kml.v_2_2_0.AbstractObject; 5 | import jakarta.xml.bind.annotation.XmlAccessType; 6 | import jakarta.xml.bind.annotation.XmlAccessorType; 7 | import jakarta.xml.bind.annotation.XmlSeeAlso; 8 | import jakarta.xml.bind.annotation.XmlType; 9 | 10 | /** 11 | * gx:TourPrimitive 12 | *

13 | * Elements extended from gx:TourPrimitive provide instructions to KML browsers during 14 | * tours, including points to fly to and the duration of those flights, pauses, updates 15 | * to KML features, and sound files to play. 16 | *

17 | *

18 | * These elements must be contained within a gx:Playlist element, which in turn is 19 | * contained with a gx:Tour element. 20 | *

21 | *

22 | * This is an abstract element and cannot be used directly in a KML file. This element 23 | * is extended by the gx:FlyTo, gx:AnimatedUpdate, gx:TourControl, gx:Wait, 24 | * and gx:SoundCue elements. 25 | *

26 | * 27 | * Syntax: 28 | *
<gx:Tour>
29 |  *   <gx:Playlist>
30 |  * 
31 |  *     <!-- abstract element; do not create -->
32 |  *     <!-- gx:TourPrimitive -->    <!-- gx:AnimatedUpdate, gx:FlyTo, gx:TourControl, gx:SoundCue, gx:Wait -->
33 |  *         <!-- extends Object -->
34 |  *     <!-- /gx:TourPrimitive -->
35 |  * 
36 |  *   </gx:Playlist>
37 |  * </gx:Tour>
38 |  * 
39 | * 40 | */ 41 | @XmlAccessorType(XmlAccessType.FIELD) 42 | @XmlType(name = "AbstractTourPrimitiveType") 43 | @XmlSeeAlso({ 44 | Wait.class, 45 | AnimatedUpdate.class, 46 | TourControl.class, 47 | FlyTo.class, 48 | SoundCue.class 49 | }) 50 | public abstract class TourPrimitive 51 | extends AbstractObject 52 | implements Cloneable 53 | { 54 | 55 | 56 | public TourPrimitive() { 57 | super(); 58 | } 59 | 60 | @Override 61 | public TourPrimitive clone() { 62 | TourPrimitive copy; 63 | copy = ((TourPrimitive) super.clone()); 64 | return copy; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/main/resources/schema/ogckml/atom-author-link.xsd: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | atom-author-link.xsd 2008-01-23 9 | There is no official atom XSD. This XSD is created based on: 10 | http://atompub.org/2005/08/17/atom.rnc. A subset of Atom as used in the 11 | ogckml22.xsd is defined here. 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/main/java/de/micromata/opengis/kml/v_2_2_0/StyleState.java: -------------------------------------------------------------------------------- 1 | 2 | package de.micromata.opengis.kml.v_2_2_0; 3 | 4 | import jakarta.xml.bind.annotation.XmlEnum; 5 | import jakarta.xml.bind.annotation.XmlEnumValue; 6 | import jakarta.xml.bind.annotation.XmlType; 7 | 8 | 9 | /** 10 | * {@code