Пример #1
0
 public ServiceEdgeInstance(IEdge myEdge, Nullable<Int64> myEdgePropertyID)
     : base(myEdge.EdgeTypeID)
 {
     this.EdgePropertyID = myEdgePropertyID;
     this.Comment = myEdge.Comment;
     var SourceVertex = myEdge.GetSourceVertex();
     this.SourceVertex = new ServiceVertexInstance(SourceVertex);
 }
Пример #2
0
 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();
 }
Пример #3
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();
 }
Пример #4
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();
 }
Пример #5
0
 public long CreationDate(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.CreationDate;
 }
Пример #6
0
 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);
 }
Пример #7
0
 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;
 }
Пример #8
0
 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();
 }
Пример #9
0
 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();
 }
Пример #10
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();
 }
Пример #11
0
 public ServiceEdgeInstance GetOutgoingEdge(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 Edge = Response.GetOutgoingEdge(myEdgePropertyID);
     if(Edge is ISingleEdge)
         return new ServiceSingleEdgeInstance(Edge as ISingleEdge, myEdgePropertyID);
     else
         return new ServiceHyperEdgeInstance(Edge as IHyperEdge, myEdgePropertyID);
 }
Пример #12
0
 public List<ServiceUnstructuredPropertyContainer> 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().Select(_ => new ServiceUnstructuredPropertyContainer { PropertyName = _.PropertyName, Property = _.Property }).ToList();
 }
Пример #13
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;
 }
Пример #14
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);
 }
Пример #15
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();
 }
Пример #16
0
 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;
 }
Пример #17
0
 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.Item2, x.Item1)).ToList();
 }
Пример #18
0
 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);
 }
Пример #19
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();
 }
Пример #20
0
 public bool HasUnstructuredProperty(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.HasUnstructuredProperty(myPropertyName);
 }
Пример #21
0
 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();
 }
Пример #22
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;
 }