Revision 8837
Added by Lauren Walker over 10 years ago
metacat-index/src/main/resources/application-context-oa.xml | ||
---|---|---|
18 | 18 |
</bean> |
19 | 19 |
|
20 | 20 |
<bean id="prov.wasDerivedFrom" class="edu.ucsb.nceas.metacat.index.annotation.SparqlField"> |
21 |
<constructor-arg name="name" value="wasDerivedFrom_sm" />
|
|
21 |
<constructor-arg name="name" value="wasDerivedFrom" /> |
|
22 | 22 |
<constructor-arg name="query"> |
23 | 23 |
<value> |
24 | 24 |
<![CDATA[ |
25 | 25 |
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> |
26 | 26 |
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> |
27 | 27 |
PREFIX owl: <http://www.w3.org/2002/07/owl#> |
28 |
PREFIX prov: <http://www.w3.org/ns/prov#>
|
|
28 |
PREFIX j.0: <http://www.w3.org/ns/prov#>
|
|
29 | 29 |
PREFIX ore: <http://www.openarchives.org/ore/terms/> |
30 | 30 |
PREFIX dcterms: <http://purl.org/dc/terms/> |
31 | 31 |
|
32 |
SELECT ?pid ?wasDerivedFrom_sm
|
|
32 |
SELECT ?pid ?wasDerivedFrom |
|
33 | 33 |
FROM <$GRAPH_NAME> |
34 | 34 |
WHERE { |
35 | 35 |
|
36 |
?primary_data ore:isDocumentedBy ?primary_metadata . |
|
37 |
?derived_data prov:wasDerivedFrom ?primary_data . |
|
38 |
?derived_data ore:isDocumentedBy ?derived_metadata . |
|
39 |
?derived_metadata dcterms:identifier ?pid . |
|
40 |
?primary_metadata dcterms:identifier ?wasDerivedFrom_sm . |
|
36 |
?derived_data j.0:wasDerivedFrom ?primary_data . |
|
37 |
?derived_data dcterms:identifier ?pid . |
|
38 |
?primary_data dcterms:identifier ?wasDerivedFrom . |
|
41 | 39 |
|
42 | 40 |
} |
43 | 41 |
]]> |
Also available in: Unified diff
Add wasDerivedFrom field to the Solr schema and use Sparql query to retrieve the value from the RDF