using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BRServer
{
    public  class TagFactory
    {
        public static Tag create(String oid, int len, String value)
        {
            Tag tag;
            if (UploadTag.isUploadTag(oid))
            {
                tag = new UploadTag(oid, len, value);
            }
            else if (oid == SystemDateTag.SYSTEM_DATE_OID)
            {
                tag = new SystemDateTag(oid, len, value);
            } 
            else if (oid == CellTag.CELL_TAG_OID)
            {
                tag = new CellTag(oid, len, value);
            }
            else
            {
                tag = new NormalTag(oid, len, value);
            }
            return tag;
        }
    }
}
