public GraphFSError_InvalidIGraphFSParameterType(IGraphFS myIGraphFS, String myParameterName, Type myParameterType, Type myWrongType)
 {
     IGraphFS      = myIGraphFS;
     ParameterName = myParameterName;
     ParameterType = myParameterType;
     Message       = String.Format("IGraphFS parameter/property '{0}.{1}' expected to be of type '{2}', not of type '{3}'!", myIGraphFS.GetType().Name, myParameterName, myParameterType.Name, myWrongType.Name);
 }
Beispiel #2
0
        private IEnumerable<IVertexView> Import()
        {
            Stopwatch sw = Stopwatch.StartNew();

            //The resulting FS via reflection from the graphfs
            _resultingFS = (IGraphFS) typeof(SonesGraphDB).GetField("_iGraphFS", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(_db);

            //insert into both filesystems...
            FillFilesystems();
            _logger.Log(Level.INFO, "filesystems filled.");

            sw.Stop();

            _logger.Log(Level.INFO, "Import finished.");

            return GetResult();
        }
Beispiel #3
0
        /// <summary>
        /// Creates a new sones graphdb instance
        /// </summary>
        /// <param name="myPlugins">The plugins that are valid for the sones GraphDB component</param>
        /// <param name="myCreate">Should the sones graphdb created?</param>
        /// <param name="myCulture">the culture of this instance, defaults to en-us</param>
        public SonesGraphDB(
            GraphDBPlugins myPlugins = null,
            Boolean myCreate         = true, CultureInfo myCulture = null, String myPersistenceLocation = "") // HACK: myPersistenceLocation was introduced because the global settings management is not in place at the moment...
        {
            _id = Guid.NewGuid();

            _cts = new CancellationTokenSource();

            if (myPlugins == null)
            {
                myPlugins = new GraphDBPlugins();
            }

            if (myCulture == null)
            {
                // defaults to en-us
                myCulture = new CultureInfo("en-us");
            }

            _graphDBCulture = myCulture;

            #region settings

            _applicationSettings = new GraphApplicationSettings(ConstantsSonesGraphDB.ApplicationSettingsLocation);

            // HACK: if existing set the PersistenceLocation (btk,23.09.2011)
            PersistenceLocation pl = new PersistenceLocation();
            _applicationSettings.ApplySetting(pl, myPersistenceLocation);

            #endregion

            #region plugin manager

            _graphDBPluginManager = new GraphDBPluginManager();

            #endregion

            #region IGraphFS

            _iGraphFS = LoadGraphFsPlugin(myPlugins.IGraphFSDefinition);

            #endregion

            #region transaction

            _transactionManager = LoadTransactionManagerPlugin(myPlugins.TransactionManagerPlugin);

            #endregion

            #region security

            _securityManager = LoadSecurityManager(myPlugins.SecurityManagerPlugin);

            #endregion

            #region ids

            _idManager = new IDManager();

            #endregion

            #region requests

            _requestManager = LoadRequestManager(CreateMetamanager(myPlugins, _transactionManager));

            #endregion
        }
        private QueryResult Import()
        {
            Stopwatch sw = Stopwatch.StartNew();

            //The resulting FS via reflection from the graphfs
            _resultingFS = (IGraphFS) typeof(SonesGraphDB).GetField("_iGraphFS", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(_db);

            //insert into both filesystems...
            FillFilesystems();
            _logger.Log(Level.INFO, "filesystems filled.");

            sw.Stop();

            _logger.Log(Level.INFO, "Import finished.");

            return new QueryResult("", PluginShortName, Convert.ToUInt64(sw.Elapsed.TotalMinutes), ResultType.Successful, GetResult());
        }
Beispiel #5
0
        public void Set(ObjectLocation myObjectLocation, IGraphFS myChildFS)
        {
            if (_ChildFSLookuptable.ContainsKey(myObjectLocation))
                _ChildFSLookuptable[myObjectLocation] = myChildFS;

            else
                _ChildFSLookuptable.Add(myObjectLocation, myChildFS);
        }