GeoPubby
Version 0.1.0.0
|
A DataSource that wraps another data source and adds an index of the resources in that data source. More...
Public Member Functions | |
IndexDataSource (String indexIRI, DataSource wrapped) | |
boolean | canDescribe (String absoluteIRI) |
Indicates whether this data source may have some information about a given IRI. More... | |
Model | describeResource (String iri) |
Returns a subgraph of the data source describing one resource. More... | |
Model | describeResource (String iri, String language) |
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) |
Describe the index resource, and extract all the statements that have our property and the right subject/object. More... | |
List< Resource > | getIndex () |
A list of IRI resources described in this data source. More... | |
de.fuberlin.wiwiss.pubby.util.AutocompleteEngine< SearchRecord > | getLabelIndex () |
Public Attributes | |
final DataSource | wrapped |
Static Public Attributes | |
static final int | MAX_INDEX_SIZE = 1000000 |
Private Attributes | |
final String | indexIRI |
Static Private Attributes | |
static final String | SIOC_NS = "http://rdfs.org/sioc/ns#" |
static final Property | siocContainerOf |
A DataSource that wraps another data source and adds an index of the resources in that data source.
IndexDataSource | ( | String | indexIRI, |
DataSource | wrapped | ||
) |
References IndexDataSource.indexIRI, and IndexDataSource.wrapped.
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.
References DataSource.canDescribe(), IndexDataSource.indexIRI, and IndexDataSource.wrapped.
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 DataSource.describeResource(), DataSource.getIndex(), IndexDataSource.indexIRI, IndexDataSource.SIOC_NS, IndexDataSource.siocContainerOf, and IndexDataSource.wrapped.
Referenced by IndexDataSource.listPropertyValues().
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.
References DataSource.describeResource(), DataSource.getIndex(), IndexDataSource.indexIRI, IndexDataSource.SIOC_NS, IndexDataSource.siocContainerOf, and IndexDataSource.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 DataSource.getHighIndegreeProperties(), and IndexDataSource.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 DataSource.getHighOutdegreeProperties(), and IndexDataSource.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 DataSource.getIndex(), and IndexDataSource.wrapped.
de.fuberlin.wiwiss.pubby.util.AutocompleteEngine<SearchRecord> getLabelIndex | ( | ) |
Implements DataSource.
References DataSource.getLabelIndex(), and IndexDataSource.wrapped.
Model listPropertyValues | ( | String | resourceIRI, |
Property | property, | ||
boolean | isInverse | ||
) |
Describe the index resource, and extract all the statements that have our property and the right subject/object.
Implements DataSource.
References IndexDataSource.describeResource(), IndexDataSource.indexIRI, DataSource.listPropertyValues(), and IndexDataSource.wrapped.
|
private |
|
staticinherited |
|
staticprivate |
Referenced by IndexDataSource.describeResource().
|
staticprivate |
Referenced by IndexDataSource.describeResource().
final DataSource wrapped |
Referenced by IndexDataSource.canDescribe(), IndexDataSource.describeResource(), IndexDataSource.getHighIndegreeProperties(), IndexDataSource.getHighOutdegreeProperties(), IndexDataSource.getIndex(), IndexDataSource.getLabelIndex(), IndexDataSource.IndexDataSource(), and IndexDataSource.listPropertyValues().