Project

General

Profile

metacat / docs / dev / eml200_solr_index_config.xml @ 8569

1
<beans>
2

    
3
 <subprocessor id="eml200Subprocessor"
4
  class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
5
  <property name="matchDocument"
6
   value="/d100:systemMetadata/formatId[text() = 'eml://ecoinformatics.org/eml-2.0.0']"></property>
7
  <property name="fieldList">
8
   <list>
9
    <bean id="eml.abstract" class="org.dataone.cn.indexer.parser.MergeSolrField">
10
      <constructor-arg name="name" value="abstract" />
11
      <constructor-arg name="xpath"
12
        value="//dataset/abstract/descendant::text()" />
13
      <constructor-arg name="delimiter" value=" " />
14
      <property name="multivalue" value="false" />
15
      <property name="dedupe" value="false" />
16
    </bean>
17

    
18
    <bean id="eml.keywords" class="org.dataone.cn.indexer.parser.SolrField">
19
        <constructor-arg name="name" value="keywords" />
20
        <constructor-arg name="xpath"
21
            value="//dataset/keywordSet/keyword/text()" />
22
        <property name="multivalue" value="true" />
23
        <property name="dedupe" value="true" />
24
    </bean>
25

    
26
    <bean id="eml.southBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
27
        <constructor-arg name="name" value="southBoundCoord" />
28
        <constructor-arg name="xpath"
29
            value="//dataset/coverage/geographicCoverage/boundingCoordinates/southBoundingCoordinate/text()" />
30
        <property name="multivalue" value="false" />
31
        <property name="converter" ref="solrLatitudeConverter" />
32
    </bean>
33

    
34
    <bean id="eml.northBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
35
        <constructor-arg name="name" value="northBoundCoord" />
36
        <constructor-arg name="xpath"
37
            value="//dataset/coverage/geographicCoverage/boundingCoordinates/northBoundingCoordinate/text()" />
38
        <property name="multivalue" value="false" />
39
        <property name="converter" ref="solrLatitudeConverter" />
40
    </bean>
41

    
42
    <bean id="eml.westBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
43
        <constructor-arg name="name" value="westBoundCoord" />
44
        <constructor-arg name="xpath"
45
            value="//dataset/coverage/geographicCoverage/boundingCoordinates/westBoundingCoordinate/text()" />
46
        <property name="multivalue" value="false" />
47
        <property name="converter" ref="solrLongitudeConverter" />
48
    </bean>
49

    
50
    <bean id="eml.eastBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
51
        <constructor-arg name="name" value="eastBoundCoord" />
52
        <constructor-arg name="xpath"
53
            value="//dataset/coverage/geographicCoverage/boundingCoordinates/eastBoundingCoordinate/text()" />
54
        <property name="multivalue" value="false" />
55
        <property name="converter" ref="solrLongitudeConverter" />
56
    </bean>
57

    
58
    <bean id="eml.beginDate" class="org.dataone.cn.indexer.parser.SolrField">
59
        <constructor-arg name="name" value="beginDate" />
60
        <constructor-arg name="xpath"
61
            value="//dataset/coverage/temporalCoverage/rangeOfDates/beginDate/calendarDate/text()" />
62
        <property name="multivalue" value="false" />
63
        <property name="converter" ref="dateConverter" />
64
    </bean>
65

    
66
    <bean id="eml.endDate" class="org.dataone.cn.indexer.parser.SolrField">
67
        <constructor-arg name="name" value="endDate" />
68
        <constructor-arg name="xpath"
69
            value="//dataset/coverage/temporalCoverage/rangeOfDates/endDate/calendarDate/text()" />
70
        <property name="multivalue" value="false" />
71
        <property name="converter" ref="dateConverter" />
72
    </bean>
73
    
74
    <bean id="eml.pubDate" class="org.dataone.cn.indexer.parser.SolrField">
75
        <constructor-arg name="name" value="pubDate" />
76
        <constructor-arg name="xpath" value="//dataset/pubDate/text()" />
77
        <property name="multivalue" value="false" />
78
        <property name="converter" ref="dateConverter" />
79
    </bean>
80

    
81
    <bean id="eml.title" class="org.dataone.cn.indexer.parser.SolrField">
82
        <constructor-arg name="name" value="title" />
