/// <summary>
        /// This method forward the call to the Update method with adding the single method number inside a single item int list
        /// </summary>
        /// <param name="type">Type of the mining entity</param>
        /// <param name="methodList">List of methods to be executed</param>
        /// <param name="miningState">Mining state to monitor the progress of the mining</param>
        public void Update(MiningEntityType type, int methodNumber, MiningState miningState)
        {
            var list = new List <int>()
            {
                methodNumber
            };

            Update(type, list, miningState);
        }
Пример #2
0
 /// <summary>
 /// Create a new unique operation with endpoint mining
 /// </summary>
 /// <param name="name">Name of the operation. Will be shown in the manage web interface</param>
 /// <param name="entityType">Type of the entity</param>
 /// <param name="methodNumber">Method number of the entity</param>
 /// <param name="endpoint">Endpoint to call</param>
 public Operation(string name, MiningEntityType entityType, int methodNumber, SparqlEndPointMiner endpoint)
 {
     this.UniqueId     = Guid.NewGuid().ToString();
     this.name         = name;
     this.entityType   = entityType;
     this.methodNumber = methodNumber;
     this.endpoint     = endpoint;
     this.state        = new MiningState();
 }
        /// <summary>
        /// This method calls right update method based on the mining entity type
        /// </summary>
        /// <param name="type">Type of the mining entity</param>
        /// <param name="methodList">List of methods to be executed</param>
        /// <param name="miningState">Mining state to monitor the progress of the mining</param>
        public void Update(MiningEntityType type, List <int> methodList, MiningState miningState)
        {
            switch (type)
            {
            case MiningEntityType.Books:
                UpdateBooks(methodList, miningState);
                break;

            case MiningEntityType.Authors:
                UpdateAuthors(methodList, miningState);
                break;

            case MiningEntityType.Genres:
                UpdateGenres(methodList, miningState);
                break;

            case MiningEntityType.Characters:
                UpdateCharacters(methodList, miningState);
                break;

            default:
                throw new NotSupportedException(type.ToString());
            }
        }