Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  package org.jibx.schema.org.opentravel._2012B.travelitinerary;
  
  import java.util.List;
This message is in response to a read RQ for a travel itinerary. Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="OTA_TravelItineraryRS">
   <xs:complexType>
     <xs:choice>
       <xs:sequence>
         <xs:element type="ns:SuccessType" name="Success"/>
         <xs:element type="ns:WarningsType" name="Warnings" minOccurs="0"/>
         <xs:element name="TravelItinerary">
           <xs:complexType>
             <xs:sequence>
               <xs:element type="ns:UniqueID_Type" name="ItineraryRef"/>
               <xs:element name="CustomerInfos">
                 <xs:complexType>
                   <xs:sequence>
                     <xs:element type="ns:CustomerInfoType" name="CustomerInfo" maxOccurs="unbounded"/>
                     <xs:element ref="ns:TPA_Extensions" minOccurs="0"/>
                   </xs:sequence>
                 </xs:complexType>
               </xs:element>
               <xs:element type="ns:ItineraryInfoType" name="ItineraryInfo"/>
               <xs:element type="ns:AssociatedContentType" name="AssociatedContent" minOccurs="0"/>
               <xs:element type="ns:TravelCostType" name="TravelCost" minOccurs="0"/>
               <xs:element name="Remarks" minOccurs="0">
                 <!-- Reference to inner class Remarks -->
               </xs:element>
               <xs:element type="ns:AccessesType" name="UpdatedBy"/>
               <xs:element ref="ns:TPA_Extensions" minOccurs="0"/>
             </xs:sequence>
           </xs:complexType>
         </xs:element>
       </xs:sequence>
       <xs:element type="ns:ErrorsType" name="Errors"/>
     </xs:choice>
     <xs:attributeGroup ref="ns:OTA_PayloadStdAttributes"/>
   </xs:complexType>
 </xs:element>
 
 
 public class RS
 {
     private int choiceSelect = -1;
     private static final int SUCCESS_CHOICE = 0;
     private static final int ERRORS_CHOICE = 1;
     private Success success;
     private Warnings warnings;
     private Remarks remarks;
     private Errors errors;
 
     private void setChoiceSelect(int choice) {
         if ( == -1) {
              = choice;
         } else if ( != choice) {
             throw new IllegalStateException(
                     "Need to call clearChoiceSelect() before changing existing choice");
         }
     }

    
Clear the choice selection.
 
     public void clearChoiceSelect() {
          = -1;
     }

    
Check if Success is current selection for choice.

Returns:
true if selection, false if not
 
     public boolean ifSuccess() {
         return  == ;
     }

    
Get the 'Success' element value. Request was successful.

Returns:
value
    public Success getSuccess() {
        return ;
    }

    
Set the 'Success' element value. Request was successful.

Parameters:
success
    public void setSuccess(Success success) {
        this. = success;
    }

    
Get the 'Warnings' element value. Warnings associated with a successful request/response.

Returns:
value
    public Warnings getWarnings() {
        return ;
    }

    
Set the 'Warnings' element value. Warnings associated with a successful request/response.

Parameters:
warnings
    public void setWarnings(Warnings warnings) {
        this. = warnings;
    }

    
Get the 'ItineraryRef' element value. Controlling system's reference to this itinerary.

Returns:
value
        return ;
    }

    
Set the 'ItineraryRef' element value. Controlling system's reference to this itinerary.

Parameters:
travelItineraryItineraryRef
    public void setTravelItineraryItineraryRef(
            UniqueID travelItineraryItineraryRef) {
        this. = travelItineraryItineraryRef;
    }

    
Get the list of 'CustomerInfo' element items. Information for each customer associated with this itinerary.

Returns:
list
        return ;
    }

    
Set the list of 'CustomerInfo' element items. Information for each customer associated with this itinerary.

Parameters:
list
         = list;
    }

    
Get the number of 'CustomerInfo' element items.

Returns:
count
    public int sizeTravelItineraryCustomerInfoList() {
        return .size();
    }

    
Add a 'CustomerInfo' element item.

Parameters:
item
    public void addTravelItineraryCustomerInfo(CustomerInfo item) {
    }

    
Get 'CustomerInfo' element item by position.

Parameters:
index
Returns:
item
    public CustomerInfo getTravelItineraryCustomerInfo(int index) {
        return .get(index);
    }

    
Remove all 'CustomerInfo' element items.
    public void clearTravelItineraryCustomerInfoList() {
    }

    
Get the 'TPA_Extensions' element value.

Returns:
value
        return ;
    }

    
Set the 'TPA_Extensions' element value.

Parameters:
travelItineraryTPAExtensions
    public void setTravelItineraryTPAExtensions(
            TPAExtensions travelItineraryTPAExtensions) {
        this. = travelItineraryTPAExtensions;
    }

    
Get the 'ItineraryInfo' element value. Itinerary reservation information.

Returns:
value
        return ;
    }

    
Set the 'ItineraryInfo' element value. Itinerary reservation information.

Parameters:
travelItineraryItineraryInfo
    public void setTravelItineraryItineraryInfo(
            ItineraryInfo travelItineraryItineraryInfo) {
        this. = travelItineraryItineraryInfo;
    }

    
Get the 'AssociatedContent' element value. Associated itinerary information such as theatre tickets, museum entries, conference tickets, sporting event, etc.

Returns:
value
        return ;
    }

    
