Example #1
0
        public void evaluate(org.openrdf.query.TupleQueryResultHandler tqrh)
        {
            SparqlResultSet rset = this.EvaluateQuery();

            java.util.ArrayList vars = new java.util.ArrayList();
            foreach (String var in rset.Variables)
            {
                vars.add(var);
            }

            tqrh.startQueryResult(vars);
            SesameMapping mapping = new SesameMapping(new Graph(), new dotSesame.impl.GraphImpl());

            foreach (SparqlResult r in rset)
            {
                dotSesameQuery.impl.MapBindingSet binding = new org.openrdf.query.impl.MapBindingSet();
                foreach (String var in r.Variables)
                {
                    binding.addBinding(var, SesameConverter.ToSesameValue(r[var], mapping));
                }
                tqrh.handleSolution(binding);
            }

            tqrh.endQueryResult();
        }
Example #2
0
        public org.openrdf.query.BindingSet getBindings()
        {
            dotSesameQuery.impl.MapBindingSet s = new org.openrdf.query.impl.MapBindingSet();

            foreach (KeyValuePair <String, INode> kvp in this._queryString.Variables)
            {
                s.addBinding(kvp.Key, SesameConverter.ToSesameValue(kvp.Value, this._mapping));
            }

            return(s);
        }
Example #3
0
        public org.openrdf.query.BindingSet getBindings()
        {
            dotSesameQuery.impl.MapBindingSet s = new org.openrdf.query.impl.MapBindingSet();

            foreach (KeyValuePair<String, INode> kvp in this._queryString.Variables)
            {
                s.addBinding(kvp.Key, SesameConverter.ToSesameValue(kvp.Value, this._mapping));
            }

            return s;
        }
Example #4
0
        public void evaluate(org.openrdf.query.TupleQueryResultHandler tqrh)
        {
            SparqlResultSet rset = this.EvaluateQuery();

            java.util.ArrayList vars = new java.util.ArrayList();
            foreach (String var in rset.Variables)
            {
                vars.add(var);
            }

            tqrh.startQueryResult(vars);
            SesameMapping mapping = new SesameMapping(new Graph(), new dotSesame.impl.GraphImpl());
            foreach (SparqlResult r in rset)
            {
                dotSesameQuery.impl.MapBindingSet binding = new org.openrdf.query.impl.MapBindingSet();
                foreach (String var in r.Variables)
                {
                    binding.addBinding(var, SesameConverter.ToSesameValue(r[var], mapping));
                }
                tqrh.handleSolution(binding);
            }

            tqrh.endQueryResult();
        }