/// <summary>Loads data from file with optional automated graph generation.</summary> /// <param name="store">Target store to be loaded with data.</param> /// <param name="resourceName">Source file with data.</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 LoadFromEmbeddedResource(this ITripleStore store, string resourceName, Uri metaGraphUri) { ITripleStore targetStore = (metaGraphUri != null ? new TripleStore() : store); targetStore.LoadFromEmbeddedResource(resourceName); if (metaGraphUri != null) { store.ExpandGraphs((TripleStore)targetStore, metaGraphUri); } }
public static void LoadTestFile(this ITripleStore store, string fileName) { string resource = GetResourceName(fileName); store.LoadFromEmbeddedResource(resource); }
public void Setup() { store = new TripleStore(); store.LoadFromEmbeddedResource(System.String.Format("{0}.ttl, {1}", GetType().FullName, GetType().GetTypeInfo().Assembly.FullName), new Uri("http://app.magi/graphs")); }
public void Setup() { store = new TripleStore(); store.LoadFromEmbeddedResource(System.String.Format("{0}.ttl, {1}", GetType().FullName, GetType().Assembly.FullName), new Uri("http://app.magi/graphs")); }