コード例 #1
0
        public static Triple ToTriple(IConceptManager conceptManager, Item item, ItemLink itemLink)
        {
            var g = new Graph();

            g.NamespaceMap.AddNamespace("sitecore", new Uri("sitecore:"));
            //g.NamespaceMap.AddNamespace("http", new Uri("http:"));

            IUriNode sub = g.CreateUriNode(ItemToUri(item));

            IUriNode obj;

            if (itemLink.GetTargetItem() == null)
            {
                //Broken link creation
                obj = g.CreateUriNode(BrokenLinkUri);
            }
            else
            {
                obj = g.CreateUriNode(ItemToUri(itemLink.GetTargetItem()));
            }

            IUriNode predicate = conceptManager.GetPredicate(sub, obj);

            //Add Source Field Id to predicate
            IUriNode predicateWithFieldId = g.CreateUriNode(new Uri(predicate.Uri + "#" + itemLink.SourceFieldID));

            return(new Triple(sub, Tools.CopyNode(predicateWithFieldId, g), obj));
        }
コード例 #2
0
 public LinkedDataManager(IQueryableStorage store, IConceptManager conceptManager, Uri graphUri)
 {
     _inFormatters  = null;
     _outFormatters = null;
     _store         = store;
     ConceptManager = conceptManager;
     _graphUri      = graphUri;
 }
コード例 #3
0
 public LinkedDataManager(List <ITripleFormatter> inFormatters, List <ITripleFormatter> outFormatters, List <IFilter> inFilters, IQueryableStorage store, IConceptManager conceptManager, Uri graphUri)
 {
     _inFormatters  = inFormatters;
     _outFormatters = outFormatters;
     _inFilters     = inFilters;
     _store         = store;
     ConceptManager = conceptManager;
     _graphUri      = graphUri;
 }
コード例 #4
0
 public SitecoreLinkedDataManager(List <ITripleFormatter> inFormatters, List <ITripleFormatter> outFormatters, List <IFilter> inFilters, IQueryableStorage store, IConceptManager conceptManager, Uri graphUri)
     : base(inFormatters, outFormatters, inFilters, store, conceptManager, graphUri)
 {
 }
コード例 #5
0
 public SitecoreLinkedDataManager(IQueryableStorage store, IConceptManager conceptManager, Uri graphUri)
     : base(store, conceptManager, graphUri)
 {
 }
コード例 #6
0
ファイル: ConceptCacheManager.cs プロジェクト: syurov/rt.srz
 /// <summary>
 /// Initializes a new instance of the <see cref="ConceptCacheManager"/> class.
 /// </summary>
 /// <param name="repository">
 /// The repository.
 /// </param>
 public ConceptCacheManager(IConceptManager repository)
     : base(repository)
 {
     TimeSpan = new TimeSpan(0, 0, 30, 0);
 }