Пример #1
0
 internal HyperEdge(Guid publicId, GraphObjectTypeInfo type, IGraphStore graphStore, IEnumerable <Guid> linkedObjectIdList) : base()
 {
     base.id                 = publicId;
     base.type               = type;
     base.graphStore         = graphStore;
     base.linkedObjectIdList = linkedObjectIdList.ToList();
 }
 public override bool Equals(object obj)
 {
     if (obj is GraphObjectTypeInfo)
     {
         GraphObjectTypeInfo nt = (GraphObjectTypeInfo)obj;
         return(Id.Equals(nt.Id));
     }
     else
     {
         return(false);
     }
 }
Пример #3
0
 public Vertex(
     GraphObjectTypeInfo type,
     NodeContent content,
     string lang,
     Guid id,
     IGraphStore graphStore) : base()
 {
     base.id         = id;
     base.graphStore = graphStore;
     this.content    = content;
     this.type       = type;
     this.language   = lang;
 }
Пример #4
0
        public Vertex(
            GraphObjectTypeInfo type,
            NodeContent content,
            string lang,
            Guid id,
            IGraphStore graphStore,
            IEnumerable <Guid> linkedObjectIdList) : base()
        {
            base.id = id;
            base.linkedObjectIdList = linkedObjectIdList.ToList();
            base.graphStore         = graphStore;

            this.content  = content;
            this.type     = type;
            this.language = lang;
        }
Пример #5
0
        internal HyperEdge(Guid publicId, GraphObjectTypeInfo type, params IGraphObject[] sources)
        {
            base.id   = publicId;
            base.type = type;
            foreach (IGraphObject obj in sources)
            {
                base.AddObject(obj);
            }

            bool selfReferenceSkipped = false;

            foreach (IGraphObject v in base.GetLinkedObjects())
            {
                if (sources.Length == 2 && sources[0].ObjectId == sources[1].ObjectId && !selfReferenceSkipped)
                {
                    selfReferenceSkipped = true;
                    continue;
                }
                v.AddEdgeLink(this);
            }
        }
Пример #6
0
 public static Vertex <SerializableString> CreateTextVertex(GraphObjectTypeInfo vertexType, string vertexContent)
 {
     return(new Vertex <SerializableString>(vertexType, new SerializableString(vertexContent)));
 }
Пример #7
0
 public static Vertex <SerializableString> CreateTextVertex(GraphObjectTypeInfo vertexType, string vertexContent, string language, Guid id)
 {
     return(new Vertex <SerializableString>(vertexType, new SerializableString(vertexContent), language, id));
 }
Пример #8
0
 public HyperEdge(GraphObjectTypeInfo type, params IGraphObject[] sources) :
     this(Guid.NewGuid(), type, sources)
 {
 }
Пример #9
0
 public Vertex(GraphObjectTypeInfo type, NodeContent content, string lang, Guid id)
     : this(type, content, lang, id, null)
 {
 }
Пример #10
0
 public Vertex(GraphObjectTypeInfo type, NodeContent content) :
     this(type, content, DefaultLanguageValue, Guid.NewGuid(), null)
 {
 }
Пример #11
0
 public static List <IVertex> SearchNode(this IGraph graph, GraphObjectTypeInfo type, string searchString)
 {
     return(graph.SearchNode(type.Id, searchString));
 }