public ServiceHyperEdgeInstance(IHyperEdge myHyperEdge, Nullable <Int64> myEdgePropertyID) : base(myHyperEdge as IEdge, myEdgePropertyID) { this.SingleEdges = myHyperEdge.GetAllEdges().Select( x => new ServiceSingleEdgeInstance(x, null, new ServiceVertexInstance(myHyperEdge.GetSourceVertex())) ).ToList(); }
public ServiceHyperEdgeInstance(IHyperEdge myHyperEdge, Nullable<Int64> myEdgePropertyID) : base(myHyperEdge as IEdge, myEdgePropertyID) { this.SingleEdges = myHyperEdge.GetAllEdges().Select( x => new ServiceSingleEdgeInstance(x, null, new ServiceVertexInstance(myHyperEdge.GetSourceVertex())) ).ToList(); }
public List <ServicePropertyContainer> GetAllProperties(SecurityToken mySecurityToken, Int64 myTransToken, ServiceEdgeInstance myEdge) { List <ServicePropertyContainer> PropertyCollection; if (myEdge.EdgePropertyID != null) { var Request = ServiceRequestFactory.MakeRequestGetVertex(myEdge.SourceVertex.TypeID, myEdge.SourceVertex.VertexID); var SourceVertex = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance); PropertyCollection = SourceVertex.GetOutgoingEdge((Int64)myEdge.EdgePropertyID).GetAllProperties().Select(_ => new ServicePropertyContainer { PropertyID = _.PropertyID, Property = _.Property }).ToList(); } else { var Request = ServiceRequestFactory.MakeRequestGetVertex( (myEdge as ServiceSingleEdgeInstance).HyperEdgeSourceVertex.TypeID, (myEdge as ServiceSingleEdgeInstance).HyperEdgeSourceVertex.VertexID); var SourceVertex = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance); IHyperEdge HyperEdge = SourceVertex.GetOutgoingHyperEdge((Int64)myEdge.EdgePropertyID); PropertyCollection = HyperEdge.GetAllEdges(delegate(ISingleEdge mySingleEdge){ return(mySingleEdge.GetSourceVertex().VertexID == myEdge.SourceVertex.VertexID && mySingleEdge.GetTargetVertex().VertexID == (myEdge as ServiceSingleEdgeInstance).TargetVertex.VertexID); }).First <ISingleEdge>().GetAllProperties().Select(_ => new ServicePropertyContainer { PropertyID = _.PropertyID, Property = _.Property }).ToList(); } return(PropertyCollection); }
public int GetCountOfProperties(SecurityToken mySecurityToken, Int64 myTransToken, ServiceEdgeInstance myEdge) { if (myEdge.EdgePropertyID != null) { var Request = ServiceRequestFactory.MakeRequestGetVertex(myEdge.SourceVertex.TypeID, myEdge.SourceVertex.VertexID); var SourceVertex = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance); return(SourceVertex.GetOutgoingEdge((Int64)myEdge.EdgePropertyID).GetCountOfProperties()); } else { var Request = ServiceRequestFactory.MakeRequestGetVertex( (myEdge as ServiceSingleEdgeInstance).HyperEdgeSourceVertex.TypeID, (myEdge as ServiceSingleEdgeInstance).HyperEdgeSourceVertex.VertexID); var SourceVertex = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance); IHyperEdge HyperEdge = SourceVertex.GetOutgoingHyperEdge((Int64)myEdge.EdgePropertyID); return(HyperEdge.GetAllEdges(delegate(ISingleEdge mySingleEdge){ return (mySingleEdge.GetSourceVertex().VertexID == myEdge.SourceVertex.VertexID && mySingleEdge.GetTargetVertex().VertexID == (myEdge as ServiceSingleEdgeInstance).TargetVertex.VertexID); }).First <ISingleEdge>().GetCountOfProperties()); } }
public List <Tuple <long, object> > GetAllProperties(SecurityToken mySecurityToken, Int64 myTransToken, ServiceEdgeInstance myEdge) { IEnumerable <Tuple <long, IComparable> > PropertyCollection; if (myEdge.EdgePropertyID != null) { var Request = ServiceRequestFactory.MakeRequestGetVertex(myEdge.SourceVertex.TypeID, myEdge.SourceVertex.VertexID); var SourceVertex = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance); PropertyCollection = SourceVertex.GetOutgoingEdge((Int64)myEdge.EdgePropertyID).GetAllProperties(); } else { var Request = ServiceRequestFactory.MakeRequestGetVertex( (myEdge as ServiceSingleEdgeInstance).HyperEdgeSourceVertex.TypeID, (myEdge as ServiceSingleEdgeInstance).HyperEdgeSourceVertex.VertexID); var SourceVertex = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance); IHyperEdge HyperEdge = SourceVertex.GetOutgoingHyperEdge((Int64)myEdge.EdgePropertyID); PropertyCollection = HyperEdge.GetAllEdges(delegate(ISingleEdge mySingleEdge){ return(mySingleEdge.GetSourceVertex().VertexID == myEdge.SourceVertex.VertexID && mySingleEdge.GetTargetVertex().VertexID == (myEdge as ServiceSingleEdgeInstance).TargetVertex.VertexID); }).First <ISingleEdge>().GetAllProperties(); } return(PropertyCollection.Select(x => new Tuple <long, object>(x.Item1, (object)x.Item2)).ToList()); }
private HyperEdgeUpdateDefinition CreateHyperEdgeUpdateDefinition(IHyperEdge iHyperEdge) { var containedEdges = iHyperEdge.GetAllEdges(); var structuredProperties = iHyperEdge.GetAllProperties(); var unstructuredProperties = iHyperEdge.GetAllUnstructuredProperties(); return new HyperEdgeUpdateDefinition(iHyperEdge.EdgeTypeID, iHyperEdge.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), null, containedEdges.Select(_ => CreateSingleEdgeUpdateDefinition(_))); }
public ServiceHyperEdgeInstance(IHyperEdge myEdge) : base(myEdge) { SingleEdges = myEdge.GetAllEdges().Select(x => new ServiceSingleEdgeInstance(x)).ToArray(); }
public ServiceHyperEdgeInstance(IHyperEdge myEdge) : base(myEdge) { SingleEdges = myEdge.GetAllEdges().Select(x => new ServiceSingleEdgeInstance(x)).ToArray(); }