/** * 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); }
/** * Clones the query (including the field to var name mapping) */ @Override public SparqlFieldQuery clone() { return clone(new SparqlFieldQuery()); } /**
public static SparqlFieldQueryFactory getInstance() { if (instance == null) { instance = new SparqlFieldQueryFactory(); } return instance; }
/** * Getter for the SPARQL CONSTRUCT representation of this FieldQuery * * @return the SPARQL CONSTRUCT query */ public String toSparqlConstruct() { return SparqlQueryUtils.createSparqlConstructQuery(this, endpointType); }
@Deprecated public final EndpointTypeEnum getEndpointType() { EndpointTypeEnum type; try { type = EndpointTypeEnum.valueOf(super.getSparqlEndpointType().name()); } catch (IllegalArgumentException e) { type = null; } return type; }
@Override public boolean equals(Object obj) { return super.equals(obj) && obj instanceof SparqlFieldQuery; }
@Override public SparqlFieldQuery createFieldQuery() { return new SparqlFieldQuery(); }
@Override public Set<String> getSelectedFields() { return query.getSelectedFields(); }
/** * 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); }
/** * Clones the query (including the field to var name mapping) */ @Override public SparqlFieldQuery clone() { return clone(new SparqlFieldQuery()); } /**
/** * Getter for the SPARQL CONSTRUCT representation of this FieldQuery * * @return the SPARQL CONSTRUCT query */ public String toSparqlConstruct() { return SparqlQueryUtils.createSparqlConstructQuery(this, endpointType); }
@Deprecated public final EndpointTypeEnum getEndpointType() { EndpointTypeEnum type; try { type = EndpointTypeEnum.valueOf(super.getSparqlEndpointType().name()); } catch (IllegalArgumentException e) { type = null; } return type; }
public static SparqlFieldQueryFactory getInstance() { if (instance == null) { instance = new SparqlFieldQueryFactory(); } return instance; }
@Override public boolean equals(Object obj) { return super.equals(obj) && obj instanceof SparqlFieldQuery; }
@Override public SparqlFieldQuery createFieldQuery() { return new SparqlFieldQuery(); }
@Override public Set<String> getSelectedFields() { return query.getSelectedFields(); }
/** * 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 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); }