/// <summary>
        /// Initializes the bootstrapper after having the the necessary extents
        /// </summary>
        /// <param name="primitiveInfrastructure">Extent reflecting the primitive structure XMI definition</param>
        /// <param name="umlInfrastructure">Extent reflecting the Uml infrastructure XMI definition</param>
        /// <param name="mofInfrastructure">Extent reflecting the MOF infrastructure XMI definition</param>
        /// <param name="dataLayerLogic">Datalayerlogic  being used</param>
        public Bootstrapper(
            IUriExtent primitiveInfrastructure,
            IUriExtent umlInfrastructure,
            IUriExtent mofInfrastructure,
            IDataLayerLogic dataLayerLogic)
        {
            if (dataLayerLogic == null) throw new ArgumentNullException(nameof(dataLayerLogic));
            if (umlInfrastructure == null)
            {
                throw new ArgumentNullException(nameof(umlInfrastructure));
            }
            if (mofInfrastructure == null)
            {
                throw new ArgumentNullException(nameof(mofInfrastructure));
            }
            if (primitiveInfrastructure == null)
            {
                throw new ArgumentNullException(nameof(primitiveInfrastructure));
            }

            _dataLayerLogic = dataLayerLogic;
            UmlInfrastructure = umlInfrastructure;
            MofInfrastructure = mofInfrastructure;
            PrimitiveInfrastructure = primitiveInfrastructure;
        }
Beispiel #2
0
 public void SetRelationsForDefaultDataLayers(IDataLayerLogic logic)
 {
     logic.SetRelationShip(Data, Types);
     logic.SetRelationShip(Types, Uml);
     logic.SetRelationShip(Uml, Uml);
     logic.SetRelationShip(Mof, Mof);
     logic.SetDefaultDatalayer(Data);
 }
        public ExtentStorageLoader(ExtentStorageData data, IConfigurationToExtentStorageMapper map, IDataLayerLogic dataLayerLogic)
        {
            Debug.Assert(map != null, "map != null");
            Debug.Assert(data != null, "data != null");
            Debug.Assert(dataLayerLogic != null, "dataLayerLogic != null");

            _data = data;
            _map = map;
            _dataLayerLogic = dataLayerLogic;
        }
 public ExtentStorageLoader(
     ExtentStorageData data,
     IConfigurationToExtentStorageMapper map,
     IDataLayerLogic dataLayerLogic,
     IWorkspaceCollection workspaceCollection,
     ILifetimeScope diScope
     )
     : this(data, map, dataLayerLogic)
 {
     Debug.Assert(workspaceCollection != null, "collection != null");
     _workspaceCollection = workspaceCollection;
     _diScope = diScope;
 }
 public ExtentController(
     IFactoryMapper mapper,
     IWorkspaceCollection workspaceCollection,
     IUmlNameResolution resolution,
     IExtentStorageLoader extentStorageLoader,
     IDataLayerLogic dataLayerLogic,
     ColumnCreator columnCreator,
     ExtentFunctions extentFunctions,
     ILifetimeScope diScope)
 {
     _mapper = mapper;
     _workspaceCollection = workspaceCollection;
     _resolution = resolution;
     _extentStorageLoader = extentStorageLoader;
     _dataLayerLogic = dataLayerLogic;
     _columnCreator = columnCreator;
     _extentFunctions = extentFunctions;
     _diScope = diScope;
 }
 public ZipCodePlugin(IDataLayerLogic dataLayerLogic, IWorkspaceCollection workspaceCollection)
 {
     _dataLayerLogic = dataLayerLogic;
     _workspaceCollection = workspaceCollection;
 }
 public CSVDataProvider(IWorkspaceCollection workspaceCollection, IDataLayerLogic dataLayerLogic)
 {
     _workspaceCollection = workspaceCollection;
     _dataLayerLogic = dataLayerLogic;
 }
 public ExtentFunctions(IDataLayerLogic dataLayerLogic)
 {
     _dataLayerLogic = dataLayerLogic;
 }
 public ClassifierMethods(IDataLayerLogic dataLayerLogic)
 {
     _dataLayerLogic = dataLayerLogic;
 }
