public static Promote ( string resourceUri, IGraph graph, bool isExistingItem ) : RegistrationCatalogEntry>.KeyValuePair |
||
resourceUri | string | |
graph | IGraph | |
isExistingItem | bool | |
return | RegistrationCatalogEntry>.KeyValuePair |
static IDictionary <RegistrationEntryKey, RegistrationCatalogEntry> PromoteRegistrationKey(IDictionary <string, IGraph> newItems) { IDictionary <RegistrationEntryKey, RegistrationCatalogEntry> promoted = new Dictionary <RegistrationEntryKey, RegistrationCatalogEntry>(); foreach (var newItem in newItems) { promoted.Add(RegistrationCatalogEntry.Promote(newItem.Key, newItem.Value)); } return(promoted); }
static void AddExistingItem(IDictionary <RegistrationEntryKey, RegistrationCatalogEntry> resources, TripleStore store, Uri catalogEntry) { SparqlParameterizedString sparql = new SparqlParameterizedString(); sparql.CommandText = Utils.GetResource("sparql.ConstructCatalogEntryGraph.rq"); sparql.SetUri("catalogEntry", catalogEntry); IGraph graph = SparqlHelpers.Construct(store, sparql.ToString()); resources.Add(RegistrationCatalogEntry.Promote(catalogEntry.AbsoluteUri, graph)); }
private static void AddExistingItem(IDictionary <RegistrationEntryKey, RegistrationCatalogEntry> resources, TripleStore store, Uri catalogEntry) { Trace.TraceInformation("RegistrationPersistence.AddExistingItem: catalogEntry = {0}", catalogEntry); SparqlParameterizedString sparql = new SparqlParameterizedString(); sparql.CommandText = Utils.GetResource("sparql.ConstructCatalogEntryGraph.rq"); sparql.SetUri("catalogEntry", catalogEntry); IGraph graph = SparqlHelpers.Construct(store, sparql.ToString()); resources.Add(RegistrationCatalogEntry.Promote( catalogEntry.AbsoluteUri, graph, shouldInclude: (k, u, g) => true, isExistingItem: true)); }
private static IDictionary <RegistrationEntryKey, RegistrationCatalogEntry> PromoteRegistrationKey( IReadOnlyDictionary <string, IGraph> newItems, ShouldIncludeRegistrationPackage shouldInclude) { IDictionary <RegistrationEntryKey, RegistrationCatalogEntry> promoted = new Dictionary <RegistrationEntryKey, RegistrationCatalogEntry>(); foreach (var newItem in newItems) { var promotedEntry = RegistrationCatalogEntry.Promote( newItem.Key, newItem.Value, shouldInclude, isExistingItem: false); promoted[promotedEntry.Key] = promotedEntry.Value; } return(promoted); }