예제 #1
0
 public LinkView(Guid mapUid, CompendiumNode originNode, XmlDocument doc, XmlElement parent, LinkType linkType)
     : this(doc, parent, linkType)
 {
     AddAttributeByKeyValue("id", mapUid.ToLongString());
     AddAttributeByKeyValue("created", originNode.Created);
     AddAttributeByKeyValue("lastModified", originNode.LastModified);
 }
예제 #2
0
 public LinkView(Guid mapUid, CompendiumNode originNode, XmlDocument doc, XmlElement parent, LinkType linkType)
     : this(doc, parent, linkType)
 {
     AddAttributeByKeyValue("id", mapUid.ToLongString());
     AddAttributeByKeyValue("created", originNode.Created);
     AddAttributeByKeyValue("lastModified", originNode.LastModified);
 }
예제 #3
0
 public void AddNode(CompendiumNode node)
 {
     if (!IsNodeExist(node))
     {
         var xmlNode = new XmlNode.XmlNode(node, Doc, _xmlElementNodes);
         xmlNode.CreateElement();
         Nodes.Add(node);
     }
 }
예제 #4
0
파일: Page.cs 프로젝트: chris-tomich/Glyma
 public Page(string content, CompendiumNode node, XmlDocument doc, XmlElement parent, int pageNo = 1)
     : base(doc, parent)
 {
     _content = content;
     _doc     = doc;
     AddAttributeByKeyValue("nodeid", node.Id.ToLongString());
     AddAttributeByKeyValue("author", node.Author);
     AddAttributeByKeyValue("created", node.Created);
     AddAttributeByKeyValue("lastModified", node.LastModified);
     AddAttributeByKeyValue("pageno", pageNo.ToString(CultureInfo.InvariantCulture));
 }
예제 #5
0
파일: Page.cs 프로젝트: chris-tomich/Glyma
 public Page(string content, CompendiumNode node, XmlDocument doc, XmlElement parent, int pageNo = 1)
     : base(doc, parent)
 {
     _content = content;
     _doc = doc;
     AddAttributeByKeyValue("nodeid", node.Id.ToLongString());
     AddAttributeByKeyValue("author", node.Author);
     AddAttributeByKeyValue("created", node.Created);
     AddAttributeByKeyValue("lastModified", node.LastModified);
     AddAttributeByKeyValue("pageno", pageNo.ToString(CultureInfo.InvariantCulture));
 }
예제 #6
0
 public ReferenceLink(Guid mapId, CompendiumNode referenceNode, CompendiumNode originNode, XmlDocument doc, XmlElement parent)
     : base(doc, null, parent)
 {
     //Console.WriteLine("New Reference Link Found: {0}", originNode.Id + "Link");
     _mapId = mapId;
     _originNode = originNode;
     AddAttributeByKeyValue("id", originNode.Id+"Link");
     AddAttributeByKeyValue("created", originNode.Created);
     AddAttributeByKeyValue("lastModified", originNode.LastModified);
     AddAttributeByKeyValue("author", originNode.Created);
     AddAttributeByKeyValue("from", referenceNode.Id.ToLongString());
     AddAttributeByKeyValue("to", originNode.Id.ToLongString());
 }
예제 #7
0
 public ReferenceLink(Guid mapId, CompendiumNode referenceNode, CompendiumNode originNode, XmlDocument doc, XmlElement parent)
     : base(doc, null, parent)
 {
     //Console.WriteLine("New Reference Link Found: {0}", originNode.Id + "Link");
     _mapId      = mapId;
     _originNode = originNode;
     AddAttributeByKeyValue("id", originNode.Id + "Link");
     AddAttributeByKeyValue("created", originNode.Created);
     AddAttributeByKeyValue("lastModified", originNode.LastModified);
     AddAttributeByKeyValue("author", originNode.Created);
     AddAttributeByKeyValue("from", referenceNode.Id.ToLongString());
     AddAttributeByKeyValue("to", originNode.Id.ToLongString());
 }
예제 #8
0
        protected override void OnNodeFound(INode node, IRelationship relationship)
        {
            var glymaNode = new CompendiumNode(relationship, node);
            CompendiumXmlMap.AddView(Map.Id, glymaNode);
            CompendiumXmlMap.AddNode(glymaNode);


            if (glymaNode.ReferenceNode != null)
            {
                CompendiumXmlMap.AddView(Map.Id, glymaNode.ReferenceNode);
                CompendiumXmlMap.AddNode(glymaNode.ReferenceNode);
                CompendiumXmlMap.AddReferenceLink(Map.Id, glymaNode.ReferenceNode, glymaNode);
            }
        }
예제 #9
0
        protected override void OnNodeFound(INode node, IRelationship relationship)
        {
            var glymaNode = new CompendiumNode(relationship, node);

            CompendiumXmlMap.AddView(Map.Id, glymaNode);
            CompendiumXmlMap.AddNode(glymaNode);


            if (glymaNode.ReferenceNode != null)
            {
                CompendiumXmlMap.AddView(Map.Id, glymaNode.ReferenceNode);
                CompendiumXmlMap.AddNode(glymaNode.ReferenceNode);
                CompendiumXmlMap.AddReferenceLink(Map.Id, glymaNode.ReferenceNode, glymaNode);
            }
        }
