package org.hisp.dhis.importexport.dhis14.xml.converter.xsd;



import org.amplecode.staxwax.reader.XMLReader;
import org.amplecode.staxwax.writer.XMLWriter;
import org.hisp.dhis.importexport.ExportParams;
import org.hisp.dhis.importexport.ImportParams;

/**
 * @author Lars Helge Overland
 * @version $Id: DataElementIndicatorGroupXSDConverter.java 6455 2008-11-24 08:59:37Z larshelg $
 */
public class DataElementIndicatorGroupXSDConverter
    extends AbstractXSDConverter
{
    // -------------------------------------------------------------------------
    // Constructor
    // -------------------------------------------------------------------------

    /**
     * Constructor for write operations.
     */
    public DataElementIndicatorGroupXSDConverter()
    {   
    }

    // -------------------------------------------------------------------------
    // XMLConverter implementation
    // -------------------------------------------------------------------------
    
    @Override
    public void write( XMLWriter writer, ExportParams params )
    {
        writer.openElement( "xsd:element", "name", "DataElementAndIndicatorGroup" );

        writeAnnotation( writer );
        
        writer.openElement( "xsd:complexType" );
        
        writer.openElement( "xsd:sequence" );

        writeInteger( writer, "DataElementAndIndicatorGroupID", 1, true );
        
        writeText( writer, "DataElementAndIndicatorGroupName", 1, true, 230 );
        
        writeMemo( writer, "DataElementAndIndicatorGroupDescription", 0, false, 536870910 );
        
        writeText( writer, "UID", 1, true, 11 );
        
        writeInteger( writer, "LastUserID", 1, true );
        
        writeDateTime( writer, "LastUpdated", 1, true );
        
        writer.closeElement();
        
        writer.closeElement();
        
        writer.closeElement();
    }

    @Override
    public void read( XMLReader reader, ImportParams params )
    {
        // Not implemented        
    }    
}
