GeoPubby
Version 0.1.0.0
|
Wraps a DataSource by applying a IRIRewriter. More...
Public Member Functions | |
RewrittenDataSource (DataSource original, IRIRewriter rewriter) | |
RewrittenDataSource (DataSource original, IRIRewriter rewriter, boolean addSameAsStatements) | |
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... | |
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< SearchRecord > | getLabelIndex () |
Model | describeResource (String absoluteIRI, String language) |
Returns a subgraph of the data source describing one resource. More... | |
Public Attributes | |
final DataSource | original |
Static Public Attributes | |
static final int | MAX_INDEX_SIZE = 1000000 |
Private Member Functions | |
boolean | isOriginalIRI (String absoluteIRI) |
void | addSameAsStatement (Model model, String rewrittenIRI) |
Private Attributes | |
final IRIRewriter | rewriter |
final boolean | addSameAs |
Wraps a DataSource by applying a IRIRewriter.
The result is a data source that contains the same data as the original, but with all IRIs replaced according to the rewriter.
Optionally, may add owl:sameAs
statements to indicate that the rewritten and original IRIs identify the same entity.
RewrittenDataSource | ( | DataSource | original, |
IRIRewriter | rewriter | ||
) |
References RewrittenDataSource.original, and RewrittenDataSource.rewriter.
RewrittenDataSource | ( | DataSource | original, |
IRIRewriter | rewriter, | ||
boolean | addSameAsStatements | ||
) |
References RewrittenDataSource.original, and RewrittenDataSource.rewriter.
|
private |
References ModelUtil.addNSIfUndefined(), RewrittenDataSource.rewriter, and IRIRewriter.unrewrite().
Referenced by RewrittenDataSource.describeResource(), and RewrittenDataSource.listPropertyValues().
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 RewrittenDataSource.addSameAs, DataSource.canDescribe(), RewrittenDataSource.isOriginalIRI(), RewrittenDataSource.original, RewrittenDataSource.rewriter, and IRIRewriter.unrewrite().
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 RewrittenDataSource.addSameAs, RewrittenDataSource.addSameAsStatement(), DataSource.describeResource(), ModelUtil.EMPTY_MODEL, RewrittenDataSource.isOriginalIRI(), RewrittenDataSource.original, IRIRewriter.rewrite(), RewrittenDataSource.rewriter, and IRIRewriter.unrewrite().
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(), RewrittenDataSource.isOriginalIRI(), RewrittenDataSource.original, IRIRewriter.rewrite(), RewrittenDataSource.rewriter, and IRIRewriter.unrewrite().
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(), RewrittenDataSource.isOriginalIRI(), RewrittenDataSource.original, IRIRewriter.rewrite(), RewrittenDataSource.rewriter, and IRIRewriter.unrewrite().
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(), RewrittenDataSource.original, IRIRewriter.rewrite(), and RewrittenDataSource.rewriter.
de.fuberlin.wiwiss.pubby.util.AutocompleteEngine<SearchRecord> getLabelIndex | ( | ) |
Implements DataSource.
References DataSource.getLabelIndex(), and RewrittenDataSource.original.
|
private |
References RewrittenDataSource.rewriter, and IRIRewriter.unrewrite().
Referenced by RewrittenDataSource.canDescribe(), RewrittenDataSource.describeResource(), RewrittenDataSource.getHighIndegreeProperties(), RewrittenDataSource.getHighOutdegreeProperties(), and RewrittenDataSource.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.
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 RewrittenDataSource.addSameAs, RewrittenDataSource.addSameAsStatement(), DataSource.describeResource(), ModelUtil.EMPTY_MODEL, RewrittenDataSource.isOriginalIRI(), DataSource.listPropertyValues(), RewrittenDataSource.original, IRIRewriter.rewrite(), RewrittenDataSource.rewriter, and IRIRewriter.unrewrite().
|
private |
|
staticinherited |
final DataSource original |
Referenced by RewrittenDataSource.canDescribe(), RewrittenDataSource.describeResource(), RewrittenDataSource.getHighIndegreeProperties(), RewrittenDataSource.getHighOutdegreeProperties(), RewrittenDataSource.getIndex(), RewrittenDataSource.getLabelIndex(), RewrittenDataSource.listPropertyValues(), and RewrittenDataSource.RewrittenDataSource().
|
private |
Referenced by RewrittenDataSource.addSameAsStatement(), RewrittenDataSource.canDescribe(), RewrittenDataSource.describeResource(), RewrittenDataSource.getHighIndegreeProperties(), RewrittenDataSource.getHighOutdegreeProperties(), RewrittenDataSource.getIndex(), RewrittenDataSource.isOriginalIRI(), RewrittenDataSource.listPropertyValues(), and RewrittenDataSource.RewrittenDataSource().