GeoPubby  Version 0.1.0.0
DataSource Interface Reference

A source of RDF data intended for publication through the server. More...

Inheritance diagram for DataSource:
Collaboration diagram for DataSource:

Public Member Functions

boolean canDescribe (String absoluteIRI)
 Indicates whether this data source may have some information about a given IRI. More...
 
Model describeResource (String absoluteIRI)
 Returns a subgraph of the data source describing one resource. More...
 
Model describeResource (String absoluteIRI, 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)
 Returns a subgraph of the data source. More...
 
List< Resource > getIndex ()
 A list of IRI resources described in this data source. More...
 
de.fuberlin.wiwiss.pubby.util.AutocompleteEngine< SearchRecordgetLabelIndex ()
 

Static Public Attributes

static final int MAX_INDEX_SIZE = 1000000
 

Detailed Description

A source of RDF data intended for publication through the server.

TODO: describeResource and getHighXxxdegreeProperties should be combined into a single method with a complex result so that implementations can better mess with the high-degree stuff while keeping responses consistent between methods

Member Function Documentation

◆ canDescribe()

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).

Parameters
absoluteIRIThe IRI of a resource to be described
Returns
true if this data source might have something about it

Implemented in RewrittenDataSource, RemoteSPARQLDataSource, ModelDataSource, MergeDataSource, IndexDataSource, and FilteredDataSource.

Referenced by IndexDataSource.canDescribe(), RewrittenDataSource.canDescribe(), and VocabularyStore.ValueCache< K >.get().

◆ describeResource() [1/2]

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.

Parameters
absoluteIRIThe IRI of the resource to be described
Returns
A subgraph of the data source describing the resource.

Implemented in RemoteSPARQLDataSource, ModelDataSource, RewrittenDataSource, MergeDataSource, IndexDataSource, and FilteredDataSource.

Referenced by Configuration.buildDataSource(), Configuration.Configuration(), FilteredDataSource.describeResource(), IndexDataSource.describeResource(), RewrittenDataSource.describeResource(), VocabularyStore.ValueCache< K >.get(), HypermediaControls.getResourceDescription(), and RewrittenDataSource.listPropertyValues().

◆ describeResource() [2/2]

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.

Parameters
absoluteIRIThe IRI of the resource to be described
Returns
A subgraph of the data source describing the resource.

Implemented in MergeDataSource, IndexDataSource, RewrittenDataSource, RemoteSPARQLDataSource, and ModelDataSource.

◆ getHighIndegreeProperties()

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.

Parameters
resourceIRIThe IRI of the resource to be described
Returns
A map containing high-indegree properties with number of arcs for the resource

Implemented in RemoteSPARQLDataSource, ModelDataSource, RewrittenDataSource, MergeDataSource, IndexDataSource, and FilteredDataSource.

Referenced by FilteredDataSource.getHighIndegreeProperties(), IndexDataSource.getHighIndegreeProperties(), RewrittenDataSource.getHighIndegreeProperties(), and HypermediaControls.getResourceDescription().

◆ getHighOutdegreeProperties()

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.

Parameters
resourceIRIThe IRI of the resource to be described
Returns
A map containing high-outdegree properties with number of arcs for the resource

Implemented in RemoteSPARQLDataSource, ModelDataSource, RewrittenDataSource, MergeDataSource, IndexDataSource, and FilteredDataSource.

Referenced by FilteredDataSource.getHighOutdegreeProperties(), IndexDataSource.getHighOutdegreeProperties(), RewrittenDataSource.getHighOutdegreeProperties(), and HypermediaControls.getResourceDescription().

◆ getIndex()

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.

Implemented in RewrittenDataSource, RemoteSPARQLDataSource, ModelDataSource, MergeDataSource, IndexDataSource, and FilteredDataSource.

Referenced by Configuration.Configuration(), IndexDataSource.describeResource(), FilteredDataSource.getIndex(), IndexDataSource.getIndex(), and RewrittenDataSource.getIndex().

◆ getLabelIndex()

◆ listPropertyValues()

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.

Parameters
resourceIRIThe resource to be examined
propertyThe property we're interested in
isInverseAre we interested in outgoing arcs (false) or incoming (true)?
Returns
A subgraph of the data source.

Implemented in RemoteSPARQLDataSource, ModelDataSource, RewrittenDataSource, MergeDataSource, IndexDataSource, and FilteredDataSource.

Referenced by ValuesDataURLServlet.doGet(), ValuesURLServlet.doGet(), VocabularyStore.CachedPropertyCollection.get(), FilteredDataSource.listPropertyValues(), IndexDataSource.listPropertyValues(), and RewrittenDataSource.listPropertyValues().

Member Data Documentation

◆ MAX_INDEX_SIZE