Beispiel #1
0
        protected virtual Uri CreateCatalogPage(CatalogItem item)
        {
            Uri tmpUri = GetTempUri("catalogpage", "ttl");

            using (IGraph graph = item.CreateContentGraph(Context))
            {
                if (_addons != null)
                {
                    INode  rdfTypePredicate = graph.CreateUriNode(Schema.Predicates.Type);
                    Triple resource         = graph.GetTriplesWithPredicateObject(rdfTypePredicate, graph.CreateUriNode(item.GetItemType())).First();

                    foreach (var addon in _addons)
                    {
                        addon.ApplyToGraph(graph, (IUriNode)resource.Subject);
                    }
                }

                SaveGraph(graph, tmpUri).Wait();
            }

            return(tmpUri);
        }