Пример #1
0
        public IUriNode CreateUriNode(string uriOrQname)
        {
            var      code     = namespaceMaper.coding.InsertOne(GetEntityString(uriOrQname));
            SUriNode sUriNode = new SUriNode(code, this);


            return(sUriNode);
        }
Пример #2
0
        public IUriNode GetUriNode(Uri uri)
        {
            var code = namespaceMaper.coding.GetCode(uri.ToString());

            if (code == int.MinValue)
            {
                return(null);
            }
            SUriNode sUriNode = new SUriNode(code, this);

            return(sUriNode);
        }
Пример #3
0
        public IEnumerable <Triple> GetTriples()
        {
            PaEntry paEntry = dataCell.Root.Element(0);

            //foreach (var element in entitiesTree.Root.Elements())
            for (int i = 0; i < entitiesTree.Root.Count(); i++)
            {
                var element = entitiesTree.Root.Element(i);
                //(int)element.Field(0).Get(),=WRONG
                SUriNode sUriNode = new SUriNode(i, this);
                foreach (object[] po in (object[])element.Field(1).Get())
                {
                    paEntry.offset = (long)po[1];
                    yield return(new Triple(sUriNode, new SUriNode((int)po[0], this), new SLiteralNode(paEntry.Get(), this)));
                }
                foreach (object[] po in (object[])element.Field(2).Get())
                {
                    yield return(new Triple(sUriNode, new SUriNode((int)po[0], this), new SUriNode((int)po[1], this)));
                }
            }
        }
Пример #4
0
        public IUriNode CreateUriNode(Uri uri)
        {
            SUriNode sUriNode = new SUriNode(namespaceMaper.coding.InsertOne(uri.ToString()), this);

            return(sUriNode);
        }