コード例 #1
0
        public List <Tuple <long, long, List <ServiceVertexInstance> > > GetAllIncomingVertices(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.GetAllIncomingVertices().Select(x => new Tuple <long, long, List <ServiceVertexInstance> >(x.Item1, x.Item2, x.Item3.Select(y => new ServiceVertexInstance(y)).ToList())).ToList());
        }
コード例 #2
0
        public List <Tuple <string, object> > GetAllUnstructuredProperties(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.GetAllUnstructuredProperties().ToList());
        }
コード例 #3
0
ファイル: VertexService.cs プロジェクト: alrehamy/sones
        public Int64 PartitionID(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.PartitionInformation.PartitionID);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
ファイル: StreamedService.cs プロジェクト: zhouweiaccp/sones
        public List <Tuple <long, Stream> > GetAllBinaryProperties(SecurityToken mySecurityToken, long myTransToken, ServiceVertexInstance myVertex)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.GetAllBinaryProperties().ToList());
        }
コード例 #6
0
ファイル: VertexService.cs プロジェクト: alrehamy/sones
        public bool HasOutgoingEdge(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex, long myEdgePropertyID)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.HasOutgoingEdge(myEdgePropertyID));
        }
コード例 #7
0
        public List <Tuple <long, object> > GetAllProperties(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.GetAllProperties().Select(x => new Tuple <long, object>(x.Item1, (object)x.Item2)).ToList());
        }
コード例 #8
0
        public Stream GetBinaryProperty(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex, Int64 myPropertyID)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.GetBinaryProperty(myPropertyID));
        }
コード例 #9
0
ファイル: VertexService.cs プロジェクト: alrehamy/sones
        public long ModificationDate(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.ModificationDate);
        }
コード例 #10
0
ファイル: VertexService.cs プロジェクト: alrehamy/sones
        public ServiceVertexStatistics VertexStatistics(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(new ServiceVertexStatistics(Response.Statistics));
        }
コード例 #11
0
ファイル: VertexService.cs プロジェクト: alrehamy/sones
        public string GetUnstructuredPropertyAsString(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex, string myPropertyName)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.GetUnstructuredPropertyAsString(myPropertyName));
        }
コード例 #12
0
ファイル: VertexService.cs プロジェクト: alrehamy/sones
        public int GetCountOfUnstructuredProperties(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.GetCountOfUnstructuredProperties());
        }
コード例 #13
0
ファイル: VertexService.cs プロジェクト: alrehamy/sones
        public List <ServiceSingleEdgeInstance> GetAllOutgoingSingleEdges(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.GetAllOutgoingSingleEdges().Select(x => new ServiceSingleEdgeInstance(x.Edge, x.PropertyID)).ToList());
        }
コード例 #14
0
ファイル: VertexService.cs プロジェクト: alrehamy/sones
        public List <ServiceVertexInstance> GetIncomingVertices(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex, long myVertexTypeID, long myEdgePropertyID)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.GetIncomingVertices(myVertexTypeID, myEdgePropertyID).Select(x => new ServiceVertexInstance(x)).ToList());
        }
コード例 #15
0
ファイル: VertexService.cs プロジェクト: alrehamy/sones
        public List <ServicePropertyContainer> GetAllProperties(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.GetAllProperties().Select(x => new ServicePropertyContainer {
                PropertyID = x.PropertyID, Property = (object)x.Property
            }).ToList());
        }
コード例 #16
0
        public List <ServiceBinaryPropertyContainer> GetAllBinaryProperties(SecurityToken mySecurityToken, long myTransToken, ServiceVertexInstance myVertex)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.GetAllBinaryProperties().Select(_ => new ServiceBinaryPropertyContainer {
                PropertyID = _.PropertyID, BinaryPropery = _.BinaryPropery
            }).ToList());
        }
コード例 #17
0
ファイル: GraphDS_API.cs プロジェクト: alrehamy/sones
        public ServiceVertexInstance GetVertex(SecurityToken mySecurityToken, Int64 myTransactionToken,
                                               ServiceVertexType myVertexType, Int64 myVertexID)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertexType, myVertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransactionToken, Request,
                                                            ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(new ServiceVertexInstance(Response));
        }
コード例 #18
0
ファイル: VertexService.cs プロジェクト: alrehamy/sones
        public ServiceSingleEdgeInstance GetOutgoingSingleEdge(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex, long myEdgePropertyID)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);
            var value    = Response.GetOutgoingSingleEdge(myEdgePropertyID);

            if (value != null)
            {
                return(new ServiceSingleEdgeInstance(value, myEdgePropertyID));
            }
            return(null);
        }
コード例 #19
0
ファイル: VertexService.cs プロジェクト: alrehamy/sones
        public List <ServiceIncomingVerticesContainer> GetAllIncomingVertices(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.GetAllIncomingVertices().Select(
                       x => new ServiceIncomingVerticesContainer
            {
                VertexTypeID = x.VertexTypeID,
                EdgePropertyID = x.EdgePropertyID,
                IncomingVertices = x.IncomingVertices.Select(y => new ServiceVertexInstance(y)).ToList()
            }).ToList());
        }
コード例 #20
0
        public List <ServiceEdgeInstance> GetAllOutgoingEdges(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexInstance myVertex)
        {
            var Request  = ServiceRequestFactory.MakeRequestGetVertex(myVertex.TypeID, myVertex.VertexID);
            var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance);

            return(Response.GetAllOutgoingEdges().Select <Tuple <long, IEdge>, ServiceEdgeInstance>(x =>
            {
                if (x.Item2 is ISingleEdge)
                {
                    return new ServiceSingleEdgeInstance(x.Item2 as ISingleEdge, x.Item1);
                }
                else
                {
                    return new ServiceHyperEdgeInstance(x.Item2 as IHyperEdge, x.Item1);
                }
            }).ToList());
        }
コード例 #21
0
ファイル: EdgeService.cs プロジェクト: zhouweiaccp/sones
 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());
     }
 }
コード例 #22
0
ファイル: EdgeService.cs プロジェクト: zhouweiaccp/sones
        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());
        }