Beispiel #1
0
        public Boolean Equals(ExpressionEdge p)
        {
            // If parameter is null return false:
            if ((object)p == null)
            {
                return(false);
            }

            return((this._destination == p.Destination) && (this._direction == p.Direction));
        }
Beispiel #2
0
        public override Boolean Equals(System.Object obj)
        {
            // If parameter is null return false.
            if (obj == null)
            {
                return(false);
            }

            // If parameter cannot be cast to Point return false.
            ExpressionEdge p = obj as ExpressionEdge;

            if ((System.Object)p == null)
            {
                return(false);
            }

            return(Equals(p));
        }
Beispiel #3
0
        public override Boolean IsGraphRelevant(LevelKey myLevelKey, IVertex mySourceDBObject)
        {
            lock (_Levels)
            {
                if (!this.ContainsLevelKey(myLevelKey))
                {
                    return false;
                }

                if (myLevelKey.Level == 0)
                {
                    return this._Levels[myLevelKey.Level].ExpressionLevels[myLevelKey].Nodes.ContainsKey(GenerateVertexInfoFromLevelKeyAndVertexID(mySourceDBObject.VertexTypeID, mySourceDBObject.VertexID));
                }
                else
                {
                    if (mySourceDBObject != null)
                    {

                        VertexInformation mySourceDBObjectNode = GenerateVertexInfoFromLevelKeyAndVertexID(mySourceDBObject.VertexTypeID, mySourceDBObject.VertexID);

                        var predecessorLevelKey = myLevelKey.GetPredecessorLevel(_iGraphDB, _securityToken, _transactionToken);

                        if (!this.ContainsLevelKey(predecessorLevelKey))
                        {
                            var interestingEdge = new ExpressionEdge(mySourceDBObjectNode, null, predecessorLevelKey.LastEdge);
                            //take the backwardEdges
                            return this._Levels[myLevelKey.Level].ExpressionLevels[myLevelKey].Nodes.Where(item => item.Value.BackwardEdges[predecessorLevelKey.LastEdge].Contains(interestingEdge)).Count() > 0;
                        }
                        else
                        {

                            if (this._Levels[predecessorLevelKey.Level].ExpressionLevels[predecessorLevelKey].Nodes[mySourceDBObjectNode].ForwardEdges.ContainsKey(myLevelKey.LastEdge))
                            {
                                if (this._Levels[predecessorLevelKey.Level].ExpressionLevels[predecessorLevelKey].Nodes[mySourceDBObjectNode].ForwardEdges[myLevelKey.LastEdge].Count > 0)
                                {
                                    return true;
                                }
                                else
                                {
                                    return false;
                                }
                            }
                            else
                            {
                                return false;
                            }
                        }
                    }
                    else
                    {
                        throw new ExpressionGraphInternalException("No IVertex givon for graph relevance test in a higher level.");
                    }
                }
            }
        }
Beispiel #4
0
        public Boolean Equals(ExpressionEdge p)
        {
            // If parameter is null return false:
            if ((object)p == null)
            {
                return false;
            }

            return (this._destination == p.Destination) && (this._direction == p.Direction);
        }