//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.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: 2008.12.23 at 11:43:13 AM EST 
//


package gov.nih.nci.cbiit.cmts.core;

import java.beans.PropertyDescriptor;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import gov.nih.nci.cbiit.cmts.common.PropertiesProvider;
import gov.nih.nci.cbiit.cmts.ui.properties.PropertiesResult;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;


/**
 * <p>Java class for baseMeta complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="baseMeta">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       &lt;attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       &lt;attribute name="idSpec" type="{http://www.w3.org/2001/XMLSchema}string" default="xmlPath" />
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "baseMeta")
@XmlSeeAlso({
    AttributeMeta.class,
    ElementMeta.class
})
public abstract class BaseMeta implements Serializable, PropertiesProvider, Cloneable{

    @XmlAttribute
    private String id;
    @XmlAttribute
    private String idSpec="X-path";
    @XmlAttribute
    private String defaultValue;
	@XmlAttribute
    private String name;
	@XmlAttribute
    private String nameSpace;
    @XmlAttribute
    private Boolean required;
	@XmlAttribute
    private String type;

    private boolean ativated = true;
private static int metaCount=0;
public BaseMeta()
{
	System.out.println("BaseMeta.BaseMeta()...:"+metaCount++);
}
    public Boolean isRequired() {
		return required;
	}
	public void setRequired(Boolean isRequired) {
		this.required = isRequired;
	}
    public Boolean isAtivated() {
		return ativated;
	}
	public void setAtivated(Boolean isAtivated) {
		this.ativated = isAtivated;
	}
    public String getDefaultValue() {
		return defaultValue;
	}
	public void setDefaultValue(String defaultValue) {
		this.defaultValue = defaultValue;
	}
    /**
     * Gets the value of the id property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getId() {
        return id;
    }
    /**
     * Gets the value of the idSpec property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getIdSpec() {
            return idSpec;
    }
    /**
     * Gets the value of the name property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getName() {
        return name;
    }

	/**
	 * @return the nameSpace
	 */
	public String getNameSpace() {
		return nameSpace;
	}

	public PropertiesResult getPropertyDescriptors() throws Exception {
		Class<?> beanClass = this.getClass();
		List<PropertyDescriptor> propList = new ArrayList<PropertyDescriptor>();
		propList.add( new PropertyDescriptor("Default Value", beanClass, "getDefaultValue", null));
		propList.add( new PropertyDescriptor("Id", beanClass, "getId", null));
		propList.add(new PropertyDescriptor("Id Spec", beanClass, "getIdSpec", null));
		propList.add(new PropertyDescriptor("Name", beanClass, "getName", null));
		propList.add(new PropertyDescriptor("Name Space", beanClass, "getNameSpace", null));
		propList.add(new PropertyDescriptor("Required", beanClass, "isRequired", null));
		propList.add(new PropertyDescriptor("Type", beanClass, "getType", null));
		PropertiesResult result = new PropertiesResult();
		result.addPropertyDescriptors(this, propList);
		return result;
	}

    /**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

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

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

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

    /**
	 * @param nameSpace the nameSpace to set
	 */
	public void setNameSpace(String nameSpace) {
		this.nameSpace = nameSpace;
	}
	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}
	
	@Override
	public String toString()
	{
		if (getNameSpace()==null||getNameSpace().equals(""))
			return getName();
		
		return getNameSpace()+":"+getName();
	}
	
	@Override
	public Object clone()
	{
		try {
			BaseMeta clonnedObj=(BaseMeta)super.clone();
			return clonnedObj;
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
		return null;
	}
}

@@ -2181,23 +2181,23 @@
 = true;%0A
-private
+%09public
  static 
@@ -2213,16 +2213,17 @@
 ount=0;%0A
+%09
 public B
@@ -2232,18 +2232,37 @@
 eMeta()%0A
+%09
 %7B%0A
+%09%09metaCount++;%0A//%09
 %09System.
@@ -2312,13 +2312,12 @@
 ount
-++
 );%0A
+%09
 %7D%0A  

verify HL7v3 schema