diff --git a/src/main/java/org/iata/cargo/model/BookingOption.java b/src/main/java/org/iata/cargo/model/BookingOption.java index be4d5b3..54c51d9 100644 --- a/src/main/java/org/iata/cargo/model/BookingOption.java +++ b/src/main/java/org/iata/cargo/model/BookingOption.java @@ -225,7 +225,7 @@ public class BookingOption @ParticipationConstraints({ @ParticipationConstraint(owlObjectIRI = "http://www.w3.org/2001/XMLSchema#string", max = 1) }) - @JsonProperty(Vocabulary.s_p_shipmentSecurityStatus_A) + @JsonProperty(Vocabulary.s_p_shipmentSecurityStatus) protected String shipmentSecurityStatus; public void setBookingSegment(BookingSegment bookingSegment) { diff --git a/src/main/java/org/iata/cargo/model/Company.java b/src/main/java/org/iata/cargo/model/Company.java index e1541f5..e5191ae 100755 --- a/src/main/java/org/iata/cargo/model/Company.java +++ b/src/main/java/org/iata/cargo/model/Company.java @@ -38,9 +38,10 @@ public class Company @Id(generated = true) @ApiModelProperty(readOnly = true) protected String id; - @JsonIgnore + @JsonIgnore @OWLAnnotationProperty(iri = RDFS.LABEL) protected String name; + @JsonIgnore @OWLAnnotationProperty(iri = cz.cvut.kbss.jopa.vocabulary.DC.Elements.DESCRIPTION) protected String description; @Types diff --git a/src/main/java/org/iata/cargo/model/Event.java b/src/main/java/org/iata/cargo/model/Event.java index 7f34083..19f072f 100755 --- a/src/main/java/org/iata/cargo/model/Event.java +++ b/src/main/java/org/iata/cargo/model/Event.java @@ -103,6 +103,7 @@ public class Event @ParticipationConstraint(owlObjectIRI = "http://www.w3.org/2001/XMLSchema#dateTime", min = 1, max = -1), @ParticipationConstraint(owlObjectIRI = "http://www.w3.org/2001/XMLSchema#dateTime", max = 1) }) + @JsonProperty(Vocabulary.s_p_dateTime) protected Date dateTime; /** * Movement or milestone code. Can refer to CXML Code List 1.18, e.g. DEP, ARR, FOH, RCS but not restricted to it. diff --git a/src/main/java/org/iata/cargo/model/ScheduledLegs.java b/src/main/java/org/iata/cargo/model/ScheduledLegs.java index e9d998c..bd42a07 100644 --- a/src/main/java/org/iata/cargo/model/ScheduledLegs.java +++ b/src/main/java/org/iata/cargo/model/ScheduledLegs.java @@ -1,6 +1,8 @@ package org.iata.cargo.model; +import io.swagger.annotations.ApiModelProperty; + import java.io.Serializable; import java.util.Date; import java.util.Map; @@ -17,6 +19,9 @@ import cz.cvut.kbss.jopa.vocabulary.RDFS; import org.iata.cargo.Vocabulary; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * Scheduled Legs class to be used to identify legs. Can be used with Booking Option Request as an indicator of preferred Routing or with Booking Option when a carrier proposes a specific Routing. @@ -30,14 +35,20 @@ public class ScheduledLegs { @Id(generated = true) + @ApiModelProperty(readOnly = true) protected String id; @OWLAnnotationProperty(iri = RDFS.LABEL) + @JsonIgnore protected String name; + @JsonIgnore @OWLAnnotationProperty(iri = cz.cvut.kbss.jopa.vocabulary.DC.Elements.DESCRIPTION) protected String description; @Types + @JsonProperty("@type") + @ApiModelProperty(allowableValues = Vocabulary.s_c_ScheduledLegs) protected Set types; @Properties + @JsonIgnore protected Map> properties; /** * Arrival location of the leg @@ -48,6 +59,7 @@ public class ScheduledLegs @ParticipationConstraint(owlObjectIRI = Vocabulary.s_c_Thing, min = 1, max = -1), @ParticipationConstraint(owlObjectIRI = Vocabulary.s_c_Thing, max = 1) }) + @JsonProperty(Vocabulary.s_p_arrivalLocation_A) protected Location arrivalLocation; /** * Departure Location of the leg @@ -58,18 +70,21 @@ public class ScheduledLegs @ParticipationConstraint(owlObjectIRI = Vocabulary.s_c_Thing, max = 1), @ParticipationConstraint(owlObjectIRI = Vocabulary.s_c_Thing, min = 1, max = -1) }) + @JsonProperty(Vocabulary.s_p_departureLocation_A) protected Location departureLocation; /** * Arrival date and time of the leg * */ @OWLDataProperty(iri = Vocabulary.s_p_arrivalDate) + @JsonProperty(Vocabulary.s_p_arrivalDate) protected Set arrivalDate; /** * Departure date and time of the leg * */ @OWLDataProperty(iri = Vocabulary.s_p_departureDate) + @JsonProperty(Vocabulary.s_p_departureDate) protected Set departureDate; /** * Sequence number of the leg @@ -80,12 +95,14 @@ public class ScheduledLegs @ParticipationConstraint(owlObjectIRI = "http://www.w3.org/2001/XMLSchema#integer", max = 1), @ParticipationConstraint(owlObjectIRI = "http://www.w3.org/2001/XMLSchema#integer", min = 1, max = -1) }) + @JsonProperty(Vocabulary.s_p_sequenceNumber) protected Integer sequenceNumber; /** * Transport Id of the leg. E.g. Flight number, truck route identifier, etc. * */ @OWLDataProperty(iri = Vocabulary.s_p_transportId) + @JsonProperty(Vocabulary.s_p_transportId) protected Set transportId; public void setId(String id) { diff --git a/src/main/java/org/iata/cargo/model/TransportSegment.java b/src/main/java/org/iata/cargo/model/TransportSegment.java index 97d2500..420b772 100755 --- a/src/main/java/org/iata/cargo/model/TransportSegment.java +++ b/src/main/java/org/iata/cargo/model/TransportSegment.java @@ -53,6 +53,7 @@ public class TransportSegment @ParticipationConstraints({ @ParticipationConstraint(owlObjectIRI = Vocabulary.s_c_Thing, max = 1) }) + @JsonProperty(Vocabulary.s_p_co2CalculationMethod) protected CO2CalcMethod co2CalculationMethod; /** * Amount of CO2 emitted (e.g. 34 kg/km)