/// <summary> /// Sets the outgoing edge, this incoming edge is the backward version for. /// </summary> /// <param name="myVertexType">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> public IncomingEdgePredefinition SetOutgoingEdge(VertexTypePredefinition myVertexType, String myOutgoingEdgeName) { if (myVertexType != null && myOutgoingEdgeName != null) AttributeType = Combine(myVertexType.VertexTypeName, myOutgoingEdgeName); return this; }
/// <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 vertex type {2}.", String.Join(",", myEdges), myPredefinition.VertexTypeName, myTargetVertexTypeName); }
/// <summary> /// Creates a new request that creates a new vertex type inside the Graphdb /// </summary> /// <param name="myVertexTypeDefinition">Describes the vertex that is going to be created</param> public RequestCreateVertexType(VertexTypePredefinition myVertexTypeDefinition) { VertexTypeDefinition = myVertexTypeDefinition; }
/// <summary> /// Creates an instance of EmptyEdgeTypeException. /// </summary> /// <param name="myPredefinition">The predefinition that causes the exception.</param> public EmptyEdgeTypeException(VertexTypePredefinition myPredefinition, String myOutgoingEdgeName) { Predefinition = myPredefinition; PropertyName = myOutgoingEdgeName; _msg = string.Format("The outgoing edge {0} on vertex type {1} is empty.",myOutgoingEdgeName, myPredefinition.VertexTypeName); }
/// <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) { Predefinition = myPredefinition; IncomingEdge = myIncomingEdge; _msg = string.Format("Vertextype {0} defines an incoming edge on a nonexisting outgoing edge ({1}).", myPredefinition.VertexTypeName, myIncomingEdge.AttributeType); }
public UnknownPropertyTypeException(VertexTypePredefinition myVertexTypeDefinition, string myPropertyName) { this.Predefinition = myVertexTypeDefinition; this.PropertyName = myPropertyName; _msg = string.Format("The property {0} on vertex type {1} has an unknown type.", myPropertyName, myVertexTypeDefinition.VertexTypeName); }
/// <summary> /// Creates a new instance of DuplicatedVertexTypeNameException. /// </summary> /// <param name="VertexTypeName">The name of the vertex type, that is tried to be added multiple times.</param> public DuplicatedAttributeNameException(VertexTypePredefinition myVertexTypePredefinition, String myVertexTypeName) { Predefinition = myVertexTypePredefinition; DuplicatedName = myVertexTypeName; _msg = string.Format("The attribute {0} was declared multiple times on vertex type {1}.", DuplicatedName, Predefinition.VertexTypeName); }
public UselessVertexTypeException(Request.VertexTypePredefinition predef) { this.VertexType = predef; _msg = string.Format("Vertex type [{0}] is marked sealed and abstract. This makes this type useless.", predef.VertexTypeName); }