Пример #1
0
 public void Add(IVertex current_node, double current_distance, UInt64 current_depth, ISingleEdge current_edge,IOutgoingEdgeDefinition edgeType, IVertex father)
 {
     var id = current_node.VertexID;
     _list.Add(id, Tuple.Create(current_node, current_distance, current_depth, Tuple.Create(current_edge,edgeType), father));
     _count++;
 }
Пример #2
0
        private SingleEdgeUpdateDefinition CreateSingleEdgeUpdateDefinition(ISingleEdge iSingleEdge)
        {
            var sourceVertex = iSingleEdge.GetSourceVertex();
            var targetVertex = iSingleEdge.GetTargetVertex();
            var structuredProperties = iSingleEdge.GetAllProperties();
            var unstructuredProperties = iSingleEdge.GetAllUnstructuredProperties();

            return new SingleEdgeUpdateDefinition(
                new VertexInformation(sourceVertex.VertexTypeID, sourceVertex.VertexID, sourceVertex.VertexRevisionID, sourceVertex.EditionName),
                new VertexInformation(targetVertex.VertexTypeID, targetVertex.VertexID, targetVertex.VertexRevisionID, targetVertex.EditionName),
                iSingleEdge.EdgeTypeID,
                iSingleEdge.Comment,
                new StructuredPropertiesUpdate(
                    structuredProperties != null && structuredProperties.Count() > 0 ? structuredProperties.ToDictionary(key => key.PropertyID, value => value.Property) : null),
                new UnstructuredPropertiesUpdate(
                    unstructuredProperties != null && unstructuredProperties.Count() > 0 ? unstructuredProperties.ToDictionary(key => key.PropertyName, value => value.Property) : null));
        }
Пример #3
0
 public void Set(IVertex value, double current_distance, ulong current_depth, ISingleEdge current_edge,IOutgoingEdgeDefinition edgeType, IVertex father)
 {
     var key = value.VertexID;
     _list[key] = Tuple.Create(value, current_distance, current_depth, Tuple.Create(current_edge,edgeType), father);
 }
Пример #4
0
        private IDictionary<string, object> GetEdgeProperties(ISingleEdge aSingleEdge, IEdgeType myInnerEdgeType)
        {
            Dictionary<String, Object> result = new Dictionary<string, object>();

            #region properties

            if (myInnerEdgeType != null)
            {
                foreach (var aProperty in myInnerEdgeType.GetPropertyDefinitions(true))
                {
                    if (aSingleEdge.HasProperty(aProperty.ID))
                    {
                        result.Add(aProperty.Name, aProperty.GetValue(aSingleEdge));
                    }
                    else
                    {
                        var tempResult = aProperty.GetValue(aSingleEdge);

                        if (tempResult != null)
                        {
                            result.Add(aProperty.Name, tempResult);
                        }
                    }
                }
            }

            #endregion

            #region unstructured data

            foreach (var aUnstructuredProperty in aSingleEdge.GetAllUnstructuredProperties())
            {
                result.Add(aUnstructuredProperty.PropertyName, aUnstructuredProperty.Property);
            }

            #endregion

            return result;
        }
Пример #5
0
 public ServiceSingleEdgeInstance(ISingleEdge mySingleEdge, Nullable<Int64> myEdgePropertyID, ServiceVertexInstance myHyperEdgeSourceVertex = null)
     : base(mySingleEdge as IEdge, myEdgePropertyID)
 {
     this.TargetVertex = new ServiceVertexInstance(mySingleEdge.GetTargetVertex());
     this.HyperEdgeSourceVertex = myHyperEdgeSourceVertex;
 }
Пример #6
0
 public ServiceSingleEdgeInstance(ISingleEdge myEdge) : base(myEdge)
 {
     TargetVertex = new ServiceVertexInstance(myEdge.GetTargetVertex());
 }
Пример #7
0
 private SingleEdgeView GenerateASingleEdgeView(SecurityToken mySecurityToken, 
                                                 Int64 myTransactionToken, 
                                                 ISingleEdge aSingleEdge, 
                                                 IVertexType myVertexType, 
                                                 long myDepth, 
                                                 EdgeList myEdgeList, 
                                                 string reference, 
                                                 bool myUsingGraph, 
                                                 IEdgeType myInnerEdgeType)
 {
     return new SingleEdgeView(GetEdgeProperties(aSingleEdge, myInnerEdgeType), 
                                 LoadAndResolveVertex(mySecurityToken, 
                                                         myTransactionToken, 
                                                         aSingleEdge.GetTargetVertex(), 
                                                         myVertexType, 
                                                         myDepth, 
                                                         myEdgeList, 
                                                         reference, 
                                                         myUsingGraph));
 }
Пример #8
0
 public void set(IVertex value, double current_distance, ulong current_depth, ISingleEdge current_edge, IVertex father)
 {
     var key = value.VertexID;
     list[key] = Tuple.Create(value, current_distance, current_depth, current_edge, father);
 }
Пример #9
0
 public void add(IVertex current_node, double current_distance, UInt64 current_depth, ISingleEdge current_edge, IVertex father)
 {
     var id = current_node.VertexID;
     list.Add(id, Tuple.Create(current_node, current_distance, current_depth, current_edge, father));
     count++;
 }
Пример #10
0
        public void Set(IVertex value, double current_distance, ulong current_depth, ISingleEdge current_edge, IOutgoingEdgeDefinition edgeType, IVertex father)
        {
            var key = value.VertexID;

            _list[key] = Tuple.Create(value, current_distance, current_depth, Tuple.Create(current_edge, edgeType), father);
        }
Пример #11
0
        public void Add(IVertex current_node, double current_distance, UInt64 current_depth, ISingleEdge current_edge, IOutgoingEdgeDefinition edgeType, IVertex father)
        {
            var id = current_node.VertexID;

            _list.Add(id, Tuple.Create(current_node, current_distance, current_depth, Tuple.Create(current_edge, edgeType), father));
            _count++;
        }
Пример #12
0
 public ServiceSingleEdgeInstance(ISingleEdge mySingleEdge, Nullable <Int64> myEdgePropertyID, ServiceVertexInstance myHyperEdgeSourceVertex = null)
     : base(mySingleEdge as IEdge, myEdgePropertyID)
 {
     this.TargetVertex          = new ServiceVertexInstance(mySingleEdge.GetTargetVertex());
     this.HyperEdgeSourceVertex = myHyperEdgeSourceVertex;
 }