Esempio n. 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);
     }
 }
Esempio n. 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;
 }
Esempio n. 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;
        }
Esempio n. 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);
            }
        }
 public static Vertex <SerializableString> CreateTextVertex(GraphObjectTypeInfo vertexType, string vertexContent)
 {
     return(new Vertex <SerializableString>(vertexType, new SerializableString(vertexContent)));
 }
 public static Vertex <SerializableString> CreateTextVertex(GraphObjectTypeInfo vertexType, string vertexContent, string language, Guid id)
 {
     return(new Vertex <SerializableString>(vertexType, new SerializableString(vertexContent), language, id));
 }
Esempio n. 8
0
 public HyperEdge(GraphObjectTypeInfo type, params IGraphObject[] sources) :
     this(Guid.NewGuid(), type, sources)
 {
 }
Esempio n. 9
0
 public Vertex(GraphObjectTypeInfo type, NodeContent content, string lang, Guid id)
     : this(type, content, lang, id, null)
 {
 }
Esempio n. 10
0
 public Vertex(GraphObjectTypeInfo type, NodeContent content) :
     this(type, content, DefaultLanguageValue, Guid.NewGuid(), null)
 {
 }
Esempio n. 11
0
 public static List <IVertex> SearchNode(this IGraph graph, GraphObjectTypeInfo type, string searchString)
 {
     return(graph.SearchNode(type.Id, searchString));
 }