All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.micromata.opengis.kml.v_2_2_0.Model Maven / Gradle / Ivy


package de.micromata.opengis.kml.v_2_2_0;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import de.micromata.opengis.kml.v_2_2_0.annotations.Obvious;


/**
 * 
 * 

* A 3D object described in a COLLADA file (referenced in the tag). COLLADA * files have a .dae file extension. Models are created in their own coordinate space * and then located, positioned, and scaled in Google Earth. See the "Topics in KML" * page on Regions for more detail. *

*

* Google Earth supports only triangles and lines as primitive types. The maximum number * of triangles allowed is 21845. Google Earth does not support animation or skinning. * Google Earth does not support external geometry references. *

*

* Google Earth supports the COLLADA common profile, with the following exceptions: *

* * Syntax: *
<Model id="ID">
 *   <!-- specific to Model -->
 *   <altitudeMode>clampToGround</altitudeMode> 
 *       <!-- kml:altitudeModeEnum: clampToGround,relativeToGround,or absolute -->
 *       <!-- or, substitute gx:altitudeMode: clampToSeaFloor, relativeToSeaFloor -->
 *   <Location> 
 *     <longitude></longitude> <!-- kml:angle180 -->
 *     <latitude></latitude>   <!-- kml:angle90 -->  
 *     <altitude>0</altitude>  <!-- double --> 
 *   </Location> 
 *   <Orientation>               
 *     <heading>0</heading>    <!-- kml:angle360 -->
 *     <tilt>0</tilt>          <!-- kml:angle360 -->
 *     <roll>0</roll>          <!-- kml:angle360 -->
 *   </Orientation> 
 *   <Scale> 
 *     <x>1</x>                <!-- double -->
 *     <y>1</y>                <!-- double -->
 *     <z>1</z>                <!-- double -->
 *   </Scale> 
 *   <Link>...</Link>
 *   <ResourceMap>
 *     <Alias>
 *       <targetHref>...</targetHref>   <!-- anyURI -->
 *       <sourceHref>...</sourceHref>   <!-- anyURI -->
 *     </Alias>
 *   </ResourceMap>
 * </Model>
* * Extends: * @see: * * Contained By: * @see: * @see: * * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ModelType", propOrder = { "altitudeMode", "location", "orientation", "scale", "link", "resourceMap", "modelSimpleExtension", "modelObjectExtension" }) @XmlRootElement(name = "Model", namespace = "http://www.opengis.net/kml/2.2") public class Model extends Geometry implements Cloneable { /** * AltitudeMode *

* clampToGround, relativeToGround, absolute *

* * See Also: * See and * * * */ @XmlElement(defaultValue = "clampToGround") protected AltitudeMode altitudeMode; /** * *

* Specifies the exact coordinates of the Model's origin in latitude, longitude, and * altitude. Latitude and longitude measurements are standard lat-lon projection with * WGS84 datum. Altitude is distance above the earth's surface, in meters, and is interpreted * according to or . 39.55375305703105 * -118.9813220168456 1223 *

* * * */ @XmlElement(name = "Location") protected Location location; /** * *

* Describes rotation of a 3D model's coordinate system to position the object in Google * Earth. See diagram below. 45.0 10.0 * 0.0 *

* * * */ @XmlElement(name = "Orientation") protected Orientation orientation; /** * *

* Note: The tag has been deprecated. Use instead. *

*

* Resizes the icon. *

*

* Scales a model along the x, y, and z axes in the model's coordinate space. * 2.5 2.5 3.5 *

* * * */ @XmlElement(name = "Scale") protected Scale scale; /** * (required). see . *

* specifies the location of any of the following: *

*

* If the file specified in is a local file, the and * elements are not used. *

*

* KML files fetched by network links Image files used in any Overlay (the element * specifies the image in an Overlay; has the same fields as ) Model files * used in the element *

*

* Specifies the URL of the website containing this KML or KMZ file. Be sure to include * the namespace for this element in any KML file that uses it: xmlns:atom="http://www.w3.org/2005/Atom" * (see the sample that follows). *

*

* Specifies the file to load and optional refresh parameters. See . *

*

* The element replaces the element of contained in earlier * KML releases and adds functionality for the element (introduced in KML * 2.1). In Google Earth releases 3.0 and earlier, the element is ignored. *

*

* The file is conditionally loaded and refreshed, depending on the refresh parameters * supplied here. Two different sets of refresh parameters can be specified: one set * is based on time ( and ) and one is based on the current * "camera" view ( and ). In addition, Link specifies * whether to scale the bounding box parameters that are sent to the server ( * and provides a set of optional viewing parameters that can be sent to the server * () as well as a set of optional parameters containing version and language * information. *

*

* Tip: To display the top-level Folder or Document within a Network Link in the List * View, assign an ID to the Folder or Document. Without this ID, only the child object * names are displayed in the List View. *

*

* When a file is fetched, the URL that is sent to the server is composed of three * pieces of information: *

*

* the href (Hypertext Reference) that specifies the file to load. an arbitrary format * string that is created from (a) parameters that you specify in the * element or (b) bounding box parameters (this is the default and is used if no * element is included in the file). a second format string that is specified in the * element. *

* * Syntax: *
<Link id="ID">
     *   <!-- specific to Link -->
     *   <href>...</href>                      <!-- string -->
     *   <refreshMode>onChange</refreshMode>   
     *     <!-- refreshModeEnum: onChange, onInterval, or onExpire -->   
     *   <refreshInterval>4</refreshInterval>  <!-- float -->
     *   <viewRefreshMode>never</viewRefreshMode> 
     *     <!-- viewRefreshModeEnum: never, onStop, onRequest, onRegion -->
     *   <viewRefreshTime>4</viewRefreshTime>  <!-- float -->
     *   <viewBoundScale>1</viewBoundScale>    <!-- float -->
     *   <viewFormat>BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]</viewFormat>
     *                                         <!-- string -->
     *   <httpQuery>...</httpQuery>            <!-- string -->
     * </Link>
* * Extends: * @see: * * Contained By: * @see: * @see: * * See Also: * * * * * */ @XmlElement(name = "Link") protected Link link; /** * * * */ @XmlElement(name = "ResourceMap") protected ResourceMap resourceMap; @XmlElement(name = "ModelSimpleExtensionGroup") @XmlSchemaType(name = "anySimpleType") protected List modelSimpleExtension; /** * *

* This is an abstract base class and cannot be used directly in a KML file. It provides * the id attribute, which allows unique identification of a KML element, and the targetId * attribute, which is used to reference objects that have already been loaded into * Google Earth. The id attribute must be assigned if the mechanism is to * be used. *

* * Syntax: *
<!-- abstract element; do not create -->
     * <!-- Object id="ID" targetId="NCName" -->
     * <!-- /Object> -->
* * * */ @XmlElement(name = "ModelObjectExtensionGroup") protected List modelObjectExtension; public Model() { super(); } /** * @see altitudeMode * * @return * possible object is * {@code <}{@link Object}{@code>} * {@code <}{@link de.micromata.opengis.kml.v_2_2_0.AltitudeMode}{@code>} * {@code <}{@link de.micromata.opengis.kml.v_2_2_0.gx.AltitudeMode}{@code>} * */ public AltitudeMode getAltitudeMode() { return altitudeMode; } /** * @see altitudeMode * * @param value * allowed object is * {@code <}{@link Object}{@code>} * {@code <}{@link de.micromata.opengis.kml.v_2_2_0.AltitudeMode}{@code>} * {@code <}{@link de.micromata.opengis.kml.v_2_2_0.gx.AltitudeMode}{@code>} * */ public void setAltitudeMode(AltitudeMode value) { this.altitudeMode = value; } /** * @see location * * @return * possible object is * {@link Location} * */ public Location getLocation() { return location; } /** * @see location * * @param value * allowed object is * {@link Location} * */ public void setLocation(Location value) { this.location = value; } /** * @see orientation * * @return * possible object is * {@link Orientation} * */ public Orientation getOrientation() { return orientation; } /** * @see orientation * * @param value * allowed object is * {@link Orientation} * */ public void setOrientation(Orientation value) { this.orientation = value; } /** * @see scale * * @return * possible object is * {@link Scale} * */ public Scale getScale() { return scale; } /** * @see scale * * @param value * allowed object is * {@link Scale} * */ public void setScale(Scale value) { this.scale = value; } /** * @see link * * @return * possible object is * {@link Link} * */ public Link getLink() { return link; } /** * @see link * * @param value * allowed object is * {@link Link} * */ public void setLink(Link value) { this.link = value; } /** * @see resourceMap * * @return * possible object is * {@link ResourceMap} * */ public ResourceMap getResourceMap() { return resourceMap; } /** * @see resourceMap * * @param value * allowed object is * {@link ResourceMap} * */ public void setResourceMap(ResourceMap value) { this.resourceMap = value; } /** * @see modelSimpleExtension * */ public List getModelSimpleExtension() { if (modelSimpleExtension == null) { modelSimpleExtension = new ArrayList(); } return this.modelSimpleExtension; } /** * @see modelObjectExtension * */ public List getModelObjectExtension() { if (modelObjectExtension == null) { modelObjectExtension = new ArrayList(); } return this.modelObjectExtension; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = ((prime*result)+((altitudeMode == null)? 0 :altitudeMode.hashCode())); result = ((prime*result)+((location == null)? 0 :location.hashCode())); result = ((prime*result)+((orientation == null)? 0 :orientation.hashCode())); result = ((prime*result)+((scale == null)? 0 :scale.hashCode())); result = ((prime*result)+((link == null)? 0 :link.hashCode())); result = ((prime*result)+((resourceMap == null)? 0 :resourceMap.hashCode())); result = ((prime*result)+((modelSimpleExtension == null)? 0 :modelSimpleExtension.hashCode())); result = ((prime*result)+((modelObjectExtension == null)? 0 :modelObjectExtension.hashCode())); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (super.equals(obj) == false) { return false; } if ((obj instanceof Model) == false) { return false; } Model other = ((Model) obj); if (altitudeMode == null) { if (other.altitudeMode!= null) { return false; } } else { if (altitudeMode.equals(other.altitudeMode) == false) { return false; } } if (location == null) { if (other.location!= null) { return false; } } else { if (location.equals(other.location) == false) { return false; } } if (orientation == null) { if (other.orientation!= null) { return false; } } else { if (orientation.equals(other.orientation) == false) { return false; } } if (scale == null) { if (other.scale!= null) { return false; } } else { if (scale.equals(other.scale) == false) { return false; } } if (link == null) { if (other.link!= null) { return false; } } else { if (link.equals(other.link) == false) { return false; } } if (resourceMap == null) { if (other.resourceMap!= null) { return false; } } else { if (resourceMap.equals(other.resourceMap) == false) { return false; } } if (modelSimpleExtension == null) { if (other.modelSimpleExtension!= null) { return false; } } else { if (modelSimpleExtension.equals(other.modelSimpleExtension) == false) { return false; } } if (modelObjectExtension == null) { if (other.modelObjectExtension!= null) { return false; } } else { if (modelObjectExtension.equals(other.modelObjectExtension) == false) { return false; } } return true; } /** * Creates a new instance of {@link Location} and set it to location. * * This method is a short version for: * * Location location = new Location(); * this.setLocation(location); * * */ public Location createAndSetLocation() { Location newValue = new Location(); this.setLocation(newValue); return newValue; } /** * Creates a new instance of {@link Orientation} and set it to orientation. * * This method is a short version for: * * Orientation orientation = new Orientation(); * this.setOrientation(orientation); * * */ public Orientation createAndSetOrientation() { Orientation newValue = new Orientation(); this.setOrientation(newValue); return newValue; } /** * Creates a new instance of {@link Scale} and set it to scale. * * This method is a short version for: * * Scale scale = new Scale(); * this.setScale(scale); * * */ public Scale createAndSetScale() { Scale newValue = new Scale(); this.setScale(newValue); return newValue; } /** * Creates a new instance of {@link Link} and set it to link. * * This method is a short version for: * * Link link = new Link(); * this.setLink(link); * * */ public Link createAndSetLink() { Link newValue = new Link(); this.setLink(newValue); return newValue; } /** * Creates a new instance of {@link ResourceMap} and set it to resourceMap. * * This method is a short version for: * * ResourceMap resourceMap = new ResourceMap(); * this.setResourceMap(resourceMap); * * */ public ResourceMap createAndSetResourceMap() { ResourceMap newValue = new ResourceMap(); this.setResourceMap(newValue); return newValue; } /** * @see modelSimpleExtension * * @param modelSimpleExtension */ public void setModelSimpleExtension(final List modelSimpleExtension) { this.modelSimpleExtension = modelSimpleExtension; } /** * add a value to the modelSimpleExtension property collection * * @param modelSimpleExtension * Objects of the following type are allowed in the list: {@link Object} * @return * true (as general contract of Collection.add). */ public Model addToModelSimpleExtension(final Object modelSimpleExtension) { this.getModelSimpleExtension().add(modelSimpleExtension); return this; } /** * @see modelObjectExtension * * @param modelObjectExtension */ public void setModelObjectExtension(final List modelObjectExtension) { this.modelObjectExtension = modelObjectExtension; } /** * add a value to the modelObjectExtension property collection * * @param modelObjectExtension * Objects of the following type are allowed in the list: {@link AbstractObject} * @return * true (as general contract of Collection.add). */ public Model addToModelObjectExtension(final AbstractObject modelObjectExtension) { this.getModelObjectExtension().add(modelObjectExtension); return this; } /** * @see objectSimpleExtension * */ @Obvious @Override public void setObjectSimpleExtension(final List objectSimpleExtension) { super.setObjectSimpleExtension(objectSimpleExtension); } @Obvious @Override public Model addToObjectSimpleExtension(final Object objectSimpleExtension) { super.getObjectSimpleExtension().add(objectSimpleExtension); return this; } /** * @see geometrySimpleExtension * */ @Obvious @Override public void setGeometrySimpleExtension(final List geometrySimpleExtension) { super.setGeometrySimpleExtension(geometrySimpleExtension); } @Obvious @Override public Model addToGeometrySimpleExtension(final Object geometrySimpleExtension) { super.getGeometrySimpleExtension().add(geometrySimpleExtension); return this; } /** * @see geometryObjectExtension * */ @Obvious @Override public void setGeometryObjectExtension(final List geometryObjectExtension) { super.setGeometryObjectExtension(geometryObjectExtension); } @Obvious @Override public Model addToGeometryObjectExtension(final AbstractObject geometryObjectExtension) { super.getGeometryObjectExtension().add(geometryObjectExtension); return this; } /** * fluent setter * @see #setAltitudeMode(Object) * * @param altitudeMode * required parameter */ public Model withAltitudeMode(final AltitudeMode altitudeMode) { this.setAltitudeMode(altitudeMode); return this; } /** * fluent setter * @see #setLocation(Location) * * @param location * required parameter */ public Model withLocation(final Location location) { this.setLocation(location); return this; } /** * fluent setter * @see #setOrientation(Orientation) * * @param orientation * required parameter */ public Model withOrientation(final Orientation orientation) { this.setOrientation(orientation); return this; } /** * fluent setter * @see #setScale(Scale) * * @param scale * required parameter */ public Model withScale(final Scale scale) { this.setScale(scale); return this; } /** * fluent setter * @see #setLink(Link) * * @param link * required parameter */ public Model withLink(final Link link) { this.setLink(link); return this; } /** * fluent setter * @see #setResourceMap(ResourceMap) * * @param resourceMap * required parameter */ public Model withResourceMap(final ResourceMap resourceMap) { this.setResourceMap(resourceMap); return this; } /** * fluent setter * @see #setModelSimpleExtension(List) * * @param modelSimpleExtension * required parameter */ public Model withModelSimpleExtension(final List modelSimpleExtension) { this.setModelSimpleExtension(modelSimpleExtension); return this; } /** * fluent setter * @see #setModelObjectExtension(List) * * @param modelObjectExtension * required parameter */ public Model withModelObjectExtension(final List modelObjectExtension) { this.setModelObjectExtension(modelObjectExtension); return this; } @Obvious @Override public Model withObjectSimpleExtension(final List objectSimpleExtension) { super.withObjectSimpleExtension(objectSimpleExtension); return this; } @Obvious @Override public Model withId(final String id) { super.withId(id); return this; } @Obvious @Override public Model withTargetId(final String targetId) { super.withTargetId(targetId); return this; } @Obvious @Override public Model withGeometrySimpleExtension(final List geometrySimpleExtension) { super.withGeometrySimpleExtension(geometrySimpleExtension); return this; } @Obvious @Override public Model withGeometryObjectExtension(final List geometryObjectExtension) { super.withGeometryObjectExtension(geometryObjectExtension); return this; } @Override public Model clone() { Model copy; copy = ((Model) super.clone()); copy.location = ((location == null)?null:((Location) location.clone())); copy.orientation = ((orientation == null)?null:((Orientation) orientation.clone())); copy.scale = ((scale == null)?null:((Scale) scale.clone())); copy.link = ((link == null)?null:((Link) link.clone())); copy.resourceMap = ((resourceMap == null)?null:((ResourceMap) resourceMap.clone())); copy.modelSimpleExtension = new ArrayList((getModelSimpleExtension().size())); for (Object iter: modelSimpleExtension) { copy.modelSimpleExtension.add(iter); } copy.modelObjectExtension = new ArrayList((getModelObjectExtension().size())); for (AbstractObject iter: modelObjectExtension) { copy.modelObjectExtension.add(iter.clone()); } return copy; } }