Examples of SPARQLParserFactory


Examples of org.jrdf.query.answer.SparqlParserFactory

    }

    public Answer getAnswer(Representation output) {
        checkNotNull(output);
        try {
            SparqlParserFactory parserFactory = tryGetParserFactory(output.getMediaType());
            return answerFactory.createStreamingAnswer(output.getStream(), parserFactory);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

Examples of org.jrdf.query.answer.SparqlParserFactory

        }
        clientInfo.setAcceptedMediaTypes(preferenceList);
    }

    private SparqlParserFactory tryGetParserFactory(MediaType mediaType) {
        final SparqlParserFactory parserFactory = typeToParser.get(mediaType);
        if (parserFactory == null) {
            throw new RuntimeException("Unknown Media Type: " + mediaType);
        } else {
            return parserFactory;
        }
View Full Code Here

Examples of org.openrdf.query.parser.sparql.SPARQLParserFactory

    StringBuffer aBuffer = new StringBuffer(aQuery);

    insertNamespaces(aBuffer);

    try {
      new SPARQLParserFactory().getParser().parseQuery(aBuffer.toString(), "http://example.org");
    }
    catch (IllegalArgumentException e) {
      throw new IllegalArgumentException("Invalid query: " + aBuffer.toString(), e);
    }
    catch (MalformedQueryException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.