/// <summary> /// Creates a new comparative operator /// </summary> /// <param name="myProperty">The interesting property</param> /// <param name="myConstant">The constant value</param> /// <param name="myIsLongrunning">Determines whether it is anticipated that the request could take longer</param> /// <param name="mySecurityToken">The current security token</param> /// <param name="myTransactionToken">The current transaction token</param> /// <param name="myVertexStore">The vertex store that is needed to load the vertices</param> protected AComparativeOperator(QueryPlanProperty myProperty, ILiteralExpression myConstant, Boolean myIsLongrunning, SecurityToken mySecurityToken, Int64 myTransactionToken, IVertexStore myVertexStore) { _property = myProperty; _constant = myConstant; _isLongrunning = myIsLongrunning; _vertexStore = myVertexStore; _securityToken = mySecurityToken; _transactionToken = myTransactionToken; }
/// <summary> /// Creates a new meta manager /// </summary> /// <param name="myVertexStore">The vertex store on which all other manager rely on</param> /// <param name="myPlugins">The plugin definitions</param> /// <param name="myPluginManager">Used to load pluginable manager</param> /// <param name="myApplicationSettings">The current application settings</param> private MetaManager(IVertexStore myVertexStore, IDManager myIDManager, GraphDBPluginManager myPluginManager, GraphDBPlugins myPlugins, GraphApplicationSettings myApplicationSettings) { _vertexStore = myVertexStore; _vertexTypeManager = new VertexTypeManager(myIDManager); _vertexManager = new VertexManager(myIDManager); _edgeTypeManager = new EdgeTypeManager(myIDManager); _queryPlanManager = new QueryPlanManager(); _indexManager = new IndexManager(myIDManager, myPluginManager, myApplicationSettings, myPlugins.IndexPlugins); _baseTypeManager = new BaseTypeManager(); _baseGraphStorageManager = new BaseGraphStorageManager(); _pluginManager = myPluginManager; }
private void AddAttribute(IVertexStore myStore, Int64 myCreationDate) { #region Attribute vertex _storageManager.StoreVertexType(myStore, _Attribute, BaseTypes.Attribute, "AttributeComment", myCreationDate, true, false, false, _Vertex, null, _security, _transaction); #endregion #region Property vertices _storageManager.StoreProperty(myStore, _AttributeDotIsUserDefined, "IsUserDefined", "IsUserDefinedComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Attribute, _BaseTypeBoolean, _security, _transaction); _storageManager.StoreProperty(myStore, _AttributeDotName, "Name", "NameComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Attribute, _BaseTypeString, _security, _transaction); _storageManager.StoreOutgoingEdge(myStore, _AttributeDotDefiningType, "DefiningType", "DefiningTypeComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _Attribute, _Edge, null, _BaseType, _security, _transaction); #endregion }
private void AddVertexType(IVertexStore myStore, Int64 myCreationDate) { #region VertexType vertex _storageManager.StoreVertexType(myStore, _VertexType, BaseTypes.VertexType, "VertexTypeComment", myCreationDate, false, true, false, _BaseType, new[] { _BaseUniqueIndexVertexTypeDotName }, _security, _transaction); #endregion #region Property vertices _storageManager.StoreOutgoingEdge(myStore, _VertexTypeDotParent, "Parent", "ParentVertexTypeComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _VertexType, _Edge, null, _VertexType, _security, _transaction); _storageManager.StoreOutgoingEdge(myStore, _VertexTypeDotUniqueDefinitions, "UniquenessDefinitions", "UniqueDefinitionsComment", false, myCreationDate, EdgeMultiplicity.MultiEdge, _VertexType, _Edge, _Edge, _Index, _security, _transaction); _storageManager.StoreIncomingEdge(myStore, _VertexTypeDotChildren, "Children", "ChildrenVertexTypeComment", false, myCreationDate, _VertexType, _VertexTypeDotParent, _security, _transaction); _storageManager.StoreIncomingEdge(myStore, _VertexTypeDotIndices, "Indices", "IndicesComment", false, myCreationDate, _VertexType, _IndexDotDefiningVertexType, _security, _transaction); #endregion }
public void StoreOutgoingEdge( IVertexStore myStore, VertexInformation myVertex, String myName, String myComment, bool myIsUserDefined, Int64 myCreationDate, EdgeMultiplicity myMultiplicity, VertexInformation myDefiningType, VertexInformation myEdgeType, VertexInformation?myInnerEdgeType, //not mandatory, might be null VertexInformation myTarget, SecurityToken mySecurity, Int64 myTransaction) { var singleEdges = new Dictionary <Tuple <long, long>, VertexInformation> { { _EdgeAttributeDotDefiningType, myDefiningType }, { _EdgeOutgoingEdgeDotSource, myDefiningType }, { _EdgeOutgoingEdgeDotEdgeType, myEdgeType }, { _EdgeOutgoingEdgeDotTarget, myTarget } }; if (myMultiplicity == EdgeMultiplicity.MultiEdge) { singleEdges.Add(_EdgeOutgoingEdgeDotInnerEdgeType, myInnerEdgeType.Value); } Store( myStore, myVertex, myComment, myCreationDate, singleEdges, null, new Dictionary <long, IComparable> { { (long)AttributeDefinitions.AttributeDotName, myName }, { (long)AttributeDefinitions.AttributeDotIsUserDefined, myIsUserDefined }, { (long)AttributeDefinitions.OutgoingEdgeDotMultiplicity, (byte)myMultiplicity }, }, null, mySecurity, myTransaction ); }
/// <summary> /// Creates a new queryplan that processes a in range operation using indices /// </summary> /// <param name="mySecurityToken">The current security token</param> /// <param name="myTransactionToken">The current transaction token</param> /// <param name="myProperty">The interesting property</param> /// <param name="myConstant">The constant value</param> /// <param name="myVertexStore">The vertex store that is needed to load the vertices</param> /// <param name="myIsLongrunning">Determines whether it is anticipated that the request could take longer</param> /// <param name="myExpressionIndex">The index name which is used for resolving the expression</param> public QueryPlanInRangeWithIndex(SecurityToken mySecurityToken, Int64 myTransactionToken, QueryPlanProperty myProperty, RangeLiteralExpression myConstant, IVertexStore myVertexStore, Boolean myIsLongrunning, IIndexManager myIndexManager, String myExpressionIndex = null) { _securityToken = mySecurityToken; _transactionToken = myTransactionToken; _property = myProperty; _constant = myConstant; _vertexStore = myVertexStore; _isLongrunning = myIsLongrunning; _expressionIndex = myExpressionIndex; }
/// <summary> /// Creates a new queryplan that processes a less or equals than operation using indices /// </summary> /// <param name="mySecurityToken">The current security token</param> /// <param name="myTransactionToken">The current transaction token</param> /// <param name="myProperty">The interesting property</param> /// <param name="myConstant">The constant value</param> /// <param name="myVertexStore">The vertex store that is needed to load the vertices</param> /// <param name="myIsLongrunning">Determines whether it is anticipated that the request could take longer</param> /// <param name="myExpressionIndex">The name of the index which is used to resolve the expression</param> public QueryPlanLessOrEqualsThanWithIndex(SecurityToken mySecurityToken, Int64 myTransactionToken, QueryPlanProperty myProperty, ILiteralExpression myConstant, IVertexStore myVertexStore, Boolean myIsLongrunning, IIndexManager myIndexManager, String myExpressionIndex = null) : base(myProperty, myConstant, myIsLongrunning, mySecurityToken, myTransactionToken, myIndexManager, myVertexStore, myExpressionIndex) { }
private void AddBasicTypes(IVertexStore myStore, long myCreationDate) { _storageManager.StoreBasicType(myStore, _BaseTypeBoolean, "Boolean", false, "BaseTypeBooleanComment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeByte, "Byte", false, "BaseTypeByteComment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeChar, "Char", false, "BaseTypeCharComment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeDateTime, "DateTime", false, "BaseTypeDateTimeComment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeDouble, "Double", false, "BaseTypeDoubleComment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeInt16, "Int16", false, "BaseTypeInt16Comment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeInt32, "Int32", false, "BaseTypeInt32Comment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeInt64, "Int64", false, "BaseTypeInt64Comment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeSByte, "SByte", false, "BaseTypeSByteComment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeSingle, "Single", false, "BaseTypeSingleComment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeString, "String", false, "BaseTypeStringComment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeTimeSpan, "TimeSpan", false, "BaseTypeTimeSpanComment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeUInt16, "UInt16", false, "BaseTypeUInt16Comment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeUInt32, "UInt32", false, "BaseTypeUInt32Comment", myCreationDate, _security, _transaction); _storageManager.StoreBasicType(myStore, _BaseTypeUInt64, "UInt64", false, "BaseTypeUInt64Comment", myCreationDate, _security, _transaction); }
/// <summary> /// Creates a new comparative index operator /// </summary> /// <param name="myProperty">The interesting property</param> /// <param name="myConstant">The constant value</param> /// <param name="myIsLongrunning">Determines whether it is anticipated that the request could take longer</param> /// <param name="mySecurityToken">The current security token</param> /// <param name="myTransactionToken">The current transaction token</param> /// <param name="myIndexManager">The index manager is needed to get the property related indices</param> /// <param name="myVertexStore">The vertex store that is needed to load the vertices</param> protected AComparativeIndexOperator(QueryPlanProperty myProperty, ILiteralExpression myConstant, Boolean myIsLongrunning, SecurityToken mySecurityToken, Int64 myTransactionToken, IIndexManager myIndexManager, IVertexStore myVertexStore, String myExpressionIndex = null) { _property = myProperty; _constant = myConstant; _isLongrunning = myIsLongrunning; _vertexStore = myVertexStore; _indexManager = myIndexManager; _securityToken = mySecurityToken; _transactionToken = myTransactionToken; _expressionIndex = myExpressionIndex; }
/// <summary> /// Creates a new queryplan that processes an GreaterOrEquals operation using indices /// </summary> /// <param name="mySecurityToken">The current security token</param> /// <param name="myTransactionToken">The current transaction token</param> /// <param name="myProperty">The interesting property</param> /// <param name="myConstant">The constant value</param> /// <param name="myVertexStore">The vertex store that is needed to load the vertices</param> /// <param name="myIsLongrunning">Determines whether it is anticipated that the request could take longer</param> public QueryPlanGreaterOrEqualsWithIndex(SecurityToken mySecurityToken, Int64 myTransactionToken, QueryPlanProperty myProperty, ILiteralExpression myConstant, IVertexStore myVertexStore, Boolean myIsLongrunning, IIndexManager myIndexManager, String myExpressionIndex = null) : base(myProperty, myConstant, myIsLongrunning, mySecurityToken, myTransactionToken, myIndexManager, myVertexStore, myExpressionIndex) { }
public void StoreProperty( IVertexStore myStore, VertexInformation myVertex, String myName, String myComment, Int64 myCreationDate, bool myIsMandatory, PropertyMultiplicity myMultiplicity, String myDefaultValue, bool myIsUserDefined, VertexInformation myDefiningType, VertexInformation myBasicType, SecurityToken mySecurity, Int64 myTransaction) { var props = new Dictionary <long, IComparable> { { (long)AttributeDefinitions.AttributeDotName, myName }, { (long)AttributeDefinitions.AttributeDotIsUserDefined, myIsUserDefined }, { (long)AttributeDefinitions.PropertyDotIsMandatory, myIsMandatory }, { (long)AttributeDefinitions.PropertyDotMultiplicity, (byte)myMultiplicity }, }; if (myDefaultValue != null) { props.Add((long)AttributeDefinitions.PropertyDotDefaultValue, myDefaultValue); } Store( myStore, myVertex, myComment, myCreationDate, new Dictionary <Tuple <long, long>, VertexInformation> { { _EdgeAttributeDotDefiningType, myDefiningType }, { _EdgePropertyDotBaseType, myBasicType }, }, null, props, null, mySecurity, myTransaction); }
private void AddBaseType(IVertexStore myStore, Int64 myCreationDate) { #region BaseType vertex _storageManager.StoreVertexType(myStore, _BaseType, BaseTypes.BaseType, "BaseTypeComment", myCreationDate, false, false, false, _Vertex, new[] { _BaseUniqueIndexBaseTypeDotName }, _security, _transaction); #endregion #region Property vertices _storageManager.StoreProperty(myStore, _BaseTypeDotName, "Name", "NameComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _BaseType, _BaseTypeString, _security, _transaction); _storageManager.StoreProperty(myStore, _BaseTypeDotIsUserDefined, "IsUserDefined", "IsUserDefinedComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _BaseType, _BaseTypeBoolean, _security, _transaction); _storageManager.StoreProperty(myStore, _BaseTypeDotIsAbstract, "IsAbstract", "IsAbstractComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _BaseType, _BaseTypeBoolean, _security, _transaction); _storageManager.StoreProperty(myStore, _BaseTypeDotIsSealed, "IsSealed", "IsSealedComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _BaseType, _BaseTypeBoolean, _security, _transaction); _storageManager.StoreProperty(myStore, _BaseTypeDotBehaviour, "Behaviour", "BehaviourComment", myCreationDate, false, PropertyMultiplicity.Single, null, false, _BaseType, _BaseTypeString, _security, _transaction); _storageManager.StoreIncomingEdge(myStore, _BaseTypeDotAttributes, "Attributes", "AttributesComment", false, myCreationDate, _BaseType, _AttributeDotDefiningType, _security, _transaction); #endregion }
private void AddOutgoingEdge(IVertexStore myStore, Int64 myCreationDate) { #region OutgoingEdge vertex _storageManager.StoreVertexType(myStore, _OutgoingEdge, BaseTypes.OutgoingEdge, "OutgoingEdgeComment", myCreationDate, false, true, false, _Attribute, null, _security, _transaction); #endregion #region Property vertices _storageManager.StoreIncomingEdge(myStore, _OutgoingEdgeDotRelatedIncomingEdges, "RelatedIncomingEdges", "RelatedIncomingEdgesComment", false, myCreationDate, _OutgoingEdge, _IncomingEdgeDotRelatedEdge, _security, _transaction); _storageManager.StoreProperty(myStore, _OutgoingEdgeDotMultiplicity, "Multiplicity", "EdgeMultiplicityComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _OutgoingEdge, _BaseTypeByte, _security, _transaction); _storageManager.StoreOutgoingEdge(myStore, _OutgoingEdgeDotEdgeType, "EdgeType", "EdgeTypeComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _OutgoingEdge, _Edge, null, _EdgeType, _security, _transaction); _storageManager.StoreOutgoingEdge(myStore, _OutgoingEdgeDotInnerEdgeType, "InnerEdgeType", "InnerEdgeTypeComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _OutgoingEdge, _Edge, null, _EdgeType, _security, _transaction); _storageManager.StoreOutgoingEdge(myStore, _OutgoingEdgeDotSource, "Source", "SourceComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _OutgoingEdge, _Edge, null, _VertexType, _security, _transaction); _storageManager.StoreOutgoingEdge(myStore, _OutgoingEdgeDotTarget, "Target", "TargetComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _OutgoingEdge, _Edge, null, _VertexType, _security, _transaction); #endregion }
public void AddUserDefinedDataTypes(IVertexStore myStore, AComponentPluginManager myPluginManager) { myStore.CheckNull("myStore"); var creationDate = DateTime.UtcNow.ToBinary(); List <AUserdefinedDataType> userdefinedDataTypePlugins = new List <AUserdefinedDataType>(); foreach (var plugin in myPluginManager.GetPluginsForType <AUserdefinedDataType>()) { userdefinedDataTypePlugins.Add((AUserdefinedDataType)plugin); } List <String> userdefinedTypes = new List <String>(); var maxValue = long.MinValue; foreach (var vertex in myStore.GetVerticesByTypeID(_security, _transaction, (long)BaseTypes.BaseType)) { if (vertex.GetProperty <Boolean>((long)AttributeDefinitions.BaseTypeDotIsUserDefined)) { if (!userdefinedDataTypePlugins.Any(item => item.TypeName == vertex.GetProperty <String>((long)AttributeDefinitions.BaseTypeDotName))) { throw new Exception(); } else { userdefinedTypes.Add(vertex.GetProperty <String>((long)AttributeDefinitions.BaseTypeDotName)); } } if (vertex.VertexID > maxValue) { maxValue = vertex.VertexID; } } maxValue++; foreach (var type in userdefinedDataTypePlugins.Select(item => item.TypeName).Except(userdefinedTypes)) { _storageManager.StoreBasicType(myStore, new VertexInformation((long)BaseTypes.BaseType, maxValue++), type, true, "UserdefinedType" + type, creationDate, _security, _transaction); } }
public IVertex StoreVertexType( IVertexStore myStore, VertexInformation myVertex, String myName, String myComment, Int64 myCreationDate, bool myIsAbstract, bool myIsSealed, bool myIsUserDefined, VertexInformation?myParent, IEnumerable <VertexInformation> myUniques, SecurityToken mySecurity, Int64 myTransaction) { return(Store( myStore, myVertex, myComment, myCreationDate, (myParent == null) ? null : new Dictionary <Tuple <long, long>, VertexInformation> { { _EdgeVertexTypeDotParent, myParent.Value }, }, myUniques == (null) ? null : new Dictionary <Tuple <long, long>, IEnumerable <Library.Commons.VertexStore.Definitions.VertexInformation> > { { _EdgeVertexTypeDotUniqueDefinitions, myUniques } }, new Dictionary <long, IComparable> { { (long)AttributeDefinitions.BaseTypeDotName, myName }, { (long)AttributeDefinitions.BaseTypeDotIsUserDefined, myIsUserDefined }, { (long)AttributeDefinitions.BaseTypeDotIsAbstract, myIsAbstract }, { (long)AttributeDefinitions.BaseTypeDotIsSealed, myIsSealed }, //{ (long) AttributeDefinitions.Behaviour, null }, }, null, mySecurity, myTransaction)); }
private void AddIndex(IVertexStore myStore, Int64 myCreationDate) { #region Index vertex _storageManager.StoreVertexType(myStore, _Index, BaseTypes.Index, "IndexComment", myCreationDate, false, true, false, _Vertex, new[] { _BaseUniqueIndexIndexDotName }, _security, _transaction); #endregion #region Property vertices _storageManager.StoreOutgoingEdge(myStore, _IndexDotIndexedProperties, "IndexedProperties", "IndexedPropertiesComment", false, myCreationDate, EdgeMultiplicity.MultiEdge, _Index, _Edge, _OrderableEdge, _Property, _security, _transaction); _storageManager.StoreOutgoingEdge(myStore, _IndexDotDefiningVertexType, "DefiningVertexType", "DefiningVertexTypeComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _Index, _Edge, null, _VertexType, _security, _transaction); _storageManager.StoreProperty(myStore, _IndexDotName, "Name", "NameComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Index, _BaseTypeString, _security, _transaction); _storageManager.StoreProperty(myStore, _IndexDotIsUserDefined, "IsUserDefined", "IsUserDefinedComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Index, _BaseTypeBoolean, _security, _transaction); _storageManager.StoreProperty(myStore, _IndexDotIndexClass, "IndexClass", "IndexClassComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Index, _BaseTypeString, _security, _transaction); _storageManager.StoreProperty(myStore, _IndexDotIsSingleValue, "IsSingleValue", "IsSingleValueComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Index, _BaseTypeBoolean, _security, _transaction); _storageManager.StoreProperty(myStore, _IndexDotIsRange, "IsRange", "IsRangeComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Index, _BaseTypeBoolean, _security, _transaction); _storageManager.StoreProperty(myStore, _IndexDotIsVersioned, "IsVersioned", "IsVersionedComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Index, _BaseTypeBoolean, _security, _transaction); #endregion }
private void AddVertex(IVertexStore myStore, Int64 myCreationDate) { #region Vertex vertex _storageManager.StoreVertexType(myStore, _Vertex, GlobalConstants.Vertex, "VertexComment", myCreationDate, true, false, false, null, null, _security, _transaction); #endregion #region Property vertices _storageManager.StoreProperty(myStore, _VertexDotVertexID, GlobalConstants.VertexDotVertexID, "VertexIDComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeInt64, _security, _transaction); _storageManager.StoreProperty(myStore, _VertexDotCreationDate, GlobalConstants.VertexDotCreationDate, "CreationDateComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeInt64, _security, _transaction); _storageManager.StoreProperty(myStore, _VertexDotModificationDate, GlobalConstants.VertexDotModificationDate, "ModificationDateComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeInt64, _security, _transaction); _storageManager.StoreProperty(myStore, _VertexDotRevision, GlobalConstants.VertexDotRevision, "RevisionComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeInt64, _security, _transaction); _storageManager.StoreProperty(myStore, _VertexDotEdition, GlobalConstants.VertexDotEdition, "EditionComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeString, _security, _transaction); _storageManager.StoreProperty(myStore, _VertexDotTypeName, GlobalConstants.VertexDotVertexTypeName, "TypeNameComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeString, _security, _transaction); _storageManager.StoreProperty(myStore, _VertexDotTypeID, GlobalConstants.VertexDotVertexTypeID, "TypeIDComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeInt64, _security, _transaction); _storageManager.StoreProperty(myStore, _VertexDotComment, GlobalConstants.VertexDotComment, "CommentComment", myCreationDate, false, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeString, _security, _transaction); #endregion }
private void AddWeightedEdge(IVertexStore myStore, Int64 myCreationDate) { #region WeightedEdge vertex _storageManager.StoreEdgeType(myStore, _WeightedEdge, "Weighted", "WeightedEdgeComment", myCreationDate, true, false, false, _Edge, _security, _transaction); #endregion #region Property vertices _storageManager.StoreProperty(myStore, _WeightedEdgeDotWeight, "Weight", "WeightedComment", myCreationDate, true, PropertyMultiplicity.Single, "0.0", false, _WeightedEdge, _BaseTypeDouble, _security, _transaction); #endregion }
private void AddOrderableEdge(IVertexStore myStore, long myCreationDate) { #region OrderableEdge vertex _storageManager.StoreEdgeType(myStore, _OrderableEdge, "Orderable", "OrderableEdgeEdgeComment", myCreationDate, true, false, false, _Edge, _security, _transaction); #endregion #region Property vertices _storageManager.StoreProperty(myStore, _OrderableEdgeDotOrder, "Order", "OrderComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _OrderableEdge, _BaseTypeUInt64, _security, _transaction); #endregion }
private void AddWeightedEdge(IVertexStore myStore, Int64 myCreationDate) { #region WeightedEdge vertex BaseGraphStorageManager.StoreEdgeType(myStore, _WeightedEdge, "Weighted", "WeightedEdgeComment", false, myCreationDate, false, true, _Edge, _security, _transaction); #endregion #region Property vertices BaseGraphStorageManager.StoreProperty(myStore, _WeightedEdgeDotWeight, "Weight", "WeightedComment", myCreationDate, true, PropertyMultiplicity.Single, "0.0", false, _WeightedEdge, _BaseTypeDouble, _security, _transaction); #endregion }
private void AddVertexTypes(IVertexStore myStore, Int64 myCreationDate) { AddVertex(myStore, myCreationDate); AddBaseType(myStore, myCreationDate); AddVertexType(myStore, myCreationDate); AddEdgeType(myStore, myCreationDate); AddAttribute(myStore, myCreationDate); AddOutgoingEdge(myStore, myCreationDate); AddIncomingEdge(myStore, myCreationDate); AddProperty(myStore, myCreationDate); AddBinaryProperty(myStore, myCreationDate); AddIndex(myStore, myCreationDate); }
private void AddVertexType(IVertexStore myStore, Int64 myCreationDate) { #region VertexType vertex BaseGraphStorageManager.StoreVertexType(myStore, _VertexType, BaseTypes.VertexType, "VertexTypeComment", myCreationDate, false, true, false, _BaseType, new[] {_BaseUniqueIndexVertexTypeDotName}, _security, _transaction); #endregion #region Property vertices BaseGraphStorageManager.StoreOutgoingEdge(myStore, _VertexTypeDotParent, "Parent", "ParentVertexTypeComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _VertexType, _Edge, null, _VertexType, _security, _transaction); BaseGraphStorageManager.StoreOutgoingEdge(myStore, _VertexTypeDotUniqueDefinitions, "UniquenessDefinitions", "UniqueDefinitionsComment", false, myCreationDate, EdgeMultiplicity.MultiEdge, _VertexType, _Edge, _Edge, _Index, _security, _transaction); BaseGraphStorageManager.StoreIncomingEdge(myStore, _VertexTypeDotChildren, "Children", "ChildrenVertexTypeComment", false, myCreationDate, _VertexType, _VertexTypeDotParent, _security, _transaction); BaseGraphStorageManager.StoreIncomingEdge(myStore, _VertexTypeDotIndices, "Indices", "IndicesComment", false, myCreationDate, _VertexType, _IndexDotDefiningVertexType, _security, _transaction); #endregion }
private void AddVertex(IVertexStore myStore, Int64 myCreationDate) { #region Vertex vertex BaseGraphStorageManager.StoreVertexType(myStore, _Vertex, GlobalConstants.Vertex, "VertexComment", myCreationDate, true, false, false, null, null, _security, _transaction); #endregion #region Property vertices BaseGraphStorageManager.StoreProperty(myStore, _VertexDotVertexID, GlobalConstants.VertexDotVertexID, "VertexIDComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeInt64, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _VertexDotCreationDate, GlobalConstants.VertexDotCreationDate, "CreationDateComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeInt64, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _VertexDotModificationDate, GlobalConstants.VertexDotModificationDate, "ModificationDateComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeInt64, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _VertexDotRevision, GlobalConstants.VertexDotRevision, "RevisionComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeInt64, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _VertexDotEdition, GlobalConstants.VertexDotEdition, "EditionComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeString, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _VertexDotTypeName, GlobalConstants.VertexDotVertexTypeName, "TypeNameComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeString, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _VertexDotTypeID, GlobalConstants.VertexDotVertexTypeID, "TypeIDComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeInt64, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _VertexDotComment, GlobalConstants.VertexDotComment, "CommentComment", myCreationDate, false, PropertyMultiplicity.Single, null, false, _Vertex, _BaseTypeString, _security, _transaction); #endregion }
/// <summary> /// Creates a new TransactionManager /// </summary> /// <param name="myVertexStore">The underlying vertex store</param> public BasicTransactionManager(IVertexStore myVertexStore) { Init(myVertexStore); }
private void AddEdgeTypes(IVertexStore myStore, Int64 myCreationDate) { AddEdge(myStore, myCreationDate); AddWeightedEdge(myStore, myCreationDate); AddOrderableEdge(myStore, myCreationDate); }
public static IVertex StoreVertexType( IVertexStore myStore, VertexInformation myVertex, BaseTypes myType, String myComment, Int64 myCreationDate, bool myIsAbstract, bool myIsSealed, bool myIsUserDefined, VertexInformation? myParent, IEnumerable<VertexInformation> myUniques, SecurityToken mySecurity, TransactionToken myTransaction) { return StoreVertexType(myStore, myVertex, myType.ToString(), myComment, myCreationDate, myIsAbstract, myIsSealed, myIsUserDefined, myParent, myUniques, mySecurity, myTransaction); }
public bool CheckBaseGraph(IVertexStore myVertexStore) { return(myVertexStore.GetVertex(_security, _transaction, (long)BaseTypes.VertexType, (long)BaseTypes.VertexType, String.Empty) != null); }
/// <summary> /// Creates a new queryplan that processes a in range operation without any index /// </summary> /// <param name="mySecurityToken">The current security token</param> /// <param name="myTransactionToken">The current transaction token</param> /// <param name="myProperty">The interesting property</param> /// <param name="myConstant">The constant value</param> /// <param name="myVertexStore">The vertex store that is needed to load the vertices</param> /// <param name="myIsLongrunning">Determines whether it is anticipated that the request could take longer</param> public QueryPlanInRangeWithoutIndex(SecurityToken mySecurityToken, Int64 myTransactionToken, QueryPlanProperty myProperty, RangeLiteralExpression myConstant, IVertexStore myVertexStore, Boolean myIsLongrunning) : base(myProperty, null, myIsLongrunning, mySecurityToken, myTransactionToken, myVertexStore) { _constantRange = myConstant; }
public static IVertex StoreBasicType( IVertexStore myStore, VertexInformation myVertex, String myName, bool myIsUserDefined, String myComment, Int64 myCreationDate, SecurityToken mySecurity, TransactionToken myTransaction) { return Store( myStore, myVertex, myComment, myCreationDate, null, null, new Dictionary<long, IComparable> { { (long) AttributeDefinitions.BaseTypeDotName, myName }, { (long) AttributeDefinitions.BaseTypeDotIsUserDefined, myIsUserDefined }, { (long) AttributeDefinitions.BaseTypeDotIsAbstract, false }, { (long) AttributeDefinitions.BaseTypeDotIsSealed, true }, //{ (long) AttributeDefinitions.Behaviour, null }, }, null, mySecurity, myTransaction); }
/// <summary> /// Creates a new TransactionManager /// </summary> /// <param name="myVertexStore">The underlying vertex store</param> public BasicTransactionManager(IVertexStore myVertexStore) { Init(myVertexStore); }
/// <summary> /// Creates a new queryplan that processes a less or equals than operation without any index /// </summary> /// <param name="mySecurityToken">The current security token</param> /// <param name="myTransactionToken">The current transaction token</param> /// <param name="myProperty">The interesting property</param> /// <param name="myConstant">The constant value</param> /// <param name="myVertexStore">The vertex store that is needed to load the vertices</param> /// <param name="myIsLongrunning">Determines whether it is anticipated that the request could take longer</param> public QueryPlanLessOrEqualsThanWithoutIndex(SecurityToken mySecurityToken, Int64 myTransactionToken, QueryPlanProperty myProperty, ILiteralExpression myConstant, IVertexStore myVertexStore, Boolean myIsLongrunning) : base(myProperty, myConstant, myIsLongrunning, mySecurityToken, myTransactionToken, myVertexStore) { }
public void Initialize(IMetaManager myMetaManager) { _vertexTypeManager = myMetaManager.VertexTypeManager; _vertexStore = myMetaManager.VertexStore; _baseStorageManager = myMetaManager.BaseGraphStorageManager; }
/// <summary> /// /// </summary> /// <param name="myStore"></param> /// <param name="myVertexID"></param> /// <param name="myVertexTypeID"></param> /// <param name="myEdition"></param> /// <param name="myComment"></param> /// <param name="myEdges"></param> /// <param name="myStructuredProperties"></param> /// <param name="myUnstructuredProperties"></param> private static IVertex Store( IVertexStore myStore, VertexInformation mySource, String myComment, Int64 myCreationDate, IDictionary<Tuple<Int64, Int64>, VertexInformation> mySingleEdges, IDictionary<Tuple<Int64, Int64>, IEnumerable<VertexInformation>> myHyperEdges, IDictionary<Int64, IComparable> myStructuredProperties, IDictionary<String, Object> myUnstructuredProperties, SecurityToken mySecurity, TransactionToken myTransaction) { VertexAddDefinition def = new VertexAddDefinition( mySource.VertexID, mySource.VertexTypeID, mySource.VertexEditionName, CreateHyperEdgeDefinitions(myHyperEdges, mySource, myCreationDate), CreateSingleEdgeDefinitions(mySingleEdges, mySource, myCreationDate), null, null, myComment, myCreationDate, myCreationDate, myStructuredProperties, myUnstructuredProperties); return myStore.AddVertex(mySecurity, myTransaction, def); }
private void AddIndices(IVertexStore myStore, Int64 myCreationDate) { #region Index _storageManager.StoreIndex(myStore, _BaseUniqueIndexIndexDotName, "IndexDotName", "IndexDotNameIndexComment", myCreationDate, null, //true, false, false, false, null, _Index, null, _IndexDotName.SingleEnumerable().ToList(), _security, _transaction); #endregion #region BaseType _storageManager.StoreIndex(myStore, _BaseUniqueIndexBaseTypeDotName, "BaseTypeDotName", "BaseTypeDotNameIndexComment", myCreationDate, null, //true, false, false, false, null, _BaseType, null, _BaseTypeDotName.SingleEnumerable().ToList(), _security, _transaction); _storageManager.StoreIndex(myStore, _BaseUniqueIndexVertexTypeDotName, "VertexTypeDotName", "VertexTypeDotNameIndexComment", myCreationDate, null, //true, false, false, false, null, _VertexType, _BaseUniqueIndexBaseTypeDotName, _BaseTypeDotName.SingleEnumerable().ToList(), _security, _transaction); _storageManager.StoreIndex(myStore, _BaseUniqueIndexEdgeTypeDotName, "EdgeTypeDotName", "EdgeTypeDotNameIndexComment", myCreationDate, null, //true, false, false, false, null, _EdgeType, _BaseUniqueIndexBaseTypeDotName, _BaseTypeDotName.SingleEnumerable().ToList(), _security, _transaction); #endregion }
/// <summary> /// Creates a new queryplan that processes a like operation without any index /// </summary> /// <param name="mySecurityToken">The current security token</param> /// <param name="myTransactionToken">The current transaction token</param> /// <param name="myProperty">The interesting property</param> /// <param name="myConstant">The constant value</param> /// <param name="myVertexStore">The vertex store that is needed to load the vertices</param> /// <param name="myIsLongrunning">Determines whether it is anticipated that the request could take longer</param> public QueryPlanLikeWithoutIndex(SecurityToken mySecurityToken, Int64 myTransactionToken, QueryPlanProperty myProperty, ILiteralExpression myConstant, IVertexStore myVertexStore, Boolean myIsLongrunning) : base(myProperty, myConstant, myIsLongrunning, mySecurityToken, myTransactionToken, myVertexStore) { }
public static void StoreIncomingEdge( IVertexStore myStore, VertexInformation myVertex, String myName, String myComment, bool myIsUserDefined, Int64 myCreationDate, VertexInformation myDefiningType, VertexInformation myRelatedIncomingEdge, SecurityToken mySecurity, TransactionToken myTransaction) { Store( myStore, myVertex, myComment, myCreationDate, new Dictionary<Tuple<long, long>, VertexInformation> { { _EdgeAttributeDotDefiningType, myDefiningType }, { _EdgeIncomingEdgeDotRelatedEdge, myRelatedIncomingEdge} }, null, new Dictionary<long, IComparable> { { (long) AttributeDefinitions.AttributeDotName, myName }, { (long) AttributeDefinitions.AttributeDotIsUserDefined, myIsUserDefined }, }, null, mySecurity, myTransaction); }
/// <summary> /// Creates a new comparative operator /// </summary> /// <param name="myProperty">The interesting property</param> /// <param name="myConstant">The constant value</param> /// <param name="myIsLongrunning">Determines whether it is anticipated that the request could take longer</param> /// <param name="mySecurityToken">The current security token</param> /// <param name="myTransactionToken">The current transaction token</param> /// <param name="myVertexStore">The vertex store that is needed to load the vertices</param> protected AComparativeOperator(QueryPlanProperty myProperty, ILiteralExpression myConstant, Boolean myIsLongrunning, SecurityToken mySecurityToken, Int64 myTransactionToken, IVertexStore myVertexStore) { _property = myProperty; _constant = myConstant; _isLongrunning = myIsLongrunning; _vertexStore = myVertexStore; _securityToken = mySecurityToken; _transactionToken = myTransactionToken; }
private void Init(IVertexStore myVertexStore) { _vertexStore = myVertexStore; }
public static void StoreOutgoingEdge( IVertexStore myStore, VertexInformation myVertex, String myName, String myComment, bool myIsUserDefined, Int64 myCreationDate, EdgeMultiplicity myMultiplicity, VertexInformation myDefiningType, VertexInformation myEdgeType, VertexInformation? myInnerEdgeType, //not mandatory, might be null VertexInformation myTarget, SecurityToken mySecurity, TransactionToken myTransaction) { var singleEdges = new Dictionary<Tuple<long, long>, VertexInformation> { { _EdgeAttributeDotDefiningType, myDefiningType }, { _EdgeOutgoingEdgeDotSource, myDefiningType }, { _EdgeOutgoingEdgeDotEdgeType, myEdgeType }, { _EdgeOutgoingEdgeDotTarget, myTarget } }; if (myMultiplicity == EdgeMultiplicity.MultiEdge) { singleEdges.Add(_EdgeOutgoingEdgeDotInnerEdgeType, myInnerEdgeType.Value); } Store( myStore, myVertex, myComment, myCreationDate, singleEdges, null, new Dictionary<long, IComparable> { { (long) AttributeDefinitions.AttributeDotName, myName }, { (long) AttributeDefinitions.AttributeDotIsUserDefined, myIsUserDefined }, { (long) AttributeDefinitions.OutgoingEdgeDotMultiplicity, (byte) myMultiplicity }, }, null, mySecurity, myTransaction ); }
void IManager.Initialize(IMetaManager myMetaManager) { _vertexTypeManager = myMetaManager.VertexTypeManager; _edgeTypeManager = myMetaManager.EdgeTypeManager; _vertexStore = myMetaManager.VertexStore; _indexManager = myMetaManager.IndexManager; }
/// <summary> /// Creates a new basic security manager /// </summary> /// <param name="myVertexStore">The underlying vertex store</param> public BasicSecurityManager(IVertexStore myVertexStore) { Init(myVertexStore); }
private void Init(IVertexStore myVertexStore) { _vertexStore = myVertexStore; }
private void AddEdgeType(IVertexStore myStore, Int64 myCreationDate) { #region EdgeType vertex BaseGraphStorageManager.StoreVertexType(myStore, _EdgeType, BaseTypes.EdgeType, "EdgeTypeComment", myCreationDate, false, true, false, _BaseType, new[] {_BaseUniqueIndexEdgeTypeDotName}, _security, _transaction); #endregion #region Property vertices BaseGraphStorageManager.StoreOutgoingEdge(myStore, _EdgeTypeDotParent, "Parent", "ParentEdgeTypeComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _EdgeType, _Edge, null, _EdgeType, _security, _transaction); BaseGraphStorageManager.StoreIncomingEdge(myStore, _EdgeTypeDotChildren, "Children", "ChildrenEdgeTypeComment", false, myCreationDate, _EdgeType, _EdgeTypeDotParent, _security, _transaction); #endregion }
/// <summary> /// Creates a new queryplan that processes a in range operation using indices /// </summary> /// <param name="mySecurityToken">The current security token</param> /// <param name="myTransactionToken">The current transaction token</param> /// <param name="myProperty">The interesting property</param> /// <param name="myConstant">The constant value</param> /// <param name="myVertexStore">The vertex store that is needed to load the vertices</param> /// <param name="myIsLongrunning">Determines whether it is anticipated that the request could take longer</param> /// <param name="myExpressionIndex">The index name which is used for resolving the expression</param> public QueryPlanInRangeWithIndex(SecurityToken mySecurityToken, Int64 myTransactionToken, QueryPlanProperty myProperty, RangeLiteralExpression myConstant, IVertexStore myVertexStore, Boolean myIsLongrunning, IIndexManager myIndexManager, String myExpressionIndex = null) { _securityToken = mySecurityToken; _transactionToken = myTransactionToken; _property = myProperty; _constant = myConstant; _vertexStore = myVertexStore; _isLongrunning = myIsLongrunning; _expressionIndex = myExpressionIndex; }
private void AddEdgeTypes(IVertexStore myStore, Int64 myCreationDate) { AddEdge(myStore, myCreationDate); AddWeightedEdge(myStore, myCreationDate); AddOrderableEdge(myStore, myCreationDate); }
public static void StoreEdgeType( IVertexStore myStore, VertexInformation myVertex, String myName, String myComment, bool myIsUserDefined, Int64 myCreationDate, bool myIsAbstract, bool myIsSealed, VertexInformation? myParent, SecurityToken mySecurity, TransactionToken myTransaction) { Store( myStore, myVertex, myComment, myCreationDate, (myParent == null) ? null : new Dictionary<Tuple<long, long>, VertexInformation> { { _EdgeEdgeTypeDotParent, myParent.Value }, }, null, new Dictionary<long, IComparable> { { (long) AttributeDefinitions.BaseTypeDotName, myName }, { (long) AttributeDefinitions.BaseTypeDotIsUserDefined, myIsUserDefined }, { (long) AttributeDefinitions.BaseTypeDotIsAbstract, myIsAbstract }, { (long) AttributeDefinitions.BaseTypeDotIsSealed, myIsSealed }, //{ (long) AttributeDefinitions.Behaviour, null }, }, null, mySecurity, myTransaction); }
private void AddIncomingEdge(IVertexStore myStore, Int64 myCreationDate) { #region IncomingEdge vertex BaseGraphStorageManager.StoreVertexType(myStore, _IncomingEdge, BaseTypes.IncomingEdge, "IncomingEdgeComment", myCreationDate, false, true, false, _Attribute, null, _security, _transaction); #endregion #region Property vertices BaseGraphStorageManager.StoreOutgoingEdge(myStore, _IncomingEdgeDotRelatedEdge, "RelatedEgde", "RelatedEdgeComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _IncomingEdge, _Edge, null, _OutgoingEdge, _security, _transaction); #endregion }
public static IVertex StoreIndex( IVertexStore myStore, VertexInformation myVertex, String myName, String myComment, Int64 myCreationDate, String myIndexClass, bool myIsSingleValue, bool myIsRange, bool myIsVersioned, bool myIsUserDefined, IDictionary<String, object> myOptions, VertexInformation myDefiningVertexType, VertexInformation? mySourceIndex, IList<VertexInformation> myIndexedProperties, SecurityToken mySecurity, TransactionToken myTransaction) { var props = new Dictionary<long, IComparable> { { (long) AttributeDefinitions.IndexDotName, myName }, { (long) AttributeDefinitions.IndexDotIsUserDefined, myIsUserDefined }, { (long) AttributeDefinitions.IndexDotIsSingleValue, myIsSingleValue}, { (long) AttributeDefinitions.IndexDotIsRange, myIsRange }, { (long) AttributeDefinitions.IndexDotIsVersioned, myIsVersioned }, }; var single = new Dictionary<Tuple<long, long>, VertexInformation> { { _EdgeIndexDotDefiningVertexType, myDefiningVertexType } }; if (myIndexClass != null) props.Add((long) AttributeDefinitions.IndexDotIndexClass, myIndexClass); if (mySourceIndex.HasValue) single.Add( _EdgeIndexDotSource, mySourceIndex.Value); return Store( myStore, myVertex, myComment, myCreationDate, single, new Dictionary<Tuple<long, long>, IEnumerable<VertexInformation>> { { _EdgeIndexDotIndexedProperties, myIndexedProperties } }, props, myOptions, mySecurity, myTransaction); }
private void AddIndex(IVertexStore myStore, Int64 myCreationDate) { #region Index vertex BaseGraphStorageManager.StoreVertexType(myStore, _Index, BaseTypes.Index, "IndexComment", myCreationDate, false, true, false, _Vertex, new[] {_BaseUniqueIndexIndexDotName}, _security, _transaction); #endregion #region Property vertices BaseGraphStorageManager.StoreOutgoingEdge(myStore, _IndexDotIndexedProperties, "IndexedProperties", "IndexedPropertiesComment", false, myCreationDate, EdgeMultiplicity.MultiEdge, _Index, _Edge, _OrderableEdge, _Property, _security, _transaction); BaseGraphStorageManager.StoreOutgoingEdge(myStore, _IndexDotDefiningVertexType, "DefiningVertexType", "DefiningVertexTypeComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _Index, _Edge, null, _VertexType, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _IndexDotName, "Name", "NameComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Index, _BaseTypeString, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _IndexDotIsUserDefined, "IsUserDefined", "IsUserDefinedComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Index, _BaseTypeBoolean, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _IndexDotIndexClass, "IndexClass", "IndexClassComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Index, _BaseTypeString, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _IndexDotIsSingleValue, "IsSingleValue", "IsSingleValueComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Index, _BaseTypeBoolean, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _IndexDotIsRange, "IsRange", "IsRangeComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Index, _BaseTypeBoolean, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _IndexDotIsVersioned, "IsVersioned", "IsVersionedComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Index, _BaseTypeBoolean, _security, _transaction); #endregion }
public static void StoreProperty( IVertexStore myStore, VertexInformation myVertex, String myName, String myComment, Int64 myCreationDate, bool myIsMandatory, PropertyMultiplicity myMultiplicity, String myDefaultValue, bool myIsUserDefined, VertexInformation myDefiningType, VertexInformation myBasicType, SecurityToken mySecurity, TransactionToken myTransaction) { var props = new Dictionary<long, IComparable> { { (long) AttributeDefinitions.AttributeDotName, myName }, { (long) AttributeDefinitions.AttributeDotIsUserDefined, myIsUserDefined }, { (long) AttributeDefinitions.PropertyDotIsMandatory, myIsMandatory }, { (long) AttributeDefinitions.PropertyDotMultiplicity, (byte) myMultiplicity }, }; if (myDefaultValue != null) props.Add((long) AttributeDefinitions.PropertyDotDefaultValue, myDefaultValue); Store( myStore, myVertex, myComment, myCreationDate, new Dictionary<Tuple<long, long>, VertexInformation> { { _EdgeAttributeDotDefiningType, myDefiningType }, { _EdgePropertyDotBaseType, myBasicType }, }, null, props, null, mySecurity, myTransaction); }
private void AddIndices(IVertexStore myStore, Int64 myCreationDate) { #region Index BaseGraphStorageManager.StoreIndex(myStore, _BaseUniqueIndexIndexDotName, "IndexDotName", "IndexDotNameIndexComment", myCreationDate, null, true, false, false, false, null, _Index, null, _IndexDotName.SingleEnumerable().ToList(), _security, _transaction); #endregion #region BaseType BaseGraphStorageManager.StoreIndex(myStore, _BaseUniqueIndexBaseTypeDotName , "BaseTypeDotName" , "BaseTypeDotNameIndexComment" , myCreationDate, null, true, false, false, false, null, _BaseType , null, _BaseTypeDotName.SingleEnumerable().ToList(), _security, _transaction); BaseGraphStorageManager.StoreIndex(myStore, _BaseUniqueIndexVertexTypeDotName, "VertexTypeDotName", "VertexTypeDotNameIndexComment", myCreationDate, null, true, false, false, false, null, _VertexType, _BaseUniqueIndexBaseTypeDotName, _BaseTypeDotName.SingleEnumerable().ToList(), _security, _transaction); BaseGraphStorageManager.StoreIndex(myStore, _BaseUniqueIndexEdgeTypeDotName, "EdgeTypeDotName", "EdgeTypeDotNameIndexComment", myCreationDate, null, true, false, false, false, null, _EdgeType, _BaseUniqueIndexBaseTypeDotName, _BaseTypeDotName.SingleEnumerable().ToList(), _security, _transaction); #endregion }
public static IVertex StoreVertexType( IVertexStore myStore, VertexInformation myVertex, String myName, String myComment, Int64 myCreationDate, bool myIsAbstract, bool myIsSealed, bool myIsUserDefined, VertexInformation? myParent, IEnumerable<VertexInformation> myUniques, SecurityToken mySecurity, TransactionToken myTransaction) { return Store( myStore, myVertex, myComment, myCreationDate, (myParent == null) ? null : new Dictionary<Tuple<long, long>, VertexInformation> { { _EdgeVertexTypeDotParent, myParent.Value }, }, myUniques == (null) ? null : new Dictionary<Tuple<long, long>, IEnumerable<Library.Commons.VertexStore.Definitions.VertexInformation>> { {_EdgeVertexTypeDotUniqueDefinitions, myUniques } }, new Dictionary<long, IComparable> { { (long) AttributeDefinitions.BaseTypeDotName, myName }, { (long) AttributeDefinitions.BaseTypeDotIsUserDefined, myIsUserDefined }, { (long) AttributeDefinitions.BaseTypeDotIsAbstract, myIsAbstract }, { (long) AttributeDefinitions.BaseTypeDotIsSealed, myIsSealed }, //{ (long) AttributeDefinitions.Behaviour, null }, }, null, mySecurity, myTransaction); }
private void AddOrderableEdge(IVertexStore myStore, long myCreationDate) { #region OrderableEdge vertex BaseGraphStorageManager.StoreEdgeType(myStore, _OrderableEdge, "Orderable", "OrderableEdgeEdgeComment", false, myCreationDate, false, true, _Edge, _security, _transaction); #endregion #region Property vertices BaseGraphStorageManager.StoreProperty(myStore, _OrderableEdgeDotOrder, "Order", "OrderComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _OrderableEdge, _BaseTypeUInt64, _security, _transaction); #endregion }
public override void Initialize(IMetaManager myMetaManager) { base.Initialize(myMetaManager); _indexManager = myMetaManager.IndexManager; _vertexStore = myMetaManager.VertexStore; _queryPlanManager = myMetaManager.QueryPlanManager; }
private void AddOutgoingEdge(IVertexStore myStore, Int64 myCreationDate) { #region OutgoingEdge vertex BaseGraphStorageManager.StoreVertexType(myStore, _OutgoingEdge, BaseTypes.OutgoingEdge, "OutgoingEdgeComment", myCreationDate, false, true, false, _Attribute, null, _security, _transaction); #endregion #region Property vertices BaseGraphStorageManager.StoreIncomingEdge(myStore, _OutgoingEdgeDotRelatedIncomingEdges, "RelatedIncomingEdges", "RelatedIncomingEdgesComment", false, myCreationDate, _OutgoingEdge, _IncomingEdgeDotRelatedEdge, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _OutgoingEdgeDotMultiplicity, "Multiplicity", "EdgeMultiplicityComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _OutgoingEdge, _BaseTypeByte, _security, _transaction); BaseGraphStorageManager.StoreOutgoingEdge(myStore, _OutgoingEdgeDotEdgeType, "EdgeType", "EdgeTypeComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _OutgoingEdge, _Edge, null, _EdgeType, _security, _transaction); BaseGraphStorageManager.StoreOutgoingEdge(myStore, _OutgoingEdgeDotInnerEdgeType, "InnerEdgeType", "InnerEdgeTypeComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _OutgoingEdge, _Edge, null, _EdgeType, _security, _transaction); BaseGraphStorageManager.StoreOutgoingEdge(myStore, _OutgoingEdgeDotSource, "Source", "SourceComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _OutgoingEdge, _Edge, null, _VertexType, _security, _transaction); BaseGraphStorageManager.StoreOutgoingEdge(myStore, _OutgoingEdgeDotTarget, "Target", "TargetComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _OutgoingEdge, _Edge, null, _VertexType, _security, _transaction); #endregion }
public void Initialize(IMetaManager myMetaManager) { _vertexTypeManager = myMetaManager.VertexTypeManager; _vertexStore = myMetaManager.VertexStore; _baseStorageManager = myMetaManager.BaseGraphStorageManager; }
private void AddProperty(IVertexStore myStore, Int64 myCreationDate) { #region Property vertex BaseGraphStorageManager.StoreVertexType(myStore, _Property, BaseTypes.Property, "PropertyComment", myCreationDate, false, true, false, _Attribute, null, _security, _transaction); #endregion #region Property vertices BaseGraphStorageManager.StoreProperty(myStore, _PropertyDotMultiplicity, "Multiplicity", "PropertyMultiplicityComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Property, _BaseTypeByte, _security, _transaction); BaseGraphStorageManager.StoreProperty(myStore, _PropertyDotIsMandatory, "IsMandatory", "IsMandatoryComment", myCreationDate, true, PropertyMultiplicity.Single, null, false, _Property, _BaseTypeBoolean, _security, _transaction); BaseGraphStorageManager.StoreOutgoingEdge(myStore, _PropertyDotBaseType, "BaseType", "TypeComment", false, myCreationDate, EdgeMultiplicity.SingleEdge, _Property, _Edge, null, _BaseType, _security, _transaction); BaseGraphStorageManager.StoreIncomingEdge(myStore, _PropertyDotInIndices, "InIndices", "InIndicesComment", false, myCreationDate, _Property, _IndexDotIndexedProperties, _security, _transaction); #endregion }