GeoPubby
Version 0.1.0.0
|
A DataSource that wraps another data source in such a way that the resulting data source is only capable of describing a subset of the IRI space. More...
Public Member Functions | |
FilteredDataSource (DataSource wrapped) | |
abstract boolean | canDescribe (String absoluteIRI) |
Determines whether a given IRI is considered to be described in the wrapped data source or not. More... | |
Model | describeResource (String iri) |
Returns a subgraph of the data source describing one resource. More... | |
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. More... | |
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. More... | |
Model | listPropertyValues (String resourceIRI, 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 () |
Model | describeResource (String absoluteIRI, String language) |
Returns a subgraph of the data source describing one resource. More... | |
Static Public Attributes | |
static final int | MAX_INDEX_SIZE = 1000000 |
Private Attributes | |
final DataSource | wrapped |
A DataSource that wraps another data source in such a way that the resulting data source is only capable of describing a subset of the IRI space.
This is usually done for performance, to prevent the underlying data source from attempting to describe resources that we know it doesn't have anything of value about.
FilteredDataSource | ( | DataSource | wrapped | ) |
References FilteredDataSource.wrapped.
|
abstract |
Determines whether a given IRI is considered to be described in the wrapped data source or not.
absoluteIRI | Any syntactically valid IRI |
true
if that IRI is described in the data source Implements DataSource.
Referenced by FilteredDataSource.describeResource(), FilteredDataSource.getHighIndegreeProperties(), FilteredDataSource.getHighOutdegreeProperties(), FilteredDataSource.getIndex(), and FilteredDataSource.listPropertyValues().
|
inherited |
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 |
Implemented in MergeDataSource, IndexDataSource, RewrittenDataSource, RemoteSPARQLDataSource, and ModelDataSource.
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 FilteredDataSource.canDescribe(), DataSource.describeResource(), ModelUtil.EMPTY_MODEL, and FilteredDataSource.wrapped.
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 FilteredDataSource.canDescribe(), DataSource.getHighIndegreeProperties(), and FilteredDataSource.wrapped.
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 FilteredDataSource.canDescribe(), DataSource.getHighOutdegreeProperties(), and FilteredDataSource.wrapped.
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 FilteredDataSource.canDescribe(), DataSource.getIndex(), and FilteredDataSource.wrapped.
AutocompleteEngine<SearchRecord> getLabelIndex | ( | ) |
Implements DataSource.
References DataSource.getLabelIndex(), and FilteredDataSource.wrapped.
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 FilteredDataSource.canDescribe(), ModelUtil.EMPTY_MODEL, DataSource.listPropertyValues(), and FilteredDataSource.wrapped.
|
staticinherited |
|
private |
Referenced by FilteredDataSource.describeResource(), FilteredDataSource.FilteredDataSource(), FilteredDataSource.getHighIndegreeProperties(), FilteredDataSource.getHighOutdegreeProperties(), FilteredDataSource.getIndex(), FilteredDataSource.getLabelIndex(), and FilteredDataSource.listPropertyValues().