Exemple #1
0
        private IGraph getExistingGraph(Uri subject, Dictionary <string, INode> graphRetrievalDictionary, T settings)
        {
            graphRetrievalDictionary = graphRetrievalDictionary ?? new Dictionary <string, INode>();
            graphRetrievalDictionary.Add("subject", SparqlConstructor.GetNode(subject));
            SparqlConstructor sparqlConstructor = new SparqlConstructor(settings.ExistingGraphSparqlCommand, graphRetrievalDictionary);

            sparqlConstructor.Sparql.Namespaces.AddNamespace("parl", new Uri(schemaNamespace));
            logger.Verbose("Trying to get existing graph");
            return(GraphRetrieval.GetGraph(sparqlConstructor.Sparql.ToString(), logger));
        }
        public override Dictionary <string, INode> GetKeysFromSource(BaseResource[] deserializedSource)
        {
            string contactPointMnisId = deserializedSource.OfType <MnisContactPoint>()
                                        .SingleOrDefault()
                                        .ContactPointMnisId;

            return(new Dictionary <string, INode>()
            {
                { "contactPointMnisId", SparqlConstructor.GetNode(contactPointMnisId) }
            });
        }