Extracting Particular Object
How Do I define values to this class
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlType;
/**
*
Java class for ResourceReservation complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ResourceReservation">
*<complexContent>
*<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
*<sequence maxOccurs="unbounded">
* <element name="Info" type="{urn:http://1}nfo"/>
* <element name="ResourceStatus" type="{urn:http://1}ResourceStatus"/>
*</sequence>
*</restriction>
*</complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ResourceReservation", propOrder = {
"infoAndResourceStatus"
})
public class ResourceReservation {
@XmlElements({
@XmlElement(name = "ResourceStatus", required = true, type = ResourceStatus.class),
@XmlElement(name = "Info", required = true, type = Info.class)
})
protected List<Object> infoAndResourceStatus;
/**
* Gets the value of the infoAndResourceStatus property.
*
*
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the infoAndResourceStatus property.
*
*
* For example, to add a new item, do as follows:
* <pre>
*getInfoAndResourceStatus().add(newItem);
* </pre>
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link ResourceStatus }
* {@link Info }
*
*
*/
public List<Object> getInfoAndResourceStatus() {
if (infoAndResourceStatus == null) {
infoAndResourceStatus = new ArrayList<Object>();
}
return this.infoAndResourceStatus;
}
}
I mean we do
ResourceReservation RR=new ResourceReservation();
RR.infoAndResourceStatus.add(e);
but what should e be. And how do I define it, because it is constuting 2 classes ResourceStatus and Info

