Exemplo n.º 1
0
        private static SearchItem CreateSearchItemFromPropertyNode(XmlNode node, string proposedType)
        {
            SearchItem res  = null;
            var        irdi = EclassUtils.GetAttributeByName(node, "id");

            if (irdi == null)
            {
                irdi = EclassUtils.GetAttributeByName(node, "xml:id");
            }
            if (irdi != null)
            {
                var info = "";
                if (node.Name == "ontoml:property" && node.HasChildNodes)
                {
                    var n2 = node.SelectSingleNode("preferred_name");
                    if (n2 != null && n2.HasChildNodes)
                    {
                        foreach (var c2 in n2.ChildNodes)
                        {
                            if (c2 is XmlNode && (c2 as XmlNode).Name == "label")
                            {
                                info = (c2 as XmlNode).InnerText;
                            }
                        }
                    }
                    proposedType = "prop";
                }
                res = new SearchItem(proposedType, irdi, info, node);
            }
            return(res);
        }
Exemplo n.º 2
0
 public SearchJobData(string eclassFullPath)
 {
     if (eclassFullPath == null || eclassFullPath == "")
     {
         return;
     }
     foreach (var fn in System.IO.Directory.GetFiles(eclassFullPath, "*.xml"))
     {
         var dft = EclassUtils.TryGetDataFileType(fn);
         eclassFiles.Add(new EclassUtils.FileItem(fn, dft));
     }
 }