/// <summary> /// Generates an incoming edge attribute /// </summary> /// <param name="aIncomingEdge">The incoming edge definition by the gql</param> /// <returns>An incoming edge predefinition</returns> private IncomingEdgePredefinition GenerateAIncomingEdge(IncomingEdgeDefinition aIncomingEdge) { IncomingEdgePredefinition result = new IncomingEdgePredefinition(aIncomingEdge.AttributeName, aIncomingEdge.TypeName, aIncomingEdge.TypeAttributeName); return(result); }
public IncomingEdgePredefinition ToIncomingEdgePredefinition() { IncomingEdgePredefinition IncomingEdgePredef = new IncomingEdgePredefinition(this.AttributeName,this.AttributeType,this.OutgoingEdgeName); if(this.Comment != null) IncomingEdgePredef.SetComment(this.Comment); return IncomingEdgePredef; }
/// <summary> /// Adds a incoming edge. /// </summary> /// <param name="myIncomingEdgePredefinition">The definition of the incoming edge.</param> /// <returns>The reference of the current object. (fluent interface).</returns> public RequestAlterVertexType AddIncomingEdge(IncomingEdgePredefinition myIncomingEdgePredefinition) { if (myIncomingEdgePredefinition != null) { _toBeAddedAttributes = (_toBeAddedAttributes) ?? new List <AAttributePredefinition>(); _toBeAddedAttributes.Add(myIncomingEdgePredefinition); AddIncomingEdgeCount++; } return(this); }
public IncomingEdgePredefinition ToIncomingEdgePredefinition() { IncomingEdgePredefinition IncomingEdgePredef = new IncomingEdgePredefinition(this.AttributeName, this.AttributeType, this.OutgoingEdgeName); if (this.Comment != null) { IncomingEdgePredef.SetComment(this.Comment); } return(IncomingEdgePredef); }
/// <summary> /// Converts the given unknown attribute predefinition to an incoming edge predfeinition. /// </summary> /// <param name="unknown">The unknown attribute predegfinition.</param> /// <returns>The created incoming edge predefinition.</returns> private static IncomingEdgePredefinition ConvertUnknownToIncomingEdge(UnknownAttributePredefinition unknown) { if (unknown.DefaultValue != null) { throw new Exception("A default value is not allowed on an incoming edge."); } if (unknown.EdgeType != null) { throw new Exception("An edge type is not allowed on an incoming edge."); } if (unknown.Multiplicity != null) { throw new Exception("A multiplicity is not allowed on an incoming edge."); } var prop = new IncomingEdgePredefinition(unknown.AttributeType, GetTargetVertexTypeFromAttributeType(unknown.AttributeType), GetTargetEdgeNameFromAttributeType(unknown.AttributeType)) .SetComment(unknown.Comment); return(prop); }
/// <summary> /// Generates an incoming edge attribute /// </summary> /// <param name="aIncomingEdge">The incoming edge definition by the gql</param> /// <returns>An incoming edge predefinition</returns> private IncomingEdgePredefinition GenerateAIncomingEdge(IncomingEdgeDefinition aIncomingEdge) { IncomingEdgePredefinition result = new IncomingEdgePredefinition(aIncomingEdge.AttributeName, aIncomingEdge.TypeName, aIncomingEdge.TypeAttributeName); return result; }
/// <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> /// Adds a incoming edge. /// </summary> /// <param name="myIncomingEdgePredefinition">The definition of the incoming edge.</param> /// <returns>The reference of the current object. (fluent interface).</returns> public RequestAlterVertexType AddIncomingEdge(IncomingEdgePredefinition myIncomingEdgePredefinition) { if (myIncomingEdgePredefinition != null) { _toBeAddedAttributes = (_toBeAddedAttributes) ?? new List<AAttributePredefinition>(); _toBeAddedAttributes.Add(myIncomingEdgePredefinition); AddIncomingEdgeCount++; } return this; }
internal ServiceIncomingEdgePredefinition(IncomingEdgePredefinition myIncomingEdgePredefinition) : base(myIncomingEdgePredefinition) { this.OutgoingEdgeName = myIncomingEdgePredefinition.AttributeType.Substring(myIncomingEdgePredefinition.AttributeType.IndexOf(IncomingEdgePredefinition.TypeSeparator) + 1); }
private static IncomingEdgePredefinition ConvertUnknownToIncomingEdge(UnknownAttributePredefinition unknown) { if (unknown.DefaultValue != null) throw new Exception("A default value is not allowed on an incoming edge."); if (unknown.EdgeType != null) throw new Exception("An edge type is not allowed on an incoming edge."); if (unknown.Multiplicity != null) throw new Exception("A multiplicity is not allowed on an incoming edge."); var prop = new IncomingEdgePredefinition(unknown.AttributeType) .SetComment(unknown.Comment) .SetOutgoingEdge(GetTargetVertexTypeFromAttributeType(unknown.AttributeType), GetTargetEdgeNameFromAttributeType(unknown.AttributeType)); return prop; }