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

namespace MarketData.MarketDataModel
{
	public class CompanyProfiles : List<CompanyProfile>
	{
		public CompanyProfiles()
		{
		}
	}
  public class CompanyProfile
  {
    public enum EnumPricingSource{YAHOO,BIGCHARTS,UNKNOWN};
    public static String PRICING_SOURCE_YAHOO="YAHOO";
    public static String PRICING_SOURCE_BIGCHARTS="BIGCHARTS";
    private String symbol;
    private String industry;
    private String sector;
    private String securityType;
    private String companyName;
    private String description;
    private String pricingSource;
    private bool canRollPrevious;
    private bool freezePricing;

    public CompanyProfile()
    {
    }
    public String Industry
    {
      get { return industry; }
      set { industry = value; }
    }
    public String Sector
    {
      get { return sector; }
      set { sector = value; }
    }
    public String SecurityType
    {
      get { return securityType;; }
      set { securityType = value; }
    }
    public bool IsEquity
    {
      get
      {
        return null!=SecurityType && SecurityType.Equals("EQUITY");
      }
    }
    public String CompanyName
    {
      get{return companyName;}
      set{companyName=value;}
    }
    public String Description
    {
      get{return description;}
      set{description=value;}
    }
    public String Symbol
    {
      get { return symbol; }
      set { symbol = value; }
    }
    public String PricingSource
    {
      set{pricingSource=value;}
    }
    public bool CanRollPrevious
    {
      get{return canRollPrevious;}
      set{canRollPrevious=value;}
    }
    public bool FreezePricing
    {
      get{return freezePricing;}
      set{freezePricing=value;}
    }

    public EnumPricingSource PricingSourceEnum
    {
      get
      {
        if(null==pricingSource)return EnumPricingSource.UNKNOWN;
        else if(pricingSource.Equals(PRICING_SOURCE_YAHOO))return EnumPricingSource.YAHOO;
        else if(pricingSource.Equals(PRICING_SOURCE_BIGCHARTS))return EnumPricingSource.BIGCHARTS;
        return EnumPricingSource.UNKNOWN;
      }
    }
  }
}
