
package cdpp3dview.types;

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.XmlType;


/**
 * <p>Java class for Body complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="Body">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="naifId" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         &lt;element name="modelId" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         &lt;element name="coverage" type="{http://cdpp3dview/types}TimeRange"/>
 *         &lt;element name="type" type="{http://cdpp3dview/types}BodyType"/>
 *         &lt;element name="color" type="{http://www.w3.org/2001/XMLSchema}string"/>
 *         &lt;element name="size" type="{http://cdpp3dview/types}Tuple3d"/>
 *         &lt;element name="orbFiles" type="{http://cdpp3dview/types}TimeFile" maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="prefFrame" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         &lt;element name="prefCenter" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         &lt;element name="prefStarSubset" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Body", propOrder = {
    "naifId",
    "modelId",
    "name",
    "coverage",
    "type",
    "color",
    "size",
    "orbFiles",
    "prefFrame",
    "prefCenter",
    "prefStarSubset"
})
public class Body {

    protected int naifId;
    protected int modelId;
    @XmlElement(required = true)
    protected String name;
    @XmlElement(required = true)
    protected TimeRange coverage;
    @XmlElement(required = true)
    protected BodyType type;
    @XmlElement(required = true)
    protected String color;
    @XmlElement(required = true)
    protected Tuple3D size;
    @XmlElement(nillable = true)
    protected List<TimeFile> orbFiles;
    protected int prefFrame;
    protected int prefCenter;
    protected int prefStarSubset;

    public Body(int naifId, int modelId, String name, TimeRange coverage, BodyType type, String color, Tuple3D size, int prefFrame, int prefCenter, int prefStarSubset) {
        this.naifId = naifId;
        this.modelId = modelId;
        this.name = name;
        this.coverage = coverage;
        this.type = type;
        this.color = color;
        this.size = size;
        this.prefFrame = prefFrame;
        this.prefCenter = prefCenter;
        this.prefStarSubset = prefStarSubset;
    }

    public Body() {
    }
    @Override
    public String toString() {
        return getName();
    }
    
    @Override
    public boolean equals(Object pObj) {
        boolean lEq = false;
        if (pObj instanceof Body) {
            Body lB = (Body)pObj;
            if (naifId==lB.getNaifId())
                lEq = true;
        }
        return lEq;
    }
    
    
    /**
     * Gets the value of the naifId property.
     * 
     */
    public int getNaifId() {
        return naifId;
    }

    /**
     * Sets the value of the naifId property.
     * 
     */
    public void setNaifId(int value) {
        this.naifId = value;
    }

    /**
     * Gets the value of the modelId property.
     * 
     */
    public int getModelId() {
        return modelId;
    }

    /**
     * Sets the value of the modelId property.
     * 
     */
    public void setModelId(int value) {
        this.modelId = value;
    }

    /**
     * Gets the value of the name property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of the name property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setName(String value) {
        this.name = value;
    }

    /**
     * Gets the value of the coverage property.
     * 
     * @return
     *     possible object is
     *     {@link TimeRange }
     *     
     */
    public TimeRange getCoverage() {
        return coverage;
    }

    /**
     * Sets the value of the coverage property.
     * 
     * @param value
     *     allowed object is
     *     {@link TimeRange }
     *     
     */
    public void setCoverage(TimeRange value) {
        this.coverage = value;
    }

    /**
     * Gets the value of the type property.
     * 
     * @return
     *     possible object is
     *     {@link BodyType }
     *     
     */
    public BodyType getType() {
        return type;
    }

    /**
     * Sets the value of the type property.
     * 
     * @param value
     *     allowed object is
     *     {@link BodyType }
     *     
     */
    public void setType(BodyType value) {
        this.type = value;
    }

    /**
     * Gets the value of the color property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getColor() {
        return color;
    }

    /**
     * Sets the value of the color property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setColor(String value) {
        this.color = value;
    }

    /**
     * Gets the value of the size property.
     * 
     * @return
     *     possible object is
     *     {@link Tuple3D }
     *     
     */
    public Tuple3D getSize() {
        return size;
    }

    /**
     * Sets the value of the size property.
     * 
     * @param value
     *     allowed object is
     *     {@link Tuple3D }
     *     
     */
    public void setSize(Tuple3D value) {
        this.size = value;
    }

    /**
     * Gets the value of the orbFiles property.
     * 
     * <p>
     * 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 orbFiles property.
     * 
     * <p>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getOrbFiles().add(newItem);
     * </pre>
     * 
     * 
     * <p>
     * Objects of the following type(s) are allowed in the list
     * {@link TimeFile }
     * 
     * 
     */
    public List<TimeFile> getOrbFiles() {
        if (orbFiles == null) {
            orbFiles = new ArrayList<TimeFile>();
        }
        return this.orbFiles;
    }

    /**
     * Gets the value of the prefFrame property.
     * 
     */
    public int getPrefFrame() {
        return prefFrame;
    }

    /**
     * Sets the value of the prefFrame property.
     * 
     */
    public void setPrefFrame(int value) {
        this.prefFrame = value;
    }

    /**
     * Gets the value of the prefCenter property.
     * 
     */
    public int getPrefCenter() {
        return prefCenter;
    }

    /**
     * Sets the value of the prefCenter property.
     * 
     */
    public void setPrefCenter(int value) {
        this.prefCenter = value;
    }

    /**
     * Gets the value of the prefStarSubset property.
     * 
     */
    public int getPrefStarSubset() {
        return prefStarSubset;
    }

    /**
     * Sets the value of the prefStarSubset property.
     * 
     */
    public void setPrefStarSubset(int value) {
        this.prefStarSubset = value;
    }

}