83
        <constructor-arg name="xpath" value="//dataset/title/text()" />
84
        <property name="multivalue" value="false" />
85
    </bean>
86
    
87
    <bean id="eml.project" class="org.dataone.cn.indexer.parser.SolrField">
88
        <constructor-arg name="name" value="project" />
89
        <constructor-arg name="xpath" value="//dataset/project/title/text()" />
90
        <property name="multivalue" value="false" />
91
    </bean> 
92

    
93
    <bean id="eml.author" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
94
            p:multivalue="false"
95
            p:root-ref="authorNameRoot">
96
            <constructor-arg name="name" value="author" />
97
    </bean>
98
    
99
    <bean id="authorNameRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
100
        p:name="author"
101
        p:xPath="//dataset/creator/individualName"
102
        p:template="[givenName] [surName]">
103
        <property name="leafs">
104
            <list>
105
                <ref bean="givenNameLeaf"/>
106
                <ref bean="surNameLeaf"/>
107
            </list>
108
        </property>
109
    </bean>
110
    
111
    <bean id="eml.author_lname" class="org.dataone.cn.indexer.parser.SolrField">
112
        <constructor-arg name="name" value="authorLastName" />
113
        <constructor-arg name="xpath"
114
            value="//dataset/creator/individualName/surName/text()" />
115
        <property name="multivalue" value="true" />
116
    </bean>
117
    
118
    <bean id="eml.investigator" class="org.dataone.cn.indexer.parser.SolrField">
119
        <constructor-arg name="name" value="investigator" />
120
        <constructor-arg name="xpath"
121
            value="//dataset/creator/individualName/surName/text()" />
122
        <property name="multivalue" value="true" />
123
    </bean>
124
    
125
    <bean id="eml.origin" class="org.dataone.cn.indexer.parser.CommonRootSolrField"
126
        p:multivalue="true"
127
        p:root-ref="originRoot">
128
        <constructor-arg name="name" value="origin" />
129
    </bean>
130
    
131
    <bean id="originRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
132
        p:name="origin"
133
        p:xPath="//dataset/creator" 
134
        p:template="[individualName]||[organizationName]">
135
        <property name="leafs"><list><ref bean="organizationNameLeaf"/></list></property>
136
        <property name="subRoots"><list><ref bean="individualNameRoot" /></list></property>
137
    </bean>
138
        
139
    <bean id="organizationNameLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
140
        p:name="organizationName"
141
        p:xPath="organizationName/text()" />
142
        
143
    <bean id="individualNameRoot" class="org.dataone.cn.indexer.parser.utility.RootElement"
144
        p:name="individualName"
145
        p:xPath="individualName"
146
        p:template="[givenName] [surName]">
147
        <property name="leafs">
148
            <list>
149
                <ref bean="givenNameLeaf"/>
150
                <ref bean="surNameLeaf"/>
151
            </list>
152
        </property>
153
    </bean>
154
    
155
    <bean id="givenNameLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
156
        p:name="givenName"
157
        p:xPath="givenName/text()" />
158
        
159
    <bean id="surNameLeaf" class="org.dataone.cn.indexer.parser.utility.LeafElement"
160
        p:name="surName"
161
        p:xPath="surName/text()"/>
162
    
163
    <bean id="eml.contactOrganization" class="org.dataone.cn.indexer.parser.SolrField">
164
        <constructor-arg name="name" value="contactOrganization" />
165
        <constructor-arg name="xpath"
166
          value="//dataset/creator/organizationName/text()" />
167
        <property name="multivalue" value="true" />
168
        <property name="dedupe" value="true"/>
169
    </bean>
170
    
171
    <bean id="eml.fileID" class="org.dataone.cn.indexer.parser.ResolveSolrField">
172
        <constructor-arg name="name" value="fileID" />
173
    </bean>
174
    
175
    <bean id="eml.fullText" class="org.dataone.cn.indexer.parser.FullTextSolrField">
176
        <constructor-arg name="name" value="text" />
177
        <constructor-arg name="xpath"
178
            value="//dataset/*[not(self::dataTable)]//text()" />
179
        <property name="multivalue" value="false" />
180
        <property name="combineNodes" value="true"/>
181
    </bean>
182
    
183
   </list>
184
  </property>
185
 </subprocessor>
186
</beans>