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

commonMain.earth.worldwind.ogc.ows.OwsException.kt Maven / Gradle / Ivy

Go to download

The WorldWind Kotlin SDK (WWK) includes the library, examples and tutorials for building multiplatform 3D virtual globe applications for Android, Web and Java.

The newest version!
package earth.worldwind.ogc.ows

import kotlinx.serialization.Serializable
import nl.adaptivity.xmlutil.serialization.XmlSerialName

@Serializable
@XmlSerialName("Exception", OWS20_NAMESPACE, OWS20_PREFIX)
data class OwsException(
    @XmlSerialName("ExceptionText", OWS20_NAMESPACE, OWS20_PREFIX)
    val exceptionText: List = emptyList(),
    val exceptionCode: String,
    val locator: String? = null
) {
    override fun toString() = "OwsException{exceptionText=$exceptionText, exceptionCode='$exceptionCode', locator='$locator'}"

    fun toPrettyString(): String? {
        return when (exceptionText.size) {
            0 -> null
            1 -> exceptionText[0]
            else -> exceptionText.joinToString(", ")
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy