//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2012.01.31 at 02:51:00 PM CET 
//

package net.ihe.gazelle.validation;

import java.util.ArrayList;
import java.util.List;

import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlTransient;
import jakarta.xml.bind.annotation.XmlType;

/**
 * <p>
 * Java class for anonymous complex type.
 * 
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 * 
 * <pre>
 * &lt;complexType&gt;
 *   &lt;complexContent&gt;
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
 *       &lt;sequence&gt;
 *         &lt;element ref="{}Test"/&gt;
 *         &lt;element ref="{}Location"/&gt;
 *         &lt;element ref="{}Description"/&gt;
 *       &lt;/sequence&gt;
 *     &lt;/restriction&gt;
 *   &lt;/complexContent&gt;
 * &lt;/complexType&gt;
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Notification", 
	propOrder = { "test", "location", "description", "identifiant", "assertions", "type" })
public class Notification {

	@XmlElement(name = "Test", required = true)
	protected String test;
	@XmlElement(name = "Location", required = true)
	protected String location;
	@XmlElement(name = "Description", required = true)
	protected String description;
	@XmlElement(name = "Identifiant", required = true)
	protected String identifiant;
	
	@XmlElement(name = "assertion")
	protected List<Assertion> assertions;
	
	@XmlElement(name = "Type")
	protected String type;
	
	@XmlTransient
	protected String packageValidation;

	public String getPackageValidation() {
		if (identifiant != null && identifiant.matches(".+\\-.+\\-.+")) {
			this.packageValidation = identifiant.split("\\-")[0];
		}
		return packageValidation;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public List<Assertion> getAssertions() {
		if (assertions == null){
			assertions = new ArrayList<>();
		}
		return assertions;
	}

	public void setAssertions(List<Assertion> assertions) {
		this.assertions = assertions;
	}

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

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

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

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

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

	/**
	 * Sets the value of the description property.
	 * 
	 * @param value
	 *            allowed object is {@link String }
	 * 
	 */
	public void setDescription(String value) {
		this.description = value;
	}
	
	public String getIdentifiant() {
		return identifiant;
	}

	public void setIdentifiant(String identifiant) {
		this.identifiant = identifiant;
	}

}
