GeoPubby
Version 0.1.0.0
|
A data source backed by a SPARQL endpoint accessed through the SPARQL protocol. More...
Public Member Functions | |
RemoteSPARQLDataSource (String endpointURL, String defaultGraphURI) | |
RemoteSPARQLDataSource (String endpointURL, String defaultGraphURI, boolean supportsSPARQL11, Set< String > resourceQueries, Set< String > propertyQueries, Set< String > inversePropertyQueries, Set< String > anonPropertyQueries, Set< String > anonInversePropertyQueries, CachedPropertyCollection highIndegreeProperties, CachedPropertyCollection highOutdegreeProperties) | |
void | setGraphContentType (String mediaType) |
Sets the content type to ask for in graph requests (CONSTRUCT and DESCRIBE) to the remote SPARQL endpoint. More... | |
void | addGraphQueryParam (String param) |
void | addSelectQueryParam (String param) |
boolean | canDescribe (String absoluteIRI) |
Indicates whether this data source may have some information about a given IRI. More... | |
Model | describeResource (String resourceURI) |
Returns a subgraph of the data source describing one resource. More... | |
Map< Property, Integer > | getHighIndegreeProperties (String resourceURI) |
If describeResource(String) omits properties of high indegree, then those properties must be returned here with the count of arcs. More... | |
Map< Property, Integer > | getHighOutdegreeProperties (String resourceURI) |
If describeResource(String) omits properties of high outdegree, then those properties must be returned here with the count of arcs. More... | |
Model | listPropertyValues (String resourceURI, Property property, boolean isInverse) |
Returns a subgraph of the data source. More... | |
List< Resource > | getIndex () |
A list of IRI resources described in this data source. More... | |
AutocompleteEngine< SearchRecord > | getLabelIndex () |
String | getPreviousDescribeQuery () |
Model | describeResource (String absoluteIRI, String language) |
Returns a subgraph of the data source describing one resource. More... | |
Public Attributes | |
final String | endpointURL |
Static Public Attributes | |
static final int | MAX_INDEX_SIZE = 1000000 |
Package Attributes | |
QueryEngineHTTP | endpoint |
Private Member Functions | |
String[] | parseQueryParam (String param) |
Map< Property, Integer > | getHighDegreeProperties (String query, String resourceURI) |
Model | execQueryGraph (String query) |
ResultSet | execQuerySelect (String query) |
String | preProcessQuery (String query, String resourceURI) |
String | preProcessQuery (String query, String resourceURI, Property property) |
String | replaceString (String text, String searchString, String replacement) |
String | toSPARQLArgumentList (Collection<? extends RDFNode > values) |
Private Attributes | |
final String | defaultGraphURI |
final boolean | supportsSPARQL11 |
final Set< String > | resourceQueries |
final Set< String > | propertyQueries |
final Set< String > | inversePropertyQueries |
final Set< String > | anonPropertyQueries |
final Set< String > | anonInversePropertyQueries |
final CachedPropertyCollection | highIndegreeProperties |
final CachedPropertyCollection | highOutdegreeProperties |
String | previousDescribeQuery |
String | contentType = null |
final Set< String[]> | queryParamsSelect = new HashSet<String[]>() |
final Set< String[]> | queryParamsGraph = new HashSet<String[]>() |
AutocompleteEngine< SearchRecord > | engine |
Pattern | queryParamPattern = Pattern.compile("(.*?)=(.*)") |
A data source backed by a SPARQL endpoint accessed through the SPARQL protocol.
RemoteSPARQLDataSource | ( | String | endpointURL, |
String | defaultGraphURI | ||
) |
References RemoteSPARQLDataSource.defaultGraphURI, and RemoteSPARQLDataSource.endpointURL.
RemoteSPARQLDataSource | ( | String | endpointURL, |
String | defaultGraphURI, | ||
boolean | supportsSPARQL11, | ||
Set< String > | resourceQueries, | ||
Set< String > | propertyQueries, | ||
Set< String > | inversePropertyQueries, | ||
Set< String > | anonPropertyQueries, | ||
Set< String > | anonInversePropertyQueries, | ||
CachedPropertyCollection | highIndegreeProperties, | ||
CachedPropertyCollection | highOutdegreeProperties | ||
) |
References RemoteSPARQLDataSource.anonInversePropertyQueries, RemoteSPARQLDataSource.anonPropertyQueries, RemoteSPARQLDataSource.defaultGraphURI, RemoteSPARQLDataSource.endpointURL, RemoteSPARQLDataSource.highIndegreeProperties, RemoteSPARQLDataSource.highOutdegreeProperties, RemoteSPARQLDataSource.inversePropertyQueries, RemoteSPARQLDataSource.propertyQueries, RemoteSPARQLDataSource.resourceQueries, and RemoteSPARQLDataSource.supportsSPARQL11.
void addGraphQueryParam | ( | String | param | ) |
References RemoteSPARQLDataSource.parseQueryParam(), and RemoteSPARQLDataSource.queryParamsGraph.
Referenced by Dataset.buildDataSource().
void addSelectQueryParam | ( | String | param | ) |
References RemoteSPARQLDataSource.parseQueryParam(), and RemoteSPARQLDataSource.queryParamsSelect.
Referenced by Dataset.buildDataSource().
boolean canDescribe | ( | String | absoluteIRI | ) |
Indicates whether this data source may have some information about a given IRI.
If this is false
, a client should not bother to call describeResource(String). This method is to allow for optimizations and should respond very fast.
It is also used by the UI to decide whether a click on a resource should go to a Pubby page (if true
) or out to the Web (if false
).
absoluteIRI | The IRI of a resource to be described |
true
if this data source might have something about it Implements DataSource.
Model describeResource | ( | String | absoluteIRI, |
String | language | ||
) |
Returns a subgraph of the data source describing one resource.
This should include both incoming and outgoing triples. However, it should exclude outgoing arcs where the property is a high-outdegree property, and it should exclude incoming arcs where the property is a high-indegree property. If labels for other resources are included in the result, then they will be used.
absoluteIRI | The IRI of the resource to be described |
Implements DataSource.
Model describeResource | ( | String | absoluteIRI | ) |
Returns a subgraph of the data source describing one resource.
This should include both incoming and outgoing triples. However, it should exclude outgoing arcs where the property is a high-outdegree property, and it should exclude incoming arcs where the property is a high-indegree property. If labels for other resources are included in the result, then they will be used.
absoluteIRI | The IRI of the resource to be described |
Implements DataSource.
References RemoteSPARQLDataSource.execQueryGraph(), RemoteSPARQLDataSource.preProcessQuery(), and RemoteSPARQLDataSource.resourceQueries.
|
private |
References RemoteSPARQLDataSource.contentType, RemoteSPARQLDataSource.defaultGraphURI, RemoteSPARQLDataSource.endpointURL, RemoteSPARQLDataSource.previousDescribeQuery, and RemoteSPARQLDataSource.queryParamsGraph.
Referenced by RemoteSPARQLDataSource.describeResource(), and RemoteSPARQLDataSource.listPropertyValues().
|
private |
References RemoteSPARQLDataSource.defaultGraphURI, RemoteSPARQLDataSource.endpoint, RemoteSPARQLDataSource.endpointURL, and RemoteSPARQLDataSource.queryParamsSelect.
Referenced by RemoteSPARQLDataSource.getHighDegreeProperties(), RemoteSPARQLDataSource.getIndex(), and RemoteSPARQLDataSource.getLabelIndex().
|
private |
References RemoteSPARQLDataSource.execQuerySelect(), RemoteSPARQLDataSource.preProcessQuery(), and RemoteSPARQLDataSource.supportsSPARQL11.
Referenced by RemoteSPARQLDataSource.getHighIndegreeProperties(), and RemoteSPARQLDataSource.getHighOutdegreeProperties().
Map<Property, Integer> getHighIndegreeProperties | ( | String | resourceIRI | ) |
If describeResource(String) omits properties of high indegree, then those properties must be returned here with the count of arcs.
If high-indegree properties are not omitted, or the resource doesn't have any, then an empty map or null may be returned. Entries with value 0 will be ignored.
resourceIRI | The IRI of the resource to be described |
Implements DataSource.
References RemoteSPARQLDataSource.getHighDegreeProperties().
Map<Property, Integer> getHighOutdegreeProperties | ( | String | resourceIRI | ) |
If describeResource(String) omits properties of high outdegree, then those properties must be returned here with the count of arcs.
If high-outdegree properties are not omitted, or the resource doesn't have any, then an empty map or null may be returned. Entries with value 0 will be ignored.
resourceIRI | The IRI of the resource to be described |
Implements DataSource.
References RemoteSPARQLDataSource.getHighDegreeProperties().
List<Resource> getIndex | ( | ) |
A list of IRI resources described in this data source.
Ordering is implementation-defined. Usually a reasonable limit should be applied to the number of resources returned.
Implements DataSource.
References RemoteSPARQLDataSource.execQuerySelect(), and DataSource.MAX_INDEX_SIZE.
AutocompleteEngine<SearchRecord> getLabelIndex | ( | ) |
Implements DataSource.
References RemoteSPARQLDataSource.engine, RemoteSPARQLDataSource.execQuerySelect(), SearchIndexInstance.getInstance(), and DataSource.MAX_INDEX_SIZE.
String getPreviousDescribeQuery | ( | ) |
References RemoteSPARQLDataSource.previousDescribeQuery.
Referenced by MetadataConfiguration.parsePlaceholder().
Model listPropertyValues | ( | String | resourceIRI, |
Property | property, | ||
boolean | isInverse | ||
) |
Returns a subgraph of the data source.
It lists the values of a particular property of a particular resource. Where values are blank nodes, a complete description of these anonymous resources must be included.
resourceIRI | The resource to be examined |
property | The property we're interested in |
isInverse | Are we interested in outgoing arcs (false ) or incoming (true )? |
Implements DataSource.
References RemoteSPARQLDataSource.anonInversePropertyQueries, RemoteSPARQLDataSource.anonPropertyQueries, RemoteSPARQLDataSource.execQueryGraph(), RemoteSPARQLDataSource.inversePropertyQueries, RemoteSPARQLDataSource.preProcessQuery(), and RemoteSPARQLDataSource.propertyQueries.
|
private |
References RemoteSPARQLDataSource.queryParamPattern.
Referenced by RemoteSPARQLDataSource.addGraphQueryParam(), and RemoteSPARQLDataSource.addSelectQueryParam().
|
private |
|
private |
References VocabularyStore.CachedPropertyCollection.get(), RemoteSPARQLDataSource.highIndegreeProperties, RemoteSPARQLDataSource.highOutdegreeProperties, RemoteSPARQLDataSource.replaceString(), and RemoteSPARQLDataSource.toSPARQLArgumentList().
|
private |
Referenced by RemoteSPARQLDataSource.preProcessQuery().
void setGraphContentType | ( | String | mediaType | ) |
Sets the content type to ask for in graph requests (CONSTRUCT and DESCRIBE) to the remote SPARQL endpoint.
Referenced by Dataset.buildDataSource().
|
private |
Referenced by RemoteSPARQLDataSource.preProcessQuery().
|
private |
|
private |
|
private |
Referenced by RemoteSPARQLDataSource.execQueryGraph().
|
private |
|
package |
Referenced by RemoteSPARQLDataSource.execQuerySelect().
final String endpointURL |
|
private |
Referenced by RemoteSPARQLDataSource.getLabelIndex().
|
private |
|
private |
|
private |
|
staticinherited |
|
private |
|
private |
|
private |
Referenced by RemoteSPARQLDataSource.parseQueryParam().
|
private |
Referenced by RemoteSPARQLDataSource.addGraphQueryParam(), and RemoteSPARQLDataSource.execQueryGraph().
|
private |
Referenced by RemoteSPARQLDataSource.addSelectQueryParam(), and RemoteSPARQLDataSource.execQuerySelect().
|
private |
|
private |