Beispiel #10
0
 public CSVStorage(IWorkspaceCollection workspaceCollection, IDataLayerLogic dataLayerLogic)
 {
     _workspaceCollection = workspaceCollection;
     _dataLayerLogic = dataLayerLogic;
 }
 public ExampleController(IDataLayerLogic dataLayerLogic, IWorkspaceCollection collection, IExtentStorageLoader loader)
 {
     _dataLayerLogic = dataLayerLogic;
     _collection = collection;
     _loader = loader;
 }
 public UmlNameResolution(IDataLayerLogic dataLayerLogic)
 {
     _dataLayerLogic = dataLayerLogic;
 }
Beispiel #13
0
        /// <summary>
        /// Performs a full bootstrap by reading the uml classes 
        /// </summary>
        /// <param name="filePaths">Paths storing the uml</param>
        /// <param name="workspace">The workspace to which the extents will be aded</param>
        /// <param name="dataLayerLogic">The datalayerlogic being used to add the </param>
        /// <param name="dataLayer">The datalayer to which the new extents will be added</param>
        /// <returns></returns>
        public static Bootstrapper PerformFullBootstrap(FilePaths filePaths, Workspace<IExtent> workspace,
            IDataLayerLogic dataLayerLogic, IDataLayer dataLayer)
        {
            if (workspace == null) throw new ArgumentNullException(nameof(workspace));
            if (dataLayerLogic == null) throw new ArgumentNullException(nameof(dataLayerLogic));
            if (dataLayer == null) throw new ArgumentNullException(nameof(dataLayer));

            var strapper = PerformFullBootstrap(filePaths, dataLayerLogic, dataLayer);

            workspace.AddExtent(strapper.MofInfrastructure);
            workspace.AddExtent(strapper.UmlInfrastructure);
            workspace.AddExtent(strapper.PrimitiveInfrastructure);
            return strapper;
        }
Beispiel #14
0
        /// <summary>
        ///     Performs a full bootstrap by reading in the uml class
        /// </summary>
        /// <param name="paths">Paths storing the uml information</param>
        /// <param name="dataLayerLogic">The datalayer logic to be used</param>
        /// <param name="dataLayer">The datalayer to be filled before the bootstrap itself</param>
        /// <returns>The instance of the bootstrapper</returns>
        public static Bootstrapper PerformFullBootstrap(
            FilePaths paths,
            IDataLayerLogic dataLayerLogic,
            IDataLayer dataLayer)
        {
            var factory = new MofFactory();
            var umlExtent = new MofUriExtent("datenmeister:///uml");
            var mofExtent = new MofUriExtent("datenmeister:///mof");
            var primitiveExtent = new MofUriExtent("datenmeister:///prototypes");
            var loader = new SimpleLoader(factory);
            loader.Load(primitiveExtent, paths.PathPrimitive);
            loader.Load(umlExtent, paths.PathUml);
            loader.Load(mofExtent, paths.PathMof);

            // Assigns the extents to the datalayer
            if (dataLayer != null && dataLayerLogic != null)
            {
                dataLayerLogic.AssignToDataLayer(mofExtent, dataLayer);
                dataLayerLogic.AssignToDataLayer(umlExtent, dataLayer);
                dataLayerLogic.AssignToDataLayer(primitiveExtent, dataLayer);
                dataLayerLogic.Create<FillTheMOF, _MOF>(dataLayer);
                dataLayerLogic.Create<FillTheUML, _UML>(dataLayer);
                dataLayerLogic.Create<FillThePrimitiveTypes, _PrimitiveTypes>(dataLayer);

                var dmml = new DmML();
                UmlToDmMLConverter.Convert(dataLayerLogic.Get<_UML>(dataLayer), dmml);
                dataLayerLogic.Set(dataLayer, dmml);
            }
            else
            {
                // To support the creation of _MOF and _UML, we need to have datalayers and their logic
                throw new InvalidOperationException("datalayers or dataLayerLogic is null");
            }

            // Now do the bootstrap
            var bootStrapper = new Bootstrapper(primitiveExtent, umlExtent, mofExtent, dataLayerLogic);
            bootStrapper.Strap();
            return bootStrapper;
        }
Beispiel #15
0
 public Integrate(IDataLayerLogic dataLayerLogic)
 {
     _dataLayerLogic = dataLayerLogic;
 }
 public ColumnCreator(IUmlNameResolution nameResolution, IDataLayerLogic dataLayerLogic, IWorkspaceCollection workspaceCollection)
 {
     _nameResolution = nameResolution;
     _dataLayerLogic = dataLayerLogic;
     _workspaceCollection = workspaceCollection;
 }