/// <summary>
        /// Initializes a new instance of the <see cref="DataAccessIntentHandler"/> class.
        /// </summary>
        public DataAccessIntentHandler(IIntentManager intentManager,
            INetworkSearchConfigBuilder networkSearchConfigBuilder,
            IDataSourcesAndSchema dataSourcesAndSchema,
            IExploreConfigBuilder exploreConfigBuilder,
            INotificationService notificationService,
            IExplorationIntentFactory explorationIntentFactory,
            IAcxiomConstants acxiomConstants)
        {
            mIntentManager = intentManager;
            mNetworkSearchConfigBuilder = networkSearchConfigBuilder;
            mDataSourcesAndSchema = dataSourcesAndSchema;
            mExploreConfigBuilder = exploreConfigBuilder;
            mNotificationService = notificationService;
            mExplorationIntentFactory = explorationIntentFactory;
            mAcxiomConstants = acxiomConstants;

            mDataSource = mDataSourcesAndSchema.DataSources.SingleOrDefault(x => x.Id.Equals(mAcxiomConstants.AcxiomDaodExternalContextRoot));

            if (mDataSource == null)
            {
                string extractDataSourceNotFound = string.Format(AcxiomStringResources.ErrorExternalDataSourceNotFound, mAcxiomConstants.AcxiomDaodExternalContextRoot);
                mNotificationService.PresentInformationNotificationWithoutDiagnosticsToTheUser(extractDataSourceNotFound);
                throw new ArgumentException(string.Format(CultureInfo.InvariantCulture,
                                                          AcxiomStringResources.ErrorExternalDataSourceNotFound,
                                                          mAcxiomConstants.AcxiomDaodExternalContextRoot));
            }
        }
        private string mSubetName = "{subset_default_name}"; //set default for now;

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="DataAccessIntentHandler"/> class.
        /// </summary>
        public DataAccessIntentHandler(IIntentManager intentManager, 
            INetworkSearchConfigBuilder networkSearchConfigBuilder,
            IDataSourcesAndSchema dataSourcesAndSchema,
            IExploreConfigBuilder exploreConfigBuilder,
            INotificationService notificationService,
            IExplorationIntentFactory explorationIntentFactory,
            IAcxiomConstants acxiomConstants)
        {
            mIntentManager = intentManager;
            mNetworkSearchConfigBuilder = networkSearchConfigBuilder;
            mDataSourcesAndSchema = dataSourcesAndSchema;
            mExploreConfigBuilder = exploreConfigBuilder;
            mNotificationService = notificationService;
            mExplorationIntentFactory = explorationIntentFactory;
            mAcxiomConstants = acxiomConstants;

            mAcxiomExternalDataSource = mAcxiomConstants.AcxiomDaodExternalContextRoot;//defaults to daod
            mAcxiomDaodXmlSourcePath = mAcxiomConstants.AcxiomDaodXmlSourcePath; //defaults to c:/i2-integration/xml/
            mAcxiomTransformSourcePath = mAcxiomConstants.AcxiomDaodTransformSourcePath; //defaults to empty
        }
Exemplo n.º 3
0
        private IDataSource mDataSource = null;           //ACXIOM External Data Source

        /// <summary>
        /// Initializes a new instance of the <see cref="DataAccessIntentHandler"/> class.
        /// </summary>
        public DataAccessIntentHandler(IIntentManager intentManager,
                                       INetworkSearchConfigBuilder networkSearchConfigBuilder,
                                       IDataSourcesAndSchema dataSourcesAndSchema,
                                       IExploreConfigBuilder exploreConfigBuilder,
                                       INotificationService notificationService,
                                       IExplorationIntentFactory explorationIntentFactory,
                                       IAcxiomConstants acxiomConstants)
        {
            mIntentManager = intentManager;
            mNetworkSearchConfigBuilder = networkSearchConfigBuilder;
            mDataSourcesAndSchema       = dataSourcesAndSchema;
            mExploreConfigBuilder       = exploreConfigBuilder;
            mNotificationService        = notificationService;
            mExplorationIntentFactory   = explorationIntentFactory;
            mAcxiomConstants            = acxiomConstants;

            mAcxiomExternalDataSource  = mAcxiomConstants.AcxiomDaodExternalContextRoot; //defaults to daod
            mAcxiomDaodXmlSourcePath   = mAcxiomConstants.AcxiomDaodXmlSourcePath;       //defaults to c:/i2-integration/xml/
            mAcxiomTransformSourcePath = mAcxiomConstants.AcxiomDaodTransformSourcePath; //defaults to empty
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AcxiomTabViewModel"/> class.
        /// </summary>
        public AcxiomTabViewModel(IAcxiomTabView view,
                                  IIntentManager intentManager,
                                  IDispatcherTimer dispatcherTimer,
                                  IDependencyInjectionContainer container,
                                  IAcxiomConstants acxiomConstants)
            : base(isCloseable: true)
        {
            mIntentManager   = intentManager;
            mContainer       = container;
            mDispatcherTimer = dispatcherTimer;
            mAcxiomConstants = acxiomConstants;
            Header           = AcxiomStringResources.TabHeader;        //Tab Header text
            HeaderTooltip    = AcxiomStringResources.TabHeaderTooltip; //Tab header tooltip

            mBaseURL           = mAcxiomConstants.ExternalSubsetGenerationUri.ToString();
            PageLocation       = mBaseURL;
            mJavaScriptHandler = new JavaScriptHandler(this);

            SetAsViewModelForView(view);
            //All is ok, start to render html UI
            mDispatcherTimer.Interval = TimeSpan.FromMilliseconds(100);
            mDispatcherTimer.Tick    += CheckForHtmlReady;
            mDispatcherTimer.Start();
        }