Exemplo n.º 1
0
        private Negotiator ProcessQuery(string storeName, SparqlRequestObject requestObject)
        {
            //SparqlResultsFormat requestedFormat =
            //    String.IsNullOrEmpty(requestObject.Format)
            //        ? SparqlResultsFormat.Xml
            //        : (
            //              SparqlResultsFormat.GetResultsFormat(requestObject.Format) ??
            //              SparqlResultsFormat.Xml);
            //RdfFormat graphFormat =
            //    String.IsNullOrEmpty(requestObject.Format)
            //        ? RdfFormat.RdfXml
            //        : (RdfFormat.GetResultsFormat(requestObject.Format) ?? RdfFormat.RdfXml);

            var model = new SparqlResultModel(storeName, _brightstar, requestObject,
                                              //requestedFormat, graphFormat);
                                              null, null);

            return Negotiate
                .WithMediaRangeModel(MediaRange.FromString("text/html"), model).WithView("SparqlResult")
                .WithModel(new SparqlQueryProcessingModel(storeName, _brightstar, requestObject));
        }
Exemplo n.º 2
0
 private Negotiator ProcessQuery(string storeName, SparqlRequestObject requestObject)
 {
     SparqlResultsFormat requestedFormat =
         String.IsNullOrEmpty(requestObject.Format)
             ? SparqlResultsFormat.Xml
             : (
                   SparqlResultsFormat.GetResultsFormat(requestObject.Format) ??
                   SparqlResultsFormat.Xml);
     var model = new SparqlResultModel(storeName, _brightstar, requestObject, requestedFormat);
     
     return Negotiate
         .WithMediaRangeModel(MediaRange.FromString("text/html"), model).WithView("SparqlResult")
         .WithModel(new SparqlQueryProcessingModel(storeName, _brightstar, requestObject));
 }