Revision 8972
Added by ben leinfelder about 10 years ago
metacat-index/src/main/resources/index-processor-context.xml | ||
---|---|---|
29 | 29 |
|
30 | 30 |
|
31 | 31 |
<import resource="application-context-oa.xml" /> |
32 |
<import resource="application-context-annotator.xml" /> |
|
32 | 33 |
|
33 | 34 |
|
34 | 35 |
<!-- <import resource="application-context-ao.xml" /> --> |
... | ... | |
101 | 102 |
<ref bean="dryad30Subprocessor" /> |
102 | 103 |
<ref bean="dryad31Subprocessor" /> |
103 | 104 |
<ref bean="rdfXmlSubprocessor" /> |
105 |
<ref bean="annotatorSubprocessor" /> |
|
106 |
|
|
104 | 107 |
</list> |
105 | 108 |
</property> |
106 | 109 |
</bean> |
metacat-index/src/main/resources/application-context-annotator.xml | ||
---|---|---|
1 |
<beans xmlns="http://www.springframework.org/schema/beans" |
|
2 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
3 |
xmlns:p="http://www.springframework.org/schema/p" |
|
4 |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> |
|
5 |
|
|
6 |
<bean id="annotatorSubprocessor" class="org.dataone.cn.indexer.annotation.AnnotatorSubprocessor"/> |
|
7 |
<!-- no params needed for this processor yet --> |
|
8 |
|
|
9 |
</beans> |
|
0 | 10 |
src/edu/ucsb/nceas/metacat/MetacatHandler.java | ||
---|---|---|
2694 | 2694 |
try { |
2695 | 2695 |
// submit for indexing |
2696 | 2696 |
Map<String, List<Object>> fields = EventLog.getInstance().getIndexFields(identifier, Event.READ.xmlValue()); |
2697 |
Map<String, List<Object>> annotations = AnnotatorService.lookUpAnnotations(identifier.getValue()); |
|
2698 |
if (annotations != null) { |
|
2699 |
fields.putAll(annotations); |
|
2700 |
} |
|
2697 |
// Map<String, List<Object>> annotations = AnnotatorService.lookUpAnnotations(identifier.getValue());
|
|
2698 |
// if (annotations != null) {
|
|
2699 |
// fields.putAll(annotations);
|
|
2700 |
// }
|
|
2701 | 2701 |
MetacatSolrIndex.getInstance().submit(identifier, sysMeta, fields, false); |
2702 | 2702 |
} catch (Exception e) { |
2703 | 2703 |
failedList.add(id); |
Also available in: Unified diff
let metacat-index lookup annotations for indexing rather than the metacat "reindex" action.