Set the 'AssociatedContent' element value. Associated itinerary information such as theatre tickets, museum entries, conference tickets, sporting event, etc.

Parameters:
travelItineraryAssociatedContent
            AssociatedContent travelItineraryAssociatedContent) {
        this. = travelItineraryAssociatedContent;
    }

    
Get the 'TravelCost' element value. Total cost associated with the entire itinerary.

Returns:
value
        return ;
    }

    
Set the 'TravelCost' element value. Total cost associated with the entire itinerary.

Parameters:
travelItineraryTravelCost
    public void setTravelItineraryTravelCost(
            TravelCost travelItineraryTravelCost) {
        this. = travelItineraryTravelCost;
    }

    
Get the 'Remarks' element value. Requested itinerary information.

Returns:
value
    public Remarks getRemarks() {
        return ;
    }

    
Set the 'Remarks' element value. Requested itinerary information.

Parameters:
remarks
    public void setRemarks(Remarks remarks) {
        this. = remarks;
    }

    
Get the 'UpdatedBy' element value. Information on the last entity to modify this Itinerary and when this occurred.

Returns:
value
        return ;
    }

    
Set the 'UpdatedBy' element value. Information on the last entity to modify this Itinerary and when this occurred.

Parameters:
travelItineraryUpdatedBy
    public void setTravelItineraryUpdatedBy(Accesses travelItineraryUpdatedBy) {
        this. = travelItineraryUpdatedBy;
    }

    
Get the 'TPA_Extensions' element value.

Returns:
value
        return ;
    }

    
Set the 'TPA_Extensions' element value.

Parameters:
travelItineraryTPAExtensions1
            TPAExtensions travelItineraryTPAExtensions1) {
        this. = travelItineraryTPAExtensions1;
    }

    
Check if Errors is current selection for choice.

Returns:
true if selection, false if not
    public boolean ifErrors() {
        return  == ;
    }

    
Get the 'Errors' element value. Request was not successful - error information.

Returns:
value
    public Errors getErrors() {
        return ;
    }

    
Set the 'Errors' element value. Request was not successful - error information.

Parameters:
errors
    public void setErrors(Errors errors) {
        this. = errors;
    }

    
Get the 'OTA_PayloadStdAttributes' attributeGroup value.

Returns:
value
        return ;
    }

    
Set the 'OTA_PayloadStdAttributes' attributeGroup value.

Parameters:
OTAPayloadStdAttributes
    public void setOTAPayloadStdAttributes(
            OTAPayloadStdAttributes OTAPayloadStdAttributes) {
        this. = OTAPayloadStdAttributes;
    }
    
Free text remarks associated with the itinerary (non-customer, non-item). Schema fragment(s) for this class:
 <xs:element xmlns:ns="http://www.opentravel.org/OTA/2003/05/common" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Remarks" minOccurs="0">
   <xs:complexType>
     <xs:sequence>
       <xs:element type="xs:string" name="Remark" maxOccurs="unbounded"/>
       <xs:element ref="ns:TPA_Extensions" minOccurs="0"/>
     </xs:sequence>
     <xs:attribute name="RemarkType">
       <xs:simpleType>
         <!-- Reference to inner class Remark -->
       </xs:simpleType>
     </xs:attribute>
   </xs:complexType>
 </xs:element>
 
    public static class Remarks
    {
        private List<StringremarkList = new ArrayList<String>();
        private TPAExtensions TPAExtensions;
        private Remark remark;

        
Get the list of 'Remark' element items. Free text.

Returns:
list
        public List<StringgetRemarkList() {
            return ;
        }

        
Set the list of 'Remark' element items. Free text.

Parameters:
list
        public void setRemarkList(List<Stringlist) {
             = list;
        }

        
Get the number of 'Remark' element items.

Returns:
count
        public int sizeRemarkList() {
            return .size();
        }

        
Add a 'Remark' element item.

Parameters:
item
        public void addRemark(String item) {
            .add(item);
        }

        
Get 'Remark' element item by position.

Parameters:
index
Returns:
item
        public String getRemark(int index) {
            return .get(index);
        }

        
Remove all 'Remark' element items.
        public void clearRemarkList() {
            .clear();
        }

        
Get the 'TPA_Extensions' element value.

Returns:
value
        public TPAExtensions getTPAExtensions() {
            return ;
        }

        
Set the 'TPA_Extensions' element value.

Parameters:
TPAExtensions
        public void setTPAExtensions(TPAExtensions TPAExtensions) {
            this. = TPAExtensions;
        }

        
Get the 'RemarkType' attribute value.

Returns:
value
        public Remark getRemark() {
            return ;
        }

        
Set the 'RemarkType' attribute value.

Parameters:
remark
        public void setRemark(Remark remark) {
            this. = remark;
        }
        
Schema fragment(s) for this class:
 <xs:simpleType xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:restriction base="xs:string">
     <xs:enumeration value="General"/>
     <xs:enumeration value="TravelPolicy"/>
   </xs:restriction>
 </xs:simpleType>
 
        public static enum Remark {
            GENERAL("General"), TRAVEL_POLICY("TravelPolicy");
            private final String value;
            private Remark(String value) {
                this. = value;
            }
            public String xmlValue() {
                return ;
            }
            public static Remark convert(String value) {
                for (Remark inst : values()) {
                    if (inst.xmlValue().equals(value)) {
                        return inst;
                    }
                }
                return null;
            }
        }
    }
New to GrepCode? Check out our FAQ X