public bool IsSealed(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexType myServiceVertexType) { var Request = ServiceRequestFactory.MakeRequestGetVertexType(myServiceVertexType.Name); var Response = this.GraphDS.GetVertexType <IVertexType>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexType); return(Response.IsSealed); }
public void DropIndex(SecurityToken mySecurityToken, Int64 myTransactionToken, ServiceVertexType myVertexType, String myIndexName, String myEdition) { var Request = ServiceRequestFactory.MakeRequestDropIndex(myVertexType, myIndexName, myEdition); var Response = this.GraphDS.DropIndex(mySecurityToken, myTransactionToken, Request, ServiceReturnConverter.ConverteToVoid); }
public bool HasProperties(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexType myServiceVertexType, bool myIncludeAncestorDefinitions) { var Request = ServiceRequestFactory.MakeRequestGetVertexType(myServiceVertexType.Name); var Response = this.GraphDS.GetVertexType <IVertexType>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexType); return(Response.HasProperties(myIncludeAncestorDefinitions)); }
public bool HasProperty(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexType myServiceVertexType, string myPropertyName) { var Request = ServiceRequestFactory.MakeRequestGetVertexType(myServiceVertexType.Name); var Response = this.GraphDS.GetVertexType <IVertexType>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexType); return(Response.HasProperty(myPropertyName)); }
public ServiceVertexInstance GetVertex(SecurityToken mySecurityToken, Int64 myTransactionToken, ServiceVertexType myVertexType, Int64 myVertexID) { var Request = ServiceRequestFactory.MakeRequestGetVertex(myVertexType, myVertexID); var Response = this.GraphDS.GetVertex <IVertex>(mySecurityToken, myTransactionToken, Request, ServiceReturnConverter.ConvertOnlyVertexInstance); return(new ServiceVertexInstance(Response)); }
public ServiceVertexType AlterVertexType(SecurityToken mySecurityToken, Int64 myTransactionToken, ServiceVertexType myVertexType, ServiceAlterVertexChangeset myChangeset) { var Request = ServiceRequestFactory.MakeRequestAlterVertexType(myVertexType, myChangeset); var Response = this.GraphDS.AlterVertexType <IVertexType>(mySecurityToken, myTransactionToken, Request, ServiceReturnConverter.ConvertOnlyVertexType); return(new ServiceVertexType(Response)); }
public Tuple <IEnumerable <IComparable>, IEnumerable <IComparable> > Delete(SecurityToken mySecurityToken, Int64 myTransactionToken, ServiceVertexType myVertexType, IEnumerable <Int64> myVertexIDs = null, ServiceDeletePayload myDeletePayload = null) { var Request = ServiceRequestFactory.MakeRequestDelete(myVertexType, myVertexIDs, myDeletePayload); var Result = this.GraphDS.Delete <Tuple <IEnumerable <IComparable>, IEnumerable <IComparable> > >(mySecurityToken, myTransactionToken, Request, ServiceReturnConverter.ConverteAllLists); return(Result); }
public Dictionary <Int64, String> DropVertexType(SecurityToken mySecurityToken, Int64 myTransactionToken, ServiceVertexType myVertexType) { var Request = ServiceRequestFactory.MakeRequestDropVertexType(myVertexType); var Response = this.GraphDS.DropVertexType <Dictionary <Int64, String> >(mySecurityToken, myTransactionToken, Request, ServiceReturnConverter.ConverteOnlyDeletedTypeIDs); return(Response); }
public bool IsDescendant(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexType myServiceVertexType, ServiceVertexType myOtherType) { var Request = ServiceRequestFactory.MakeRequestGetVertexType(myOtherType.Name); var BaseType = this.GraphDS.GetVertexType <IVertexType>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexType); Request = ServiceRequestFactory.MakeRequestGetVertexType(myServiceVertexType.Name); var Response = this.GraphDS.GetVertexType <IVertexType>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexType); return(Response.IsDescendant(BaseType)); }
public static ServiceBaseType ToServiceBaseType(IBaseType myBaseType) { ServiceBaseType svcBaseType = null; if (myBaseType is IVertexType) { svcBaseType = new ServiceVertexType((IVertexType)myBaseType); } else if (myBaseType is IEdgeType) { svcBaseType = new ServiceEdgeType((IEdgeType)myBaseType); } return(svcBaseType); }
public static RequestDelete MakeRequestDelete(ServiceVertexType myVertexType, IEnumerable <Int64> myVertexIDs = null, ServiceDeletePayload myDeletePayload = null) { RequestGetVertices PreRequest = null; if (myVertexIDs != null) { PreRequest = new RequestGetVertices(myVertexType.Name, myVertexIDs); } else { PreRequest = new RequestGetVertices(myVertexType.Name); } RequestDelete Request = new RequestDelete(PreRequest); if (myDeletePayload != null) { foreach (var toDel in myDeletePayload.ToBeDeletedAttributes) { Request.AddAttribute(toDel); } } return(Request); }
internal RemoteVertexType(ServiceVertexType myVertexType, IServiceToken myServiceToken) : base(myVertexType, myServiceToken) { _IsAbstract = myVertexType.IsAbstract; }
public static RequestAlterVertexType MakeRequestAlterVertexType(ServiceVertexType myVertexType, ServiceAlterVertexChangeset myChangeset) { var Request = new RequestAlterVertexType(myVertexType.Name); #region Add Attributes if (myChangeset.ToBeAddedProperties != null) { foreach (var toAdd in myChangeset.ToBeAddedProperties) { Request.AddProperty(toAdd.ToPropertyPredefinition()); } } if (myChangeset.ToBeAddedIncomingEdges != null) { foreach (var toAdd in myChangeset.ToBeAddedIncomingEdges) { Request.AddIncomingEdge(toAdd.ToIncomingEdgePredefinition()); } } if (myChangeset.ToBeAddedOutgoingEdges != null) { foreach (var toAdd in myChangeset.ToBeAddedOutgoingEdges) { Request.AddOutgoingEdge(toAdd.ToOutgoingEdgePredefinition()); } } if (myChangeset.ToBeAddedUniques != null) { foreach (var toAdd in myChangeset.ToBeAddedUniques) { Request.AddUnique(toAdd.ToUniquePredefinition()); } } if (myChangeset.ToBeAddedMandatories != null) { foreach (var toAdd in myChangeset.ToBeAddedMandatories) { Request.AddMandatory(toAdd.ToMandatoryPredefinition()); } } if (myChangeset.ToBeAddedIndices != null) { foreach (var toAdd in myChangeset.ToBeAddedIndices) { Request.AddIndex(toAdd.ToIndexPredefinition()); } } #endregion #region Remove Attributes if (myChangeset.ToBeRemovedProperties != null) { foreach (var toDel in myChangeset.ToBeRemovedProperties) { Request.RemoveProperty(toDel); } } if (myChangeset.ToBeRemovedIncomingEdges != null) { foreach (var toDel in myChangeset.ToBeRemovedIncomingEdges) { Request.RemoveIncomingEdge(toDel); } } if (myChangeset.ToBeRemovedOutgoingEdges != null) { foreach (var toDel in myChangeset.ToBeRemovedOutgoingEdges) { Request.RemoveOutgoingEdge(toDel); } } if (myChangeset.ToBeRemovedUniques != null) { foreach (var toDel in myChangeset.ToBeRemovedUniques) { Request.RemoveUnique(toDel); } } if (myChangeset.ToBeRemovedMandatories != null) { foreach (var toDel in myChangeset.ToBeRemovedMandatories) { Request.RemoveMandatory(toDel); } } if (myChangeset.ToBeRemovedIndices != null) { foreach (var toDel in myChangeset.ToBeRemovedIndices) { Request.RemoveIndex(toDel.Key, toDel.Value); } } #endregion #region define / undefine if (myChangeset.ToBeDefinedAttributes != null) { foreach (var toDefine in myChangeset.ToBeDefinedAttributes) { Request.DefineAttribute(toDefine.ToUnknownAttributePredefinition()); } } if (myChangeset.ToBeUndefinedAttributes != null) { foreach (var toUndefine in myChangeset.ToBeUndefinedAttributes) { Request.UndefineAttribute(toUndefine); } } #endregion #region Rename Task if (myChangeset.ToBeRenamedProperties != null) { foreach (var toRename in myChangeset.ToBeRenamedProperties) { Request.RenameAttribute(toRename.Key, toRename.Value); } } #endregion if (myChangeset.Comment != null) { Request.SetComment(myChangeset.Comment); } if (myChangeset.NewTypeName != null) { Request.RenameType(myChangeset.NewTypeName); } //todo add unknown attribute return(Request); }
public static RequestGetVertexCount MakeRequestGetVertexCount(ServiceVertexType myVertexTypeName) { return(new RequestGetVertexCount(myVertexTypeName.Name)); }
public static RequestGetVertex MakeRequestGetVertex(ServiceVertexType myVertexType, Int64 myVertexID, String myEdition = null) { return(new RequestGetVertex(myVertexType.Name, myVertexID, myEdition)); }
public static RequestDropVertexType MakeRequestDropVertexType(ServiceVertexType myVertexType) { RequestDropVertexType Request = new RequestDropVertexType(myVertexType.Name); return(Request); }
public static RequestDropIndex MakeRequestDropIndex(ServiceVertexType myVertexType, String myIndexName, String myEdition) { RequestDropIndex Request = new RequestDropIndex(myVertexType.Name, myIndexName, myEdition); return(Request); }
public List <ServiceVertexInstance> GetVertices(SecurityToken mySecurityToken, Int64 myTransactionToken, ServiceVertexType myVertexType) { RequestGetVertices Request; if (myVertexType.Name == null) { Request = ServiceRequestFactory.MakeRequestGetVertices(myVertexType.ID); } else { Request = ServiceRequestFactory.MakeRequestGetVertices(myVertexType.Name); } var Response = this.GraphDS.GetVertices <IEnumerable <IVertex> >(mySecurityToken, myTransactionToken, Request, ServiceReturnConverter.ConvertOnlyVertices); return(Response.Select(x => new ServiceVertexInstance(x)).ToList()); }
public ServiceAttributeDefinition GetAttributeDefinitionByID(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexType myServiceVertexType, long myAttributeID) { var Request = ServiceRequestFactory.MakeRequestGetVertexType(myServiceVertexType.Name); var Response = this.GraphDS.GetVertexType <IVertexType>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexType); return(ConvertHelper.ToServiceAttributeDefinition(Response.GetAttributeDefinition(myAttributeID))); }
public UInt64 GetVertexCount(SecurityToken mySecurityToken, Int64 myTransactionToken, ServiceVertexType myVertexType) { var Request = ServiceRequestFactory.MakeRequestGetVertexCount(myVertexType); var Response = this.GraphDS.GetVertexCount <UInt64>(mySecurityToken, myTransactionToken, Request, ServiceReturnConverter.ConvertOnlyCount); return(Response); }
public ServiceIncomingEdgeDefinition GetIncomingEdgeDefinition(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexType myServiceVertexType, string myEdgeName) { var Request = ServiceRequestFactory.MakeRequestGetVertexType(myServiceVertexType.Name); var Response = this.GraphDS.GetVertexType <IVertexType>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexType); return(new ServiceIncomingEdgeDefinition(Response.GetIncomingEdgeDefinition(myEdgeName))); }
public ServiceOutgoingEdgeDefinition GetOutgoingEdgeDefinition(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexType myServiceVertexType, string myEdgeName) { var Request = ServiceRequestFactory.MakeRequestGetVertexType(myServiceVertexType.Name); var Response = this.GraphDS.GetVertexType <IVertexType>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexType); var value = Response.GetOutgoingEdgeDefinition(myEdgeName); if (value != null) { return(new ServiceOutgoingEdgeDefinition(value)); } return(null); }
public List <ServiceIndexDefinition> GetIndexDefinitions(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexType myServiceVertexType, bool myIncludeAncestorDefinitions) { var Request = ServiceRequestFactory.MakeRequestGetVertexType(myServiceVertexType.Name); var Response = this.GraphDS.GetVertexType <IVertexType>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexType); return(Response.GetIndexDefinitions(myIncludeAncestorDefinitions).Select(x => new ServiceIndexDefinition(x)).ToList()); }
public List <ServiceVertexType> ChildrenVertexTypes(SecurityToken mySecurityToken, Int64 myTransToken, ServiceVertexType myServiceVertexType) { var Request = ServiceRequestFactory.MakeRequestGetVertexType(myServiceVertexType.Name); var Response = this.GraphDS.GetVertexType <IVertexType>(mySecurityToken, myTransToken, Request, ServiceReturnConverter.ConvertOnlyVertexType); return(Response.ChildrenVertexTypes.Select(x => new ServiceVertexType(x)).ToList()); }