예제 #1
0
파일: Store.cs 프로젝트: jayagupta678/psi
        /// <summary>
        /// Crops a store between the extents of a specified interval, generating a new store.
        /// </summary>
        /// <param name="inputName">The name of the store to crop.</param>
        /// <param name="inputPath">The path of the store to crop.</param>
        /// <param name="outputName">The name of the cropped store.</param>
        /// <param name="outputPath">The path of the cropped store.</param>
        /// <param name="cropInterval">The time interval to which to crop the store.</param>
        /// <param name="createSubdirectory">
        /// Indicates whether to create a numbered subdirectory for each cropped store
        /// generated by multiple calls to this method.
        /// </param>
        public static void Crop(string inputName, string inputPath, string outputName, string outputPath, TimeInterval cropInterval, bool createSubdirectory = true)
        {
            using (var pipeline = Pipeline.Create("CropStore"))
            {
                Importer inputStore  = Store.Open(pipeline, inputName, inputPath);
                Exporter outputStore = Store.Create(pipeline, outputName, outputPath, createSubdirectory, inputStore.Serializers);

                // copy all streams from inputStore to outputStore
                foreach (var streamInfo in inputStore.AvailableStreams)
                {
                    inputStore.CopyStream(streamInfo.Name, outputStore);
                }

                // run the pipeline to copy over the specified cropInterval
                pipeline.Run(cropInterval, true, false);
            }
        }
예제 #2
0
 /// <inheritdoc />
 public virtual void Update(TimeInterval messagesTimeInterval, TimeInterval messagesOriginatingTimeInterval)
 {
     throw new NotImplementedException();
 }