Skip to content

Commit

Permalink
Fix more wrong/missing @JsonProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
mskopp committed May 13, 2022
1 parent 04b0a83 commit 5fecbf9
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/iata/cargo/model/BookingOption.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/iata/cargo/model/Company.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/iata/cargo/model/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/org/iata/cargo/model/ScheduledLegs.java
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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.
Expand All @@ -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<String> types;
@Properties
@JsonIgnore
protected Map<String, Set<String>> properties;
/**
* Arrival location of the leg
Expand All @@ -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
Expand All @@ -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<Date> arrivalDate;
/**
* Departure date and time of the leg
*
*/
@OWLDataProperty(iri = Vocabulary.s_p_departureDate)
@JsonProperty(Vocabulary.s_p_departureDate)
protected Set<Date> departureDate;
/**
* Sequence number of the leg
Expand All @@ -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<String> transportId;

public void setId(String id) {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/iata/cargo/model/TransportSegment.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5fecbf9

Please sign in to comment.