Package org.apache.marmotta.platform.core.exception

Examples of org.apache.marmotta.platform.core.exception.InvalidArgumentException


            out = QueryResultIO.createWriter(TupleQueryResultFormat.JSON, os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("xml")) {
            out = QueryResultIO.createWriter(TupleQueryResultFormat.SPARQL, os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("csv")) {
            out = QueryResultIO.createWriter(TupleQueryResultFormat.CSV, os);
        } else throw new InvalidArgumentException("could not produce format "+format);
        return out;
    }
View Full Code Here


            out = QueryResultIO.createWriter(BooleanQueryResultFormat.JSON, os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("xml")) {
            out = QueryResultIO.createWriter(BooleanQueryResultFormat.SPARQL, os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("csv")) {
            out = QueryResultIO.createWriter(BooleanQueryResultFormat.TEXT, os);
        } else throw new InvalidArgumentException("could not produce format "+format);
        return out;
    }
View Full Code Here

                            query((BooleanQuery) sparqlQuery, booleanWriter);
                        } else if (sparqlQuery instanceof GraphQuery) {
                            query((GraphQuery) sparqlQuery, graphWriter);
                        } else {
                            connection.rollback();
                            throw new InvalidArgumentException("SPARQL query type " + sparqlQuery.getClass() + " not supported!");
                        }

                        connection.commit();
                    } catch (Exception ex) {
                        connection.rollback();
View Full Code Here

                        } else if (sparqlQuery instanceof BooleanQuery) {
                            query((BooleanQuery)sparqlQuery, output, format);
                        } else if (sparqlQuery instanceof GraphQuery) {
                            query((GraphQuery)sparqlQuery, output, format);
                        } else {
                            throw new InvalidArgumentException("SPARQL query type " + sparqlQuery.getClass() + " not supported!");
                        }

                        connection.commit();
                    } catch (Exception ex) {
                        connection.rollback();
View Full Code Here

            log.error("error while getting repository connection");
            throw new MarmottaException("error while getting repository connection",ex);
        } catch (QueryEvaluationException e) {
            throw new MarmottaException("error while evaluating SPARQL query "+query,e);
        } catch (MalformedQueryException e) {
            throw new InvalidArgumentException("malformed SPARQL query ("+query+") for language "+queryLanguage,e);
        }

        log.debug("SPARQL execution took {}ms",System.currentTimeMillis()-start);
        return result;
    }
View Full Code Here

            out = QueryResultIO.createWriter(TupleQueryResultFormat.JSON, os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("xml")) {
            out = QueryResultIO.createWriter(TupleQueryResultFormat.SPARQL, os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("csv")) {
            out = QueryResultIO.createWriter(TupleQueryResultFormat.CSV, os);
        } else throw new InvalidArgumentException("could not produce format "+format);
        return out;
    }
View Full Code Here

            out = QueryResultIO.createWriter(BooleanQueryResultFormat.JSON, os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("xml")) {
            out = QueryResultIO.createWriter(BooleanQueryResultFormat.SPARQL, os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("csv")) {
            out = QueryResultIO.createWriter(BooleanQueryResultFormat.TEXT, os);
        } else throw new InvalidArgumentException("could not produce format "+format);
        return out;
    }
View Full Code Here

                            query((BooleanQuery) sparqlQuery, booleanWriter);
                        } else if (sparqlQuery instanceof GraphQuery) {
                            query((GraphQuery) sparqlQuery, graphWriter.getOutputStream(), graphWriter.getFormat());
                        } else {
                            connection.rollback();
                            throw new InvalidArgumentException("SPARQL query type " + sparqlQuery.getClass() + " not supported!");
                        }

                        connection.commit();
                    } catch (Exception ex) {
                        connection.rollback();
View Full Code Here

                            query((BooleanQuery) sparqlQuery, (BooleanQueryResultWriter)writer);
                        } else if (sparqlQuery instanceof GraphQuery) {
                            query((GraphQuery) sparqlQuery, ((SPARQLGraphResultWriter)writer).getOutputStream(), ((SPARQLGraphResultWriter)writer).getFormat());
                        } else {
                            connection.rollback();
                            throw new InvalidArgumentException("SPARQL query type " + sparqlQuery.getClass() + " not supported!");
                        }

                        connection.commit();
                    } catch (Exception ex) {
                        connection.rollback();
View Full Code Here

                        } else if (sparqlQuery instanceof BooleanQuery) {
                            query((BooleanQuery)sparqlQuery, output, format);
                        } else if (sparqlQuery instanceof GraphQuery) {
                            query((GraphQuery)sparqlQuery, output, format);
                        } else {
                            throw new InvalidArgumentException("SPARQL query type " + sparqlQuery.getClass() + " not supported!");
                        }

                        connection.commit();
                    } catch (Exception ex) {
                        connection.rollback();
View Full Code Here

TOP

Related Classes of org.apache.marmotta.platform.core.exception.InvalidArgumentException

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.