예제 #10
0
 public XmlNode(CompendiumNode node, XmlDocument doc, XmlElement parent)
     : base(doc, parent)
 {
     //Console.WriteLine("New Node Found: {0}", node.Id);
     _node = node;
     AddAttributeByKeyValue("id", node.Id.ToLongString());
     AddAttributeByKeyValue("type", node.NodeType.ToId());
     AddAttributeByKeyValue("extendedtype", "");
     AddAttributeByKeyValue("originalid", "");
     AddAttributeByKeyValue("author", node.Author);
     AddAttributeByKeyValue("created", node.Created);
     AddAttributeByKeyValue("lastModified", node.LastModified);
     AddAttributeByKeyValue("label", node.Name);
     AddAttributeByKeyValue("state", "1");
     AddAttributeByKeyValue("lastModificationAuthor", node.LastModificationAuthor);
 }
예제 #11
0
 public XmlNode(CompendiumNode node, XmlDocument doc, XmlElement parent)
     : base(doc, parent)
 {
     //Console.WriteLine("New Node Found: {0}", node.Id);
     _node = node;
     AddAttributeByKeyValue("id", node.Id.ToLongString());
     AddAttributeByKeyValue("type", node.NodeType.ToId());
     AddAttributeByKeyValue("extendedtype", "");
     AddAttributeByKeyValue("originalid", "");
     AddAttributeByKeyValue("author", node.Author);
     AddAttributeByKeyValue("created", node.Created);
     AddAttributeByKeyValue("lastModified", node.LastModified);
     AddAttributeByKeyValue("label", node.Name);
     AddAttributeByKeyValue("state", "1");
     AddAttributeByKeyValue("lastModificationAuthor", node.LastModificationAuthor);
 }
예제 #12
0
 public View(Guid mapId, CompendiumNode node, XmlDocument doc, XmlElement parent)
     : base(doc, parent)
 {
     AddAttributeByKeyValue("viewref", mapId.ToLongString());
     AddAttributeByKeyValue("noderef", node.Id.ToLongString());
     AddAttributeByKeyValue("XPosition", ((int)node.XPosition).ToString(CultureInfo.InvariantCulture));
     AddAttributeByKeyValue("YPosition", ((int)node.YPosition).ToString(CultureInfo.InvariantCulture));
     AddAttributeByKeyValue("created", node.Created);
     AddAttributeByKeyValue("lastModified", node.LastModified);
     AddAttributeByKeyValue("showTags", "true");
     AddAttributeByKeyValue("showText", "true");
     AddAttributeByKeyValue("showTrans", "true");
     AddAttributeByKeyValue("showWeight", "true");
     AddAttributeByKeyValue("smallIcon", "false");
     AddAttributeByKeyValue("hideIcon", "false");
     AddAttributeByKeyValue("labelWrapWidth", "25");
     AddAttributeByKeyValue("fontsize", "12");
     AddAttributeByKeyValue("fontface", "Dialog");
     AddAttributeByKeyValue("fontstyle", "0");
     AddAttributeByKeyValue("foreground", "-16777216");
     AddAttributeByKeyValue("background", "-1");
 }
예제 #13
0
파일: View.cs 프로젝트: chris-tomich/Glyma
 public View(Guid mapId, CompendiumNode node, XmlDocument doc, XmlElement parent)
     : base(doc, parent)
 {
     AddAttributeByKeyValue("viewref", mapId.ToLongString());
     AddAttributeByKeyValue("noderef", node.Id.ToLongString());
     AddAttributeByKeyValue("XPosition", ((int)node.XPosition).ToString(CultureInfo.InvariantCulture));
     AddAttributeByKeyValue("YPosition", ((int)node.YPosition).ToString(CultureInfo.InvariantCulture));
     AddAttributeByKeyValue("created", node.Created);
     AddAttributeByKeyValue("lastModified", node.LastModified);
     AddAttributeByKeyValue("showTags", "true");
     AddAttributeByKeyValue("showText", "true");
     AddAttributeByKeyValue("showTrans", "true");
     AddAttributeByKeyValue("showWeight", "true");
     AddAttributeByKeyValue("smallIcon", "false");
     AddAttributeByKeyValue("hideIcon", "false");
     AddAttributeByKeyValue("labelWrapWidth", "25");
     AddAttributeByKeyValue("fontsize", "12");
     AddAttributeByKeyValue("fontface", "Dialog");
     AddAttributeByKeyValue("fontstyle", "0");
     AddAttributeByKeyValue("foreground", "-16777216");
     AddAttributeByKeyValue("background", "-1");
 }
예제 #14
0
 public void AddReferenceLink(Guid mapId, CompendiumNode refenceNode, CompendiumNode originNode)
 {
     var xmlLink = new ReferenceLink(mapId, refenceNode, originNode, Doc, _xmlElementLinks);
     xmlLink.CreateElement();
 }
예제 #15
0
 public void AddView(Guid mapId, CompendiumNode node)
 {
     var xmlView = new View(mapId, node, Doc, _xmlElementViews);
     xmlView.CreateElement();
 }