/** * Getter for the SPARQL CONSTRUCT representation of this FieldQuery * * @return the SPARQL CONSTRUCT query */ public String toSparqlConstruct() { return SparqlQueryUtils.createSparqlConstructQuery(this, endpointType); }
/** * Getter for the SPARQL CONSTRUCT representation of this FieldQuery * * @return the SPARQL CONSTRUCT query */ public String toSparqlConstruct() { return SparqlQueryUtils.createSparqlConstructQuery(this, endpointType); }
/** * Creates a SPARWL CONSTRUCT query that creates triples for all the selected fields of representations in * the result set. * <p> * In addition the query also constructs <code>entityhub-query:ieldQueryResultSet * entityhub-query:fieldQueryResult ?representation </code> triples that can be used to create an iterator * over the results of the query * * @param query * the field query * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @param additionalFields * This allows to parse additional fields that are optionally selected in the data set and * added to the CONSTRUCT part of the query * @return the SPARQL CONSTRUCT Query */ public static String createSparqlConstructQuery(SparqlFieldQuery query, SparqlEndpointTypeEnum endpointType, String... additionalFields) { return createSparqlConstructQuery(query, -1, endpointType, additionalFields); }
/** * Creates a SPARWL CONSTRUCT query that creates triples for all the selected fields of representations in * the result set. * <p> * In addition the query also constructs <code>entityhub-query:ieldQueryResultSet * entityhub-query:fieldQueryResult ?representation </code> triples that can be used to create an iterator * over the results of the query * * @param query * the field query * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @param additionalFields * This allows to parse additional fields that are optionally selected in the data set and * added to the CONSTRUCT part of the query * @return the SPARQL CONSTRUCT Query */ public static String createSparqlConstructQuery(SparqlFieldQuery query, SparqlEndpointTypeEnum endpointType, String... additionalFields) { return createSparqlConstructQuery(query, -1, endpointType, additionalFields); }
SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); return org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils.createSparqlConstructQuery( query,limit,type,additionalFields);
/** * Creates a SPARWL CONSTRUCT query that creates triples for all the selected fields of representations in * the result set. * <p> * In addition the query also constructs <code>entityhub-query:ieldQueryResultSet * entityhub-query:fieldQueryResult ?representation </code> triples that can be used to create an iterator * over the results of the query * * @param query * the field query * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @param additionalFields * This allows to parse additional fields that are optionally selected in the data set and * added to the CONSTRUCT part of the query * @return the SPARQL CONSTRUCT Query * @see org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils#createSparqlConstructQuery(org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery, SparqlEndpointTypeEnum, String...) */ @Deprecated public static String createSparqlConstructQuery(SparqlFieldQuery query, EndpointTypeEnum endpointType, String... additionalFields) { SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); return org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils.createSparqlConstructQuery( query, type, additionalFields); }
SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); return org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils.createSparqlConstructQuery( query,limit,type,additionalFields);
/** * Creates a SPARWL CONSTRUCT query that creates triples for all the selected fields of representations in * the result set. * <p> * In addition the query also constructs <code>entityhub-query:ieldQueryResultSet * entityhub-query:fieldQueryResult ?representation </code> triples that can be used to create an iterator * over the results of the query * * @param query * the field query * @param endpointType * The type of the Endpoint (used to write optimized queries for endpoint type specific * extensions * @param additionalFields * This allows to parse additional fields that are optionally selected in the data set and * added to the CONSTRUCT part of the query * @return the SPARQL CONSTRUCT Query * @see org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils#createSparqlConstructQuery(org.apache.stanbol.entityhub.query.sparql.SparqlFieldQuery, SparqlEndpointTypeEnum, String...) */ @Deprecated public static String createSparqlConstructQuery(SparqlFieldQuery query, EndpointTypeEnum endpointType, String... additionalFields) { SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); return org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils.createSparqlConstructQuery( query, type, additionalFields); }
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.Standard)); System.out.println(); System.out.println(createSparqlConstructQuery(query, 0, SparqlEndpointTypeEnum.Virtuoso));