com.github.marcoshsc.orsApiTools.isochrones.helperclasses.Info Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of orsApiTools Show documentation
Show all versions of orsApiTools Show documentation
Java library that provides implementation of Open Route Service endpoints.
package com.github.marcoshsc.orsApiTools.isochrones.helperclasses;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.github.marcoshsc.orsApiTools.isochrones.enums.EnumAttributes;
import com.github.marcoshsc.orsApiTools.isochrones.enums.EnumRangeType;
import com.github.marcoshsc.orsApiTools.json.deserializers.CoordinateListDeserializer;
import lombok.Getter;
import lombok.ToString;
import org.locationtech.jts.geom.Coordinate;
import java.util.ArrayList;
import java.util.List;
@Getter
@ToString
@JsonIgnoreProperties(ignoreUnknown = true)
public class Info {
private final List range;
@JsonDeserialize(using = CoordinateListDeserializer.class)
private final List locations;
private final EnumRangeType rangeType;
private final List attributes;
@JsonCreator
public Info(@JsonProperty(value = "range", required = true) List range,
@JsonProperty(value = "locations", required = true) List locations,
@JsonProperty(value = "range_type") EnumRangeType rangeType,
@JsonProperty("attributes") List attributes) {
this.range = range;
this.locations = locations;
this.rangeType = rangeType == null ? EnumRangeType.TIME : rangeType;
this.attributes = attributes == null ? new ArrayList<>() : attributes;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy