Package org.atomojo.app.db.sparql

Examples of org.atomojo.app.db.sparql.QueryContext


         Parser parser = new Parser(getLogger());
         Query query = parser.parseQuery(r);
         r.close();

         getResponse().setStatus(Status.SUCCESS_OK);
         final QueryContext context = new QueryContext(getLogger(),app.getDB(),query);
         final XMLRepresentationParser xmlParser = new XMLRepresentationParser();
         return new OutputRepresentation(MediaType.APPLICATION_ATOM) {
            public void write(OutputStream os)
               throws IOException
            {
               final ItemDestination dest = new WriterItemDestination(new OutputStreamWriter(os,"UTF-8"),"UTF-8");
               final ItemConstructor constructor = InfosetFactory.getDefaultInfoset().createItemConstructor();
               try {
                  context.execute(new QueryContext.ResultListener() {
                     DocumentLoader loader = new SAXDocumentLoader();
                     public void onStart() throws QueryException {
                        try {
                           dest.send(constructor.createDocument());
                           dest.send(constructor.createElement(AtomResource.FEED_NAME));
View Full Code Here

TOP

Related Classes of org.atomojo.app.db.sparql.QueryContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.