/** * Getter for the SPARQL SELECT representation of this FieldQuery * * @return the SPARQL SELECT query */ public String toSparqlSelect(boolean includeFields) { return SparqlQueryUtils.createSparqlSelectQuery(this, includeFields, endpointType); }
/** * Getter for the SPARQL SELECT representation of this FieldQuery * * @return the SPARQL SELECT query */ public String toSparqlSelect(boolean includeFields) { return SparqlQueryUtils.createSparqlSelectQuery(this, includeFields, endpointType); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String */ public static String createSparqlSelectQuery(SparqlFieldQuery query, SparqlEndpointTypeEnum endpointType) { return createSparqlSelectQuery(query, true, -1, endpointType); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String */ public static String createSparqlSelectQuery(SparqlFieldQuery query, SparqlEndpointTypeEnum endpointType) { return createSparqlSelectQuery(query, true, -1, endpointType); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param limit * If > 0, than the limit parsed by the query is overriden by this value * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String */ public static String createSparqlSelectQuery(SparqlFieldQuery query, int limit, SparqlEndpointTypeEnum endpointType) { return createSparqlSelectQuery(query, true, limit, endpointType); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param includeFields * if <code>false</code> only the root is selected (selected fields are ignored) * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String */ public static String createSparqlSelectQuery(SparqlFieldQuery query, boolean includeFields, SparqlEndpointTypeEnum endpointType) { return createSparqlSelectQuery(query, includeFields, -1, endpointType); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param includeFields * if <code>false</code> only the root is selected (selected fields are ignored) * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String */ public static String createSparqlSelectQuery(SparqlFieldQuery query, boolean includeFields, SparqlEndpointTypeEnum endpointType) { return createSparqlSelectQuery(query, includeFields, -1, endpointType); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param limit * If > 0, than the limit parsed by the query is overriden by this value * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String */ public static String createSparqlSelectQuery(SparqlFieldQuery query, int limit, SparqlEndpointTypeEnum endpointType) { return createSparqlSelectQuery(query, true, limit, endpointType); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String * @see org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils#createSparqlSelectQuery(org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery, SparqlEndpointTypeEnum) */ @Deprecated public static String createSparqlSelectQuery(SparqlFieldQuery query, EndpointTypeEnum endpointType) { SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); return org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils.createSparqlSelectQuery(query, type); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String * @see org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils#createSparqlSelectQuery(org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery, SparqlEndpointTypeEnum) */ @Deprecated public static String createSparqlSelectQuery(SparqlFieldQuery query, EndpointTypeEnum endpointType) { SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); return org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils.createSparqlSelectQuery(query, type); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param includeFields * if <code>false</code> only the root is selected (selected fields are ignored) * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String * @see org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils#createSparqlSelectQuery(org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery, boolean, SparqlEndpointTypeEnum) */ @Deprecated public static String createSparqlSelectQuery(SparqlFieldQuery query, boolean includeFields, EndpointTypeEnum endpointType) { SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); return org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils.createSparqlSelectQuery(query,includeFields,type); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param limit * If > 0, than the limit parsed by the query is overriden by this value * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String * @see org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils#createSparqlSelectQuery(org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery, int, SparqlEndpointTypeEnum) */ @Deprecated public static String createSparqlSelectQuery(SparqlFieldQuery query, int limit, EndpointTypeEnum endpointType) { SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); return org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils.createSparqlSelectQuery(query,limit,type); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param includeFields * if <code>false</code> only the root is selected (selected fields are ignored) * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String * @see org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils#createSparqlSelectQuery(org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery, boolean, SparqlEndpointTypeEnum) */ @Deprecated public static String createSparqlSelectQuery(SparqlFieldQuery query, boolean includeFields, EndpointTypeEnum endpointType) { SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); return org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils.createSparqlSelectQuery(query,includeFields,type); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param includeFields * if <code>false</code> only the root is selected (selected fields are ignored) * @param limit * if > 0 than the limit defined by the query is overridden by the parsed value * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String * @see org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils#createSparqlSelectQuery(org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery, boolean, int, SparqlEndpointTypeEnum) */ @Deprecated public static String createSparqlSelectQuery(SparqlFieldQuery query, boolean includeFields, int limit, EndpointTypeEnum endpointType) { SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); return org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils.createSparqlSelectQuery(query,includeFields,limit, type); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param limit * If > 0, than the limit parsed by the query is overriden by this value * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String * @see org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils#createSparqlSelectQuery(org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery, int, SparqlEndpointTypeEnum) */ @Deprecated public static String createSparqlSelectQuery(SparqlFieldQuery query, int limit, EndpointTypeEnum endpointType) { SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); return org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils.createSparqlSelectQuery(query,limit,type); }
/** * Creates the SPARQL representation of the parse field query. * * @param query * A field query implementation that additionally supports a field to variable mapping * @param includeFields * if <code>false</code> only the root is selected (selected fields are ignored) * @param limit * if > 0 than the limit defined by the query is overridden by the parsed value * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @return the SPARQL query as String * @see org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils#createSparqlSelectQuery(org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery, boolean, int, SparqlEndpointTypeEnum) */ @Deprecated public static String createSparqlSelectQuery(SparqlFieldQuery query, boolean includeFields, int limit, EndpointTypeEnum endpointType) { SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); return org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils.createSparqlSelectQuery(query,includeFields,limit, type); }
String sparqlQueryString = SparqlQueryUtils.createSparqlSelectQuery( fieldQuery, select, limit, SparqlEndpointTypeEnum.Sesame); log.debug(" - SPARQL Query: {}", sparqlQueryString);
System.out.println(createSparqlSelectQuery(query, true, 0, SparqlEndpointTypeEnum.LARQ)); System.out.println(); System.out.println(createSparqlSelectQuery(query, true, 0, SparqlEndpointTypeEnum.Virtuoso)); System.out.println(); System.out.println(createSparqlSelectQuery(query, true, 0, SparqlEndpointTypeEnum.Standard)); System.out.println(); System.out.println(createSparqlConstructQuery(query, 0, SparqlEndpointTypeEnum.Virtuoso));
System.out.println(createSparqlSelectQuery(query, true, 0, SparqlEndpointTypeEnum.LARQ)); System.out.println(); System.out.println(createSparqlSelectQuery(query, true, 0, SparqlEndpointTypeEnum.Virtuoso)); System.out.println(); System.out.println(createSparqlSelectQuery(query, true, 0, SparqlEndpointTypeEnum.Standard)); System.out.println(); System.out.println(createSparqlConstructQuery(query, 0, SparqlEndpointTypeEnum.Virtuoso));