/** * Tries to match the extension of a file name against the list of RDF formats that can be written. * * @param fileName * A file name. * @return An TupleQueryResultFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getWriterFormatForFileName(String, TupleQueryResultFormat) */ public static Optional<QueryResultFormat> getWriterFormatForFileName(String fileName) { return TupleQueryResultWriterRegistry.getInstance().getFileFormatForFileName(fileName); }
/** * Tries to match a MIME type against the list of boolean query result formats that can be parsed. * * @param mimeType * A MIME type, e.g. "application/sparql-results+xml". * @return An RDFFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getBooleanParserFormatForMIMEType(String, BooleanQueryResultFormat) */ public static Optional<QueryResultFormat> getBooleanParserFormatForMIMEType(String mimeType) { return BooleanQueryResultParserRegistry.getInstance().getFileFormatForMIMEType(mimeType); }
/** * Tries to match a MIME type against the list of boolean query result formats that can be written. * * @param mimeType * A MIME type, e.g. "application/sparql-results+xml". * @return An BooleanQueryResultFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getBooleanWriterFormatForMIMEType(String, BooleanQueryResultFormat) */ public static Optional<QueryResultFormat> getBooleanWriterFormatForMIMEType(String mimeType) { return BooleanQueryResultWriterRegistry.getInstance().getFileFormatForMIMEType(mimeType); }
/** * Tries to match the extension of a file name against the list of RDF formats that can be parsed. * * @param fileName * A file name. * @return An BooleanQueryResultFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getBooleanParserFormatForFileName(String, BooleanQueryResultFormat) */ public static Optional<QueryResultFormat> getBooleanParserFormatForFileName(String fileName) { return BooleanQueryResultParserRegistry.getInstance().getFileFormatForFileName(fileName); }
/** * Tries to match a MIME type against the list of tuple query result formats that can be written. * * @param mimeType * A MIME type, e.g. "application/sparql-results+xml". * @return An TupleQueryResultFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getWriterFormatForMIMEType(String, TupleQueryResultFormat) */ public static Optional<QueryResultFormat> getWriterFormatForMIMEType(String mimeType) { return TupleQueryResultWriterRegistry.getInstance().getFileFormatForMIMEType(mimeType); }
/** * Tries to match the extension of a file name against the list of RDF formats that can be written. * * @param fileName * A file name. * @return An BooleanQueryResultFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getBooleanWriterFormatForFileName(String, BooleanQueryResultFormat) */ public static Optional<QueryResultFormat> getBooleanWriterFormatForFileName(String fileName) { return BooleanQueryResultWriterRegistry.getInstance().getFileFormatForFileName(fileName); }
/** * Tries to match the extension of a file name against the list of RDF formats that can be parsed. * * @param fileName * A file name. * @return An TupleQueryResultFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getParserFormatForFileName(String, TupleQueryResultFormat) */ public static Optional<QueryResultFormat> getParserFormatForFileName(String fileName) { return TupleQueryResultParserRegistry.getInstance().getFileFormatForFileName(fileName); }
/** * Tries to match a MIME type against the list of tuple query result formats that can be parsed. * * @param mimeType * A MIME type, e.g. "application/sparql-results+xml". * @return An RDFFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getParserFormatForMIMEType(String, TupleQueryResultFormat) */ public static Optional<QueryResultFormat> getParserFormatForMIMEType(String mimeType) { return TupleQueryResultParserRegistry.getInstance().getFileFormatForMIMEType(mimeType); }
@Override protected QueryResultFormat getKey(BooleanQueryResultWriterFactory factory) { return factory.getBooleanQueryResultFormat(); } }
@Override protected QueryResultFormat getKey(TupleQueryResultWriterFactory factory) { return factory.getTupleQueryResultFormat(); } }
@Override protected QueryResultFormat getKey(BooleanQueryResultParserFactory factory) { return factory.getBooleanQueryResultFormat(); } }
@Override public void parseQueryResult(InputStream in) throws IOException, QueryResultParseException, QueryResultHandlerException { parse(in); }
@Override protected QueryResultFormat getKey(TupleQueryResultParserFactory factory) { return factory.getTupleQueryResultFormat(); } }
/** * Tries to match the extension of a file name against the list of RDF formats that can be parsed. * * @param fileName * A file name. * @return An BooleanQueryResultFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getBooleanParserFormatForFileName(String, BooleanQueryResultFormat) */ public static Optional<QueryResultFormat> getBooleanParserFormatForFileName(String fileName) { return BooleanQueryResultParserRegistry.getInstance().getFileFormatForFileName(fileName); }
/** * Tries to match the extension of a file name against the list of RDF formats that can be written. * * @param fileName * A file name. * @return An TupleQueryResultFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getWriterFormatForFileName(String, TupleQueryResultFormat) */ public static Optional<QueryResultFormat> getWriterFormatForFileName(String fileName) { return TupleQueryResultWriterRegistry.getInstance().getFileFormatForFileName(fileName); }
/** * Tries to match a MIME type against the list of tuple query result formats that can be written. * * @param mimeType * A MIME type, e.g. "application/sparql-results+xml". * @return An TupleQueryResultFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getWriterFormatForMIMEType(String, TupleQueryResultFormat) */ public static Optional<QueryResultFormat> getWriterFormatForMIMEType(String mimeType) { return TupleQueryResultWriterRegistry.getInstance().getFileFormatForMIMEType(mimeType); }
/** * Tries to match the extension of a file name against the list of RDF formats that can be parsed. * * @param fileName * A file name. * @return An TupleQueryResultFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getParserFormatForFileName(String, TupleQueryResultFormat) */ public static Optional<QueryResultFormat> getParserFormatForFileName(String fileName) { return TupleQueryResultParserRegistry.getInstance().getFileFormatForFileName(fileName); }
@Override protected QueryResultFormat getKey(BooleanQueryResultWriterFactory factory) { return factory.getBooleanQueryResultFormat(); } }
@Override protected QueryResultFormat getKey(BooleanQueryResultParserFactory factory) { return factory.getBooleanQueryResultFormat(); } }
@Override public void parseQueryResult(InputStream in) throws IOException, QueryResultParseException, QueryResultHandlerException { parse(in); }