Commit 6fe03772 authored by Rushikesh Padsala's avatar Rushikesh Padsala
Browse files

Merge branch 'beta7' into 'master'

Initial commit

See merge request energy-ade/energy-ade-2-citygml4j!1
parents ae6f88db 43f73dc0
//
// Generated with ade-xjc - XML Schema binding compiler for CityGML ADEs, version 2.10.0
// ade-xjc is part of the citygml4j project, see https://github.com/citygml4j
// Any modifications to this file will be lost upon recompilation of the source
// Generated: Wed Jul 02 10:53:09 CEST 2025
//
package org.sig3d.citygml.energyADE2beta7;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.w3._1999.xlink.ActuateType;
import org.w3._1999.xlink.ShowType;
import org.w3._1999.xlink.TypeType;
/**
* <p>Java class for WastePropertyType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="WastePropertyType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence minOccurs="0"&gt;
* &lt;element ref="{http://www.citygml.org/ade/energy/2.0}Waste"/&gt;
* &lt;/sequence&gt;
* &lt;attGroup ref="{http://www.opengis.net/gml}AssociationAttributeGroup"/&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WastePropertyType", propOrder = {
"waste"
})
public class WastePropertyType {
@XmlElement(name = "Waste")
protected WasteType waste;
@XmlAttribute(name = "remoteSchema", namespace = "http://www.opengis.net/gml")
@XmlSchemaType(name = "anyURI")
protected String remoteSchema;
@XmlAttribute(name = "type", namespace = "http://www.w3.org/1999/xlink")
protected TypeType type;
@XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink")
protected String href;
@XmlAttribute(name = "role", namespace = "http://www.w3.org/1999/xlink")
protected String role;
@XmlAttribute(name = "arcrole", namespace = "http://www.w3.org/1999/xlink")
protected String arcrole;
@XmlAttribute(name = "title", namespace = "http://www.w3.org/1999/xlink")
protected String title;
@XmlAttribute(name = "show", namespace = "http://www.w3.org/1999/xlink")
protected ShowType show;
@XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink")
protected ActuateType actuate;
/**
* Gets the value of the waste property.
*
* @return
* possible object is
* {@link WasteType }
*
*/
public WasteType getWaste() {
return waste;
}
/**
* Sets the value of the waste property.
*
* @param value
* allowed object is
* {@link WasteType }
*
*/
public void setWaste(WasteType value) {
this.waste = value;
}
public boolean isSetWaste() {
return (this.waste!= null);
}
/**
* Gets the value of the remoteSchema property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRemoteSchema() {
return remoteSchema;
}
/**
* Sets the value of the remoteSchema property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRemoteSchema(String value) {
this.remoteSchema = value;
}
public boolean isSetRemoteSchema() {
return (this.remoteSchema!= null);
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link TypeType }
*
*/
public TypeType getType() {
if (type == null) {
return TypeType.SIMPLE;
} else {
return type;
}
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link TypeType }
*
*/
public void setType(TypeType value) {
this.type = value;
}
public boolean isSetType() {
return (this.type!= null);
}
/**
* Gets the value of the href property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHref() {
return href;
}
/**
* Sets the value of the href property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHref(String value) {
this.href = value;
}
public boolean isSetHref() {
return (this.href!= null);
}
/**
* Gets the value of the role property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRole() {
return role;
}
/**
* Sets the value of the role property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRole(String value) {
this.role = value;
}
public boolean isSetRole() {
return (this.role!= null);
}
/**
* Gets the value of the arcrole property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getArcrole() {
return arcrole;
}
/**
* Sets the value of the arcrole property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArcrole(String value) {
this.arcrole = value;
}
public boolean isSetArcrole() {
return (this.arcrole!= null);
}
/**
* Gets the value of the title property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
public boolean isSetTitle() {
return (this.title!= null);
}
/**
* Gets the value of the show property.
*
* @return
* possible object is
* {@link ShowType }
*
*/
public ShowType getShow() {
return show;
}
/**
* Sets the value of the show property.
*
* @param value
* allowed object is
* {@link ShowType }
*
*/
public void setShow(ShowType value) {
this.show = value;
}
public boolean isSetShow() {
return (this.show!= null);
}
/**
* Gets the value of the actuate property.
*
* @return
* possible object is
* {@link ActuateType }
*
*/
public ActuateType getActuate() {
return actuate;
}
/**
* Sets the value of the actuate property.
*
* @param value
* allowed object is
* {@link ActuateType }
*
*/
public void setActuate(ActuateType value) {
this.actuate = value;
}
public boolean isSetActuate() {
return (this.actuate!= null);
}
}
//
// Generated with ade-xjc - XML Schema binding compiler for CityGML ADEs, version 2.10.0
// ade-xjc is part of the citygml4j project, see https://github.com/citygml4j
// Any modifications to this file will be lost upon recompilation of the source
// Generated: Wed Jul 02 10:53:09 CEST 2025
//
package org.sig3d.citygml.energyADE2beta7;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import net.opengis.gml.CodeType;
/**
* <p>Java class for WasteType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="WasteType"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://www.citygml.org/ade/energy/2.0}AbstractResourceType"&gt;
* &lt;sequence&gt;
* &lt;element name="type" type="{http://www.opengis.net/gml}CodeType"/&gt;
* &lt;element name="endUse" type="{http://www.opengis.net/gml}CodeType"/&gt;
* &lt;element name="isDangerous" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt;
* &lt;element name="isRecyclable" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WasteType", propOrder = {
"type",
"endUse",
"isDangerous",
"isRecyclable"
})
public class WasteType
extends AbstractResourceType
{
@XmlElement(required = true)
protected CodeType type;
@XmlElement(required = true)
protected CodeType endUse;
protected Boolean isDangerous;
protected Boolean isRecyclable;
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link CodeType }
*
*/
public CodeType getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link CodeType }
*
*/
public void setType(CodeType value) {
this.type = value;
}
public boolean isSetType() {
return (this.type!= null);
}
/**
* Gets the value of the endUse property.
*
* @return
* possible object is
* {@link CodeType }
*
*/
public CodeType getEndUse() {
return endUse;
}
/**
* Sets the value of the endUse property.
*
* @param value
* allowed object is
* {@link CodeType }
*
*/
public void setEndUse(CodeType value) {
this.endUse = value;
}
public boolean isSetEndUse() {
return (this.endUse!= null);
}
/**
* Gets the value of the isDangerous property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isIsDangerous() {
return isDangerous;
}
/**
* Sets the value of the isDangerous property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setIsDangerous(Boolean value) {
this.isDangerous = value;
}
public boolean isSetIsDangerous() {
return (this.isDangerous!= null);
}
/**
* Gets the value of the isRecyclable property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isIsRecyclable() {
return isRecyclable;
}
/**
* Sets the value of the isRecyclable property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setIsRecyclable(Boolean value) {
this.isRecyclable = value;
}
public boolean isSetIsRecyclable() {
return (this.isRecyclable!= null);
}
}
//
// Generated with ade-xjc - XML Schema binding compiler for CityGML ADEs, version 2.10.0
// ade-xjc is part of the citygml4j project, see https://github.com/citygml4j
// Any modifications to this file will be lost upon recompilation of the source
// Generated: Wed Jul 02 10:53:09 CEST 2025
//
package org.sig3d.citygml.energyADE2beta7;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.w3._1999.xlink.ActuateType;
import org.w3._1999.xlink.ShowType;
import org.w3._1999.xlink.TypeType;
/**
* <p>Java class for WaterPropertyType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="WaterPropertyType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence minOccurs="0"&gt;
* &lt;element ref="{http://www.citygml.org/ade/energy/2.0}Water"/&gt;
* &lt;/sequence&gt;
* &lt;attGroup ref="{http://www.opengis.net/gml}AssociationAttributeGroup"/&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WaterPropertyType", propOrder = {
"water"
})
public class WaterPropertyType {
@XmlElement(name = "Water")
protected WaterType water;
@XmlAttribute(name = "remoteSchema", namespace = "http://www.opengis.net/gml")
@XmlSchemaType(name = "anyURI")
protected String remoteSchema;
@XmlAttribute(name = "type", namespace = "http://www.w3.org/1999/xlink")
protected TypeType type;
@XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink")
protected String href;
@XmlAttribute(name = "role", namespace = "http://www.w3.org/1999/xlink")
protected String role;
@XmlAttribute(name = "arcrole", namespace = "http://www.w3.org/1999/xlink")
protected String arcrole;
@XmlAttribute(name = "title", namespace = "http://www.w3.org/1999/xlink")
protected String title;
@XmlAttribute(name = "show", namespace = "http://www.w3.org/1999/xlink")
protected ShowType show;
@XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink")
protected ActuateType actuate;
/**
* Gets the value of the water property.
*
* @return
* possible object is
* {@link WaterType }
*
*/
public WaterType getWater() {
return water;
}
/**
* Sets the value of the water property.
*
* @param value
* allowed object is
* {@link WaterType }
*
*/
public void setWater(WaterType value) {
this.water = value;
}
public boolean isSetWater() {
return (this.water!= null);
}
/**
* Gets the value of the remoteSchema property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRemoteSchema() {
return remoteSchema;
}
/**
* Sets the value of the remoteSchema property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRemoteSchema(String value) {
this.remoteSchema = value;
}
public boolean isSetRemoteSchema() {
return (this.remoteSchema!= null);
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link TypeType }
*
*/
public TypeType getType() {
if (type == null) {
return TypeType.SIMPLE;
} else {
return type;
}
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link TypeType }
*
*/
public void setType(TypeType value) {
this.type = value;
}
public boolean isSetType() {
return (this.type!= null);
}
/**
* Gets the value of the href property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHref() {
return href;
}
/**
* Sets the value of the href property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHref(String value) {
this.href = value;
}
public boolean isSetHref() {
return (this.href!= null);
}
/**
* Gets the value of the role property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRole() {
return role;
}
/**
* Sets the value of the role property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRole(String value) {
this.role = value;
}
public boolean isSetRole() {
return (this.role!= null);
}
/**
* Gets the value of the arcrole property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getArcrole() {
return arcrole;
}
/**
* Sets the value of the arcrole property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArcrole(String value) {
this.arcrole = value;
}
public boolean isSetArcrole() {
return (this.arcrole!= null);
}
/**
* Gets the value of the title property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
public boolean isSetTitle() {
return (this.title!= null);
}
/**
* Gets the value of the show property.
*
* @return
* possible object is
* {@link ShowType }
*
*/
public ShowType getShow() {
return show;
}
/**
* Sets the value of the show property.
*
* @param value
* allowed object is
* {@link ShowType }
*
*/
public void setShow(ShowType value) {
this.show = value;
}
public boolean isSetShow() {
return (this.show!= null);
}
/**
* Gets the value of the actuate property.
*
* @return
* possible object is
* {@link ActuateType }
*
*/
public ActuateType getActuate() {
return actuate;
}
/**
* Sets the value of the actuate property.
*
* @param value
* allowed object is
* {@link ActuateType }
*
*/
public void setActuate(ActuateType value) {
this.actuate = value;
}
public boolean isSetActuate() {
return (this.actuate!= null);
}
}
//
// Generated with ade-xjc - XML Schema binding compiler for CityGML ADEs, version 2.10.0
// ade-xjc is part of the citygml4j project, see https://github.com/citygml4j
// Any modifications to this file will be lost upon recompilation of the source
// Generated: Wed Jul 02 10:53:09 CEST 2025
//
package org.sig3d.citygml.energyADE2beta7;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import net.opengis.gml.CodeType;
/**
* <p>Java class for WaterType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="WaterType"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://www.citygml.org/ade/energy/2.0}AbstractResourceType"&gt;
* &lt;sequence&gt;
* &lt;element name="type" type="{http://www.opengis.net/gml}CodeType"/&gt;
* &lt;element name="endUse" type="{http://www.opengis.net/gml}CodeType"/&gt;
* &lt;/sequence&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WaterType", propOrder = {
"type",
"endUse"
})
public class WaterType
extends AbstractResourceType
{
@XmlElement(required = true)
protected CodeType type;
@XmlElement(required = true)
protected CodeType endUse;
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link CodeType }
*
*/
public CodeType getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link CodeType }
*
*/
public void setType(CodeType value) {
this.type = value;
}
public boolean isSetType() {
return (this.type!= null);
}
/**
* Gets the value of the endUse property.
*
* @return
* possible object is
* {@link CodeType }
*
*/
public CodeType getEndUse() {
return endUse;
}
/**
* Sets the value of the endUse property.
*
* @param value
* allowed object is
* {@link CodeType }
*
*/
public void setEndUse(CodeType value) {
this.endUse = value;
}
public boolean isSetEndUse() {
return (this.endUse!= null);
}
}
//
// Generated with ade-xjc - XML Schema binding compiler for CityGML ADEs, version 2.10.0
// ade-xjc is part of the citygml4j project, see https://github.com/citygml4j
// Any modifications to this file will be lost upon recompilation of the source
// Generated: Wed Jul 02 10:53:09 CEST 2025
//
package org.sig3d.citygml.energyADE2beta7;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for WavelengthRangeType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* &lt;simpleType name="WavelengthRangeType"&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;
* &lt;enumeration value="solar"/&gt;
* &lt;enumeration value="infrared"/&gt;
* &lt;enumeration value="visible"/&gt;
* &lt;enumeration value="total"/&gt;
* &lt;/restriction&gt;
* &lt;/simpleType&gt;
* </pre>
*
*/
@XmlType(name = "WavelengthRangeType")
@XmlEnum
public enum WavelengthRangeType {
@XmlEnumValue("solar")
SOLAR("solar"),
@XmlEnumValue("infrared")
INFRARED("infrared"),
@XmlEnumValue("visible")
VISIBLE("visible"),
@XmlEnumValue("total")
TOTAL("total");
private final String value;
WavelengthRangeType(String v) {
value = v;
}
public String value() {
return value;
}
public static WavelengthRangeType fromValue(String v) {
for (WavelengthRangeType c: WavelengthRangeType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
//
// Generated with ade-xjc - XML Schema binding compiler for CityGML ADEs, version 2.10.0
// ade-xjc is part of the citygml4j project, see https://github.com/citygml4j
// Any modifications to this file will be lost upon recompilation of the source
// Generated: Wed Jul 02 10:53:09 CEST 2025
//
package org.sig3d.citygml.energyADE2beta7;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.w3._1999.xlink.ActuateType;
import org.w3._1999.xlink.ShowType;
import org.w3._1999.xlink.TypeType;
/**
* <p>Java class for WeatherDataPropertyType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="WeatherDataPropertyType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence minOccurs="0"&gt;
* &lt;element ref="{http://www.citygml.org/ade/energy/2.0}WeatherData"/&gt;
* &lt;/sequence&gt;
* &lt;attGroup ref="{http://www.opengis.net/gml}AssociationAttributeGroup"/&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WeatherDataPropertyType", propOrder = {
"weatherData"
})
public class WeatherDataPropertyType {
@XmlElement(name = "WeatherData")
protected WeatherDataType weatherData;
@XmlAttribute(name = "remoteSchema", namespace = "http://www.opengis.net/gml")
@XmlSchemaType(name = "anyURI")
protected String remoteSchema;
@XmlAttribute(name = "type", namespace = "http://www.w3.org/1999/xlink")
protected TypeType type;
@XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink")
protected String href;
@XmlAttribute(name = "role", namespace = "http://www.w3.org/1999/xlink")
protected String role;
@XmlAttribute(name = "arcrole", namespace = "http://www.w3.org/1999/xlink")
protected String arcrole;
@XmlAttribute(name = "title", namespace = "http://www.w3.org/1999/xlink")
protected String title;
@XmlAttribute(name = "show", namespace = "http://www.w3.org/1999/xlink")
protected ShowType show;
@XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink")
protected ActuateType actuate;
/**
* Gets the value of the weatherData property.
*
* @return
* possible object is
* {@link WeatherDataType }
*
*/
public WeatherDataType getWeatherData() {
return weatherData;
}
/**
* Sets the value of the weatherData property.
*
* @param value
* allowed object is
* {@link WeatherDataType }
*
*/
public void setWeatherData(WeatherDataType value) {
this.weatherData = value;
}
public boolean isSetWeatherData() {
return (this.weatherData!= null);
}
/**
* Gets the value of the remoteSchema property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRemoteSchema() {
return remoteSchema;
}
/**
* Sets the value of the remoteSchema property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRemoteSchema(String value) {
this.remoteSchema = value;
}
public boolean isSetRemoteSchema() {
return (this.remoteSchema!= null);
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link TypeType }
*
*/
public TypeType getType() {
if (type == null) {
return TypeType.SIMPLE;
} else {
return type;
}
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link TypeType }
*
*/
public void setType(TypeType value) {
this.type = value;
}
public boolean isSetType() {
return (this.type!= null);
}
/**
* Gets the value of the href property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHref() {
return href;
}
/**
* Sets the value of the href property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHref(String value) {
this.href = value;
}
public boolean isSetHref() {
return (this.href!= null);
}
/**
* Gets the value of the role property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRole() {
return role;
}
/**
* Sets the value of the role property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRole(String value) {
this.role = value;
}
public boolean isSetRole() {
return (this.role!= null);
}
/**
* Gets the value of the arcrole property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getArcrole() {
return arcrole;
}
/**
* Sets the value of the arcrole property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArcrole(String value) {
this.arcrole = value;
}
public boolean isSetArcrole() {
return (this.arcrole!= null);
}
/**
* Gets the value of the title property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
public boolean isSetTitle() {
return (this.title!= null);
}
/**
* Gets the value of the show property.
*
* @return
* possible object is
* {@link ShowType }
*
*/
public ShowType getShow() {
return show;
}
/**
* Sets the value of the show property.
*
* @param value
* allowed object is
* {@link ShowType }
*
*/
public void setShow(ShowType value) {
this.show = value;
}
public boolean isSetShow() {
return (this.show!= null);
}
/**
* Gets the value of the actuate property.
*
* @return
* possible object is
* {@link ActuateType }
*
*/
public ActuateType getActuate() {
return actuate;
}
/**
* Sets the value of the actuate property.
*
* @param value
* allowed object is
* {@link ActuateType }
*
*/
public void setActuate(ActuateType value) {
this.actuate = value;
}
public boolean isSetActuate() {
return (this.actuate!= null);
}
}
//
// Generated with ade-xjc - XML Schema binding compiler for CityGML ADEs, version 2.10.0
// ade-xjc is part of the citygml4j project, see https://github.com/citygml4j
// Any modifications to this file will be lost upon recompilation of the source
// Generated: Wed Jul 02 10:53:09 CEST 2025
//
package org.sig3d.citygml.energyADE2beta7;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import net.opengis.gml.AbstractFeatureType;
import net.opengis.gml.CodeType;
import net.opengis.gml.MeasureType;
import net.opengis.gml.PointPropertyType;
/**
* <p>Java class for WeatherDataType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="WeatherDataType"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://www.opengis.net/gml}AbstractFeatureType"&gt;
* &lt;sequence&gt;
* &lt;element name="libraryCode" type="{http://www.opengis.net/gml}CodeType" minOccurs="0"/&gt;
* &lt;element name="type" type="{http://www.opengis.net/gml}CodeType"/&gt;
* &lt;element name="valueType" type="{http://www.opengis.net/gml}CodeType" minOccurs="0"/&gt;
* &lt;element name="yearlyValue" type="{http://www.opengis.net/gml}MeasureType" minOccurs="0"/&gt;
* &lt;element name="timeDependentValues" type="{http://www.citygml.org/ade/energy/2.0}AbstractTimeSeriesPropertyType" minOccurs="0"/&gt;
* &lt;element name="position" type="{http://www.opengis.net/gml}PointPropertyType" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WeatherDataType", propOrder = {
"libraryCode",
"type",
"valueType",
"yearlyValue",
"timeDependentValues",
"position"
})
public class WeatherDataType
extends AbstractFeatureType
{
protected CodeType libraryCode;
@XmlElement(required = true)
protected CodeType type;
protected CodeType valueType;
protected MeasureType yearlyValue;
protected AbstractTimeSeriesPropertyType timeDependentValues;
protected PointPropertyType position;
/**
* Gets the value of the libraryCode property.
*
* @return
* possible object is
* {@link CodeType }
*
*/
public CodeType getLibraryCode() {
return libraryCode;
}
/**
* Sets the value of the libraryCode property.
*
* @param value
* allowed object is
* {@link CodeType }
*
*/
public void setLibraryCode(CodeType value) {
this.libraryCode = value;
}
public boolean isSetLibraryCode() {
return (this.libraryCode!= null);
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link CodeType }
*
*/
public CodeType getType() {
return type;
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link CodeType }
*
*/
public void setType(CodeType value) {
this.type = value;
}
public boolean isSetType() {
return (this.type!= null);
}
/**
* Gets the value of the valueType property.
*
* @return
* possible object is
* {@link CodeType }
*
*/
public CodeType getValueType() {
return valueType;
}
/**
* Sets the value of the valueType property.
*
* @param value
* allowed object is
* {@link CodeType }
*
*/
public void setValueType(CodeType value) {
this.valueType = value;
}
public boolean isSetValueType() {
return (this.valueType!= null);
}
/**
* Gets the value of the yearlyValue property.
*
* @return
* possible object is
* {@link MeasureType }
*
*/
public MeasureType getYearlyValue() {
return yearlyValue;
}
/**
* Sets the value of the yearlyValue property.
*
* @param value
* allowed object is
* {@link MeasureType }
*
*/
public void setYearlyValue(MeasureType value) {
this.yearlyValue = value;
}
public boolean isSetYearlyValue() {
return (this.yearlyValue!= null);
}
/**
* Gets the value of the timeDependentValues property.
*
* @return
* possible object is
* {@link AbstractTimeSeriesPropertyType }
*
*/
public AbstractTimeSeriesPropertyType getTimeDependentValues() {
return timeDependentValues;
}
/**
* Sets the value of the timeDependentValues property.
*
* @param value
* allowed object is
* {@link AbstractTimeSeriesPropertyType }
*
*/
public void setTimeDependentValues(AbstractTimeSeriesPropertyType value) {
this.timeDependentValues = value;
}
public boolean isSetTimeDependentValues() {
return (this.timeDependentValues!= null);
}
/**
* Gets the value of the position property.
*
* @return
* possible object is
* {@link PointPropertyType }
*
*/
public PointPropertyType getPosition() {
return position;
}
/**
* Sets the value of the position property.
*
* @param value
* allowed object is
* {@link PointPropertyType }
*
*/
public void setPosition(PointPropertyType value) {
this.position = value;
}
public boolean isSetPosition() {
return (this.position!= null);
}
}
//
// Generated with ade-xjc - XML Schema binding compiler for CityGML ADEs, version 2.10.0
// ade-xjc is part of the citygml4j project, see https://github.com/citygml4j
// Any modifications to this file will be lost upon recompilation of the source
// Generated: Wed Jul 02 10:53:09 CEST 2025
//
package org.sig3d.citygml.energyADE2beta7;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.w3._1999.xlink.ActuateType;
import org.w3._1999.xlink.ShowType;
import org.w3._1999.xlink.TypeType;
/**
* <p>Java class for WeatherStationPropertyType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="WeatherStationPropertyType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence minOccurs="0"&gt;
* &lt;element ref="{http://www.citygml.org/ade/energy/2.0}WeatherStation"/&gt;
* &lt;/sequence&gt;
* &lt;attGroup ref="{http://www.opengis.net/gml}AssociationAttributeGroup"/&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WeatherStationPropertyType", propOrder = {
"weatherStation"
})
public class WeatherStationPropertyType {
@XmlElement(name = "WeatherStation")
protected WeatherStationType weatherStation;
@XmlAttribute(name = "remoteSchema", namespace = "http://www.opengis.net/gml")
@XmlSchemaType(name = "anyURI")
protected String remoteSchema;
@XmlAttribute(name = "type", namespace = "http://www.w3.org/1999/xlink")
protected TypeType type;
@XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink")
protected String href;
@XmlAttribute(name = "role", namespace = "http://www.w3.org/1999/xlink")
protected String role;
@XmlAttribute(name = "arcrole", namespace = "http://www.w3.org/1999/xlink")
protected String arcrole;
@XmlAttribute(name = "title", namespace = "http://www.w3.org/1999/xlink")
protected String title;
@XmlAttribute(name = "show", namespace = "http://www.w3.org/1999/xlink")
protected ShowType show;
@XmlAttribute(name = "actuate", namespace = "http://www.w3.org/1999/xlink")
protected ActuateType actuate;
/**
* Gets the value of the weatherStation property.
*
* @return
* possible object is
* {@link WeatherStationType }
*
*/
public WeatherStationType getWeatherStation() {
return weatherStation;
}
/**
* Sets the value of the weatherStation property.
*
* @param value
* allowed object is
* {@link WeatherStationType }
*
*/
public void setWeatherStation(WeatherStationType value) {
this.weatherStation = value;
}
public boolean isSetWeatherStation() {
return (this.weatherStation!= null);
}
/**
* Gets the value of the remoteSchema property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRemoteSchema() {
return remoteSchema;
}
/**
* Sets the value of the remoteSchema property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRemoteSchema(String value) {
this.remoteSchema = value;
}
public boolean isSetRemoteSchema() {
return (this.remoteSchema!= null);
}
/**
* Gets the value of the type property.
*
* @return
* possible object is
* {@link TypeType }
*
*/
public TypeType getType() {
if (type == null) {
return TypeType.SIMPLE;
} else {
return type;
}
}
/**
* Sets the value of the type property.
*
* @param value
* allowed object is
* {@link TypeType }
*
*/
public void setType(TypeType value) {
this.type = value;
}
public boolean isSetType() {
return (this.type!= null);
}
/**
* Gets the value of the href property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getHref() {
return href;
}
/**
* Sets the value of the href property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setHref(String value) {
this.href = value;
}
public boolean isSetHref() {
return (this.href!= null);
}
/**
* Gets the value of the role property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRole() {
return role;
}
/**
* Sets the value of the role property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRole(String value) {
this.role = value;
}
public boolean isSetRole() {
return (this.role!= null);
}
/**
* Gets the value of the arcrole property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getArcrole() {
return arcrole;
}
/**
* Sets the value of the arcrole property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArcrole(String value) {
this.arcrole = value;
}
public boolean isSetArcrole() {
return (this.arcrole!= null);
}
/**
* Gets the value of the title property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
public boolean isSetTitle() {
return (this.title!= null);
}
/**
* Gets the value of the show property.
*
* @return
* possible object is
* {@link ShowType }
*
*/
public ShowType getShow() {
return show;
}
/**
* Sets the value of the show property.
*
* @param value
* allowed object is
* {@link ShowType }
*
*/
public void setShow(ShowType value) {
this.show = value;
}
public boolean isSetShow() {
return (this.show!= null);
}
/**
* Gets the value of the actuate property.
*
* @return
* possible object is
* {@link ActuateType }
*
*/
public ActuateType getActuate() {
return actuate;
}
/**
* Sets the value of the actuate property.
*
* @param value
* allowed object is
* {@link ActuateType }
*
*/
public void setActuate(ActuateType value) {
this.actuate = value;
}
public boolean isSetActuate() {
return (this.actuate!= null);
}
}
//
// Generated with ade-xjc - XML Schema binding compiler for CityGML ADEs, version 2.10.0
// ade-xjc is part of the citygml4j project, see https://github.com/citygml4j
// Any modifications to this file will be lost upon recompilation of the source
// Generated: Wed Jul 02 10:53:09 CEST 2025
//
package org.sig3d.citygml.energyADE2beta7;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import net.opengis.citygml._2.AbstractCityObjectType;
/**
* <p>Java class for WeatherStationType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="WeatherStationType"&gt;
* &lt;complexContent&gt;
* &lt;extension base="{http://www.opengis.net/citygml/2.0}AbstractCityObjectType"&gt;
* &lt;sequence&gt;
* &lt;/sequence&gt;
* &lt;/extension&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WeatherStationType")
public class WeatherStationType
extends AbstractCityObjectType
{
}
//
// Generated with ade-xjc - XML Schema binding compiler for CityGML ADEs, version 2.10.0
// ade-xjc is part of the citygml4j project, see https://github.com/citygml4j
// Any modifications to this file will be lost upon recompilation of the source
// Generated: Wed Jul 02 10:53:09 CEST 2025
//
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.citygml.org/ade/energy/2.0", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED, xmlns = {
@javax.xml.bind.annotation.XmlNs(namespaceURI = "http://www.citygml.org/ade/energy/2.0", prefix = "nrg2")
})
package org.sig3d.citygml.energyADE2beta7;
/*
* energy-ade-citygml4j - Energy ADE module for citygml4j
* https://github.com/citygml4j/energy-ade-citygml4j
*
* energy-ade-citygml4j is part of the citygml4j project
*
* Copyright 2019-2024 Claus Nagel <claus.nagel@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.citygml4j.ade.energy;
import org.citygml4j.ade.energy.bind.EnergyADEMarshaller;
import org.citygml4j.ade.energy.bind.EnergyADEUnmarshaller;
import org.citygml4j.ade.energy.model.module.EnergyADEModule;
import org.citygml4j.ade.energy.walker.EnergyADEFeatureWalker;
import org.citygml4j.model.citygml.ade.binding.ADEContext;
import org.citygml4j.model.citygml.ade.binding.ADEMarshaller;
import org.citygml4j.model.citygml.ade.binding.ADEUnmarshaller;
import org.citygml4j.model.citygml.ade.binding.ADEWalker;
import org.citygml4j.model.module.ade.ADEModule;
import org.citygml4j.util.walker.FeatureWalker;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class EnergyADEContext implements ADEContext {
private final List<ADEModule> modules = Collections.singletonList(EnergyADEModule.v2_0);
@Override
public List<ADEModule> getADEModules() {
return modules;
}
@Override
public List<String> getModelPackageNames() {
return Arrays.asList("org.citygml4j.ade.energy.model.core",
"org.citygml4j.ade.energy.model.supportingClasses");
}
@Override
public ADEMarshaller createADEMarshaller() {
return new EnergyADEMarshaller();
}
@Override
public ADEUnmarshaller createADEUnmarshaller() {
return new EnergyADEUnmarshaller();
}
@Override
public ADEWalker<FeatureWalker> createDefaultFeatureWalker(){
return new EnergyADEFeatureWalker();
}
}
/*
* energy-ade-citygml4j - Energy ADE module for citygml4j
* https://github.com/citygml4j/energy-ade-citygml4j
*
* energy-ade-citygml4j is part of the citygml4j project
*
* Copyright 2019-2024 Claus Nagel <claus.nagel@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.citygml4j.ade.energy.bind;
import lombok.SneakyThrows;
import net.opengis.gml.*;
import org.citygml4j.ade.energy.model.core.*;
import org.citygml4j.ade.energy.model.supportingClasses.*;
import org.citygml4j.builder.jaxb.marshal.citygml.ade.ADEMarshallerHelper;
import org.citygml4j.model.citygml.ade.binding.ADEMarshaller;
import org.citygml4j.model.citygml.ade.binding.ADEModelObject;
import org.citygml4j.util.mapper.TypeMapper;
import org.sig3d.citygml.energyADE2beta7.*;
import org.sig3d.citygml.energyADE2beta7.ObjectFactory;
import org.w3._1999.xlink.ActuateType;
import org.w3._1999.xlink.ShowType;
import org.w3._1999.xlink.TypeType;
import javax.xml.bind.JAXBElement;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeConstants;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.GregorianCalendar;
import java.util.concurrent.locks.ReentrantLock;
public class EnergyADEMarshaller implements ADEMarshaller {
private final ReentrantLock lock = new ReentrantLock();
private final ObjectFactory factory = new ObjectFactory();
private ADEMarshallerHelper helper;
private TypeMapper<JAXBElement<?>> elementMapper;
private TypeMapper<Object> typeMapper;
@SneakyThrows
private TypeMapper<JAXBElement<?>> getElementMapper() {
if (elementMapper == null) {
lock.lock();
try {
if (elementMapper == null) {
elementMapper = TypeMapper.<JAXBElement<?>>create()
.with(RegularTimeSeriesFile.class, this::createRegularTimeSeriesFile)
.with(TypicalValuesTimeSeriesFile.class, this::createTypicalValuesTimeSeriesFile)
.with(BuildingTypeProperty.class, this::createBuildingTypeProperty)
.with(BuildingConstructionWeightProperty.class, this::createBuildingConstructionWeightProperty)
// .with(BuildingHeightAboveGroundProperty.class, this::createBuildingHeightAboveGroundProperty)
//.with(BuildingFloorAreaProperty.class, this::createBuildingFloorAreaProperty)
// .with(BuildingVolumeProperty.class, this::createBuildingVolumeProperty)
.with(BuildingAtticThermalStatusProperty.class, this::createBuildingAtticThermalStatusProperty)
.with(BuildingBasementThermalStatusProperty.class, this::createBuildingBasementThermalStatusProperty)
.with(BuildingIsProtectedProperty.class, this::createBuildingIsProtectedProperty)
.with(AbstractQualifiedAttributeProperty.class, this::createAbstractQualifiedAttributeProperty)
.with(RefurbishmentMeasure.class, this::createRefurbishmentMeasure)
.with(RefurbishmentMeasureProperty.class, this::createRefurbishmentMeasureProperty)
.with(UrbanFunctionArea.class, this::createUrbanFunctionArea)
.with(Water.class, this::createWater)
.with(Waste.class, this::createWaste)
.with(UrbanSpace.class, this::createUrbanSpace)
.with(Energy.class, this::createEnergy)
.with(Food.class, this::createFood)
.with(AbstractResourceProperty.class, this::createAbstractResourceProperty)
.with(AbstractDeviceProperty.class, this::createAbstractDeviceProperty)
.with(DeviceOperation.class, this::createDeviceOperation)
.with(ConstructionMaterial.class, this::createConstructionMaterial)
.with(OtherResource.class, this::createOtherResource)
.with(RegularTimeSeries.class, this::createRegularTimeSeries)
.with(RegularTimeSeriesFile.class, this::createRegularTimeSeriesFile)
.with(TypicalValuesTimeSeries.class, this::createTypicalValuesTimeSeries)
.with(TypicalValuesTimeSeriesFile.class, this::createTypicalValuesTimeSeriesFile)
.with(SensorConnection.class, this::createSensorConnection)
.with(WeatherData.class, this::createWeatherData)
.with(WeatherDataProperty.class, this::createWeatherDataProperty)
.with(WeatherStation.class, this::createWeatherStation);
}
} finally {
lock.unlock();
}
}
return elementMapper;
}
@SneakyThrows
private TypeMapper<Object> getTypeMapper() {
if (typeMapper == null) {
lock.lock();
try {
if (typeMapper == null) {
typeMapper = TypeMapper.create()
.with(RegularTimeSeries.class, this::marshalRegularTimeSeries)
.with(WeatherData.class, this::marshalWeatherData)
.with(WeatherDataProperty.class, this::marshalWeatherDataProperty)
.with(RegularTimeSeriesFile.class, this::marshalRegularTimeSeriesFile)
.with(AbstractScheduleProperty.class, this::marshalAbstractScheduleProperty)
.with(AbstractLibraryProperty.class, this::marshalAbstractLibraryProperty)
.with(DeviceOperation.class, this::marshalDeviceOperation)
.with(DeviceOperationProperty.class, this::marshalDeviceOperationProperty)
.with(AbstractBuildingPartitionProperty.class, this::marshalAbstractBuildingPartitionProperty)
.with(RegularTimeSeriesProperty.class, this::marshalRegularTimeSeriesProperty)
.with(TypicalValuesTimeSeriesFileProperty.class, this::marshalTypicalValuesTimeSeriesFileProperty)
.with(TypicalValuesTimeSeriesProperty.class, this::marshalTypicalValuesTimeSeriesProperty)
.with(TypicalValuesTimeSeries.class, this::marshalTypicalValuesTimeSeries)
.with(TypicalValuesTimeSeriesFile.class, this::marshalTypicalValuesTimeSeriesFile)
.with(SensorConnection.class, this::marshalSensorConnection)
.with(SensorConnectionProperty.class, this::marshalSensorConnectionProperty)
.with(UrbanFunctionArea.class, this::marshalUrbanFunctionArea)
.with(AbstractResourceProperty.class, this::marshalAbstractResourceProperty)
.with(AbstractTimeSeriesProperty.class, this::marshalAbstractTimeSeriesProperty)
.with(UrbanFunctionAreaProperty.class, this::marshalUrbanFunctionAreaProperty)
.with(Energy.class, this::marshalEnergy)
.with(EnergyProperty.class, this::marshalEnergyProperty)
.with(Waste.class, this::marshalWaste)
.with(WasteProperty.class, this::marshalWasteProperty)
.with(Water.class, this::marshalWater)
.with(WaterProperty.class, this::marshalWaterProperty)
.with(Food.class, this::marshalFood)
.with(FoodProperty.class, this::marshalFoodProperty)
.with(ConstructionMaterial.class, this::marshalConstructionMaterial)
.with(ConstructionMaterialProperty.class, this::marshalConstructionMaterialProperty)
.with(OtherResource.class, this::marshalOtherResource)
.with(OtherResourceProperty.class, this::marshalOtherResourceProperty)
.with(UrbanSpace.class, this::marshalUrbanSpace)
.with(UrbanSpaceProperty.class, this::marshalUrbanSpaceProperty)
.with(WeatherStation.class, this::marshalWeatherStation)
.with(RefurbishmentMeasure.class, this::marshalRefurbishmentMeasure)
.with(RefurbishmentMeasureProperty.class, this::marshalRefurbishmentMeasureProperty)
.with(EnergyPerformanceCertificate.class, this::marshalEnergyPerformanceCertificate)
.with(UtilityNetworkConnection.class, this::marshalUtilityNetworkConnection)
.with(UtilityNetworkConnectionProperty.class, this::marshalUtilityNetworkConnectionProperty)
.with(EnergyPerformanceCertificateProperty.class, this::marshalEnergyPerformanceCertificateProperty)
.with(AbstractDeviceProperty.class, this::marshalAbstractDeviceProperty)
.with(RegularTimeSeries.class, this::marshalRegularTimeSeries)
.with(RegularTimeSeriesFile.class, this::marshalRegularTimeSeriesFile)
.with(TypicalValuesTimeSeries.class, this::marshalTypicalValuesTimeSeries)
.with(TypicalValuesTimeSeriesFile.class, this::marshalTypicalValuesTimeSeriesFile)
.with(SensorConnection.class, this::marshalSensorConnection)
.with(WeatherStationProperty.class, this::marshalWeatherStationProperty);
}
} finally {
lock.unlock();
}
}
return typeMapper;
}
@Override
public void setADEMarshallerHelper(ADEMarshallerHelper helper) {
this.helper = helper;
}
@Override
public JAXBElement<?> marshalJAXBElement(ADEModelObject src) {
return getElementMapper().apply(src);
}
@Override
public Object marshal(ADEModelObject src) {
return getTypeMapper().apply(src);
}
private WeatherDataType marshalWeatherData(WeatherData src) {
WeatherDataType dest = new WeatherDataType();
if (src.isSetType())
dest.setType(helper.getGMLMarshaller().marshalCode(src.getType()));
if (src.isSetLibraryCode())
dest.setLibraryCode(helper.getGMLMarshaller().marshalCode(src.getLibraryCode()));
if (src.isSetValueType())
dest.setValueType(helper.getGMLMarshaller().marshalCode(src.getValueType()));
if (src.isSetYearlyValue())
dest.setYearlyValue(helper.getGMLMarshaller().marshalMeasure(src.getYearlyValue()));
if (src.isSetTimeDependentValues())
dest.setTimeDependentValues(marshalAbstractTimeSeriesProperty(src.getTimeDependentValues()));
return dest;
}
private WeatherDataPropertyType marshalWeatherDataProperty(WeatherDataProperty src) {
WeatherDataPropertyType dest = new WeatherDataPropertyType();
if (src.isSetWeatherData()) {
dest.setWeatherData(marshalWeatherData(src.getWeatherData()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
private ElectricalStorageDeviceType marshalElectricalStorageDevice(ElectricalStorageDevice src) {
ElectricalStorageDeviceType dest = new ElectricalStorageDeviceType();
if (src.isSetBatteryTechnology()) {
dest.setBatteryTechnology(helper.getGMLMarshaller().marshalCode(src.getBatteryTechnology()));
}
if (src.isSetPowerCapacity())
dest.setPowerCapacity(helper.getGMLMarshaller().marshalMeasure(src.getPowerCapacity()));
return dest;
}
private ElectricalStorageDevicePropertyType marshalElectricalStorageDeviceProperty(ElectricalStorageDeviceProperty src) {
ElectricalStorageDevicePropertyType dest = new ElectricalStorageDevicePropertyType();
if (src.isSetAbstractSolarCollector()) {
dest.setElectricalStorageDevice(marshalElectricalStorageDevice(src.getElectricalStorageDevice()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
private BoilerType marshalBoiler(Boiler src) {
BoilerType dest = new BoilerType();
if (src.isSetHasCondensation()) {
dest.setHasCondensation(src.getHasCondensation());
}
return dest;
}
private BoilerPropertyType marshalBoilerProperty(BoilerProperty src) {
BoilerPropertyType dest = new BoilerPropertyType();
if (src.isSetBoiler()) {
dest.setBoiler(marshalBoiler(src.getBoiler()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert AbstractSolarCollector to AbstractSolarCollectorType.
*/
private AbstractSolarCollectorType marshalAbstractSolarCollector(AbstractSolarCollector src,AbstractSolarCollectorType dest) {
helper.getGMLMarshaller().marshalAbstractGML(src, dest);
if (src.isSetModuleArea()) {
dest.setModuleArea(helper.getGMLMarshaller().marshalArea(src.getModuleArea()));
}
if (src.isSetApertureArea()) {
dest.setApertureArea(helper.getGMLMarshaller().marshalArea(src.getApertureArea()));
}
if (src.isSetAzimuth()) {
dest.setAzimuth(helper.getGMLMarshaller().marshalAngle((src.getAzimuth())));
}
if (src.isSetInclination()) {
dest.setInclination(helper.getGMLMarshaller().marshalAngle((src.getInclination())));
}
if(src.isSetLod2MultiSurface())
dest.setLod2MultiSurface(helper.getGMLMarshaller().marshalMultiSurfaceProperty(src.getLod2MultiSurface()));
if(src.isSetLod3MultiSurface())
dest.setLod3MultiSurface(helper.getGMLMarshaller().marshalMultiSurfaceProperty(src.getLod3MultiSurface()));
return dest;
}
private AbstractSolarCollectorPropertyType marshalAbstractSolarCollectorProperty(AbstractSolarCollectorProperty src) {
AbstractSolarCollectorPropertyType dest = new AbstractSolarCollectorPropertyType();
if (src.isSetAbstractSolarCollector()) {
JAXBElement<?> elem = helper.getJAXBMarshaller().marshalJAXBElement(src.getAbstractSolarCollector());
if (elem != null && elem.getValue() instanceof AbstractSolarCollectorType) {
JAXBElement<? extends AbstractSolarCollectorType> typedElem =
(JAXBElement<? extends AbstractSolarCollectorType>) elem;
dest.setAbstractSolarCollector(typedElem);
}
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
private AbstractBuildingPartitionType marshalAbstractBuildingPartition(AbstractBuildingPartition src, AbstractBuildingPartitionType dest) {
helper.getGMLMarshaller().marshalAbstractGML(src, dest);
if (src.isSetFloorArea()) {
// dest.se(helper.getGMLMarshaller().marshalCode(src.getDeviceOperationTypeValue()));
}
if (src.isSetFloorVolume())
// dest.
if(src.isSetLod1Solid())
dest.setLod1Solid(src.getLod1Solid());
if (src.isSetLod2Solid())
dest.setLod2Solid(src.getLod2Solid());
if (src.isSetLod3Solid())
dest.setLod3Solid(src.getLod3Solid());
return dest;
}
private AbstractBuildingPartitionPropertyType marshalAbstractBuildingPartitionProperty(AbstractBuildingPartitionProperty src) {
AbstractBuildingPartitionPropertyType dest = new AbstractBuildingPartitionPropertyType();
if (src.isSetAbstractBuildingPartition()) {
JAXBElement<?> elem = helper.getJAXBMarshaller().marshalJAXBElement(src.getAbstractBuildingPartition());
if (elem != null && elem.getValue() instanceof AbstractBuildingPartition){}
// dest.setAbstractBuildingPartition(elem);
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
//
// private AbstractBuildingType marshalAbstractBuilding(AbstractBuilding src, AbstractBuildingType dest) {
//
// helper.getGMLMarshaller().marshalAbstractGML(src, dest);
//
// if (src.isSetBdgType())
// dest.setBuildingTy
//
//
//
//
// return dest;
// }
/*
* Convert DeviceOperation to DeviceOperationType.
*/
private DeviceOperationType marshalDeviceOperation(DeviceOperation src) {
DeviceOperationType dest = new DeviceOperationType();
if (src.isSetType()) {
dest.setType(helper.getGMLMarshaller().marshalCode(src.getType()));
}
if (src.isSetYearlyGlobalEfficiency()) {
dest.setYearlyGlobalEfficiency(src.getYearlyGlobalEfficiency());
}
if (src.isSetSchedule())
dest.setSchedule(marshalAbstractScheduleProperty(src.getSchedule()));
return dest;
}
private DeviceOperationPropertyType marshalDeviceOperationProperty(DeviceOperationProperty src) {
DeviceOperationPropertyType dest = new DeviceOperationPropertyType();
if (src.isSetDeviceOperation()) {
dest.setDeviceOperation(marshalDeviceOperation(src.getDeviceOperation()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
private AbstractScheduleType marshalAbstractSchedule(AbstractSchedule src, AbstractScheduleType dest) {
helper.getGMLMarshaller().marshalAbstractGML(src, dest);
try {
if (src.isSetId()) {
dest.setLibraryCode(helper.getGMLMarshaller().marshalCode(src.getLibraryCode()));
}
if (src.isSetScheduleTypeValue()) {
dest.setType(helper.getGMLMarshaller().marshalCode(src.getScheduleTypeValue()));
}
if (src.isSetStartTime()) {
GregorianCalendar gregorianCalendar = GregorianCalendar.from(src.getStartTime());
dest.setStartTime(DatatypeFactory.newInstance().newXMLGregorianCalendar(gregorianCalendar));
}
if (src.isSetStartMonth()){
dest.setStartMonth(BigInteger.valueOf(src.getStartMonth()));
}
if (src.isSetStartYear())
dest.setStartYear(BigInteger.valueOf(src.getStartYear()));
if (src.isSetTemporalExtent())
dest.setTemporalExtent(marshalTimeIntervalLength(src.getTemporalExtent()));
} catch (DatatypeConfigurationException e) {
e.printStackTrace();
}
return dest;
}
private AbstractSchedulePropertyType marshalAbstractScheduleProperty(AbstractScheduleProperty src) {
AbstractSchedulePropertyType dest = new AbstractSchedulePropertyType();
if (src.isSetAbstractSchedule()) {
JAXBElement<?> elem = helper.getJAXBMarshaller().marshalJAXBElement(src.getAbstractSchedule());
if (elem != null && elem.getValue() instanceof AbstractResourceType)
dest.setAbstractSchedule((JAXBElement<? extends AbstractScheduleType>) elem);
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
private AbstractLibraryType marshalAbstractLibrary(AbstractLibrary src, AbstractLibraryType dest) {
helper.getGMLMarshaller().marshalAbstractGML(src, dest);
if (src.isSetType()) {
dest.setType(helper.getGMLMarshaller().marshalCode(src.getType()));
}
if (src.isSetSource()) {
dest.setSource(src.getSource());
}
if (src.isSetAuthor()) {
dest.setAuthor(src.getAuthor());
}
return dest;
}
private AbstractLibraryPropertyType marshalAbstractLibraryProperty(AbstractLibraryProperty src) {
AbstractLibraryPropertyType dest = new AbstractLibraryPropertyType();
if (src.isSetAbstractLibrary()) {
JAXBElement<?> elem = helper.getJAXBMarshaller().marshalJAXBElement(src.getAbstractLibrary());
if (elem != null && elem.getValue() instanceof AbstractResourceType)
dest.setAbstractLibrary((JAXBElement<? extends AbstractLibraryType>) elem);
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert RefurbishmentMeasure to RefurbishmentMeasureType.
*/
private RefurbishmentMeasureType marshalRefurbishmentMeasure(RefurbishmentMeasure src) {
RefurbishmentMeasureType dest = new RefurbishmentMeasureType();
helper.getGMLMarshaller().marshalAbstractFeature(src, dest);
if (src.isSetType()) {
dest.setType(helper.getGMLMarshaller().marshalCode(src.getType()));
}
if (src.isSetEndDate()) {
XMLGregorianCalendar endDate = src.getEndDate();
endDate.setTimezone(DatatypeConstants.FIELD_UNDEFINED);
dest.setEndDate(endDate);
}
if (src.isSetStartDate()) {
dest.setStartDate(src.getStartDate());
}
if (src.isSetLibraryCode()) {
dest.setLibraryCode(helper.getGMLMarshaller().marshalCode(src.getLibraryCode()));
}
return dest;
}
/*
* Convert RefurbishmentMeasureProperty to RefurbishmentMeasurePropertyType.
*/
private RefurbishmentMeasurePropertyType marshalRefurbishmentMeasureProperty(RefurbishmentMeasureProperty src) {
RefurbishmentMeasurePropertyType dest = factory.createRefurbishmentMeasurePropertyType();
if (src.isSetRefurbishmentMeasure()) {
dest.setRefurbishmentMeasure(marshalRefurbishmentMeasure(src.getRefurbishmentMeasure()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert EnergyPerformanceCertificate to EnergyPerformanceCertificateType.
*/
private EnergyPerformanceCertificateType marshalEnergyPerformanceCertificate(EnergyPerformanceCertificate src) {
EnergyPerformanceCertificateType dest = new EnergyPerformanceCertificateType();
if (src.isSetType()) {
dest.setType(helper.getGMLMarshaller().marshalCode(src.getType()));
}
if (src.isSetCertificationMethod()) {
dest.setCertificationMethod(src.getCertificationMethod());
}
if (src.isSetCertificationURI()) {
dest.setCertificationURI(src.getCertificationURI().toString());
}
if (src.isSetLabel()) {
dest.setLabel(src.getLabel());
}
if (src.isSetIssueDate()) {
dest.setIssueDate(src.getIssueDate());
}
if (src.isSetExpirationDate()) {
dest.setExpirationDate(src.getExpirationDate());
}
if (src.isSetValue())
dest.setValue(helper.getGMLMarshaller().marshalMeasure(src.getValue()));
return dest;
}
/*
* Convert EnergyPerformanceCertificateProperty to EnergyPerformanceCertificatePropertyType.
*/
private EnergyPerformanceCertificatePropertyType marshalEnergyPerformanceCertificateProperty(EnergyPerformanceCertificateProperty src) {
EnergyPerformanceCertificatePropertyType dest = factory.createEnergyPerformanceCertificatePropertyType();
if (src.isSetEnergyPerformanceCertificate()) {
dest.setEnergyPerformanceCertificate(marshalEnergyPerformanceCertificate(src.getEnergyPerformanceCertificate()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert UtilityNetworkConnection to UtilityNetworkConnectionType.
*/
private UtilityNetworkConnectionType marshalUtilityNetworkConnection(UtilityNetworkConnection src) {
UtilityNetworkConnectionType dest = new UtilityNetworkConnectionType();
if (src.isSetNetworkID()) {
dest.setNetworkID(src.getNetworkID());
}
if (src.isSetConnectionStatus()) {
dest.setConnectionStatus(marshalConnectionStatus(src.getConnectionStatus()));
}
if (src.isSetFunctionInNetwork()) {
dest.setFunctionInNetwork(helper.getGMLMarshaller().marshalCode(src.getFunctionInNetwork()));
}
if (src.isSetType()) {
dest.setNetworkType(helper.getGMLMarshaller().marshalCode(src.getNetworkType()));
}
if (src.isSetUsageInNetwork()) {
dest.setUsageInNetwork(helper.getGMLMarshaller().marshalCode(src.getUsageInNetwork()));
}
if (src.isSetNetworkNodeID()) {
dest.setNetworkNodeID(src.getNetworkNodeID());
}
return dest;
}
/*
* Convert NetworkConnectionStatusValue to NetworkConnectionStatusValueType.
*/
private NetworkConnectionStatusValueType marshalConnectionStatus(NetworkConnectionStatusValue networkConnectionStatusValue) {
switch (networkConnectionStatusValue) {
case CONNECTED:
return NetworkConnectionStatusValueType.CONNECTED;
case DISCONNECTED_BUT_CONNECTABLE:
return NetworkConnectionStatusValueType.DISCONNECTED_BUT_CONNECTABLE;
case DISCONNECTED_AND_NOT_CONNECTABLE:
return NetworkConnectionStatusValueType.DISCONNECTED_AND_NOT_CONNECTABLE;
case UNKNOWN:
return NetworkConnectionStatusValueType.UNKNOWN;
default:
throw new IllegalArgumentException("Unexpected NetworkConnectionStatusValue: " + networkConnectionStatusValue);
}
}
/*
* Convert UtilityNetworkConnectionProperty to UtilityNetworkConnectionPropertyType.
*/
private UtilityNetworkConnectionPropertyType marshalUtilityNetworkConnectionProperty(UtilityNetworkConnectionProperty src) {
UtilityNetworkConnectionPropertyType dest = factory.createUtilityNetworkConnectionPropertyType();
if (src.isSetUtilityNetworkConnection()) {
dest.setUtilityNetworkConnection(marshalUtilityNetworkConnection(src.getUtilityNetworkConnection()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert AbstractDevice to AbstractDeviceType.
*/
private AbstractDeviceType marshalAbstractDevice(AbstractDevice src, AbstractDeviceType dest) {
helper.getCore200Marshaller().marshalAbstractCityObject(src, dest);
if (src.isSetNumberOfDevices())
dest.setNumberOfDevices(BigInteger.valueOf(src.getNumberOfDevices()));
if (src.isSetModel())
dest.setNumberOfDevices(BigInteger.valueOf(src.getNumberOfDevices()));
if (src.isSetYearOfManufacture())
dest.setYearOfManufacture((BigInteger.valueOf(src.getYearOfManufacture())));
if (src.isSetInstalledPower())
dest.setInstalledPower(helper.getGMLMarshaller().marshalMeasure(src.getInstalledPower()));
if (src.isSetNominalEfficiency())
dest.setNominalEfficiency(helper.getGMLMarshaller().marshalMeasure(src.getNominalEfficiency()));
if (src.isSetEfficiencyIndicator())
dest.setEfficiencyIndicator(src.getEfficiencyIndicator());
if (src.isSetHeatDissipation())
dest.setHeatDissipation(helper.getGMLMarshaller().marshalMeasure(src.getHeatDissipation()));
if (src.isSetHeatDissipationConvectiveFraction())
dest.setHeatDissipationConvectiveFraction(helper.getGMLMarshaller().marshalScale(src.getHeatDissipationConvectiveFraction()));
if (src.isSetHeatDissipationLatentFraction())
dest.setHeatDissipationLatentFraction(helper.getGMLMarshaller().marshalScale(src.getHeatDissipationLatentFraction()));
if (src.isSetHeatDissipationRadiantFraction())
dest.setHeatDissipationRadiantFraction(helper.getGMLMarshaller().marshalScale(src.getHeatDissipationRadiantFraction()));
return dest;
}
/*
* Convert AbstractDeviceProperty to AbstractDevicePropertyType.
*/
private AbstractDevicePropertyType marshalAbstractDeviceProperty(AbstractDeviceProperty src) {
AbstractDevicePropertyType dest = factory.createAbstractDevicePropertyType();
if (src.isSetAbstractDevice()) {
JAXBElement<?> elem = helper.getJAXBMarshaller().marshalJAXBElement(src.getAbstractDevice());
if (elem != null && elem.getValue() instanceof AbstractDevice)
dest.setAbstractDevice((JAXBElement<? extends AbstractDeviceType>) elem);
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert SensorConnection to SensorConnectionType.
*/
private SensorConnectionType marshalSensorConnection(SensorConnection src) {
SensorConnectionType dest = factory.createSensorConnectionType();
marshalAbstractTimeSeries(src, dest);
if (src.isSetUom()) {
UnitOfMeasureType uom = new UnitOfMeasureType();
uom.setUom(src.getUom());
dest.setUom(uom);
}
if (src.isSetTemporalExtent()) {
dest.setTemporalExtent(marshalTimeIntervalLength(src.getTemporalExtent()));
}
if (src.isSetConnectionType())
dest.setConnectionType(helper.getGMLMarshaller().marshalCode(src.getConnectionType()));
if (src.isSetObservationID())
dest.setObservationID(src.getObservationID());
if (src.isSetSensorID())
dest.setSensorID(src.getSensorID());
if (src.isSetSensorName())
dest.setSensorName(src.getSensorName());
if (src.isSetObservationProperty())
dest.setObservationProperty(src.getObservationProperty());
if (src.isSetDataStreamID())
dest.setDatastreamID(src.getObservationID());
if (src.isSetBaseURL())
dest.setBaseURL(String.valueOf(src.getBaseURL()));
if (src.isSetAuthType())
dest.setAuthType(helper.getGMLMarshaller().marshalCode(src.getAuthType()));
if (src.isSetMqtServer())
dest.setMqttServer(src.getMqtServer());
if (src.isSetMqtTopic())
dest.setMqttTopic(src.getMqtTopic());
if (src.isSetLinkToObservation())
dest.setLinkToObservation(src.getLinkToObservation());
if (src.isSetLinkToSensorDescription())
dest.setLinkToSensorDescription(src.getLinkToSensorDescription());
return dest;
}
/*
* Convert SensorConnectionProperty to SensorConnectionPropertyType.
*/
private SensorConnectionPropertyType marshalSensorConnectionProperty(SensorConnectionProperty src) {
SensorConnectionPropertyType dest = factory.createSensorConnectionPropertyType();
if (src.isSetSensorConnection()) {
dest.setSensorConnection(marshalSensorConnection(src.getSensorConnection()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert TypicalValuesTimeSeriesFile to TypicalValuesTimeSeriesFileType.
*/
private TypicalValuesTimeSeriesFileType marshalTypicalValuesTimeSeriesFile(TypicalValuesTimeSeriesFile src) {
TypicalValuesTimeSeriesFileType dest = new TypicalValuesTimeSeriesFileType();
marshalAbstractTimeSeries(src, dest);
if (src.isSetStartTime()) {
ZonedDateTime zonedDateTime = src.getStartTime();
if (zonedDateTime != null) {
GregorianCalendar calendar = GregorianCalendar.from(zonedDateTime);
XMLGregorianCalendar xmlGregorianCalendar = DatatypeFactory.newDefaultInstance().newXMLGregorianCalendar(calendar);
dest.setStartTime(xmlGregorianCalendar);
}
}
if (src.isSetStartDay())
dest.setStartDay(BigInteger.valueOf(src.getStartDay()));
if (src.isSetStartMonth())
dest.setStartMonth(BigInteger.valueOf(src.getStartMonth()));
if (src.isSetUom()) {
UnitOfMeasureType uom = new UnitOfMeasureType();
uom.setUom(src.getUom());
dest.setUom(uom);
}
if (src.isSetTemporalExtent())
dest.setTemporalExtent(marshalTimeIntervalLength(src.getTemporalExtent()));
if (src.isSetTimeInterval())
dest.setTimeInterval(marshalTimeIntervalLength(src.getTimeInterval()));
if (src.isSetNumberOfHeaderLines())
dest.setNumberOfHeaderLines(BigInteger.valueOf(src.getNumberOfHeaderLines()));
if (src.isSetFieldSeparator())
dest.setFieldSeparator(src.getFieldSeparator());
if (src.isSetRecordSeparator())
dest.setRecordSeparator(src.getRecordSeparator());
if (src.isSetDecimalSymbol())
dest.setDecimalSymbol(src.getDecimalSymbol());
if (src.isSetValueColumnNumber())
dest.setValueColumnNumber(BigInteger.valueOf(src.getValueColumnNumber()));
return dest;
}
/*
* Convert TypicalValuesTimeSeriesFileProperty to TypicalValuesTimeSeriesFilePropertyType.
*/
private TypicalValuesTimeSeriesFilePropertyType marshalTypicalValuesTimeSeriesFileProperty(TypicalValuesTimeSeriesFileProperty src) {
TypicalValuesTimeSeriesFilePropertyType dest = factory.createTypicalValuesTimeSeriesFilePropertyType();
if (src.isSetTypicalValuesTimeSeriesFile()) {
dest.setTypicalValuesTimeSeriesFile(marshalTypicalValuesTimeSeriesFile(src.getTypicalValuesTimeSeriesFile()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert RegularTimeSeriesFile to RegularTimeSeriesFileType.
*/
private RegularTimeSeriesFileType marshalRegularTimeSeriesFile(RegularTimeSeriesFile src) {
RegularTimeSeriesFileType dest = factory.createRegularTimeSeriesFileType();
marshalAbstractTimeSeries(src, dest);
if (src.isSetUom()) {
UnitOfMeasureType uom = new UnitOfMeasureType();
uom.setUom(src.getUom());
dest.setUom(uom);
}
if (src.isSetFileURI())
dest.setFileURI(src.getFileURI().toString());
if (src.isSetTemporalExtent())
dest.setTemporalExtent(marshalTimePeriodProperty(src.getTemporalExtent()));
if (src.isSetTimeInterval())
dest.setTimeInterval(marshalTimeIntervalLength(src.getTimeInterval()));
if (src.isSetNumberOfHeaderLines())
dest.setNumberOfHeaderLines(BigInteger.valueOf(src.getNumberOfHeaderLines()));
if (src.isSetFieldSeparator())
dest.setFieldSeparator(src.getFieldSeparator());
if (src.isSetRecordSeparator())
dest.setRecordSeparator(src.getRecordSeparator());
if (src.isSetDecimalSymbol())
dest.setDecimalSymbol(src.getDecimalSymbol());
if (src.isSetValueColumnNumber())
dest.setValueColumnNumber(BigInteger.valueOf(src.getValueColumnNumber()));
return dest;
}
/*
* Convert RegularTimeSeriesFileProperty to RegularTimeSeriesFilePropertyType.
*/
private RegularTimeSeriesFilePropertyType marshalTypicalValuesTimeSeriesProperty(RegularTimeSeriesFileProperty src) {
RegularTimeSeriesFilePropertyType dest = factory.createRegularTimeSeriesFilePropertyType();
if (src.isSetRegularTimeSeriesFile()) {
dest.setRegularTimeSeriesFile(marshalRegularTimeSeriesFile(src.getRegularTimeSeriesFile()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert TypicalValuesTimeSeries to TypicalValuesTimeSeriesType.
*/
private TypicalValuesTimeSeriesType marshalTypicalValuesTimeSeries(TypicalValuesTimeSeries src) {
TypicalValuesTimeSeriesType dest = factory.createTypicalValuesTimeSeriesType();
marshalAbstractTimeSeries(src, dest);
if (src.isSetTimeInterval()) {
dest.setTimeInterval(marshalTimeIntervalLength(src.getTimeInterval()));
}
if (src.isSetTemporalExtent()) {
dest.setTemporalExtent(marshalTimeIntervalLength(src.getTemporalExtent()));
}
if (src.isSetValues()) {
dest.setValuesList(helper.getGMLMarshaller().marshalMeasureList(src.getValues()));
}
if (src.isSetStartTime()) {
LocalTime timestamp = src.getStartTime(); // Assuming getStartTime() returns Timestamp
if (timestamp != null) {
int hours = timestamp.getHour();
int minutes = timestamp.getMinute();
int seconds = timestamp.getSecond();
dest.setStartTime(DatatypeFactory.newDefaultInstance().newXMLGregorianCalendarTime( hours, minutes, seconds, DatatypeConstants.FIELD_UNDEFINED));
}
}
if (src.isSetStartDay())
dest.setStartDay(BigInteger.valueOf(src.getStartDay()));
if (src.isSetStartMonth())
dest.setStartMonth(BigInteger.valueOf(src.getStartMonth()));
if (src.isSetValues()) {
dest.setValuesList(helper.getGMLMarshaller().marshalMeasureList(src.getValues()));
}
return dest;
}
/*
* Convert TypicalValuesTimeSeriesProperty to TypicalValuesTimeSeriesPropertyType.
*/
private TypicalValuesTimeSeriesPropertyType marshalTypicalValuesTimeSeriesProperty(TypicalValuesTimeSeriesProperty src) {
TypicalValuesTimeSeriesPropertyType dest = factory.createTypicalValuesTimeSeriesPropertyType();
if (src.isSetTypicalValuesTimeSeriesProperty()) {
dest.setTypicalValuesTimeSeries(marshalTypicalValuesTimeSeries(src.getTypicalValuesTimeSeries()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert RegularTimeSeries to RegularTimeSeriesType.
*/
private RegularTimeSeriesType marshalRegularTimeSeries(RegularTimeSeries src) {
RegularTimeSeriesType dest = factory.createRegularTimeSeriesType();
marshalAbstractTimeSeries(src, dest);
if (src.isSetTimeInterval()) {
dest.setTimeInterval(marshalTimeIntervalLength(src.getTimeInterval()));
}
if (src.isSetTemporalExtent()) {
dest.setTemporalExtent(marshalTimePeriodProperty(src.getTemporalExtent()));
}
if (src.isSetValues()) {
dest.setValuesList(helper.getGMLMarshaller().marshalMeasureList(src.getValues()));
}
return dest;
}
/*
* Convert TimePeriod to TimePeriodType.
*/
private TimePeriodType marshalTimePeriod(TimePeriod src) {
TimePeriodType dest = new TimePeriodType();
ZonedDateTime beginPosition = src.getBeginPosition();
ZonedDateTime endPosition = src.getEndPosition();
DateTimeFormatter formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
if (beginPosition != null && endPosition != null) {
LocalDate epoch = LocalDate.of(1970, 1, 1);
if (epoch.isEqual(beginPosition.toLocalDate()) && epoch.isEqual(endPosition.toLocalDate()))
formatter = DateTimeFormatter.ISO_LOCAL_TIME;
}
if (beginPosition != null) {
TimePositionType timePosition = new TimePositionType();
timePosition.getValue().add(beginPosition.format(formatter));
dest.setBeginPosition(timePosition);
}
if (endPosition != null) {
TimePositionType timePosition = new TimePositionType();
timePosition.getValue().add(endPosition.format(formatter));
dest.setEndPosition(timePosition);
}
return dest;
}
/*
* Convert RegularTimeSeriesProperty to RegularTimeSeriesPropertyType.
*/
private RegularTimeSeriesPropertyType marshalRegularTimeSeriesProperty(RegularTimeSeriesProperty src) {
RegularTimeSeriesPropertyType dest = factory.createRegularTimeSeriesPropertyType();
if (src.isSetRegularTimeSeries()) {
dest.setRegularTimeSeries(marshalRegularTimeSeries(src.getRegularTimeSeries()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert AbstractTimeSeries to AbstractTimeSeriesType.
*/
private void marshalAbstractTimeSeries(AbstractTimeSeries src, AbstractTimeSeriesType dest) {
helper.getGMLMarshaller().marshalAbstractFeature(src, dest);
if (src.isSetAcquisitionMethod()) {
dest.setAcquisitionMethod(helper.getGMLMarshaller().marshalCode(src.getAcquisitionMethod()));
}
if (src.isSetSource()) {
dest.setSource(src.getSource());
}
if (src.isSetInterpolationTypeValue()) {
dest.setInterpolationType(InterpolationTypeValueType.fromValue(src.getInterpolationTypeValue().value()));
}
}
/*
* Convert AbstractTimeSeriesProperty to AbstractTimeSeriesPropertyType.
*/
@SuppressWarnings("unchecked")
private AbstractTimeSeriesPropertyType marshalAbstractTimeSeriesProperty(AbstractTimeSeriesProperty src) {
AbstractTimeSeriesPropertyType dest = factory.createAbstractTimeSeriesPropertyType();
if (src.isSetAbstractTimeSeries()) {
JAXBElement<?> elem = helper.getJAXBMarshaller().marshalJAXBElement(src.getAbstractTimeSeries());
if (elem != null && elem.getValue() instanceof AbstractTimeSeriesType)
dest.setAbstractTimeSeries((JAXBElement<? extends AbstractTimeSeriesType>) elem);
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert TimeIntervalLength to TimeIntervalLengthType.
*/
private TimeIntervalLengthType marshalTimeIntervalLength(TimeIntervalLength src) {
TimeIntervalLengthType dest = new TimeIntervalLengthType();
if (src.isSetValue())
dest.setValue(BigDecimal.valueOf(src.getValue()));
if (src.isSetUnit())
dest.setUnit(src.getUnit());
if (src.isSetRadix())
dest.setRadix(BigInteger.valueOf(src.getRadix()));
if (src.isSetFactor())
dest.setFactor(BigInteger.valueOf(src.getRadix()));
return dest;
}
/*
* Convert TimePeriodProperty to TimePeriodPropertyType.
*/
private TimePeriodPropertyType marshalTimePeriodProperty(TimePeriodProperty src) {
TimePeriodPropertyType dest = new TimePeriodPropertyType();
if (src.isSetTimePeriod())
dest.setTimePeriod(marshalTimePeriod(src.getTimePeriod()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert CityObjectRelation to CityObjectRelationType.
*/
private CityObjectRelationType marshalCityObjectRelation(CityObjectRelation src) {
CityObjectRelationType dest = factory.createCityObjectRelationType();
if (src.isSetRelation())
dest.setRelationType(helper.getGMLMarshaller().marshalCode(src.getRelationType()));
if (src.isSetRelatedTo())
dest.setRelatedTo(marshalRelatedToProperty(src.getRelatedTo()));
return dest;
}
/*
* Convert RelatedToProperty to RelatedToPropertyType.
*/
private RelatedToPropertyType marshalRelatedToProperty(RelatedToProperty src) {
RelatedToPropertyType dest = factory.createRelatedToPropertyType();
if (src.isSetCityObject()) {
dest.set_CityObject(src.getCityObject());
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert CityObjectRelationProperty to CityObjectRelationPropertyType.
*/
private CityObjectRelationPropertyType marshalCityObjectRelationProperty(CityObjectRelationProperty src) {
CityObjectRelationPropertyType dest = factory.createCityObjectRelationPropertyType();
if (src.isSetObject()) {
dest.setCityObjectRelation(marshalCityObjectRelation(src.getObject()));
}
return dest;
}
/*
* Convert OtherResource to OtherResourceType.
*/
private OtherResourceType marshalOtherResource(OtherResource src) {
OtherResourceType dest = factory.createOtherResourceType();
helper.getGMLMarshaller().marshalAbstractGML(src, dest);
if (src.isSetOtherResourceTypeValue()) {
dest.setType(helper.getGMLMarshaller().marshalCode(src.getOtherResourceTypeValue()));
}
if (src.isSetOtherResourceEndUseValue()) {
dest.setEndUse(helper.getGMLMarshaller().marshalCode(src.getOtherResourceEndUseValue()));
}
return dest;
}
/*
* Convert OtherResourceProperty to OtherResourcePropertyType.
*/
private OtherResourcePropertyType marshalOtherResourceProperty(OtherResourceProperty src) {
OtherResourcePropertyType dest = factory.createOtherResourcePropertyType();
if (src.isSetOtherResource()) {
dest.setOtherResource(marshalOtherResource(src.getOtherResource()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert ConstructionMaterial to ConstructionMaterialType.
*/
private ConstructionMaterialType marshalConstructionMaterial(ConstructionMaterial src) {
ConstructionMaterialType dest = factory.createConstructionMaterialType();
helper.getGMLMarshaller().marshalAbstractGML(src, dest);
if (src.isSetConstructionMaterialTypeValue()) {
dest.setType(helper.getGMLMarshaller().marshalCode(src.getConstructionMaterialTypeValue()));
}
if (src.isSetConstructionMaterialEndUseValue()) {
dest.setEndUse(helper.getGMLMarshaller().marshalCode(src.getConstructionMaterialEndUseValue()));
}
return dest;
}
/*
* Convert ConstructionMaterialProperty to ConstructionMaterialPropertyType.
*/
private ConstructionMaterialPropertyType marshalConstructionMaterialProperty(ConstructionMaterialProperty src) {
ConstructionMaterialPropertyType dest = factory.createConstructionMaterialPropertyType();
if (src.isSetConstructionMaterial()) {
dest.setConstructionMaterial(marshalConstructionMaterial(src.getConstructionMaterial()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert Food to FoodType.
*/
private FoodType marshalFood(Food src) {
FoodType dest = factory.createFoodType();
helper.getGMLMarshaller().marshalAbstractGML(src, dest);
if (src.isSetFoodTypeValue()) {
dest.setType(helper.getGMLMarshaller().marshalCode(src.getFoodTypeValue()));
}
if (src.isSetFoodEndUseValue()) {
dest.setEndUse(helper.getGMLMarshaller().marshalCode(src.getFoodEndUseValue()));
}
return dest;
}
/*
* Convert FoodProperty to FoodPropertyType.
*/
private FoodPropertyType marshalFoodProperty(FoodProperty src) {
FoodPropertyType dest = factory.createFoodPropertyType();
if (src.isSetFood()) {
dest.setFood(marshalFood(src.getFood()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert Waste to WasteType.
*/
private WasteType marshalWaste(Waste src) {
WasteType dest = factory.createWasteType();
helper.getGMLMarshaller().marshalAbstractGML(src, dest);
if (src.isWasteTypeValue()) {
dest.setType(helper.getGMLMarshaller().marshalCode(src.getWasteTypeValue()));
}
if (src.isWasteEndUseValue()) {
dest.setEndUse(helper.getGMLMarshaller().marshalCode(src.getWasteEndUseValue()));
}
if (src.isDangerous()) {
dest.setIsDangerous(src.getDangerous());
}
if (src.isRecyclable()) {
dest.setIsRecyclable(src.getRecyclable());
}
return dest;
}
/*
* Convert WasteProperty to WastePropertyType.
*/
private WastePropertyType marshalWasteProperty(WasteProperty src) {
WastePropertyType dest = factory.createWastePropertyType();
if (src.isSetWaste()) {
dest.setWaste(marshalWaste(src.getWaste()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert UrbanSpace to UrbanSpaceType.
*/
private UrbanSpaceType marshalUrbanSpace(UrbanSpace src) {
UrbanSpaceType dest = factory.createUrbanSpaceType();
marshalAbstractResource(src,dest);
if (src.isSetType()) {
dest.setType(helper.getGMLMarshaller().marshalCode(src.getType()));
}
if (src.isSetEndUse()) {
dest.setEndUse(helper.getGMLMarshaller().marshalCode(src.getEndUse()));
}
return dest;
}
/*
* Convert UrbanSpaceProperty to UrbanSpacePropertyType.
*/
private UrbanSpacePropertyType marshalUrbanSpaceProperty(UrbanSpaceProperty src) {
UrbanSpacePropertyType dest = factory.createUrbanSpacePropertyType();
if (src.isSetUrbanSpace()) {
dest.setUrbanSpace(marshalUrbanSpace(src.getUrbanSpace()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert Water to WaterType.
*/
private WaterType marshalWater(Water src) {
WaterType dest = factory.createWaterType();
marshalAbstractResource(src,dest);
if (src.isWaterTypeValue()) {
dest.setType(helper.getGMLMarshaller().marshalCode(src.getWaterTypeValue()));
}
if (src.isWaterEndUseValue()) {
dest.setEndUse(helper.getGMLMarshaller().marshalCode(src.getWaterEndUseValue()));
}
return dest;
}
/*
* Convert WaterProperty to WaterPropertyType.
*/
private WaterPropertyType marshalWaterProperty(WaterProperty src) {
WaterPropertyType dest = factory.createWaterPropertyType();
if (src.isSetWater()) {
dest.setWater(marshalWater(src.getWater()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert Energy to EnergyType.
*/
private EnergyType marshalEnergy(Energy src) {
EnergyType dest = factory.createEnergyType();
marshalAbstractResource(src, dest);
if (src.isSetEnergyTypeValue()) {
dest.setType(helper.getGMLMarshaller().marshalCode(src.getEnergyTypeValue()));
}
if (src.isSetEnergyEndUseValue()) {
dest.setEndUse(helper.getGMLMarshaller().marshalCode(src.getEnergyEndUseValue()));
}
if (src.isSetEnergyCarrierValue()) {
dest.setEnergyCarrier(helper.getGMLMarshaller().marshalCode(src.getEnergyCarrierValue()));
}
if (src.isSetMaximumLoadValue()) {
dest.setMaximumLoad(helper.getGMLMarshaller().marshalMeasure(src.getMaximumLoad()));
}
if (src.isSetEnergySourceValue()) {
dest.setSource(helper.getGMLMarshaller().marshalCode(src.getEnergySourceValue()));
}
return dest;
}
/*
* Convert EnergyProperty to EnergyPropertyType.
*/
private EnergyPropertyType marshalEnergyProperty(EnergyProperty src) {
EnergyPropertyType dest = factory.createEnergyPropertyType();
if (src.isSetEnergy()) {
dest.setEnergy(marshalEnergy(src.getEnergy()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert UrbanFunctionArea to UrbanFunctionAreaType.
*/
private UrbanFunctionAreaType marshalUrbanFunctionArea(UrbanFunctionArea src) {
UrbanFunctionAreaType dest = factory.createUrbanFunctionAreaType();
helper.getCityObjectGroup200Marshaller().marshalCityObjectGroup(src, dest);
if (src.isSetCode()) {
dest.setCode(helper.getGMLMarshaller().marshalCode(src.getCode()));
}
if (src.isSetType()) {
dest.setType(helper.getGMLMarshaller().marshalCode(src.getType()));
}
return dest;
}
/*
* Convert UrbanFunctionAreaProperty to UrbanFunctionAreaPropertyType.
*/
private UrbanFunctionAreaPropertyType marshalUrbanFunctionAreaProperty(UrbanFunctionAreaProperty src) {
UrbanFunctionAreaPropertyType dest = factory.createUrbanFunctionAreaPropertyType();
if (src.isSetUrbanFunctionArea()) {
dest.setUrbanFunctionArea(marshalUrbanFunctionArea(src.getUrbanFunctionArea()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Convert WeatherStation to WeatherStationType.
*/
private WeatherStationType marshalWeatherStation(WeatherStation src) {
WeatherStationType dest = factory.createWeatherStationType();
//Convert AbstractCityObject attributes.
helper.getCore200Marshaller().marshalAbstractCityObject(src, dest);
return dest;
}
/*
* Convert WeatherStationProperty to WeatherStationPropertyType.
*/
private WeatherStationPropertyType marshalWeatherStationProperty(WeatherStationProperty src) {
WeatherStationPropertyType dest = factory.createWeatherStationPropertyType();
if (src.isSetWeatherStation())
dest.setWeatherStation(marshalWeatherStation(src.getWeatherStation()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
/*
* Does marshalling of AbstractResource.
*/
private AbstractResourceType marshalAbstractResource(AbstractResource src, AbstractResourceType dest) {
helper.getGMLMarshaller().marshalAbstractGML(src, dest);
if (src.isSetAmount()) {
dest.setAmount(helper.getGMLMarshaller().marshalMeasure(src.getAmount()));
}
if (src.isSetTimeDependentAmount()) {
dest.setTimeDependentAmount(marshalAbstractTimeSeriesProperty(src.getTimeDependentAmount()));
}
if (src.isSetStatus()) {
dest.setStatus(src.getStatus());
}
if (src.isSetOperationType()) {
dest.setOperationType(helper.getGMLMarshaller().marshalCode(src.getOperationType()));
}
if (src.isSetAmountType()) {
dest.setAmountType(helper.getGMLMarshaller().marshalCode(src.getAmountType()));
}
if (src.isSetAmountNormalized()) {
dest.setIsAmountNormalized(src.isSetAmountNormalized());
}
if (src.isSetNormalizationValue()) {
dest.setNormalizationValue(helper.getGMLMarshaller().marshalMeasure(src.getNormalizationValue()));
}
if (src.isSetNormalizationParameter()) {
dest.setNormalizationParameter(src.getNormalizationParameter());
}
if (src.isSetCo2Equivalent()) {
dest.setCo2Equivalent(helper.getGMLMarshaller().marshalMeasure(src.getCo2Equivalent()));
}
if (src.isSetYear()) {
dest.setYear(BigInteger.valueOf(src.getYear()));
}
if (src.isSetCostsMoney()) {
dest.setCostsMoney(helper.getGMLMarshaller().marshalMeasure(src.getCostsMoney()));
}
if (src.isSetYieldsMoney()) {
dest.setYieldsMoney(helper.getGMLMarshaller().marshalMeasure(src.getYieldsMoney()));
}
return dest;
}
/*
* Convert AbstractResourceProperty to AbstractResourcePropertyType.
*/
private AbstractResourcePropertyType marshalAbstractResourceProperty(AbstractResourceProperty src) {
AbstractResourcePropertyType dest = factory.createAbstractResourcePropertyType();
if (src.isSetAbstractResource()) {
JAXBElement<?> elem = helper.getJAXBMarshaller().marshalJAXBElement(src.getAbstractResource());
if (elem != null && elem.getValue() instanceof AbstractResourceType)
dest.setAbstractResource((JAXBElement<? extends AbstractResourceType>) elem);
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(TypeType.fromValue(src.getType().getValue()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(ShowType.fromValue(src.getShow().getValue()));
if (src.isSetActuate())
dest.setActuate(ActuateType.fromValue(src.getActuate().getValue()));
return dest;
}
private QualifiedAreaType marshalQualifiedArea(QualifiedArea src) {
QualifiedAreaType dest = new QualifiedAreaType();
if (src.getDescription() != null && src.getDescription().getValue() != null && !src.getDescription().getValue().trim().isEmpty()) {
dest.setDescription(src.getDescription().getValue());
//System.out.println("Marshalling QualifiedArea description: " + src.getDescription().getValue());
} //else {
// System.out.println("QualifiedArea description is null or empty");
//}
if (src.isSetSource())
dest.setSource(src.getSource());
if (src.isSetValue())
dest.setValue(helper.getGMLMarshaller().marshalMeasure(src.getValue()));
if (src.isSetType())
dest.setType(helper.getGMLMarshaller().marshalCode(src.getType()));
return dest;
}
private QualifiedHeightType marshalQualifiedHeight(QualifiedHeight src) {
QualifiedHeightType dest = new QualifiedHeightType();
if (src.getDescription() != null && src.getDescription().getValue() != null && !src.getDescription().getValue().trim().isEmpty()) {
dest.setDescription(src.getDescription().getValue());
// System.out.println("Marshalling QualifiedHeight description: " + src.getDescription().getValue());
} //else {
//System.out.println("QualifiedHeight description is null or empty");
// }
if (src.isSetSource())
dest.setSource(src.getSource());
if (src.isSetValue())
dest.setValue(helper.getGMLMarshaller().marshalMeasure(src.getValue()));
if (src.isSetType())
dest.setType(helper.getGMLMarshaller().marshalCode(src.getType()));
return dest;
}
private QualifiedVolumeType marshalQualifiedVolume(QualifiedVolume src) {
QualifiedVolumeType dest = new QualifiedVolumeType();
if (src.getDescription() != null && src.getDescription().getValue() != null && !src.getDescription().getValue().trim().isEmpty()) {
dest.setDescription(src.getDescription().getValue());
// System.out.println("Marshalling QualifiedVolume description: " + src.getDescription().getValue());
} //else {
//System.out.println("QualifiedVolume description is null or empty");
// }
if (src.isSetSource())
dest.setSource(src.getSource());
if (src.isSetValue())
dest.setValue(helper.getGMLMarshaller().marshalMeasure(src.getValue()));
if (src.isSetType())
dest.setType(helper.getGMLMarshaller().marshalCode(src.getType()));
return dest;
}
private AbstractQualifiedAttributePropertyType marshalAbstractQualifiedAttributeProperty(AbstractQualifiedAttributeProperty src) {
AbstractQualifiedAttributePropertyType dest = factory.createAbstractQualifiedAttributePropertyType();
if (src.isSetValue()) {
AbstractQualifiedAttribute attribute = src.getValue();
if (attribute instanceof QualifiedArea) {
dest.setAbstractQualifiedAttribute(factory.createQualifiedArea(marshalQualifiedArea((QualifiedArea) attribute)));
} else if (attribute instanceof QualifiedHeight) {
dest.setAbstractQualifiedAttribute(factory.createQualifiedHeight(marshalQualifiedHeight((QualifiedHeight) attribute)));
} else if (attribute instanceof QualifiedVolume) {
dest.setAbstractQualifiedAttribute(factory.createQualifiedVolume(marshalQualifiedVolume((QualifiedVolume) attribute)));
}
}
return dest;
}
private JAXBElement<?> createRegularTimeSeriesFile(RegularTimeSeriesFile src) {
return factory.createRegularTimeSeriesFile(marshalRegularTimeSeriesFile(src));
}
private JAXBElement<?> createRegularTimeSeries(RegularTimeSeries src) {
return factory.createRegularTimeSeriesProperty(marshalRegularTimeSeries(src));
}
private JAXBElement<?> createTypicalValuesTimeSeries(TypicalValuesTimeSeries src) {
return factory.createTypicalValuesTimeSeries(marshalTypicalValuesTimeSeries(src));
}
private JAXBElement<?> createSensorConnection(SensorConnection src) {
return factory.createSensorConnection(marshalSensorConnection(src));
}
private JAXBElement<?> createTypicalValuesTimeSeriesFile(TypicalValuesTimeSeriesFile src) {
return factory.createTypicalValuesTimeSeriesFile(marshalTypicalValuesTimeSeriesFile(src));
}
private JAXBElement<?> createWeatherData(WeatherData src) {
return factory.createWeatherData(marshalWeatherData(src));
}
private JAXBElement<?> createWeatherDataProperty(WeatherDataProperty src) {
return factory.createWeatherDataProperty(marshalWeatherDataProperty(src));
}
private JAXBElement<?> createWeatherStation(WeatherStation src) {
return factory.createWeatherStation(marshalWeatherStation(src));
}
private JAXBElement<?> createUrbanFunctionArea(UrbanFunctionArea src) {
return factory.createUrbanFunctionArea(marshalUrbanFunctionArea(src));
}
private JAXBElement<?> createUrbanSpace(UrbanSpace src) {
return factory.createUrbanSpace(marshalUrbanSpace(src));
}
private JAXBElement<?> createWaste(Waste src) {
return factory.createWaste(marshalWaste(src));
}
private JAXBElement<?> createEnergy(Energy src) {
return factory.createEnergy(marshalEnergy(src));
}
private JAXBElement<?> createWater(Water src) {
return factory.createWater(marshalWater(src));
}
private JAXBElement<?> createFood(Food src) {
return factory.createFood(marshalFood(src));
}
private JAXBElement<?> createDeviceOperation(DeviceOperation src) {
return factory.createDeviceOperation(marshalDeviceOperation(src));
}
private JAXBElement<?> createAbstractDeviceProperty(AbstractDeviceProperty src) {
return factory.createDevice(marshalAbstractDeviceProperty(src));
}
private JAXBElement<?> createAbstractResourceProperty(AbstractResourceProperty src) {
return factory.createResource(marshalAbstractResourceProperty(src));
}
private JAXBElement<?> createConstructionMaterial(ConstructionMaterial src) {
return factory.createConstructionMaterial(marshalConstructionMaterial(src));
}
private JAXBElement<?> createOtherResource(OtherResource src) {
return factory.createOtherResource(marshalOtherResource(src));
}
private JAXBElement<?> createBuildingTypeProperty(BuildingTypeProperty src) {
return factory.createBdgType(src.getValue());
}
private JAXBElement<?> createBuildingConstructionWeightProperty(BuildingConstructionWeightProperty src) {
return factory.createBdgConstructionWeight(src.getValue());
}
// private JAXBElement<?> createBuildingFloorAreaProperty(BuildingFloorAreaProperty src) {
// return factory.createBdgArea(src.getValue());
// }
// private JAXBElement<?> createBuildingHeightAboveGroundProperty(BuildingHeightAboveGroundProperty src) {
// return factory.createBdgHeight(src.getValue());
// }
// private JAXBElement<?> createBuildingVolumeProperty(BuildingVolumeProperty src) {
// return factory.createBdgVolume(src.getValue());
// }
private JAXBElement<?> createBuildingAtticThermalStatusProperty(BuildingAtticThermalStatusProperty src) {
return factory.createBdgAtticThermalStatus(src.getValue());
}
private JAXBElement<?> createBuildingBasementThermalStatusProperty(BuildingBasementThermalStatusProperty src) {
return factory.createBdgBasementThermalStatus(src.getValue());
}
private JAXBElement<?> createRefurbishmentMeasure(RefurbishmentMeasure src) {
return factory.createRefurbishmentMeasure(marshalRefurbishmentMeasure(src));
}
private JAXBElement<?> createRefurbishmentMeasureProperty(RefurbishmentMeasureProperty src) {
return factory.createRefurbishmentMeasureProperty(marshalRefurbishmentMeasureProperty(src));
}
private JAXBElement<?> createAbstractQualifiedAttributeProperty(AbstractQualifiedAttributeProperty src) {
AbstractQualifiedAttribute attribute = src.getValue();
if (attribute instanceof QualifiedArea) {
QualifiedAreaPropertyType property = factory.createQualifiedAreaPropertyType();
property.setQualifiedArea(marshalQualifiedArea((QualifiedArea) attribute));
return factory.createBdgArea(property);
} else if (attribute instanceof QualifiedHeight) {
QualifiedHeightPropertyType property = factory.createQualifiedHeightPropertyType();
property.setQualifiedHeight(marshalQualifiedHeight((QualifiedHeight) attribute));
return factory.createBdgHeight(property);
} else if (attribute instanceof QualifiedVolume) {
QualifiedVolumePropertyType property = factory.createQualifiedVolumePropertyType();
property.setQualifiedVolume(marshalQualifiedVolume((QualifiedVolume) attribute));
return factory.createBdgVolume(property);
}
return null;
}
private JAXBElement<?> createBuildingIsProtectedProperty(BuildingIsProtectedProperty src) {
return factory.createBdgIsProtected(src.getValue());
}
}
/*
* energy-ade-citygml4j - Energy ADE module for citygml4j
* https://github.com/citygml4j/energy-ade-citygml4j
*
* energy-ade-citygml4j is part of the citygml4j project
*
* Copyright 2019-2024 Claus Nagel <claus.nagel@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.citygml4j.ade.energy.bind;
import lombok.SneakyThrows;
import net.opengis.gml.*;
import org.citygml4j.ade.energy.model.core.*;
import org.citygml4j.ade.energy.model.supportingClasses.*;
import org.citygml4j.builder.jaxb.unmarshal.citygml.ade.ADEUnmarshallerHelper;
import org.citygml4j.model.citygml.ade.binding.ADEModelObject;
import org.citygml4j.model.citygml.ade.binding.ADEUnmarshaller;
import org.citygml4j.model.common.base.ModelObject;
import org.citygml4j.model.gml.xlink.XLinkActuate;
import org.citygml4j.model.gml.xlink.XLinkShow;
import org.citygml4j.model.gml.xlink.XLinkType;
import org.citygml4j.util.mapper.CheckedTypeMapper;
import org.citygml4j.xml.io.reader.MissingADESchemaException;
import org.sig3d.citygml.energyADE2beta7.*;
import javax.xml.bind.JAXBElement;
import javax.xml.datatype.DatatypeConstants;
import javax.xml.datatype.XMLGregorianCalendar;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.sql.Timestamp;
import java.time.LocalTime;
import java.time.ZonedDateTime;
import java.util.concurrent.locks.ReentrantLock;
public class EnergyADEUnmarshaller implements ADEUnmarshaller {
private final ReentrantLock lock = new ReentrantLock();
private ADEUnmarshallerHelper helper;
private CheckedTypeMapper<ADEModelObject> typeMapper;
private CheckedTypeMapper<ADEModelObject> getTypeMapper() {
if (typeMapper == null) {
lock.lock();
try {
if (typeMapper == null) {
typeMapper = CheckedTypeMapper.<ADEModelObject>create()
.with(RegularTimeSeriesType.class, this::unmarshalRegularTimeSeries)
.with(RegularTimeSeriesFileType.class, this::unmarshalRegularTimeSeriesFile)
.with(AbstractSchedulePropertyType.class, this::unmarshalAbstractScheduleProperty)
.with(AbstractLibraryPropertyType.class, this::unmarshalAbstractLibraryProperty)
.with(DeviceOperationType.class, this::unmarshalDeviceOperation)
.with(DeviceOperationPropertyType.class, this::unmarshalDeviceOperationProperty)
.with(WasteType.class, this::unmarshalWaste)
.with(WastePropertyType.class, this::unmarshalWasteProperty)
.with(FoodType.class, this::unmarshalFood)
.with(FoodPropertyType.class, this::unmarshalFoodProperty)
.with(ConstructionMaterialType.class, this::unmarshalConstructionMaterial)
.with(ConstructionMaterialPropertyType.class, this::unmarshalConstructionMaterialProperty)
.with(OtherResourceType.class, this::unmarshalOtherResource)
.with(OtherResourcePropertyType.class, this::unmarshalOtherResourceProperty)
.with(WaterType.class, this::unmarshalWater)
.with(EnergyType.class, this::unmarshalEnergy)
.with(EnergyPropertyType.class, this::unmarshalEnergyProperty)
.with(WaterPropertyType.class, this::unmarshalWaterProperty)
.with(WeatherStationType.class, this::unmarshalWeatherStation)
.with(WeatherStationPropertyType.class, this::unmarshalWeatherStationProperty)
.with(UrbanFunctionAreaType.class, this::unmarshalUrbanFunctionArea)
.with(UrbanFunctionAreaPropertyType.class, this::unmarshalUrbanFunctionAreaProperty)
.with(UrbanSpaceType.class, this::unmarshalUrbanSpace)
.with(UrbanSpacePropertyType.class, this::unmarshalUrbanSpaceProperty)
.with(AbstractResourcePropertyType.class, this::unmarshalAbstractResourceProperty)
.with(AbstractTimeSeriesPropertyType.class, this::unmarshalAbstractTimeSeriesProperty)
.with(RegularTimeSeriesPropertyType.class, this::unmarshalRegularTimeSeriesProperty)
.with(TypicalValuesTimeSeriesPropertyType.class, this::unmarshalTypicalValuesTimeSeriesProperty)
.with(TypicalValuesTimeSeriesType.class, this::unmarshalTypicalValuesTimeSeries)
.with(TypicalValuesTimeSeriesFileType.class, this::unmarshalTypicalValuesTimeSeriesFile)
.with(RegularTimeSeriesFilePropertyType.class, this::unmarshalRegularTimeSeriesFileProperty)
.with(TypicalValuesTimeSeriesFilePropertyType.class, this::unmarshalTypicalValuesTimeSeriesFileProperty)
.with(SensorConnectionPropertyType.class, this::unmarshalSensorConnectionProperty)
.with(SensorConnectionType.class, this::unmarshalSensorConnection)
.with(RefurbishmentMeasureType.class, this::unmarshalRefurbishmentMeasure)
.with(RefurbishmentMeasurePropertyType.class, this::unmarshalRefurbishmentMeasureProperty)
.with(EnergyPerformanceCertificatePropertyType.class, this::unmarshalEnergyPerformanceCertificateProperty)
.with(UtilityNetworkConnectionType.class, this::unmarshalUtilityNetworkConnection)
.with(UtilityNetworkConnectionPropertyType.class, this::unmarshalUtilityNetworkConnectionProperty)
.with(CityObjectRelationType.class, this::unmarshalCityObjectRelation)
.with(CityObjectRelationPropertyType.class, this::unmarshalCityObjectRelationProperty)
.with(AbstractDevicePropertyType.class, this::unmarshalAbstractDeviceProperty)
.with(WeatherDataPropertyType.class, this::unmarshalWeatherDataProperty)
.with(WeatherDataType.class, this::unmarshalWeatherData)
.with(JAXBElement.class, this::unmarshal);
}
} finally {
lock.unlock();
}
}
return typeMapper;
}
@Override
public void setADEUnmarshallerHelper(ADEUnmarshallerHelper helper) {
this.helper = helper;
}
@Override
public ADEModelObject unmarshal(JAXBElement<?> src) throws MissingADESchemaException {
final Object value = src.getValue();
// generic application properties
switch (src.getName().getLocalPart()) {
case "bdgType":
return new BuildingTypeProperty((CodeType) value);
case "bdgConstructionWeight":
return new BuildingConstructionWeightProperty((CodeType) value);
case "bdgArea":
return new QualifiedAreaProperty((QualifiedAreaPropertyType) value);
case "bdgHeight":
return new QualifiedHeightProperty((QualifiedHeightPropertyType) value);
case "bdgVolume":
return new QualifiedVolumeProperty((QualifiedVolumePropertyType)value);
case "bdgAtticThermalStatus":
return new BuildingAtticThermalStatusProperty((ThermalStatusValueType) value);
case "bdgBasementThermalStatus":
return new BuildingBasementThermalStatusProperty((ThermalStatusValueType) value);
case "bdgIsProtected":
return new BuildingIsProtectedProperty((Boolean) value);
case "resource":
return (unmarshalAbstractResourceProperty((AbstractResourcePropertyType) value));
case "weatherData":
return unmarshalWeatherDataProperty((WeatherDataPropertyType)value);
case "referencePoint":
return new ReferencePointProperty(helper.getGMLUnmarshaller().unmarshalPointProperty((PointPropertyType) value));
case "suitability":
return new SuitabilityProperty((SuitabilityPropertyType) value);
}
// all other types
return unmarshal(value);
}
@Override
public ADEModelObject unmarshal(Object src) throws MissingADESchemaException {
return getTypeMapper().apply(src);
}
private AbstractLibrary unmarshalAbstractLibrary(AbstractLibraryType src, AbstractLibrary dest) {
helper.getGMLUnmarshaller().unmarshalAbstractGML(src, dest);
if (src.isSetType())
dest.setType(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
if (src.isSetSource())
dest.setSource(src.getSource());
if (src.isSetAuthor())
dest.setAuthor(src.getAuthor());
return dest;
}
private AbstractLibraryProperty unmarshalAbstractLibraryProperty(AbstractLibraryPropertyType src) throws MissingADESchemaException {
AbstractLibraryProperty dest = new AbstractLibraryProperty();
if (src.isSetAbstractLibrary()) {
ADEModelObject temp = unmarshal(src.getAbstractLibrary());
if (temp instanceof AbstractLibrary) {
dest.setAbstractLibrary((AbstractLibrary) temp);
}
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
private AbstractDevice unmarshalAbstractDevice(AbstractDeviceType src, AbstractDevice dest) {
helper.getGMLUnmarshaller().unmarshalAbstractGML(src, dest);
if (src.isSetNumberOfDevices()) {
dest.setNumberOfDevices(src.getNumberOfDevices().intValue());
}
if (src.isSetModel()) {
dest.setModel(src.getModel());
}
if (src.isSetYearOfManufacture()) {
dest.setYearOfManufacture(src.getYearOfManufacture().intValue());
}
if (src.isSetInstalledPower())
dest.setInstalledPower(helper.getGMLUnmarshaller().unmarshalMeasure(src.getInstalledPower()));
if (src.isSetNominalEfficiency())
dest.setNominalEfficiency(helper.getGMLUnmarshaller().unmarshalMeasure(src.getNominalEfficiency()));
if(src.isSetEfficiencyIndicator())
dest.setEfficiencyIndicator(src.getEfficiencyIndicator());
if (src.isSetHeatDissipation())
dest.setHeatDissipation(helper.getGMLUnmarshaller().unmarshalMeasure(src.getHeatDissipation()));
if (src.isSetHeatDissipationConvectiveFraction())
dest.setHeatDissipationConvectiveFraction(helper.getGMLUnmarshaller().unmarshalScale(src.getHeatDissipationConvectiveFraction()));
if (src.isSetHeatDissipationLatentFraction())
dest.setHeatDissipationLatentFraction(helper.getGMLUnmarshaller().unmarshalScale(src.getHeatDissipationLatentFraction()));
if (src.isSetHeatDissipationRadiantFraction())
dest.setHeatDissipationRadiantFraction(helper.getGMLUnmarshaller().unmarshalScale(src.getHeatDissipationRadiantFraction()));
return dest;
}
private AbstractDeviceProperty unmarshalAbstractDeviceProperty(AbstractDevicePropertyType src) throws MissingADESchemaException {
AbstractDeviceProperty dest = new AbstractDeviceProperty();
if (src.isSetAbstractDevice()) {
ADEModelObject temp = unmarshal(src.getAbstractDevice());
if (temp instanceof AbstractDevice) {
dest.setAbstractDevice((AbstractDevice) temp);
}
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert DeviceOperationType to DeviceOperation.
*/
private DeviceOperation unmarshalDeviceOperation(DeviceOperationType src) throws MissingADESchemaException {
DeviceOperation dest = new DeviceOperation();
if (src.isSetType()) {
dest.setType(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
if (src.isSetYearlyGlobalEfficiency()) {
dest.setYearlyGlobalEfficiency(src.getYearlyGlobalEfficiency());
}
return dest;
}
private DeviceOperationProperty unmarshalDeviceOperationProperty(DeviceOperationPropertyType src) throws MissingADESchemaException {
DeviceOperationProperty dest = new DeviceOperationProperty();
if (src.isSetDeviceOperation()) {
ADEModelObject temp = unmarshal(src.getDeviceOperation());
if (temp instanceof DeviceOperation) {
dest.setDeviceOperation((DeviceOperation) temp);
}
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
private AbstractSchedule unmarshalAbstractSchedule(AbstractScheduleType src, AbstractSchedule dest) {
helper.getGMLUnmarshaller().unmarshalAbstractGML(src, dest);
if (src.isSetType()) {
dest.setScheduleTypeValue(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
if (src.isSetStartTime()) {
ZonedDateTime zonedDateTime = src.getStartTime().toGregorianCalendar()
.toZonedDateTime();
dest.setStartTime(zonedDateTime); }
if (src.isSetStartMonth()){
dest.setStartMonth(src.getStartMonth().intValue());
}
if (src.isSetStartYear())
dest.setStartYear(src.getStartYear().intValue());
if (src.isSetTemporalExtent())
dest.setTemporalExtent(unmarshalTimeIntervalLength(src.getTemporalExtent()));
return dest;
}
private AbstractScheduleProperty unmarshalAbstractScheduleProperty(AbstractSchedulePropertyType src) throws MissingADESchemaException {
AbstractScheduleProperty dest = new AbstractScheduleProperty();
if (src.isSetAbstractSchedule()) {
ADEModelObject temp = unmarshal(src.getAbstractSchedule());
if (temp instanceof AbstractSchedule) {
dest.setAbstractSchedule((AbstractSchedule) temp);
}
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert RefurbishmentMeasureType to RefurbishmentMeasure.
*/
private RefurbishmentMeasure unmarshalRefurbishmentMeasure(RefurbishmentMeasureType src) throws MissingADESchemaException {
RefurbishmentMeasure dest = new RefurbishmentMeasure();
helper.getGMLUnmarshaller().unmarshalAbstractFeature(src, dest);
if (src.isSetType()) {
dest.setType(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
if (src.isSetEndDate()){
dest.setEndDate(src.getEndDate());
}
if (src.isSetStartDate())
dest.setStartDate(src.getStartDate());
if (src.isSetLibraryCode()){
dest.setLibraryCode(helper.getGMLUnmarshaller().unmarshalCode(src.getLibraryCode()));
}
return dest;
}
/*
* Convert RefurbishmentMeasurePropertyType to RefurbishmentMeasureProperty.
*/
private RefurbishmentMeasureProperty unmarshalRefurbishmentMeasureProperty(RefurbishmentMeasurePropertyType src) throws MissingADESchemaException {
RefurbishmentMeasureProperty dest = new RefurbishmentMeasureProperty();
if (src.isSetRefurbishmentMeasure()) {
dest.setRefurbishmentMeasure(unmarshalRefurbishmentMeasure(src.getRefurbishmentMeasure()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert EnergyPerformanceCertificateType to EnergyPerformanceCertificate.
*/
private EnergyPerformanceCertificate unmarshalEnergyPerformanceCertificate(EnergyPerformanceCertificateType src) throws URISyntaxException {
EnergyPerformanceCertificate dest = new EnergyPerformanceCertificate();
if (src.isSetType()) {
dest.setType(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
if (src.isSetCertificationMethod()){
dest.setCertificationMethod(src.getCertificationMethod());
}
if (src.isSetCertificationURI()){
URI uri = new URI(src.getCertificationURI());
dest.setCertificationURI(uri);
}
if (src.isSetLabel()){
dest.setLabel(src.getLabel());
}
if (src.isSetIssueDate()){
dest.setIssueDate(src.getIssueDate());
}
if (src.isSetExpirationDate()){
dest.setExpirationDate(src.getExpirationDate());
}
if (src.isSetValue()){
dest.setValue(helper.getGMLUnmarshaller().unmarshalMeasure(src.getValue()));
}
return dest;
}
/*
* Convert EnergyPerformanceCertificatePropertyType to EnergyPerformanceCertificateProperty.
*/
@SneakyThrows(URISyntaxException.class)
private EnergyPerformanceCertificateProperty unmarshalEnergyPerformanceCertificateProperty(EnergyPerformanceCertificatePropertyType src) {
EnergyPerformanceCertificateProperty dest = new EnergyPerformanceCertificateProperty();
if (src.isSetEnergyPerformanceCertificate()) {
dest.setEnergyPerformanceCertificate(unmarshalEnergyPerformanceCertificate(src.getEnergyPerformanceCertificate()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert UtilityNetworkConnectionType to UtilityNetworkConnection.
*/
private UtilityNetworkConnection unmarshalUtilityNetworkConnection(UtilityNetworkConnectionType src) {
UtilityNetworkConnection dest = new UtilityNetworkConnection();
if (src.isSetNetworkID()) {
dest.setNetworkID(src.getNetworkID());
}
if (src.isSetConnectionStatus()){
dest.setConnectionStatus(unmarshalConnectionStatus(src.getConnectionStatus()));
}
if (src.isSetFunctionInNetwork()){
dest.setFunctionInNetwork(helper.getGMLUnmarshaller().unmarshalCode(src.getFunctionInNetwork()));
}
if (src.isSetNetworkType()){
dest.setNetworkType(helper.getGMLUnmarshaller().unmarshalCode(src.getNetworkType()));
}
if (src.isSetUsageInNetwork()){
dest.setUsageInNetwork(helper.getGMLUnmarshaller().unmarshalCode(src.getUsageInNetwork()));
}
if (src.isSetNetworkNodeID()){
dest.setNetworkNodeID(src.getNetworkNodeID());
}
return dest;
}
/*
* Convert NetworkConnectionStatusValueType to NetworkConnectionStatusValue.
*/
private NetworkConnectionStatusValue unmarshalConnectionStatus(NetworkConnectionStatusValueType networkConnectionStatusValue) {
switch (networkConnectionStatusValue) {
case CONNECTED:
return NetworkConnectionStatusValue.CONNECTED;
case DISCONNECTED_BUT_CONNECTABLE:
return NetworkConnectionStatusValue.DISCONNECTED_BUT_CONNECTABLE;
case DISCONNECTED_AND_NOT_CONNECTABLE:
return NetworkConnectionStatusValue.DISCONNECTED_AND_NOT_CONNECTABLE;
case UNKNOWN:
return NetworkConnectionStatusValue.UNKNOWN;
default:
throw new IllegalArgumentException("Unexpected NetworkConnectionStatusValue: " + networkConnectionStatusValue);
}
}
/*
* Convert UtilityNetworkConnectionPropertyType to UtilityNetworkConnectionProperty.
*/
private UtilityNetworkConnectionProperty unmarshalUtilityNetworkConnectionProperty(UtilityNetworkConnectionPropertyType src) {
UtilityNetworkConnectionProperty dest = new UtilityNetworkConnectionProperty();
if (src.isSetUtilityNetworkConnection()) {
dest.setUtilityNetworkConnection(unmarshalUtilityNetworkConnection(src.getUtilityNetworkConnection()));
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert AbstractEnergySystemType to AbstractEnergySystem.
*/
private AbstractDevice unmarshalAbstractEnergySystem(AbstractDeviceType src, AbstractDevice dest) throws MissingADESchemaException {
helper.getCore200Unmarshaller().unmarshalAbstractCityObject(src, dest);
if (src.isSetNumberOfDevices())
dest.setNumberOfDevices((src.getNumberOfDevices()).intValue());
if (src.isSetModel())
dest.setNumberOfDevices(src.getNumberOfDevices().intValue());
if (src.isSetYearOfManufacture())
dest.setYearOfManufacture((src.getYearOfManufacture().intValue()));
if (src.isSetInstalledPower())
dest.setInstalledPower(helper.getGMLUnmarshaller().unmarshalMeasure(src.getInstalledPower()));
if (src.isSetNominalEfficiency())
dest.setNominalEfficiency(helper.getGMLUnmarshaller().unmarshalMeasure(src.getNominalEfficiency()));
if (src.isSetEfficiencyIndicator())
dest.setEfficiencyIndicator(src.getEfficiencyIndicator());
if(src.isSetHeatDissipation())
dest.setHeatDissipation(helper.getGMLUnmarshaller().unmarshalMeasure(src.getHeatDissipation()));
if (src.isSetHeatDissipationConvectiveFraction())
dest.setHeatDissipationConvectiveFraction(helper.getGMLUnmarshaller().unmarshalScale(src.getHeatDissipationConvectiveFraction()));
if (src.isSetHeatDissipationLatentFraction())
dest.setHeatDissipationLatentFraction(helper.getGMLUnmarshaller().unmarshalScale(src.getHeatDissipationLatentFraction()));
if (src.isSetHeatDissipationRadiantFraction())
dest.setHeatDissipationRadiantFraction(helper.getGMLUnmarshaller().unmarshalScale(src.getHeatDissipationRadiantFraction()));
return dest;
}
/*
* Convert AbstractEnergySystemPropertyType to AbstractEnergySystemProperty.
*/
@SuppressWarnings("unchecked")
private AbstractDeviceProperty unmarshalAbstractEnergySystemProperty(AbstractDevicePropertyType src) throws MissingADESchemaException {
AbstractDeviceProperty dest = new AbstractDeviceProperty();
if (src.isSetAbstractDevice()) {
ModelObject modelObject = helper.getJAXBUnmarshaller().unmarshal(src.getAbstractDevice());
if (modelObject instanceof RegularTimeSeriesFile)
dest.setAbstractDevice((AbstractDevice) modelObject);
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert SensorConnectionPropertyType to SensorConnectionProperty.
*/
private SensorConnectionProperty unmarshalSensorConnectionProperty(SensorConnectionPropertyType src) throws MissingADESchemaException {
SensorConnectionProperty dest = new SensorConnectionProperty();
if (src.isSetSensorConnection()) {
ModelObject object = helper.getJAXBUnmarshaller().unmarshal(src.getSensorConnection());
if (object instanceof RegularTimeSeriesFile)
dest.setSensorConnection((SensorConnection) object);
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert SensorConnectionType to SensorConnection.
*/
private SensorConnection unmarshalSensorConnection(SensorConnectionType src) throws MissingADESchemaException {
SensorConnection dest = new SensorConnection();
unmarshalAbstractTimeSeries(src, dest);
helper.getGMLUnmarshaller().unmarshalAbstractFeature(src, dest);
try {
if (src.isSetUom()) {
dest.setUom(src.getUom().toString());
}
if (src.isSetTemporalExtent()) {
dest.setTemporalExtent(unmarshalTimeIntervalLength(src.getTemporalExtent()));
}
if (src.isSetConnectionType())
dest.setConnectionType(helper.getGMLUnmarshaller().unmarshalCode(src.getConnectionType()));
if (src.isSetObservationID())
dest.setObservationID(src.getObservationID());
if (src.isSetSensorID())
dest.setSensorID(src.getSensorID());
if (src.isSetSensorName())
dest.setSensorName(src.getSensorName());
if (src.isSetObservationProperty())
dest.setObservationProperty(src.getObservationProperty());
if (src.isSetDatastreamID())
dest.setDataStreamID(src.getObservationID());
if (src.isSetBaseURL()) {
String encodedUrl = URLEncoder.encode(src.getBaseURL(), StandardCharsets.UTF_8.toString());
URI uri = new URI(encodedUrl);
dest.setBaseURL(uri);
}
if (src.isSetAuthType())
dest.setAuthType(helper.getGMLUnmarshaller().unmarshalCode(src.getAuthType()));
if (src.isSetMqttServer())
dest.setMqtServer(src.getMqttServer());
if (src.isSetMqttTopic())
dest.setMqtTopic(src.getMqttTopic());
if (src.isSetLinkToObservation())
dest.setLinkToObservation(src.getLinkToObservation());
if (src.isSetLinkToSensorDescription())
dest.setLinkToSensorDescription(src.getLinkToSensorDescription());
return dest;
}
catch (URISyntaxException e) {
throw new RuntimeException("Error parsing URI", e);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("Unsupported encoding", e);
}
}
/*
* Convert TypicalValuesTimeSeriesFileType to TypicalValuesTimeSeriesFile.
*/
private TypicalValuesTimeSeriesFile unmarshalTypicalValuesTimeSeriesFile(TypicalValuesTimeSeriesFileType src) throws MissingADESchemaException {
TypicalValuesTimeSeriesFile dest = new TypicalValuesTimeSeriesFile();
unmarshalAbstractTimeSeries(src, dest);
if (src.isSetStartTime()){
dest.setStartTime(src.getStartTime().toGregorianCalendar().toZonedDateTime());
}
if (src.isSetStartDay())
dest.setStartDay(src.getStartDay().intValue());
if (src.isSetStartMonth())
dest.setStartMonth(src.getStartMonth().intValue());
if (src.isSetUom() && src.getUom().isSetUom())
dest.setUom(src.getUom().getUom());
if (src.isSetTemporalExtent())
dest.setTemporalExtent(unmarshalTimeIntervalLength(src.getTemporalExtent()));
if (src.isSetTimeInterval())
dest.setTimeInterval(unmarshalTimeIntervalLength(src.getTimeInterval()));
if (src.isSetNumberOfHeaderLines())
dest.setNumberOfHeaderLines(src.getNumberOfHeaderLines().intValue());
if (src.isSetFieldSeparator())
dest.setFieldSeparator(src.getFieldSeparator());
if (src.isSetRecordSeparator())
dest.setRecordSeparator(src.getRecordSeparator());
if (src.isSetDecimalSymbol())
dest.setDecimalSymbol(src.getDecimalSymbol());
if (src.isSetValueColumnNumber())
dest.setValueColumnNumber(src.getValueColumnNumber().intValue());
return dest;
}
/*
* Convert TypicalValuesTimeSeriesFilePropertyType to TypicalValuesTimeSeriesFileProperty.
*/
private TypicalValuesTimeSeriesFileProperty unmarshalTypicalValuesTimeSeriesFileProperty(TypicalValuesTimeSeriesFilePropertyType src) throws MissingADESchemaException {
TypicalValuesTimeSeriesFileProperty dest = new TypicalValuesTimeSeriesFileProperty();
if (src.isSetTypicalValuesTimeSeriesFile()) {
ModelObject object = helper.getJAXBUnmarshaller().unmarshal(src.getTypicalValuesTimeSeriesFile());
if (object instanceof TypicalValuesTimeSeriesFile)
dest.setTypicalValuesTimeSeriesFile((TypicalValuesTimeSeriesFile) object);
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert RegularTimeSeriesFilePropertyType to RegularTimeSeriesFileProperty.
*/
private RegularTimeSeriesFileProperty unmarshalRegularTimeSeriesFileProperty(RegularTimeSeriesFilePropertyType src) throws MissingADESchemaException {
RegularTimeSeriesFileProperty dest = new RegularTimeSeriesFileProperty();
if (src.isSetRegularTimeSeriesFile()) {
ModelObject object = helper.getJAXBUnmarshaller().unmarshal(src.getRegularTimeSeriesFile());
if (object instanceof RegularTimeSeriesFile)
dest.setRegularTimeSeriesFile((RegularTimeSeriesFile) object);
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert RegularTimeSeriesFilePropertyType to RegularTimeSeriesFileProperty.
*/
private void unmarshalAbstractTimeSeries(AbstractTimeSeriesType src, AbstractTimeSeries dest) throws MissingADESchemaException {
helper.getGMLUnmarshaller().unmarshalAbstractFeature(src, dest);
if( src.isSetAcquisitionMethod()){
dest.setAcquisitionMethod(helper.getGMLUnmarshaller().unmarshalCode(src.getAcquisitionMethod()));
}
if( src.isSetSource()){
dest.setSource(src.getSource());
}
if (src.isSetInterpolationType()){
dest.setInterpolationTypeValue(InterpolationTypeValue.fromValue(src.getInterpolationType().value()));
}
}
/*
* Convert AbstractTimeSeriesPropertyType to AbstractTimeSeriesProperty.
*/
private AbstractTimeSeriesProperty unmarshalAbstractTimeSeriesProperty(AbstractTimeSeriesPropertyType src) throws MissingADESchemaException {
AbstractTimeSeriesProperty dest = new AbstractTimeSeriesProperty();
if (src.isSetAbstractTimeSeries()) {
ModelObject object = helper.getJAXBUnmarshaller().unmarshal(src.getAbstractTimeSeries());
if (object instanceof AbstractTimeSeries)
dest.setAbstractTimeSeries((AbstractTimeSeries) object);
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert RegularTimeSeriesType to RegularTimeSeries.
*/
private RegularTimeSeries unmarshalRegularTimeSeries(RegularTimeSeriesType src) throws MissingADESchemaException {
RegularTimeSeries dest = new RegularTimeSeries();
unmarshalAbstractTimeSeries(src, dest);
if (src.isSetTemporalExtent())
dest.setTemporalExtent(unmarshalTimePeriodProperty(src.getTemporalExtent()));
if (src.isSetTimeInterval())
dest.setTimeInterval(unmarshalTimeIntervalLength(src.getTimeInterval()));
if (src.isSetValuesList())
dest.setValues(helper.getGMLUnmarshaller().unmarshalMeasureList(src.getValuesList()));
return dest;
}
/*
* Convert RegularTimeSeriesFileType to RegularTimeSeriesFile.
*/
private RegularTimeSeriesFile unmarshalRegularTimeSeriesFile(RegularTimeSeriesFileType src) throws MissingADESchemaException {
RegularTimeSeriesFile dest = new RegularTimeSeriesFile();
unmarshalAbstractTimeSeries(src, dest);
if (src.isSetUom() && src.getUom().isSetUom())
dest.setUom(src.getUom().getUom());
if (src.isSetFileURI()){
URI uri = URI.create(src.getFileURI());
dest.setFileURI(uri);
}
if (src.isSetTemporalExtent())
dest.setTemporalExtent(unmarshalTimePeriodProperty(src.getTemporalExtent()));
if (src.isSetTimeInterval())
dest.setTimeInterval(unmarshalTimeIntervalLength(src.getTimeInterval()));
if (src.isSetNumberOfHeaderLines())
dest.setNumberOfHeaderLines(src.getNumberOfHeaderLines().intValue());
if (src.isSetFieldSeparator())
dest.setFieldSeparator(src.getFieldSeparator());
if (src.isSetRecordSeparator())
dest.setRecordSeparator(src.getRecordSeparator());
if (src.isSetDecimalSymbol())
dest.setDecimalSymbol(src.getDecimalSymbol());
if (src.isSetValueColumnNumber())
dest.setValueColumnNumber(src.getValueColumnNumber().intValue());
return dest;
}
/*
* Convert TimePeriodType to TimePeriod.
*/
private TimePeriod unmarshalTimePeriod(TimePeriodType src) {
TimePeriod dest = new TimePeriod();
if (src.isSetBeginPosition()) {
TimePositionType timePosition = src.getBeginPosition();
for (String value : timePosition.getValue()) {
XMLGregorianCalendar calendar = helper.getJAXBUnmarshaller().getDataTypeFactory().newXMLGregorianCalendar(value);
if (calendar != null) {
if (calendar.getTimezone() == DatatypeConstants.FIELD_UNDEFINED)
calendar.setTimezone(0);
dest.setBeginPosition(calendar.toGregorianCalendar().toZonedDateTime());
break;
}
}
}
//todo
if (src.isSetEndPosition()) {
TimePositionType timePosition = src.getEndPosition();
for (String value : timePosition.getValue()) {
XMLGregorianCalendar calendar = helper.getJAXBUnmarshaller().getDataTypeFactory().newXMLGregorianCalendar(value);
if (calendar != null) {
if (calendar.getTimezone() == DatatypeConstants.FIELD_UNDEFINED)
calendar.setTimezone(0);
dest.setEndPosition(calendar.toGregorianCalendar().toZonedDateTime());
break;
}
}
}
return dest;
}
/*
* Convert TimePeriodPropertyType to TimePeriodProperty.
*/
private TimePeriodProperty unmarshalTimePeriodProperty(TimePeriodPropertyType src) {
TimePeriodProperty dest = new TimePeriodProperty();
if (src.isSetTimePeriod())
dest.setTimePeriod(unmarshalTimePeriod(src.getTimePeriod()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert CityObjectRelationType to CityObjectRelation.
*/
private CityObjectRelation unmarshalCityObjectRelation(CityObjectRelationType src) {
CityObjectRelation dest = new CityObjectRelation();
if (src.isSetRelationType())
dest.setRelationType(helper.getGMLUnmarshaller().unmarshalCode(src.getRelationType()));
if (src.isSetRelatedTo())
dest.setRelatedTo(unmarshalRelatedToProperty(src.getRelatedTo()));
return dest;
}
/*
* Convert RelatedToPropertyType to RelatedToProperty.
*/
private RelatedToProperty unmarshalRelatedToProperty(RelatedToPropertyType src) {
RelatedToProperty dest = new RelatedToProperty();
if (src.isSet_CityObject()){
dest.setCityObject(src.get_CityObject());
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert CityObjectRelationPropertyType to CityObjectRelationProperty.
*/
private CityObjectRelationProperty unmarshalCityObjectRelationProperty(CityObjectRelationPropertyType src){
CityObjectRelationProperty dest = new CityObjectRelationProperty();
if (src.isSetCityObjectRelation()) {
dest.setObject(unmarshalCityObjectRelation(src.getCityObjectRelation()));
}
return dest;
}
/*
* Convert TypicalValuesTimeSeriesType to TypicalValuesTimeSeries.
*/
private TypicalValuesTimeSeries unmarshalTypicalValuesTimeSeries(TypicalValuesTimeSeriesType src) throws MissingADESchemaException {
TypicalValuesTimeSeries dest = new TypicalValuesTimeSeries();
unmarshalAbstractTimeSeries(src, dest);
if (src.isSetTimeInterval()){
dest.setTimeInterval(unmarshalTimeIntervalLength(src.getTimeInterval()));
}
if (src.isSetTemporalExtent()){
dest.setTemporalExtent(unmarshalTimeIntervalLength(src.getTemporalExtent()));
}
if (src.isSetValuesList()){
dest.setValues(helper.getGMLUnmarshaller().unmarshalMeasureList(src.getValuesList()));
}
if (src.isSetStartDay())
dest.setStartDay(src.getStartDay().intValue());
if (src.isSetStartTime()) {
XMLGregorianCalendar xmlGregorianCalendar = src.getStartTime();
if (xmlGregorianCalendar != null) {
LocalTime timestamp = xmlGregorianCalendar.toGregorianCalendar().toZonedDateTime().toLocalTime();
dest.setStartTime(timestamp);
}
}
if (src.isSetStartMonth())
dest.setStartMonth(src.getStartMonth().intValue());
return dest;
}
/*
* Convert TypicalValuesTimeSeriesPropertyType to TypicalValuesTimeSeriesProperty.
*/
private TypicalValuesTimeSeriesProperty unmarshalTypicalValuesTimeSeriesProperty(TypicalValuesTimeSeriesPropertyType src) throws MissingADESchemaException {
TypicalValuesTimeSeriesProperty dest = new TypicalValuesTimeSeriesProperty();
if (src.isSetTypicalValuesTimeSeries())
dest.setTypicalValuesTimeSeries(unmarshalTypicalValuesTimeSeries(src.getTypicalValuesTimeSeries()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert RegularTimeSeriesPropertyType to RegularTimeSeriesProperty.
*/
private RegularTimeSeriesProperty unmarshalRegularTimeSeriesProperty(RegularTimeSeriesPropertyType src) throws MissingADESchemaException {
RegularTimeSeriesProperty dest = new RegularTimeSeriesProperty();
if (src.isSetRegularTimeSeries())
dest.setRegularTimeSeries(unmarshalRegularTimeSeries(src.getRegularTimeSeries()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert TimeIntervalLengthType to TimeIntervalLength.
*/
private TimeIntervalLength unmarshalTimeIntervalLength(TimeIntervalLengthType src) {
TimeIntervalLength dest = new TimeIntervalLength();
if (src.isSetValue())
dest.setValue(src.getValue().doubleValue());
if (src.isSetUnit())
dest.setUnit(src.getUnit());
if (src.isSetRadix())
dest.setRadix(src.getRadix().intValue());
if (src.isSetFactor())
dest.setFactor(src.getFactor().intValue());
return dest;
}
/*
* Convert AbstractResourceType to AbstractResource.
*/
private AbstractResource unmarshalAbstractResource(AbstractResourceType src, AbstractResource dest) throws MissingADESchemaException {
helper.getGMLUnmarshaller().unmarshalAbstractGML(src, dest);
if( src.isSetAmount()){
dest.setAmount(helper.getGMLUnmarshaller().unmarshalMeasure(src.getAmount()));
}
if(src.isSetTimeDependentAmount()){
dest.setTimeDependentAmount((AbstractTimeSeriesProperty)unmarshal(src.getTimeDependentAmount()));
}
if (src.isSetStatus()){
dest.setStatus(src.getStatus());
}
if (src.isSetOperationType()){
dest.setOperationType(helper.getGMLUnmarshaller().unmarshalCode(src.getOperationType()));
}
if (src.isSetAmountType()){
dest.setAmountType(helper.getGMLUnmarshaller().unmarshalCode(src.getAmountType()));
}
if (src.isSetIsAmountNormalized()){
dest.setAmountNormalized(src.isIsAmountNormalized());
}
if (src.isSetNormalizationValue()){
dest.setNormalizationValue(helper.getGMLUnmarshaller().unmarshalMeasure(src.getNormalizationValue()));
}
if (src.isSetNormalizationParameter()){
dest.setNormalizationParameter(src.getNormalizationParameter());
}
if (src.isSetCo2Equivalent()) {
dest.setCo2Equivalent(helper.getGMLUnmarshaller().unmarshalMeasure(src.getCo2Equivalent()));
}
if (src.isSetYear()){
dest.setYear(src.getYear().intValue());
}
if (src.isSetCostsMoney()){
dest.setCostsMoney(helper.getGMLUnmarshaller().unmarshalMeasure(src.getCostsMoney()));
}
if (src.isSetYieldsMoney()){
dest.setYieldsMoney(helper.getGMLUnmarshaller().unmarshalMeasure(src.getYieldsMoney()));
}
return dest;
}
private WeatherData unmarshalWeatherData(WeatherDataType src) throws MissingADESchemaException {
WeatherData dest = new WeatherData();
if (src.isSetType())
dest.setType(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
if (src.isSetLibraryCode())
dest.setLibraryCode(helper.getGMLUnmarshaller().unmarshalCode(src.getLibraryCode()));
if (src.isSetValueType())
dest.setValueType(helper.getGMLUnmarshaller().unmarshalCode(src.getValueType()));
if (src.isSetYearlyValue())
dest.setYearlyValue(helper.getGMLUnmarshaller().unmarshalMeasure(src.getYearlyValue()));
if (src.isSetTimeDependentValues())
dest.setTimeDependentValues(unmarshalAbstractTimeSeriesProperty(src.getTimeDependentValues()));
return dest;
}
private WeatherDataProperty unmarshalWeatherDataProperty(WeatherDataPropertyType src) throws MissingADESchemaException {
WeatherDataProperty dest = new WeatherDataProperty();
if (src.isSetWeatherData()) {
ADEModelObject temp = unmarshal(src.getWeatherData());
if (temp instanceof WeatherData) {
dest.setWeatherData((WeatherData) temp);
}
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert AbstractResourcePropertyType to AbstractResourceProperty.
*/
private AbstractResourceProperty unmarshalAbstractResourceProperty(AbstractResourcePropertyType src) throws MissingADESchemaException {
AbstractResourceProperty dest = new AbstractResourceProperty();
if (src.isSetAbstractResource()) {
ADEModelObject temp = unmarshal(src.getAbstractResource());
if (temp instanceof AbstractResource) {
dest.setAbstractResource((AbstractResource) temp);
}
}
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert UrbanFunctionAreaType to UrbanFunctionArea.
*/
private UrbanFunctionArea unmarshalUrbanFunctionArea(UrbanFunctionAreaType src) throws MissingADESchemaException {
UrbanFunctionArea dest = new UrbanFunctionArea();
helper.getCityObjectGroup200Unmarshaller().unmarshalCityObjectGroup(src, dest);
if (src.isSetCode()){
dest.setCode(helper.getGMLUnmarshaller().unmarshalCode(src.getCode()));
}
if (src.isSetType()){
dest.setType(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
return dest;
}
/*
* Convert UrbanFunctionAreaPropertyType to UrbanFunctionAreaProperty.
*/
private UrbanFunctionAreaProperty unmarshalUrbanFunctionAreaProperty(UrbanFunctionAreaPropertyType src) throws MissingADESchemaException {
UrbanFunctionAreaProperty dest = new UrbanFunctionAreaProperty();
if (src.isSetUrbanFunctionArea())
dest.setUrbanFunctionArea(unmarshalUrbanFunctionArea(src.getUrbanFunctionArea()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert WeatherStationType to WeatherStation.
*/
private WeatherStation unmarshalWeatherStation(WeatherStationType src) throws MissingADESchemaException {
WeatherStation dest = new WeatherStation();
helper.getCore200Unmarshaller().unmarshalAbstractCityObject(src, dest);
return dest;
}
/*
* Convert WeatherStationPropertyType to WeatherStationProperty.
*/
private WeatherStationProperty unmarshalWeatherStationProperty(WeatherStationPropertyType src) throws MissingADESchemaException {
WeatherStationProperty dest = new WeatherStationProperty();
if (src.isSetWeatherStation())
dest.setWeatherStation(unmarshalWeatherStation(src.getWeatherStation()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert EnergyType to Energy.
*/
private Energy unmarshalEnergy(EnergyType src) throws MissingADESchemaException {
Energy dest = new Energy();
unmarshalAbstractResource(src,dest);
if (src.isSetType()){
dest.setEnergyTypeValue(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
if (src.isSetEndUse()){
dest.setEnergyEndUseValue(helper.getGMLUnmarshaller().unmarshalCode(src.getEndUse()));
}
if (src.isSetEnergyCarrier()){
dest.setEnergyCarrierValue(helper.getGMLUnmarshaller().unmarshalCode(src.getEnergyCarrier()));
}
if (src.isSetMaximumLoad()){
dest.setMaximumLoad(helper.getGMLUnmarshaller().unmarshalMeasure(src.getMaximumLoad()));
}
if (src.isSetSource()){
dest.setEnergySourceValue(helper.getGMLUnmarshaller().unmarshalCode(src.getSource()));
}
return dest;
}
/*
* Convert EnergyPropertyType to EnergyProperty.
*/
private EnergyProperty unmarshalEnergyProperty(EnergyPropertyType src) throws MissingADESchemaException {
EnergyProperty dest = new EnergyProperty();
if (src.isSetEnergy())
dest.setEnergy(unmarshalEnergy(src.getEnergy()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert UrbanSpaceType to UrbanSpace.
*/
private UrbanSpace unmarshalUrbanSpace(UrbanSpaceType src) throws MissingADESchemaException {
UrbanSpace dest = new UrbanSpace();
unmarshalAbstractResource(src, dest);
if (src.isSetType()){
dest.setType(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
if (src.isSetEndUse()){
dest.setEndUse(helper.getGMLUnmarshaller().unmarshalCode(src.getEndUse()));
}
return dest;
}
/*
* Convert UrbanSpacePropertyType to UrbanSpaceProperty.
*/
private UrbanSpaceProperty unmarshalUrbanSpaceProperty(UrbanSpacePropertyType src) throws MissingADESchemaException {
UrbanSpaceProperty dest = new UrbanSpaceProperty();
if (src.isSetUrbanSpace())
dest.setUrbanSpace(unmarshalUrbanSpace(src.getUrbanSpace()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert WaterType to Water.
*/
private Water unmarshalWater(WaterType src) throws MissingADESchemaException {
Water dest = new Water();
unmarshalAbstractResource(src, dest);
if (src.isSetType()){
dest.setWaterTypeValue(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
if (src.isSetEndUse()){
dest.setWaterEndUseValue(helper.getGMLUnmarshaller().unmarshalCode(src.getEndUse()));
}
return dest;
}
/*
* Convert WaterPropertyType to WaterProperty.
*/
private WaterProperty unmarshalWaterProperty(WaterPropertyType src) throws MissingADESchemaException {
WaterProperty dest = new WaterProperty();
if (src.isSetWater())
dest.setWater(unmarshalWater(src.getWater()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert WasteType to Waste.
*/
private Waste unmarshalWaste(WasteType src) throws MissingADESchemaException {
Waste dest = new Waste();
helper.getGMLUnmarshaller().unmarshalAbstractGML(src, dest);
if (src.isSetType()){
dest.setWasteTypeValue(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
if (src.isSetEndUse()){
dest.setWasteEndUseValue(helper.getGMLUnmarshaller().unmarshalCode(src.getEndUse()));
}
if (src.isSetIsDangerous())
dest.setDangerous(src.isIsDangerous());
if (src.isIsRecyclable())
dest.setRecyclable(src.isIsRecyclable());
return dest;
}
/*
* Convert WastePropertyType to WasteProperty.
*/
private WasteProperty unmarshalWasteProperty(WastePropertyType src) throws MissingADESchemaException {
WasteProperty dest = new WasteProperty();
if (src.isSetWaste())
dest.setWaste(unmarshalWaste(src.getWaste()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert ConstructionMaterialType to ConstructionMaterial.
*/
private ConstructionMaterial unmarshalConstructionMaterial(ConstructionMaterialType src) throws MissingADESchemaException {
ConstructionMaterial dest = new ConstructionMaterial();
helper.getGMLUnmarshaller().unmarshalAbstractGML(src, dest);
if (src.isSetType()){
dest.setConstructionMaterialTypeValue(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
if (src.isSetEndUse()){
dest.setConstructionMaterialEndUseValue(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
return dest;
}
/*
* Convert ConstructionMaterialPropertyType to ConstructionMaterialProperty.
*/
private ConstructionMaterialProperty unmarshalConstructionMaterialProperty(ConstructionMaterialPropertyType src) throws MissingADESchemaException {
ConstructionMaterialProperty dest = new ConstructionMaterialProperty();
if (src.isSetConstructionMaterial())
dest.setConstructionMaterial(unmarshalConstructionMaterial(src.getConstructionMaterial()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert FoodType to Food.
*/
private Food unmarshalFood(FoodType src) throws MissingADESchemaException {
Food dest = new Food();
helper.getGMLUnmarshaller().unmarshalAbstractGML(src, dest);
if (src.isSetType()){
dest.setFoodTypeValue(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
if (src.isSetEndUse()){
dest.setFoodEndUseValue(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
return dest;
}
/*
* Convert FoodPropertyType to FoodProperty.
*/
private FoodProperty unmarshalFoodProperty(FoodPropertyType src) throws MissingADESchemaException {
FoodProperty dest = new FoodProperty();
if (src.isSetFood())
dest.setFood(unmarshalFood(src.getFood()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
/*
* Convert OtherResourceType to OtherResource.
*/
private OtherResource unmarshalOtherResource(OtherResourceType src) throws MissingADESchemaException {
OtherResource dest = new OtherResource();
helper.getGMLUnmarshaller().unmarshalAbstractGML(src, dest);
if (src.isSetType()){
dest.setOtherResourceTypeValue(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
if (src.isSetEndUse()){
dest.setOtherResourceEndUseValue(helper.getGMLUnmarshaller().unmarshalCode(src.getType()));
}
return dest;
}
/*
* Convert OtherResourcePropertyType to OtherResourceProperty.
*/
private OtherResourceProperty unmarshalOtherResourceProperty(OtherResourcePropertyType src) throws MissingADESchemaException {
OtherResourceProperty dest = new OtherResourceProperty();
if (src.isSetOtherResource())
dest.setOtherResource(unmarshalOtherResource(src.getOtherResource()));
if (src.isSetRemoteSchema())
dest.setRemoteSchema(src.getRemoteSchema());
if (src.isSetType())
dest.setType(XLinkType.fromValue(src.getType().value()));
if (src.isSetHref())
dest.setHref(src.getHref());
if (src.isSetRole())
dest.setRole(src.getRole());
if (src.isSetArcrole())
dest.setArcrole(src.getArcrole());
if (src.isSetTitle())
dest.setTitle(src.getTitle());
if (src.isSetShow())
dest.setShow(XLinkShow.fromValue(src.getShow().value()));
if (src.isSetActuate())
dest.setActuate(XLinkActuate.fromValue(src.getActuate().value()));
return dest;
}
}
package org.citygml4j.ade.energy.model.core;
import org.citygml4j.builder.copy.CopyBuilder;
import org.citygml4j.model.citygml.ade.binding.ADEModelObject;
import org.citygml4j.model.citygml.core.AbstractCityObject;
import org.citygml4j.model.common.visitor.FeatureFunctor;
import org.citygml4j.model.common.visitor.FeatureVisitor;
import org.citygml4j.model.common.visitor.GMLFunctor;
import org.citygml4j.model.common.visitor.GMLVisitor;
import org.citygml4j.model.gml.base.AbstractGML;
import org.citygml4j.model.gml.basicTypes.Code;
import org.citygml4j.model.gml.feature.AbstractFeature;
public class AbstractBuilding extends AbstractFeature implements ADEModelObject {
private Code bdgType;
private ThermalStatusValue bdgAtticThermalStatus;
private ThermalStatusValue bdgBasementThermalStatus;
private Code bdgConstructionWeight;
private boolean bdgIsProtected;
private QualifiedHeight bdgHeight;
private QualifiedArea bdgArea;
private QualifiedVolume bdgVolume;
public QualifiedHeight getBdgHeight() {
return bdgHeight;
}
public void setBdgHeight(QualifiedHeight bdgHeight) {
this.bdgHeight = bdgHeight;
}
public Code getBdgType() {
return bdgType;
}
public void setBdgType(Code bdgType) {
this.bdgType = bdgType;
}
public ThermalStatusValue getBdgAtticThermalStatus() {
return bdgAtticThermalStatus;
}
public void setBdgAtticThermalStatus(ThermalStatusValue bdgAtticThermalStatus) {
this.bdgAtticThermalStatus = bdgAtticThermalStatus;
}
public ThermalStatusValue getBdgBasementThermalStatus() {
return bdgBasementThermalStatus;
}
public void setBdgBasementThermalStatus(ThermalStatusValue bdgBasementThermalStatus) {
this.bdgBasementThermalStatus = bdgBasementThermalStatus;
}
public Code getBdgConstructionWeight() {
return bdgConstructionWeight;
}
public void setBdgConstructionWeight(Code bdgConstructionWeight) {
this.bdgConstructionWeight = bdgConstructionWeight;
}
public boolean isBdgIsProtected() {
return bdgIsProtected;
}
public void setBdgIsProtected(boolean bdgIsProtected) {
this.bdgIsProtected = bdgIsProtected;
}
public QualifiedArea getBdgArea() {
return bdgArea;
}
public void setBdgArea(QualifiedArea bdgArea) {
this.bdgArea = bdgArea;
}
public QualifiedVolume getBdgVolume() {
return bdgVolume;
}
public void setBdgVolume(QualifiedVolume bdgVolume) {
this.bdgVolume = bdgVolume;
}
public boolean isSetBdgIsProtected() {
return bdgIsProtected;
}
public boolean isSetBdgHeightAboveGround() {
return bdgHeight != null;
}
public boolean isSetBdgFloorArea() {
return bdgArea != null;
}
public boolean isSetBdgVolume() {
return bdgVolume != null;
}
public boolean isSetBdgBasementThermalStatus() {
return bdgBasementThermalStatus != null;
}
public boolean isSetBdgConstructionWeight() {
return bdgConstructionWeight != null;
}
public boolean isSetHeightAboveGround() {
return bdgHeight != null;
}
public boolean isSetBdgType(){
return bdgType != null;
}
public boolean isSetBdgAtticThermalStatus(){
return bdgAtticThermalStatus != null;
}
@Override
public void accept(FeatureVisitor visitor) {
visitor.visit(this);
}
@Override
public <T> T accept(FeatureFunctor<T> visitor) {
return visitor.apply(this);
}
@Override
public void accept(GMLVisitor visitor) {
visitor.visit(this);
}
@Override
public <T> T accept(GMLFunctor<T> visitor) {
return visitor.apply(this);
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return null;
}
}
package org.citygml4j.ade.energy.model.core;
import net.opengis.gml.SolidPropertyType;
import org.citygml4j.builder.copy.CopyBuilder;
import org.citygml4j.model.citygml.ade.binding.ADEModelObject;
import org.citygml4j.model.citygml.core.AbstractCityObject;
import org.citygml4j.model.common.visitor.FeatureFunctor;
import org.citygml4j.model.common.visitor.FeatureVisitor;
import org.citygml4j.model.common.visitor.GMLFunctor;
import org.citygml4j.model.common.visitor.GMLVisitor;
public abstract class AbstractBuildingPartition extends AbstractCityObject implements ADEModelObject {
private QualifiedArea floorArea;
private QualifiedVolume volume;
private SolidPropertyType lod1Solid;
private SolidPropertyType lod2Solid;
public SolidPropertyType lod3Solid;
public boolean isSetFloorArea() {
return floorArea != null;
}
public boolean isSetFloorVolume() {
return volume != null;
}
public boolean isSetLod1Solid() {
return lod1Solid != null;
}
public boolean isSetLod2Solid() {
return lod2Solid != null;
}
public boolean isSetLod3Solid() {
return lod3Solid != null;
}
public QualifiedArea getFloorArea() {
return floorArea;
}
public void setFloorArea(QualifiedArea floorArea) {
this.floorArea = floorArea;
}
public QualifiedVolume getVolume() {
return volume;
}
public void setVolume(QualifiedVolume volume) {
this.volume = volume;
}
public SolidPropertyType getLod1Solid() {
return lod1Solid;
}
public void setLod1Solid(SolidPropertyType lod1Solid) {
this.lod1Solid = lod1Solid;
}
public SolidPropertyType getLod2Solid() {
return lod2Solid;
}
public void setLod2Solid(SolidPropertyType lod2Solid) {
this.lod2Solid = lod2Solid;
}
public SolidPropertyType getLod3Solid() {
return lod3Solid;
}
public void setLod3Solid(SolidPropertyType lod3Solid) {
this.lod3Solid = lod3Solid;
}
@Override
public void accept(FeatureVisitor visitor) {
visitor.visit(this);
}
@Override
public <T> T accept(FeatureFunctor<T> visitor) {
return visitor.apply(this);
}
@Override
public void accept(GMLVisitor visitor) {
visitor.visit(this);
}
@Override
public <T> T accept(GMLFunctor<T> visitor) {
return visitor.apply(this);
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return null;
}
}
package org.citygml4j.ade.energy.model.core;
import org.citygml4j.builder.copy.CopyBuilder;
import org.citygml4j.model.citygml.ade.binding.ADEModelObject;
import org.citygml4j.model.gml.feature.FeatureProperty;
public class AbstractBuildingPartitionProperty extends FeatureProperty<AbstractBuildingPartition> implements ADEModelObject {
public AbstractBuildingPartitionProperty() {
}
public AbstractBuildingPartitionProperty(AbstractBuildingPartition abstractBuildingPartition) {
super(abstractBuildingPartition);
}
public AbstractBuildingPartitionProperty(String href) {
super(href);
}
public AbstractBuildingPartition getAbstractBuildingPartition() {
return super.getObject();
}
public boolean isSetAbstractBuildingPartition() {
return super.isSetObject();
}
public void setAbstractBuildingPartition(AbstractBuildingPartition abstractBuildingPartition) {
super.setObject(abstractBuildingPartition);
}
public void unsetAbstractEnergySystem() {
super.unsetObject();
}
@Override
public Class<AbstractBuildingPartition> getAssociableClass() {
return AbstractBuildingPartition.class;
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(this, copyBuilder);
}
@Override
public Object copyTo(Object target, CopyBuilder copyBuilder) {
AbstractBuildingPartitionProperty copy = (target == null) ? new AbstractBuildingPartitionProperty() : (AbstractBuildingPartitionProperty) target;
return super.copyTo(copy, copyBuilder);
}
}
package org.citygml4j.ade.energy.model.core;
import org.citygml4j.builder.copy.CopyBuilder;
import org.citygml4j.model.citygml.ade.binding.ADEModelObject;
import org.citygml4j.model.gml.feature.FeatureProperty;
public class AbstractBuildingProperty extends FeatureProperty<AbstractBuilding> implements ADEModelObject {
public AbstractBuildingProperty() {
}
public AbstractBuildingProperty(AbstractBuilding abstractBuilding) {
super(abstractBuilding);
}
public AbstractBuildingProperty(String href) {
super(href);
}
public AbstractBuilding getAbstractBuilding() {
return super.getObject();
}
public boolean isSetAbstractBuilding() {
return super.isSetObject();
}
public void setAbstractBuilding(AbstractBuilding abstractBuilding) {
super.setObject(abstractBuilding);
}
public void unsetAbstractEnergySystem() {
super.unsetObject();
}
@Override
public Class<AbstractBuilding> getAssociableClass() {
return AbstractBuilding.class;
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(this, copyBuilder);
}
@Override
public Object copyTo(Object target, CopyBuilder copyBuilder) {
AbstractBuildingProperty copy = (target == null) ? new AbstractBuildingProperty() : (AbstractBuildingProperty) target;
return super.copyTo(copy, copyBuilder);
}
}
package org.citygml4j.ade.energy.model.core;
import org.citygml4j.model.citygml.ade.binding.ADEModelObject;
import org.citygml4j.model.common.association.Associable;
import org.citygml4j.model.common.base.ModelObject;
public abstract class AbstractDataType implements Associable, ADEModelObject {
private ModelObject parent;
@Override
public ModelObject getParent() {
return parent;
}
@Override
public void setParent(ModelObject modelObject) {
this.parent = modelObject;
}
@Override
public boolean isSetParent() {
return parent != null;
}
@Override
public void unsetParent() {
parent = null;
}
}
package org.citygml4j.ade.energy.model.core;
import lombok.Getter;
import org.citygml4j.model.citygml.ade.binding.ADEModelObject;
import org.citygml4j.model.citygml.core.AbstractCityObject;
import org.citygml4j.model.common.visitor.FeatureFunctor;
import org.citygml4j.model.common.visitor.FeatureVisitor;
import org.citygml4j.model.common.visitor.GMLFunctor;
import org.citygml4j.model.common.visitor.GMLVisitor;
import org.citygml4j.model.gml.basicTypes.Measure;
import org.citygml4j.model.gml.measures.Scale;
@Getter
public abstract class AbstractDevice extends AbstractCityObject implements ADEModelObject {
private Integer numberOfDevices;
private String model;
private Integer yearOfManufacture;
private Measure installedPower;
private Measure nominalEfficiency;
private String efficiencyIndicator;
private Measure heatDissipation;
private Scale heatDissipationConvectiveFraction;
private Scale heatDissipationLatentFraction;
private Scale heatDissipationRadiantFraction;
public AbstractDevice(Integer numberOfDevices, String model, Integer yearOfManufacture, Measure installedPower, Measure nominalEfficiency, String efficiencyIndicator, Measure heatDissipation, Scale heatDissipationConvectiveFraction, Scale heatDissipationLatentFraction, Scale heatDissipationRadiantFraction) {
this.numberOfDevices = numberOfDevices;
this.model = model;
this.yearOfManufacture = yearOfManufacture;
this.installedPower = installedPower;
this.nominalEfficiency = nominalEfficiency;
this.efficiencyIndicator = efficiencyIndicator;
this.heatDissipation = heatDissipation;
this.heatDissipationConvectiveFraction = heatDissipationConvectiveFraction;
this.heatDissipationLatentFraction = heatDissipationLatentFraction;
this.heatDissipationRadiantFraction = heatDissipationRadiantFraction;
}
public void setHeatDissipationConvectiveFraction(Scale heatDissipationConvectiveFraction) {
this.heatDissipationConvectiveFraction = heatDissipationConvectiveFraction;
}
public void setNumberOfDevices(Integer numberOfDevices) {
this.numberOfDevices = numberOfDevices;
}
public void setModel(String model) {
this.model = model;
}
public void setYearOfManufacture(Integer yearOfManufacture) {
this.yearOfManufacture = yearOfManufacture;
}
public void setInstalledPower(Measure installedPower) {
this.installedPower = installedPower;
}
public void setNominalEfficiency(Measure nominalEfficiency) {
this.nominalEfficiency = nominalEfficiency;
}
public void setEfficiencyIndicator(String efficiencyIndicator) {
this.efficiencyIndicator = efficiencyIndicator;
}
public void setHeatDissipation(Measure heatDissipation) {
this.heatDissipation = heatDissipation;
}
public void setHeatDissipationLatentFraction(Scale heatDissipationLatentFraction) {
this.heatDissipationLatentFraction = heatDissipationLatentFraction;
}
public void setHeatDissipationRadiantFraction(Scale heatDissipationRadiantFraction) {
this.heatDissipationRadiantFraction = heatDissipationRadiantFraction;
}
public boolean isSetHeatDissipationConvectiveFraction() {
return heatDissipationConvectiveFraction != null;
}
public boolean isSetHeatDissipationLatentFraction() {
return heatDissipationLatentFraction != null;
}
public boolean isSetHeatDissipationRadiantFraction() {
return heatDissipationRadiantFraction != null;
}
public boolean isSetHeatDissipation() {
return heatDissipation != null;
}
public boolean isSetInstalledPower() {
return installedPower != null;
}
public boolean isSetNominalEfficiency() {
return nominalEfficiency != null;
}
public boolean isSetEfficiencyIndicator() {
return efficiencyIndicator != null;
}
public boolean isSetNumberOfDevices() {
return numberOfDevices != null;
}
public boolean isSetModel() {
return model != null;
}
public boolean isSetYearOfManufacture() {
return yearOfManufacture != null;
}
@Override
public void accept(FeatureVisitor visitor) {
visitor.visit(this);
}
@Override
public <T> T accept(FeatureFunctor<T> visitor) {
return visitor.apply(this);
}
@Override
public void accept(GMLVisitor visitor) {
visitor.visit(this);
}
@Override
public <T> T accept(GMLFunctor<T> visitor) {
return visitor.apply(this);
}
}
package org.citygml4j.ade.energy.model.core;
import org.citygml4j.builder.copy.CopyBuilder;
import org.citygml4j.model.citygml.ade.binding.ADEModelObject;
import org.citygml4j.model.gml.feature.FeatureProperty;
public class AbstractDeviceProperty extends FeatureProperty<AbstractDevice> implements ADEModelObject {
public AbstractDeviceProperty() {
}
public AbstractDeviceProperty(AbstractDevice abstractDevice) {
super(abstractDevice);
}
public AbstractDeviceProperty(String href) {
super(href);
}
public AbstractDevice getAbstractDevice() {
return super.getObject();
}
public boolean isSetAbstractDevice() {
return super.isSetObject();
}
public void setAbstractDevice(AbstractDevice abstractDevice) {
super.setObject(abstractDevice);
}
public void unsetAbstractDevice() {
super.unsetObject();
}
@Override
public Class<AbstractDevice> getAssociableClass() {
return AbstractDevice.class;
}
@Override
public Object copy(CopyBuilder copyBuilder) {
return copyTo(new AbstractDeviceProperty(), copyBuilder);
}
@Override
public Object copyTo(Object target, CopyBuilder copyBuilder) {
AbstractDeviceProperty copy = (target == null) ? new AbstractDeviceProperty() : (AbstractDeviceProperty) target;
return super.copyTo(copy, copyBuilder);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment