コード例 #1
0
        /// <summary>Loads data from string with optional automated graph generation.</summary>
        /// <param name="store">Target store to be loaded with data.</param>
        /// <param name="data">String with data.</param>
        /// <param name="parser">Store reader.</param>
        /// <param name="metaGraphUri">When provided, store will have automatically created graphs for all resources that are mentioned in the meta graph provided.</param>
        public static void LoadFromString(this ITripleStore store, string data, IStoreReader parser, Uri metaGraphUri)
        {
            ITripleStore targetStore = (metaGraphUri != null ? new TripleStore() : store);

            targetStore.LoadFromString(data, parser);
            if (metaGraphUri != null)
            {
                store.ExpandGraphs((TripleStore)targetStore, metaGraphUri);
            }
        }