@Override public int hashCode() { return super.hashCode() + field2VarMappings.hashCode() + varNum + endpointType.ordinal(); }
/** * Determines if the current query uses sub selects. Activated if the SPARQL endpoint supports the SPARQL * 1.1 sub select feature and the query selects more than the enttiy id. * * @param endpoint * the used endpoint type * @param selectedFields * the map with the selected fields * @return the state */ private static boolean isSubSelectState(SparqlEndpointTypeEnum endpoint, Map<String,String> selectedFields) { return endpoint.supportsSubSelect() && selectedFields.size() > 1; }
protected SparqlFieldQuery(EndpointTypeEnum endpointType) { super(endpointType == null ? null : org.apache.stanbol.entityhub.query.sparql.SparqlEndpointTypeEnum.valueOf(endpointType.name())); }
@Deprecated public final EndpointTypeEnum getEndpointType() { EndpointTypeEnum type; try { type = EndpointTypeEnum.valueOf(super.getSparqlEndpointType().name()); } catch (IllegalArgumentException e) { type = null; } return type; }
@Deprecated public final EndpointTypeEnum getEndpointType() { EndpointTypeEnum type; try { type = EndpointTypeEnum.valueOf(super.getSparqlEndpointType().name()); } catch (IllegalArgumentException e) { type = null; } return type; }
protected SparqlFieldQuery(EndpointTypeEnum endpointType) { super(endpointType == null ? null : org.apache.stanbol.entityhub.query.sparql.SparqlEndpointTypeEnum.valueOf(endpointType.name())); }
/** * Determines if the current query uses sub selects. Activated if the SPARQL endpoint supports the SPARQL * 1.1 sub select feature and the query selects more than the enttiy id. * * @param endpoint * the used endpoint type * @param selectedFields * the map with the selected fields * @return the state */ private static boolean isSubSelectState(SparqlEndpointTypeEnum endpoint, Map<String,String> selectedFields) { return endpoint.supportsSubSelect() && selectedFields.size() > 1; }
@Override public int hashCode() { return super.hashCode() + field2VarMappings.hashCode() + varNum + endpointType.ordinal(); }
@Deprecated public final void setEndpointType(EndpointTypeEnum endpointType) { SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); setSparqlEndpointType(type); }
@Deprecated public final void setEndpointType(EndpointTypeEnum endpointType) { SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); setSparqlEndpointType(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 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); }
/** * 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); }
String... additionalFields) { SparqlEndpointTypeEnum type = endpointType == null ? null : SparqlEndpointTypeEnum.valueOf(endpointType.name()); return org.apache.stanbol.entityhub.query.sparql.SparqlQueryUtils.createSparqlConstructQuery( query,limit,type,additionalFields);