internal ServiceVertexTypePredefinition(VertexTypePredefinition myVertexTypePredefinition)
        {
            this.VertexTypeName = myVertexTypePredefinition.TypeName;
            this.SuperVertexTypeName = myVertexTypePredefinition.SuperTypeName;
            this.IsSealed = myVertexTypePredefinition.IsSealed;
            this.IsAbstract = myVertexTypePredefinition.IsAbstract;
            this.Comment = myVertexTypePredefinition.Comment;

            this.Uniques = (myVertexTypePredefinition.Uniques == null)
                ? null : myVertexTypePredefinition.Uniques.Select(x => new ServiceUniquePredefinition(x)).ToList();

            this.Indices = (myVertexTypePredefinition.Indices == null)
                ? null : myVertexTypePredefinition.Indices.Select(x => new ServiceIndexPredefinition(x)).ToList();
            
            this.Properties = (myVertexTypePredefinition.Properties == null)
                ? null : myVertexTypePredefinition.Properties.Select(x => new ServicePropertyPredefinition(x)).ToList();

            this.BinaryProperties = (myVertexTypePredefinition.BinaryProperties == null)
                ? null : myVertexTypePredefinition.BinaryProperties.Select(x => new ServiceBinaryPropertyPredefinition(x)).ToList();

            this.OutgoingEdges = (myVertexTypePredefinition.OutgoingEdges == null)
                ? null : myVertexTypePredefinition.OutgoingEdges.Select(x => new ServiceOutgoingEdgePredefinition(x)).ToList();

            this.IncomingEdges = (myVertexTypePredefinition.IncomingEdges == null)
                ? null : myVertexTypePredefinition.IncomingEdges.Select(x => new ServiceIncomingEdgePredefinition(x)).ToList();
        }
 /// <summary>
 /// Creates a new instance of TargetVertexTypeNotFoundException.
 /// </summary>
 /// <param name="myPredefinition">
 /// The Predefinition that contains the edges.
 /// </param>
 /// <param name="myTargetVertexTypeName">
 /// The vertex type name, that was not found.
 /// </param>
 /// <param name="myEdges">
 /// The list of edges that causes the exception.
 /// </param>
 public TargetVertexTypeNotFoundException(VertexTypePredefinition myPredefinition, string myTargetVertexTypeName, IEnumerable<String> myEdges)
 {
     this.Predefinition = myPredefinition;
     this.TargetVertexTypeName = myTargetVertexTypeName;
     this.Edges = myEdges;
     _msg = string.Format("The outgoing edges ({0}) on vertex type {1} does point to a not existing target type {2}.", String.Join(",", myEdges), myPredefinition.TypeName, myTargetVertexTypeName);
 }
示例#3
0
 public IncomingEdgePredefinition(String myEdgeName, 
                                     VertexTypePredefinition mySourceVertexType, 
                                     String myOutgoingEdgeName)
     : base(myEdgeName, "")
 {
     SetOutgoingEdge(mySourceVertexType, myOutgoingEdgeName);
 }
 public IncomingEdgePredefinition(String myEdgeName,
                                  VertexTypePredefinition mySourceVertexType,
                                  String myOutgoingEdgeName)
     : base(myEdgeName, "")
 {
     SetOutgoingEdge(mySourceVertexType, myOutgoingEdgeName);
 }
        /// <summary>
        /// Sets the outgoing edge, this incoming edge is the backward version for.
        /// </summary>
        /// <param name="mySourceVertexType">A vertex type pre-definition.</param>
        /// <param name="myOutgoingEdgeName">The name of the IncomingEdge on the vertex type.</param>
        /// <returns>The reference of the current object. (fluent interface).</returns>
        private IncomingEdgePredefinition SetOutgoingEdge(VertexTypePredefinition mySourceVertexType, 
                                                            String myOutgoingEdgeName)
        {
            if (mySourceVertexType != null && myOutgoingEdgeName != null)
                AttributeType = Combine(mySourceVertexType.TypeName, myOutgoingEdgeName);

            return this;
        }
        /// <summary>
        /// Sets the type of this outgoing edge with a VertexTypePredefinition.
        /// </summary>
        /// <param name="myTargetVertexType">The target vertex type predefinition</param>
        /// <returns>The reference of the current object. (fluent interface).</returns>
        public OutgoingEdgePredefinition SetAttributeType(VertexTypePredefinition myTargetVertexType)
        {
            if (myTargetVertexType != null)
            {
                AttributeType = myTargetVertexType.TypeName;
            }

            return(this);
        }
        /// <summary>
        /// Sets the outgoing edge, this incoming edge is the backward version for.
        /// </summary>
        /// <param name="mySourceVertexType">A vertex type pre-definition.</param>
        /// <param name="myOutgoingEdgeName">The name of the IncomingEdge on the vertex type.</param>
        /// <returns>The reference of the current object. (fluent interface).</returns>
        private IncomingEdgePredefinition SetOutgoingEdge(VertexTypePredefinition mySourceVertexType,
                                                          String myOutgoingEdgeName)
        {
            if (mySourceVertexType != null && myOutgoingEdgeName != null)
            {
                AttributeType = Combine(mySourceVertexType.TypeName, myOutgoingEdgeName);
            }

            return(this);
        }
 /// <summary>
 /// Creates an instance of OutgoingEdgeNotFoundException.
 /// </summary>
 /// <param name="myPredefinition">
 /// The predefinition, that contains the incoming edge.
 /// </param>
 /// <param name="myIncomingEdge">
 /// The incoming edge that causes the exception.
 /// </param>
 public OutgoingEdgeNotFoundException(VertexTypePredefinition myPredefinition, IncomingEdgePredefinition myIncomingEdge, Exception innerException = null) : base(innerException)
 {
     Predefinition = myPredefinition;
     IncomingEdge = myIncomingEdge;
     _msg = string.Format("Vertextype {0} defines an incoming edge on a nonexisting outgoing edge ({1}).", myPredefinition.TypeName, myIncomingEdge.AttributeType);
 }
 /// <summary>
 /// Creates a definition for an outgoing edge.
 /// </summary>
 /// <param name="myEdgeName">The name of the edge</param>
 /// <param name="myTypePredefinition">The type of the edges source and target</param>
 public OutgoingEdgePredefinition(String myEdgeName, VertexTypePredefinition myTypePredefinition)
     : base(myEdgeName, (myTypePredefinition == null) ? "" : myTypePredefinition.TypeName)
 {
     EdgeType     = Edge;
     Multiplicity = EdgeMultiplicity.SingleEdge;
 }
示例#10
0
 /// <summary>
 /// Creates a definition for an outgoing edge.
 /// </summary>
 /// <param name="myEdgeName">The name of the edge</param>
 /// <param name="myTypePredefinition">The type of the edges source and target</param>
 public OutgoingEdgePredefinition(String myEdgeName, VertexTypePredefinition myTypePredefinition)
     : base(myEdgeName, (myTypePredefinition == null) ? "" : myTypePredefinition.TypeName)
 {
     EdgeType = Edge;
     Multiplicity = EdgeMultiplicity.SingleEdge;
 }
示例#11
0
        /// <summary>
        /// Sets the type of this outgoing edge with a VertexTypePredefinition.
        /// </summary>
        /// <param name="myTargetVertexType">The target vertex type predefinition</param>
        /// <returns>The reference of the current object. (fluent interface).</returns>
        public OutgoingEdgePredefinition SetAttributeType(VertexTypePredefinition myTargetVertexType)
        {
            if (myTargetVertexType != null)
                AttributeType = myTargetVertexType.TypeName;

            return this;
        }