Project

General

Profile

« Previous | Next » 

Revision 7542

Added by Jing Tao over 11 years ago

Figured out to read beans from the configuration file.

View differences:

metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/ApplicationControllerTest.java
1
package edu.ucsb.nceas.metacat.index;
2

  
3
import static org.junit.Assert.assertEquals;
4
import static org.junit.Assert.assertTrue;
5

  
6
import java.util.List;
7

  
8
import org.dataone.cn.indexer.parser.IDocumentSubprocessor;
9
import org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor;
10
import org.dataone.configuration.Settings;
11
import org.junit.Test;
12

  
13
public class ApplicationControllerTest {
14
    
15
    /**
16
     * Test lookup from default properties file
17
     */
18
    @Test
19
    public void testConstructor() {
20
        ApplicationController controller = new ApplicationController();
21
        List<SolrIndex> list = controller.getSolrIndexes();
22
        assertTrue(list.size() == 1);
23
        SolrIndex[] solrIndexesarray = list.toArray(new SolrIndex[list.size()]);
24
        SolrIndex index = solrIndexesarray[0];
25
        List<IDocumentSubprocessor> subprocessors = index.getSubprocessors();
26
        IDocumentSubprocessor[] subprocessorArray = subprocessors.toArray(new IDocumentSubprocessor[subprocessors.size()]);
27
        assertTrue(subprocessorArray[0] instanceof ScienceMetadataDocumentSubprocessor);
28
    }
29
    
30
}
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SolrIndex.java
1
/**
2
 *  '$RCSfile$'
3
 *    Purpose: A class that gets Accession Number, check for uniqueness
4
 *             and register it into db
5
 *  Copyright: 2000 Regents of the University of California and the
6
 *             National Center for Ecological Analysis and Synthesis
7
 *    Authors: Jivka Bojilova, Matt Jones
8
 *
9
 *   '$Author: leinfelder $'
10
 *     '$Date: 2011-11-02 20:40:12 -0700 (Wed, 02 Nov 2011) $'
11
 * '$Revision: 6595 $'
12
 *
13
 * This program is free software; you can redistribute it and/or modify
14
 * it under the terms of the GNU General Public License as published by
15
 * the Free Software Foundation; either version 2 of the License, or
16
 * (at your option) any later version.
17
 *
18
 * This program is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this program; if not, write to the Free Software
25
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
 */
27
package edu.ucsb.nceas.metacat.index;
28

  
29
import java.util.List;
30

  
31
import javax.xml.parsers.DocumentBuilder;
32
import javax.xml.parsers.DocumentBuilderFactory;
33
import javax.xml.xpath.XPath;
34
import javax.xml.xpath.XPathFactory;
35

  
36
import org.apache.solr.client.solrj.SolrServer;
37
import org.dataone.cn.indexer.XMLNamespaceConfig;
38
import org.dataone.cn.indexer.parser.IDocumentSubprocessor;
39

  
40
/**
41
 * A class does insert, update and remove indexes to a SOLR server
42
 * @author tao
43
 *
44
 */
45
public class SolrIndex {
46
    private List<IDocumentSubprocessor> subprocessors = null;
47
    private SolrServer solrServer = null;
48
    private XMLNamespaceConfig xmlNamespaceConfig = null;
49

  
50
    private static DocumentBuilderFactory documentBuilderFactory = null;
51
    private static DocumentBuilder builder = null;
52

  
53
    private static XPathFactory xpathFactory = null;
54
    private static XPath xpath = null;
55
    
56
    /**
57
     * Constructor
58
     */
59
    public SolrIndex() {
60
        
61
    }
62
    
63
    
64
    /**
65
     * Get the list of the Subprocessors in this index.
66
     * @return the list of the Subprocessors.
67
     */
68
    public List<IDocumentSubprocessor> getSubprocessors() {
69
        return subprocessors;
70
    }
71

  
72
    /**
73
     * Set the list of Subprocessors.
74
     * @param subprocessorList  the list will be set.
75
     */
76
    public void setSubprocessors(List<IDocumentSubprocessor> subprocessorList) {
77
        /*for (IDocumentSubprocessor subprocessor : subprocessorList) {
78
            subprocessor.initExpression(xpath);
79
        }*/
80
        this.subprocessors = subprocessorList;
81
    }
82
}
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/ApplicationController.java
1
/**
2
 *  '$RCSfile$'
3
 *    Purpose: A class that gets Accession Number, check for uniqueness
4
 *             and register it into db
5
 *  Copyright: 2000 Regents of the University of California and the
6
 *             National Center for Ecological Analysis and Synthesis
7
 *    Authors: Jivka Bojilova, Matt Jones
8
 *
9
 *   '$Author: leinfelder $'
10
 *     '$Date: 2011-11-02 20:40:12 -0700 (Wed, 02 Nov 2011) $'
11
 * '$Revision: 6595 $'
12
 *
13
 * This program is free software; you can redistribute it and/or modify
14
 * it under the terms of the GNU General Public License as published by
15
 * the Free Software Foundation; either version 2 of the License, or
16
 * (at your option) any later version.
17
 *
18
 * This program is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this program; if not, write to the Free Software
25
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
 */
27
package edu.ucsb.nceas.metacat.index;
28

  
29
import java.util.List;
30

  
31
import org.apache.commons.logging.Log;
32
import org.apache.commons.logging.LogFactory;
33
import org.springframework.context.ApplicationContext;
34
import org.springframework.context.support.ClassPathXmlApplicationContext;
35
import org.springframework.context.support.FileSystemXmlApplicationContext;
36

  
37
/**
38
 * The start class of the index.
39
 * @author tao
40
 *
41
 */
42
public class ApplicationController {
43
    
44
    private static String SOLRINDEXES = "solrIndexes";
45
    private List<SolrIndex> solrIndexes = null;
46
    private static ApplicationContext context = null;
47
    private String springConfigFile = "src/main/resources/index-processor-context.xml";
48
    Log log = LogFactory.getLog(ApplicationController.class);
49
    
50
    /**
51
     * Constructor
52
     */
53
    public ApplicationController () {
54
        init();
55
    }
56
    
57
    /*
58
     * Init the list of the SolrIndex objects from the configuration file.
59
     */
60
    private void init() {
61
        context = getContext();
62
        solrIndexes = (List<SolrIndex>) context.getBean(SOLRINDEXES);
63
        
64
    }
65
    
66
    /*
67
     * Get the ApplicaionContext of Spring.
68
     */
69
    private ApplicationContext getContext() {
70
        if (context == null) {
71
            context = new FileSystemXmlApplicationContext(springConfigFile);
72
        }
73
        return context;
74
    }
75

  
76
    /**
77
     * Set the Spring configuration file.
78
     * @param springConfigFile  the path of the Spring configuration file
79
     */
80
    public void setSpringConfigFile(String springConfigFile) {
81
        this.springConfigFile = springConfigFile;
82
    }
83
    
84
    /**
85
     * Get the path of the Spring configuration file.
86
     * @return the path of the Spring configuration file.
87
     */
88
    public String getSpringConfigFile() {
89
        return this.springConfigFile;
90
    }
91
    
92
    /**
93
     * Get the list of the solr index.
94
     * @return the list of the solr index.
95
     */
96
    public List<SolrIndex> getSolrIndexes() {
97
        return this.solrIndexes;
98
    }
99
}
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SystemMetadataEventListener.java
1
/**
2
 *  '$RCSfile$'
3
 *    Purpose: A class that gets Accession Number, check for uniqueness
4
 *             and register it into db
5
 *  Copyright: 2000 Regents of the University of California and the
6
 *             National Center for Ecological Analysis and Synthesis
7
 *    Authors: Jivka Bojilova, Matt Jones
8
 *
9
 *   '$Author: leinfelder $'
10
 *     '$Date: 2011-11-02 20:40:12 -0700 (Wed, 02 Nov 2011) $'
11
 * '$Revision: 6595 $'
12
 *
13
 * This program is free software; you can redistribute it and/or modify
14
 * it under the terms of the GNU General Public License as published by
15
 * the Free Software Foundation; either version 2 of the License, or
16
 * (at your option) any later version.
17
 *
18
 * This program is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this program; if not, write to the Free Software
25
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
 */
27
package edu.ucsb.nceas.metacat.index;
28

  
29
public class SystemMetadataEventListener {
30
    
31
}
metacat-index/src/main/resources/application-context-eml200.xml
1
<beans xmlns="http://www.springframework.org/schema/beans"
2
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
4

  
5
 <bean id="eml200Subprocessor"
6
  class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
7
  <property name="matchDocument"
8
   value="/d100:systemMetadata/formatId[text() = 'eml://ecoinformatics.org/eml-2.0.0']"></property>
9
  <property name="fieldList">
10
   <list>
11
    <ref bean="eml.abstract" />
12
    <ref bean="eml.keywords" />
13
    <ref bean="eml.title" />
14
    <ref bean="eml.project" />
15
    <ref bean="eml.southBoundCoord" />
16
    <ref bean="eml.northBoundCoord" />
17
    <ref bean="eml.westBoundCoord" />
18
    <ref bean="eml.eastBoundCoord" />
19
    <ref bean="eml.beginDate" />
20
    <ref bean="eml.endDate" />
21
    <ref bean="eml.pubDate" />
22
    <ref bean="eml.author" />
23
    <ref bean="eml.author_lname" />
24
    <ref bean="eml.investigator" />
25
    <ref bean="eml.origin" />
26
    <ref bean="eml.contactOrganization" />
27
    <ref bean="eml.fileID" />
28
    <ref bean="eml.fullText" />
29
   </list>
30
  </property>
31
 </bean>
32
</beans>
metacat-index/src/main/resources/index-solr-schema.xml
1
<?xml version="1.0" ?>
2
<!-- 
3
THE OFFICIAL DataONE Index Solr Schema definition file.  
4
This schema is copied into the dataone-cn-index buildout for deployment on cn nodes.
5

  
6
The Solr schema file. This file should be named "schema.xml" and
7
 should be in the conf directory under the solr home
8
 (i.e. ./solr/conf/schema.xml by default) 
9
 or located where the classloader for the Solr webapp can find it.
10

  
11
 For more information, on how to customize this file, please see...
12
 http://wiki.apache.org/solr/SchemaXml
13
-->
14

  
15
<schema name="dataone" version="1.1">
16
    <types>
17
        <!-- field type definitions. The "name" attribute is
18
   just a label to be used by field definitions.  The "class"
19
   attribute and any other attributes determine the real
20
   behavior of the fieldtype.  -->
21

  
22
        <!-- The StringField type is not analyzed, but indexed/stored verbatim  -->
23
        <fieldtype name="string" class="solr.StrField" sortMissingLast="true"/>
24

  
25
        <!-- boolean type: "true" or "false" -->
26
        <fieldtype name="boolean" class="solr.BoolField" sortMissingLast="true"/>
27

  
28
        <!-- The optional sortMissingLast and sortMissingFirst attributes are
29
             currently supported on types that are sorted internally as a strings.
30
           - If sortMissingLast="true" then a sort on this field will cause documents
31
           without the field to come after documents with the field,
32
           regardless of the requested sort order (asc or desc).
33
           - If sortMissingFirst="true" then a sort on this field will cause documents
34
           without the field to come before documents with the field,
35
           regardless of the requested sort order.
36
           - If sortMissingLast="false" and sortMissingFirst="false" (the default),
37
           then default lucene sorting will be used which places docs without the field
38
           first in an ascending sort and last in a descending sort.
39
        -->
40

  
41
        <!-- numeric field types that store and index the text
42
value verbatim (and hence don't support range queries since the
43
lexicographic ordering isn't equal to the numeric ordering) -->
44
        <fieldtype name="integer" class="solr.IntField"/>
45
        <fieldtype name="long" class="solr.LongField"/>
46
        <fieldtype name="float" class="solr.FloatField"/>
47
        <fieldtype name="double" class="solr.DoubleField"/>
48

  
49
        <!-- Numeric field types that manipulate the value into
50
  a string value that isn't human readable in it's internal form,
51
  but with a lexicographic ordering the same as the numeric ordering
52
  so that range queries correctly work. -->
53
        <fieldtype name="sint" class="solr.SortableIntField" sortMissingLast="true"/>
54
        <fieldtype name="slong" class="solr.SortableLongField" sortMissingLast="true"/>
55
        <fieldtype name="sfloat" class="solr.SortableFloatField" sortMissingLast="true"/>
56
        <fieldtype name="sdouble" class="solr.SortableDoubleField" sortMissingLast="true"/>
57

  
58
        <!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
59
   is a more restricted form of the canonical representation of dateTime
60
   http://www.w3.org/TR/xmlschema-2/#dateTime
61
   The trailing "Z" designates UTC time and is mandatory.
62
   Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
63
   All other components are mandatory. -->
64
        <fieldtype name="date" class="solr.DateField" sortMissingLast="true"/>
65

  
66
        <!-- solr.TextField allows the specification of custom text analyzers
67
            specified as a tokenizer and a list of token filters. Different
68
            analyzers may be specified for indexing and querying.
69

  
70
            The optional positionIncrementGap puts space between multiple fields of
71
            this type on the same document, with the purpose of preventing false phrase
72
            matching across fields.
73

  
74
            For more info on customizing your analyzer chain, please see...
75
         http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
76

  
77
        -->
78

  
79
        <!-- Standard analyzer commonly used by Lucene developers
80
        -->
81
        <!-- Standard analyzer commonly used by Lucene developers -->
82
<!--
83
         <fieldtype name="text_lu" class="solr.TextField" positionIncrementGap="100">
84
            <analyzer>
85
                <tokenizer class="solr.StandardTokenizerFactory"/>
86
                <filter class="solr.StandardFilterFactory"/>
87
                <filter class="solr.LowerCaseFilterFactory"/>
88
                <filter class="solr.StopFilterFactory"/>
89
                <filter class="solr.EnglishPorterFilterFactory"/>
90
            </analyzer>
91
        </fieldtype> 
92
-->
93
        <!-- One could also specify an existing Analyzer implementation in Java
94
             via the class attribute on the analyzer element:
95
        <fieldtype name="text_lu" class="solr.TextField">
96
          <analyzer class="org.apache.lucene.analysis.snowball.SnowballAnalyzer"/>
97
        </fieldType>
98
        -->
99

  
100
        <!-- A text field that only splits on whitespace for more exact matching -->
101
        <fieldtype name="text_ws" class="solr.TextField" positionIncrementGap="100">
102
            <analyzer>
103
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
104
            </analyzer>
105
        </fieldtype>
106

  
107
        <fieldtype name="text" class="solr.TextField" positionIncrementGap="100">
108
            <analyzer type="index">
109
          		<tokenizer class="solr.WhitespaceTokenizerFactory"/>
110
                <filter class="solr.WordDelimiterFilterFactory" 
111
                	generateWordParts="1"
112
                	catenateWords="1"
113
                	generateNumberParts="1"
114
                	splitOnNumerics="0"/>
115
                
116
                <filter class="solr.LowerCaseFilterFactory"/>
117
                <filter class="solr.StopFilterFactory" />
118
                <filter class="solr.PorterStemFilterFactory" />
119
                <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"/>
120
            </analyzer>
121
            <analyzer type="query">
122
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
123
                
124
                <filter class="solr.WordDelimiterFilterFactory" 
125
                	generateWordParts="1"
126
                	catenateWords="0"
127
                	generateNumberParts="1"
128
                	splitOnNumerics="0"/>
129
                
130
                <filter class="solr.LowerCaseFilterFactory"/>
131
                <filter class="solr.StopFilterFactory"/>
132
                <filter class="solr.PorterStemFilterFactory" />
133
            </analyzer>
134
        </fieldtype>
135

  
136
        <fieldtype name="text_no_token" class="solr.TextField" positionIncrementGap="100">
137
            <analyzer type="index">
138
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>    
139
                <filter class="solr.LowerCaseFilterFactory"/>
140
                <filter class="solr.StopFilterFactory" />
141
            </analyzer>
142
            <analyzer type="query">
143
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>                
144
                <filter class="solr.LowerCaseFilterFactory"/>
145
                <filter class="solr.StopFilterFactory"/>
146
            </analyzer>
147
        </fieldtype>
148

  
149
<!--
150
         <fieldtype name="text_all" class="solr.TextField" positionIncrementGap="100">
151
            <analyzer type="index">
152
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
153
                in this example, we will only use synonyms at query time
154
                <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
155
               
156
                <filter class="solr.StopFilterFactory" ignoreCase="true"/>
157
                <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
158
                        catenateWords="1" catenateNumbers="1" catenateAll="0"/>
159
                <filter class="solr.LowerCaseFilterFactory"/>
160
                <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
161
            </analyzer>
162
            <analyzer type="query">
163
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
164
                <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
165
                <filter class="solr.StopFilterFactory" ignoreCase="true"/>
166
                <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1"
167
                        catenateWords="0" catenateNumbers="0" catenateAll="0"/>
168
                <filter class="solr.LowerCaseFilterFactory"/>
169
                <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
170
            </analyzer>
171
        </fieldtype>
172
 -->
173

  
174
        <!-- Less flexible matching, but less false matches.  Probably not ideal for product names
175
but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->
176
         <fieldtype name="textTight" class="solr.TextField" positionIncrementGap="100">
177
            <analyzer>
178
                <tokenizer class="solr.WhitespaceTokenizerFactory"/>
179
                <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
180
                <filter class="solr.StopFilterFactory" ignoreCase="true"/>
181
                <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0"
182
                        catenateWords="1" catenateNumbers="1" catenateAll="0"/>
183
                <filter class="solr.LowerCaseFilterFactory"/>
184
                <filter class="solr.EnglishPorterFilterFactory" protected="protwords.txt"/>
185
            </analyzer>
186
        </fieldtype> 
187
		
188
    </types>
189

  
190

  
191
<!-- ======================================================================= -->
192
    <fields>
193
        <!-- Valid attributes for fields:
194
            name: mandatory - the name for the field
195
            type: mandatory - the name of a previously defined type from the <types> section
196
            indexed: true if this field should be indexed (searchable)
197
            stored: true if this field should be retrievable
198
            multiValued: true if this field may contain multiple values per document
199
            omitNorms: (expert) set to true to omit the norms associated with this field
200
                       (this disables length normalization and index-time boosting for the field)
201
        -->
202

  
203
        <field name="id"              	type="string"   indexed="true" stored="true" multiValued="false"/>
204
        <field name="formatId"    		type="string"   indexed="true" stored="true" multiValued="false"/>
205
		<field name="formatType"		type="string"	indexed="true"	stored="true"	multiValued="false"/>
206
        <field name="size"            	type="slong"     indexed="true" stored="true" multiValued="false"/>
207
        <field name="checksum"        	type="string"   indexed="false" stored="true" multiValued="false"/>
208
        <field name="checksumAlgorithm" type="string" indexed="false" stored="true"/>
209
        <field name="dateUploaded"    type="date"     indexed="true" stored="true" multiValued="false"/>
210
        <field name="dateModified"    type="date"     indexed="true" stored="true" multiValued="false"/>
211
        <field name="submitter"       type="string"   indexed="true" stored="true" multiValued="false"/>
212
        <field name="rightsHolder"    type="string"   indexed="true" stored="true" multiValued="false"/>
213
        <field name="authoritativeMN"       	type="string"   indexed="false" stored="true" multiValued="false"/>
214
        <field name="replicationAllowed"     	type="boolean"  indexed="false" stored="true" multiValued="false"/>
215
        <field name="numberReplicas"      		type="integer"  indexed="false" stored="true" multiValued="false"/>
216
        <field name="preferredReplicationMN"   	type="string"   indexed="false" stored="true" multiValued="true"/>
217
        <field name="blockedReplicationMN"  	type="string"   indexed="false" stored="true" multiValued="true"/>
218
        <field name="replicaMN"      		type="string"   indexed="false" stored="true" multiValued="true"/>
219
        <field name="replicaVerifiedDate" 	type="date"    indexed="false" stored="true" multiValued="true"/>
220
        <field name="datasource"       		type="string"  indexed="true" stored="true" multiValued="false"/>
221
        <field name="obsoletes"       		type="string"   indexed="true" stored="true" multiValued="false"/>
222
        <field name="obsoletedBy"      		type="string"   indexed="true" stored="true" multiValued="false"/>
223

  
224
        <!-- Object relationships -->
225
        <field name="resourceMap"		type="string"   indexed="true" stored="true" multiValued="true"/>
226
        <field name="documents"			type="string"   indexed="true" stored="true" multiValued="true"/>
227
        <field name="isDocumentedBy"	type="string"   indexed="true" stored="true" multiValued="true"/>
228

  
229
        <!--Permissions-->
230
        <field name="readPermission"    type="string"   indexed="true" stored="true" multiValued="true"/>
231
        <field name="writePermission"   type="string"   indexed="true" stored="true" multiValued="true"/>
232
        <field name="changePermission"  type="string"   indexed="true" stored="true" multiValued="true"/>
233
        <field name="isPublic"          type="boolean"  indexed="true" stored="true" />
234
        
235
        <!-- Science metadata properties -->
236
        <field name="abstract"                 type="text"      multiValued="false" indexed="true" stored="true" />
237
        <field name="author"                   type="string"    multiValued="false" indexed="true" stored="true" />
238
        <field name="authorLastName"             type="string"    multiValued="true" indexed="true" stored="true" />
239
        <field name="keywords"                 type="string"    multiValued="true" indexed="true" stored="true" />
240
        <field name="keyConcept"               type="string"    multiValued="true" indexed="true" stored="true" />
241
        <field name="southBoundCoord"          type="sfloat"     multiValued="false" indexed="true" stored="true"/>
242
        <field name="northBoundCoord"          type="sfloat"     multiValued="false" indexed="true" stored="true"/>
243
        <field name="westBoundCoord"           type="sfloat"     multiValued="false" indexed="true" stored="true"/>
244
        <field name="eastBoundCoord"           type="sfloat"     multiValued="false" indexed="true" stored="true"/>
245
        <field name="namedLocation"            type="string"    multiValued="true" indexed="true" stored="true" />
246
        <field name="beginDate"                type="date"      multiValued="false" indexed="true" stored="true" />
247
        <field name="endDate"                  type="date"      multiValued="false" indexed="true" stored="true" />
248
        
249
        <field name="title"                    type="text"    multiValued="false" indexed="true" stored="true" />
250
        <field name="scientificName"           type="string"    multiValued="true" indexed="true" stored="true" />
251
        <field name="relatedOrganizations"     type="string"    multiValued="true" indexed="true" stored="true" />
252
        <field name="datePublished"            type="date"      multiValued="false" indexed="true" stored="true" />
253
        <field name="pubDate" 				   type="date" 							indexed="true" stored="true"/>
254

  
255
		<field name="investigator" 		type="string" 	indexed="true" stored="true" multiValued="true"/>
256
		<field name="investigatorText" 	type="text" 	indexed="true" stored="false" multiValued="true"/>
257
        <field name="ogcUrl" 			type="text" 	indexed="false" stored="true"/>
258
        <field name="sku" 				type="textTight" indexed="true" stored="true"/>
259
        <field name="identifier" 		type="textTight" indexed="true" stored="true"/>
260
        <field name="LTERSite"	 		type="string" 	indexed="true" stored="true"/>
261
        <field name="origin" 			type="string" 	indexed="true" stored="true" multiValued="true"/>
262
        <field name="originText" 		type="text" 	indexed="true" stored="false" multiValued="true"/>
263
        <field name="titlestr" 			type="string" 	indexed="true" stored="false"/>
264
        <field name="geoform" 			type="string" 	indexed="true" stored="true"/>
265
        <field name="presentationCat" 	type="string" 	indexed="true" stored="true"/>
266
        <field name="purpose" 			type="text" 	indexed="true" stored="true"/>
267
        <field name="updateDate" 		type="date" 	indexed="true" stored="true"/>
268
        <field name="edition" 			type="text" 	indexed="true" stored="true"/>
269
        <field name="dataUrl" 			type="string" 	indexed="false" stored="true"/>
270
        <field name="originator" 		type="string" 	indexed="true" stored="true" multiValued="true"/>
271
        <field name="originatorText" 	type="text"	  	indexed="true" stored="false" multiValued="true"/>
272
        <field name="family" 			type="string" 	indexed="true" stored="true" multiValued="true"/>
273
        <field name="species" 			type="string" 	indexed="true" stored="true" multiValued="true"/>
274
        <field name="genus" 			type="string" 	indexed="true" stored="true" multiValued="true"/>
275
        <field name="kingdom" 			type="string" 	indexed="true" stored="true" multiValued="true"/>
276
        <field name="phylum" 			type="string" 	indexed="true" stored="true" multiValued="true"/>
277
        <field name="order" 			type="string" 	indexed="true" stored="true" multiValued="true"/>
278
        <field name="class" 			type="string" 	indexed="true" stored="true" multiValued="true"/>
279

  
280
        <field name="webUrl" 			type="string" 	indexed="false" stored="true" multiValued="true"/>
281

  
282
        <field name="contactOrganization" 		type="string" indexed="true" stored="true" multiValued="true"/>
283
        <field name="contactOrganizationText" 	type="text"   indexed="true" stored="false" multiValued="true"/>
284

  
285
        <field name="keywordsText" 		type="text" 	indexed="true" stored="false" multiValued="true"/>
286
        <field name="placeKey" 			type="text" 	indexed="true" stored="true" multiValued="true"/>
287

  
288
        <field name="noBoundingBox" 	type="string" 	indexed="true" stored="true"/>
289
        <field name="isSpatial" 		type="string" 	indexed="true" stored="true"/>
290

  
291
        <field name="decade" 			type="string" 	indexed="true" stored="true"/>
292
        <field name="gcmdKeyword" 		type="text" 	indexed="true" stored="true" multiValued="true"/>
293

  
294
        <!-- these are ornl daac fields, may not be populated for nbii, but are required to be here for indexing purpose-->
295
        <field name="project" 			type="string" 	indexed="true" stored="true"/>
296
        <field name="projectText" 		type="text" 	indexed="true" stored="false"/>
297

  
298
        <field name="site" 				type="string" 	indexed="true" stored="true" multiValued="true"/>
299
        <field name="siteText" 			type="text" 	indexed="true" stored="false" multiValued="true"/>
300

  
301
        <field name="parameter" 		type="string" 	indexed="true" stored="true" multiValued="true"/>
302
        <field name="parameterText"		type="text" 	indexed="true" stored="false" multiValued="true"/>
303

  
304
        <field name="sensor" 			type="string" 	indexed="true" stored="true" multiValued="true"/>
305
        <field name="sensorText" 		type="text" 	indexed="true" stored="false" multiValued="true"/>
306

  
307
        <field name="source" 			type="string" 	indexed="true" stored="true" multiValued="true"/>
308
        <field name="sourceText" 		type="text" 	indexed="true" stored="false" multiValued="true"/>
309

  
310
        <field name="term" 				type="string" 	indexed="true" stored="true" multiValued="true"/>
311
        <field name="termText" 			type="text" 	indexed="true" stored="false" multiValued="true"/>
312

  
313
        <field name="topic" 			type="string" 	indexed="true" stored="true" multiValued="true"/>
314
        <field name="topicText" 		type="text" 	indexed="true" stored="false" multiValued="true"/>
315

  
316
        <field name="fileID" 			type="string" 	indexed="true" stored="true"/>
317
   		<field name="text"				type="text"		indexed="true" stored="true" multiValued="false" />
318
<!-- ======================================================================= -->
319
        <!-- Dynamic field definitions.  If a field name is not found, dynamicFields
320
will be used if the name matches any of the patterns.
321
RESTRICTION: the glob-like pattern in the name attribute must have
322
a "*" only at the start or the end.
323
EXAMPLE:  name="*_i" will match any field ending in _i (like myid_i, z_i)
324
Longer patterns will be matched first.  if equal size patterns
325
both match, the first appearing in the schema will be used.  -->
326
        <dynamicField name="*_i" type="sint" indexed="true" stored="true"/>
327
        <dynamicField name="*_s" type="string" indexed="true" stored="true"/>
328
        <dynamicField name="*_l" type="slong" indexed="true" stored="true"/>
329
        <dynamicField name="*_t" type="text" indexed="true" stored="true"/>
330
        <dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
331
        <dynamicField name="*_f" type="sfloat" indexed="true" stored="true"/>
332
        <dynamicField name="*_d" type="sdouble" indexed="true" stored="true"/>
333
        <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
334
    </fields>
335

  
336
<!-- ======================================================================= -->
337
    <!-- field to use to determine and enforce document uniqueness. -->
338
    <uniqueKey>id</uniqueKey>
339

  
340
    <!-- field for the QueryParser to use when an explicit fieldname is absent -->
341
    <defaultSearchField>text</defaultSearchField>
342

  
343
    <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
344
    <solrQueryParser defaultOperator="AND"/>
345

  
346
<!-- ======================================================================= -->
347
    <!-- copyField commands copy one field to another at the time a document
348
is added to the index.  It's used either to index the same field different
349
ways, or to add multiple fields to the same field for easier/faster searching.  -->
350

  
351
    <copyField source="id" dest="sku"/>
352
    <copyField source="id" dest="identifier"/>
353
    <copyfield source="replicaMN" dest="datasource" />
354

  
355
    <copyField source="title" dest="titlestr"/>
356

  
357
    <copyField source="origin" dest="originText"/>
358
    <copyField source="origin" dest="originatorText"/>
359
    
360
    <copyField source="project" dest="projectText"/>
361
    
362
    <copyField source="site" dest="siteText"/>
363
    <copyField source="parameter" dest="parameterText"/>
364
    <copyField source="sensor" dest="sensorText"/>
365
    <copyField source="source" dest="sourceText"/>
366
    <copyField source="term" dest="termText"/>
367
    <copyField source="topic" dest="topicText"/>
368
    <copyField source="investigator" dest="investigatorText"/>
369
    <copyField source="keywords" dest="keywordsText"/>
370
    <copyField source="pubDate" dest="datePublished" />
371
    <copyField source="dateUploaded" dest="updateDate" />
372
    <copyField source="contactOrganization" dest="contactOrganizationText"/>
373
  
374

  
375
    <!-- Similarity is the scoring routine for each document vs a query.
376
A custom similarity may be specified here, but the default is fine
377
for most applications.  -->
378
    <!-- <similarity class="org.apache.lucene.search.DefaultSimilarity"/> -->
379

  
380
</schema>
metacat-index/src/main/resources/application-context-eml210.xml
1
<beans xmlns="http://www.springframework.org/schema/beans"
2
	xmlns:p="http://www.springframework.org/schema/p"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xsi:schemaLocation="http://www.springframework.org/schema/beans 
5
						http://www.springframework.org/schema/beans/spring-beans.xsd
6
						http://www.springframework.org/schema/context  
7
    					http://www.springframework.org/schema/context/spring-context-3.0.xsd">
8
    					
9
 <bean id="eml210Subprocessor"
10
  class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
11
  <property name="matchDocument"
12
   value="/d100:systemMetadata/formatId[text() = 'eml://ecoinformatics.org/eml-2.1.0']"></property>
13
  <property name="fieldList">
14
   <list>
15
    <ref bean="eml.abstract" />
16
    <ref bean="eml.keywords" />
17
    <ref bean="eml.title" />
18
    <ref bean="eml.project" />
19
    <ref bean="eml.southBoundCoord" />
20
    <ref bean="eml.northBoundCoord" />
21
    <ref bean="eml.westBoundCoord" />
22
    <ref bean="eml.eastBoundCoord" />
23
    <ref bean="eml.beginDate" />
24
    <ref bean="eml.endDate" />
25
    <ref bean="eml.pubDate" />
26
    <ref bean="eml.author" />
27
    <ref bean="eml.author_lname" />
28
    <ref bean="eml.investigator" />
29
    <ref bean="eml.origin" />
30
    <ref bean="eml.contactOrganization" />
31
    <ref bean="eml.fileID" />
32
    <ref bean="eml.fullText" />
33
   </list>
34
  </property>
35
 </bean>
36
</beans>
metacat-index/src/main/resources/application-context-eml201.xml
1
<beans xmlns="http://www.springframework.org/schema/beans"
2
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
4

  
5
 <bean id="eml201Subprocessor"
6
  class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
7
  <property name="matchDocument"
8
   value="/d100:systemMetadata/formatId[text() = 'eml://ecoinformatics.org/eml-2.0.1']"></property>
9
  <property name="fieldList">
10
   <list>
11
    <ref bean="eml.abstract" />
12
    <ref bean="eml.keywords" />
13
    <ref bean="eml.title" />
14
    <ref bean="eml.project" />
15
    <ref bean="eml.southBoundCoord" />
16
    <ref bean="eml.northBoundCoord" />
17
    <ref bean="eml.westBoundCoord" />
18
    <ref bean="eml.eastBoundCoord" />
19
    <ref bean="eml.beginDate" />
20
    <ref bean="eml.endDate" />
21
    <ref bean="eml.pubDate" />
22
    <ref bean="eml.author" />
23
    <ref bean="eml.author_lname" />
24
    <ref bean="eml.investigator" />
25
    <ref bean="eml.origin" />
26
    <ref bean="eml.contactOrganization" />
27
    <ref bean="eml.fileID" />
28
    <ref bean="eml.fullText" />
29
   </list>
30
  </property>
31
 </bean>
32
</beans>
metacat-index/src/main/resources/application-context-fgdc-std-001-1998.xml
1
<beans xmlns="http://www.springframework.org/schema/beans"
2
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
4

  
5
 <bean id="fgdcstd0011998Subprocessor"
6
  class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
7
  <property name="matchDocument"
8
   value="/d100:systemMetadata/formatId[text() = 'FGDC-STD-001-1998']"></property>
9
  <property name="fieldList">
10
   <list>
11
	    <ref bean="fgdc.abstract" />
12
	    <ref bean="fgdc.beginDate"/>
13
	    <ref bean="fgdc.class" />
14
		<ref bean="fgdc.contactOrganization"/>
15
		<ref bean="fgdc.eastBoundCoord"/>
16
		<ref bean="fgdc.westBoundCoord" />
17
		<ref bean="fgdc.northBoundCoord" />
18
		<ref bean="fgdc.southBoundCoord" />
19
		<ref bean="fgdc.edition" />
20
		<ref bean="fgdc.endDate" />
21
		<ref bean="fgdc.gcmdKeyword"/>
22
		<ref bean="fgdc.keywords"/>
23
		<ref bean="fgdc.geoform" />
24
		<ref bean="fgdc.genus" />
25
		<ref bean="fgdc.kingdom" />
26
		<ref bean="fgdc.order" />
27
		<ref bean="fgdc.phylum" />
28
		<ref bean="fgdc.species" />
29
		<ref bean="fgdc.origin" />
30
		<ref bean="fgdc.placeKey" />
31
		<ref bean="fgdc.pubDate" />
32
		<ref bean="fgdc.purpose" />
33
		<ref bean="fgdc.title" />
34
		<ref bean="fgdc.web_url" />
35
		<ref bean="fgdc.fileID" />
36
		<ref bean="fgdc.fullText" />
37
		<ref bean="fgdc.presentationCat" />
38
		<ref bean="fgdc.author"/>
39
		<ref bean="fgdc.investigator" />
40
		<ref bean="fgdc.site" />
41
   </list>
42
  </property>
43
 </bean>
44
</beans>
metacat-index/src/main/resources/application-context-eml211.xml
1
<beans xmlns="http://www.springframework.org/schema/beans"
2
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
4

  
5
 <bean id="eml211Subprocessor"
6
  class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
7
  <property name="matchDocument"
8
   value="/d100:systemMetadata/formatId[text() = 'eml://ecoinformatics.org/eml-2.1.1']"></property>
9
  <property name="fieldList">
10
   <list>
11
    <ref bean="eml.abstract" />
12
    <ref bean="eml.keywords" />
13
    <ref bean="eml.title" />
14
    <ref bean="eml.project" />
15
    <ref bean="eml.southBoundCoord" />
16
    <ref bean="eml.northBoundCoord" />
17
    <ref bean="eml.westBoundCoord" />
18
    <ref bean="eml.eastBoundCoord" />
19
    <ref bean="eml.beginDate" />
20
    <ref bean="eml.endDate" />
21
    <ref bean="eml.pubDate" />
22
    <ref bean="eml.author" />
23
    <ref bean="eml.author_lname" />
24
    <ref bean="eml.investigator" />
25
    <ref bean="eml.origin" />
26
    <ref bean="eml.contactOrganization" />
27
    <ref bean="eml.fileID" />
28
    <ref bean="eml.fullText" />
29
   </list>
30
  </property>
31
 </bean>
32
</beans>
metacat-index/src/main/resources/application-context-fgdc-esri-csdg-80.xml
1
<beans xmlns="http://www.springframework.org/schema/beans"
2
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
4

  
5
 <bean id="fgdcEsri80Subprocessor"
6
  class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
7
  <property name="matchDocument"
8
   value="/d100:systemMetadata/formatId[text() = 'http://www.esri.com/metadata/esriprof80.dtd']"></property>
9
  <property name="fieldList">
10
   <list>
11
	    <ref bean="fgdc.abstract" />
12
	    <ref bean="fgdc.beginDate"/>
13
	    <ref bean="fgdc.class" />
14
		<ref bean="fgdc.contactOrganization"/>
15
		<ref bean="fgdc.eastBoundCoord"/>
16
		<ref bean="fgdc.westBoundCoord" />
17
		<ref bean="fgdc.northBoundCoord" />
18
		<ref bean="fgdc.southBoundCoord" />
19
		<ref bean="fgdc.edition" />
20
		<ref bean="fgdc.endDate" />
21
		<ref bean="fgdc.gcmdKeyword"/>
22
		<ref bean="fgdc.keywords"/>
23
		<ref bean="fgdc.geoform" />
24
		<ref bean="fgdc.genus" />
25
		<ref bean="fgdc.kingdom" />
26
		<ref bean="fgdc.order" />
27
		<ref bean="fgdc.phylum" />
28
		<ref bean="fgdc.species" />
29
		<ref bean="fgdc.origin" />
30
		<ref bean="fgdc.placeKey" />
31
		<ref bean="fgdc.pubDate" />
32
		<ref bean="fgdc.purpose" />
33
		<ref bean="fgdc.title" />
34
		<ref bean="fgdc.web_url" />
35
		<ref bean="fgdc.fileID" />
36
		<ref bean="fgdc.fullText" />
37
		<ref bean="fgdc.presentationCat" />
38
		<ref bean="fgdc.author"/>
39
		<ref bean="fgdc.investigator" />
40
		<ref bean="fgdc.site" />
41
   </list>
42
  </property>
43
 </bean>
44
</beans>
metacat-index/src/main/resources/application-context-dryad30.xml
1
<beans xmlns="http://www.springframework.org/schema/beans"
2
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
4

  
5
	<bean id="dryad30Subprocessor"
6
	  	class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
7
		<property name="matchDocument"
8
	   		value="/d100:systemMetadata/formatId[text() = 'http://purl.org/dryad/terms/']"></property>
9
	  	<property name="fieldList">
10
		   	<list>
11
		    	<ref bean="dryad.abstract" />
12
		    	<ref bean="dryad.author" />
13
		    	<ref bean="dryad.investigator" />
14
		    	<ref bean="dryad.keywords" />
15
		    	<ref bean="dryad.origin" />
16
		    	<ref bean="dryad.pubDate" />
17
				<ref bean="dryad.site" />
18
		    	<ref bean="dryad.title" />
19
		    	<ref bean="dryad.scientificName" />
20
				<ref bean="dryad.fileID" />
21
		    	<ref bean="dryad.fullText" />
22
		   	</list>
23
	  	</property>
24
	</bean>
25
</beans>
metacat-index/src/main/resources/application-context-dryad31.xml
1
<beans xmlns="http://www.springframework.org/schema/beans"
2
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
4

  
5
	<bean id="dryad31Subprocessor"
6
	  	class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
7
		<property name="matchDocument"
8
	   		value="/d100:systemMetadata/formatId[text() = 'http://datadryad.org/profile/v3.1/dryad.xsd']"></property>
9
	  	<property name="fieldList">
10
		   	<list>
11
		    	<ref bean="dryad.abstract" />
12
		    	<ref bean="dryad.author" />
13
		    	<ref bean="dryad.investigator" />
14
		    	<ref bean="dryad.keywords" />
15
		    	<ref bean="dryad.origin" />
16
		    	<ref bean="dryad.pubDate" />
17
				<ref bean="dryad.site" />
18
		    	<ref bean="dryad.title" />
19
		    	<ref bean="dryad.scientificName" />
20
				<ref bean="dryad.fileID" />
21
		    	<ref bean="dryad.fullText" />
22
		   	</list>
23
	  	</property>
24
	</bean>
25
</beans>
metacat-index/src/main/resources/application-context-fgdc-base.xml
1
<beans xmlns="http://www.springframework.org/schema/beans"
2
	xmlns:p="http://www.springframework.org/schema/p"
3
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	xsi:schemaLocation="http://www.springframework.org/schema/beans 
5
						http://www.springframework.org/schema/beans/spring-beans.xsd
6
						http://www.springframework.org/schema/context  
7
    					http://www.springframework.org/schema/context/spring-context-3.0.xsd">
8

  
9
	<bean id="fgdc.abstract" class="org.dataone.cn.indexer.parser.MergeSolrField">
10
	  <constructor-arg name="name" value="abstract" />
11
	  <constructor-arg name="xpath"
12
	    value="//metadata/idinfo/descript/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="fgdc.beginDate" class="org.dataone.cn.indexer.parser.SolrField">
19
		<constructor-arg name="name" value="beginDate" />
20
		<constructor-arg name="xpath"
21
			value="//metadata/idinfo/timeperd/timeinfo/rngdates/begdate/text()" />
22
		<property name="multivalue" value="false" />
23
		<property name="converter" ref="fgdcDateConverter" />
24
	</bean>
25
	
26
	<bean id="fgdc.class" class="org.dataone.cn.indexer.parser.SolrField">
27
		<constructor-arg name="name" value="class" />
28
		<constructor-arg name="xpath" value='//taxoncl/taxonrv[../taxonrn="Class"]/text()' />
29
		<property name="multivalue" value="true" />
30
	</bean>	
31

  
32
	<bean id="fgdc.contactOrganization" class="org.dataone.cn.indexer.parser.SolrField">
33
		<constructor-arg name="name" value="contactOrganization" />
34
		<constructor-arg name="xpath"
35
		  value="//metadata/distinfo/distrib/cntinfo/cntperp/cntorg/text() | //metadata/distinfo/distrib/cntinfo/cntorgp/cntorg/text()" />
36
		<property name="multivalue" value="true" />
37
		<property name="dedupe" value="true"/>
38
	</bean>	
39

  
40
	<bean id="fgdc.eastBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
41
		<constructor-arg name="name" value="eastBoundCoord" />
42
		<constructor-arg name="xpath"
43
			value="//metadata/idinfo/spdom/bounding/eastbc/text()" />
44
		<property name="multivalue" value="false" />
45
		<property name="converter" ref="solrLongitudeConverter" />
46
	</bean>
47
	
48
	<bean id="fgdc.northBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
49
		<constructor-arg name="name" value="northBoundCoord" />
50
		<constructor-arg name="xpath"
51
			value="//metadata/idinfo/spdom/bounding/northbc/text()" />
52
		<property name="multivalue" value="false" />
53
		<property name="converter" ref="solrLongitudeConverter" />
54
	</bean>	
55
	
56
	<bean id="fgdc.southBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
57
		<constructor-arg name="name" value="southBoundCoord" />
58
		<constructor-arg name="xpath"
59
			value="//metadata/idinfo/spdom/bounding/southbc/text()" />
60
		<property name="multivalue" value="false" />
61
		<property name="converter" ref="solrLongitudeConverter" />
62
	</bean>	
63
	
64
	<bean id="fgdc.westBoundCoord" class="org.dataone.cn.indexer.parser.SolrField">
65
		<constructor-arg name="name" value="westBoundCoord" />
66
		<constructor-arg name="xpath"
67
			value="//metadata/idinfo/spdom/bounding/westbc/text()" />
68
		<property name="multivalue" value="false" />
69
		<property name="converter" ref="solrLongitudeConverter" />
70
	</bean>		
71
	
72
	<bean id="fgdc.edition" class="org.dataone.cn.indexer.parser.SolrField">
73
		<constructor-arg name="name" value="edition" />
74
		<constructor-arg name="xpath" value='//metadata/idinfo/citeinfo/edition/text()' />
75
		<property name="multivalue" value="false" />
76
	</bean>	
77

  
78
	<bean id="fgdc.endDate" class="org.dataone.cn.indexer.parser.SolrField">
79
		<constructor-arg name="name" value="endDate" />
80
		<constructor-arg name="xpath"
81
			value="//metadata/idinfo/timeperd/timeinfo/rngdates/enddate/text()" />
82
		<property name="multivalue" value="false" />
83
		<property name="converter" ref="fgdcDateConverter" />
84
	</bean>
85

  
86
	<bean id="fgdc.gcmdKeyword" class="org.dataone.cn.indexer.parser.SolrField">
87
		<constructor-arg name="name" value="gcmdKeyword" />
88
		<constructor-arg name="xpath"
89
			value="//metadata/idinfo/keywords/theme[themekt='GCMD Science Keywords']/themekey/text()" />
90
		<property name="multivalue" value="true" />
91
	</bean>
92
 	
93
	<bean id="fgdc.keywords" class="org.dataone.cn.indexer.parser.SolrField">
94
		<constructor-arg name="name" value="keywords" />
95
		<constructor-arg name="xpath"
96
			value="//metadata/idinfo/keywords/theme/themekey/text() | //metadata/idinfo/keywords/place/placekey/text()" />
97
		<property name="multivalue" value="true" />
98
		<property name="dedupe" value="true" />
99
		<property name="disallowedValues">
100
			<list>
101
				<value>none</value>
102
			</list>
103
		</property>
104
	</bean>
105

  
106
	<bean id="fgdc.genus" class="org.dataone.cn.indexer.parser.SolrField">
107
		<constructor-arg name="name" value="genus" />
108
		<constructor-arg name="xpath" value='//taxoncl/taxonrv[../taxonrn="Genus"]/text()' />
109
		<property name="multivalue" value="true" />
110
	</bean>		
111
	
112
	<bean id="fgdc.geoform" class="org.dataone.cn.indexer.parser.SolrField">
113
		<constructor-arg name="name" value="geoform" />
114
		<constructor-arg name="xpath" value='//metadata/idinfo/citation/citeinfo/geoform/text()' />
115
		<property name="multivalue" value="false" />
116
	</bean>	
117
	
118
	<bean id="fgdc.kingdom" class="org.dataone.cn.indexer.parser.SolrField">
119
		<constructor-arg name="name" value="kingdom" />
120
		<constructor-arg name="xpath" value='//taxoncl/taxonrv[../taxonrn="Kingdom"]/text()' />
121
		<property name="multivalue" value="true" />
122
	</bean>	
123
	
124
	<bean id="fgdc.order" class="org.dataone.cn.indexer.parser.SolrField">
125
		<constructor-arg name="name" value="order" />
126
		<constructor-arg name="xpath" value='//taxoncl/taxonrv[../taxonrn="Order"]/text()' />
127
		<property name="multivalue" value="true" />
128
	</bean>
129
	
130
	<bean id="fgdc.phylum" class="org.dataone.cn.indexer.parser.MergeSolrField">
131
		<constructor-arg name="name" value="phylum" />
132
		<constructor-arg name="delimiter" value=" " />
133
		<constructor-arg name="xpath" value='//taxoncl/taxonrv[../taxonrn="Phylum"]/text() | //taxoncl/taxonrv[../taxonrn="Division"]/text()' />
134
		<property name="multivalue" value="true" />
135
	</bean>
136
	
137
	<bean id="fgdc.species" class="org.dataone.cn.indexer.parser.SolrField">
138
		<constructor-arg name="name" value="species" />
139
		<constructor-arg name="xpath" value='//taxoncl/taxonrv[../taxonrn="Species"]/text()' />
140
		<property name="multivalue" value="true" />
141
	</bean>
142
	
143
	<bean id="fgdc.origin" class="org.dataone.cn.indexer.parser.SolrField">
144
		<constructor-arg name="name" value="origin" />
145
		<constructor-arg name="xpath" value='//metadata/idinfo/citation/citeinfo/origin/text()' />
146
		<property name="multivalue" value="true" />
147
	</bean>
148
		
149
	<bean id="fgdc.placeKey" class="org.dataone.cn.indexer.parser.SolrField">
150
		<constructor-arg name="name" value="placeKey" />
151
		<constructor-arg name="xpath" value='//metadata/idinfo/keywords/place/placekey/text()' />
152
		<property name="multivalue" value="true" />
153
	</bean>
154
	
155
	<bean id="fgdc.pubDate" class="org.dataone.cn.indexer.parser.SolrField">
156
		<constructor-arg name="name" value="pubDate" />
157
		<constructor-arg name="xpath"
158
			value="//metadata/idinfo/citation/citeinfo/pubdate/text()" />
159
		<property name="multivalue" value="false" />
160
		<property name="converter" ref="fgdcDateConverter" />
161
	</bean>
162
	
163
	<bean id="fgdc.purpose" class="org.dataone.cn.indexer.parser.MergeSolrField">
164
	  <constructor-arg name="name" value="purpose" />
165
	  <constructor-arg name="xpath"
166
	    value="//metadata/idinfo/descript/purpose/descendant::text()" />
167
	  <constructor-arg name="delimiter" value=" " />
168
	  <property name="multivalue" value="false" />
169
	  <property name="dedupe" value="false" />
170
	</bean>
171

  
172
	<bean id="fgdc.title" class="org.dataone.cn.indexer.parser.SolrField">
173
		<constructor-arg name="name" value="title" />
174
		<constructor-arg name="xpath" value='//metadata/idinfo/citation/citeinfo/title/text()' />
175
		<property name="multivalue" value="false" />
176
	</bean>
177

  
178
	<bean id="fgdc.web_url" class="org.dataone.cn.indexer.parser.SolrField">
179
		<constructor-arg name="name" value="webUrl" />
180
		<constructor-arg name="xpath" value='//metadata/idinfo/citation/citeinfo/onlink/text()' />
181
		<property name="multivalue" value="true" />
182
	</bean>
183
	
184
	<bean id="fgdc.fileID" class="org.dataone.cn.indexer.parser.ResolveSolrField">
185
		<constructor-arg name="name" value="fileID" />
186
	</bean>
187
	
188
	<bean id="fgdc.fullText" class="org.dataone.cn.indexer.parser.FullTextSolrField">
189
		<constructor-arg name="name" value="text" />
190
		<constructor-arg name="xpath"
191
			value="//metadata//text()" />
192
		<property name="multivalue" value="false" />
193
		<property name="combineNodes" value="true"/>
194
	</bean>
195
	
196
	<bean id="fgdc.project" class="org.dataone.cn.indexer.parser.MergeSolrField">
197
	  <constructor-arg name="name" value="project" />
198
	  <constructor-arg name="xpath"
199
	    value="//metadata/idinfo/descript/purpose/descendant::text()" />
200
	  <constructor-arg name="delimiter" value=" " />
201
	  <property name="multivalue" value="false" />
202
	  <property name="dedupe" value="false" />
203
	</bean>
204
	
205
	
206
	<bean id="fgdc.presentationCat" class="org.dataone.cn.indexer.parser.SolrField">
207
		<constructor-arg name="name" value="presentationCat" />
208
		<constructor-arg name="xpath" value='//metadata/idinfo/citation/citeinfo/geoform/text()' />
209
		<property name="multivalue" value="false" />
210
	</bean>
211
	
212
	<bean id="fgdc.author" class="org.dataone.cn.indexer.parser.SolrField">
213
		<constructor-arg name="name" value="author" />
214
		<constructor-arg name="xpath" value='//metadata/idinfo/citation/citeinfo/origin/text()' />
215
		<property name="multivalue" value="false" />
216
	</bean>
217

  
218
	<bean id="fgdc.investigator" class="org.dataone.cn.indexer.parser.SolrField">
219
		<constructor-arg name="name" value="investigator" />
220
		<constructor-arg name="xpath" value='//metadata/idinfo/citation/citeinfo/origin/text()' />
221
		<property name="multivalue" value="true" />
222
	</bean>
223
	
224
	<bean id="fgdc.site" class="org.dataone.cn.indexer.parser.SolrField">
225
		<constructor-arg name="name" value="site" />
226
		<constructor-arg name="xpath" value='//metadata/idinfo/spdom/descgeog/text()' />
227
		<property name="multivalue" value="true" />
228
	</bean>
229
</beans>
metacat-index/src/main/resources/application-context-dryad-base.xml
1
<beans xmlns="http://www.springframework.org/schema/beans"
2
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
4
	
5
	<bean id="dryad.abstract" class="org.dataone.cn.indexer.parser.SolrField">
6
		<constructor-arg name="name" value="abstract" />
7
		<constructor-arg name="xpath"
8
		  value="//dcterms:description[1]/text()" />
9
		<property name="multivalue" value="false" />
10
	</bean>
11

  
12
	<bean id="dryad.author" class="org.dataone.cn.indexer.parser.SolrField">
13
		<constructor-arg name="name" value="author" />
14
		<constructor-arg name="xpath"
15
		  value="//dcterms:creator[1]/text()" />
16
		<property name="multivalue" value="false" />
17
	</bean>
18
	
19
	<bean id="dryad.keywords" class="org.dataone.cn.indexer.parser.SolrField">
20
		<constructor-arg name="name" value="keywords" />
21
		<constructor-arg name="xpath"
22
			value="//dcterms:subject/text()" />
23
		<property name="multivalue" value="true" />
24
	</bean>
25
	
26
	<bean id="dryad.pubDate" class="org.dataone.cn.indexer.parser.SolrField">
27
		<constructor-arg name="name" value="pubDate" />
28
		<constructor-arg name="xpath" value="//dcterms:dateSubmitted/text()" />
29
		<property name="multivalue" value="false" />
30
		<property name="converter" ref="dateConverter" />
31
	</bean>
32
	
33
 	<bean id="dryad.site" class="org.dataone.cn.indexer.parser.SolrField">
34
		<constructor-arg name="name" value="site" />
35
		<constructor-arg name="xpath"
36
		  value="//dcterms:spatial/text()" />
37
		<property name="multivalue" value="true" />
38
	</bean>
39
		
40
	<bean id="dryad.title" class="org.dataone.cn.indexer.parser.SolrField">
41
		<constructor-arg name="name" value="title" />
42
		<constructor-arg name="xpath"
43
		  value="//dcterms:title[1]/text()" />
44
		<property name="multivalue" value="false" />
45
	</bean>
46
 
47
 	<bean id="dryad.scientificName" class="org.dataone.cn.indexer.parser.SolrField">
48
		<constructor-arg name="name" value="scientificName" />
49
		<constructor-arg name="xpath"
50
		  value="//dwc:scientificName/text()" />
51
		<property name="multivalue" value="true" />
52
	</bean>
53

  
54
	<bean id="dryad.fileID" class="org.dataone.cn.indexer.parser.ResolveSolrField">
55
		<constructor-arg name="name" value="fileID" />
56
	</bean>
57
	
58
	<bean id="dryad.origin" class="org.dataone.cn.indexer.parser.SolrField">
59
		<constructor-arg name="name" value="origin" />
60
		<constructor-arg name="xpath" value='//dcterms:creator/text()' />
61
		<property name="multivalue" value="true" />
62
		<property name="dedupe" value="true" />
63
	</bean>
64
	
65
	<bean id="dryad.investigator" class="org.dataone.cn.indexer.parser.SolrField">
66
		<constructor-arg name="name" value="investigator" />
67
		<constructor-arg name="xpath" value='//dcterms:creator/text()' />
68
		<property name="multivalue" value="true" />
69
		<property name="dedupe" value="true" />
70
	</bean>
71
	
72
	<bean id="dryad.fullText" class="org.dataone.cn.indexer.parser.FullTextSolrField">
73
		<constructor-arg name="name" value="text" />
74
		<constructor-arg name="xpath"
75
			value="//*/text()" />
76
		<property name="multivalue" value="false" />
77
		<property name="combineNodes" value="true"/>
78
		<property name="dedupe" value="true"/>
79
	</bean>
80
	
81
</beans>
metacat-index/src/main/resources/application-context-systemmeta100.xml
1
<beans xmlns="http://www.springframework.org/schema/beans"
2
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
4
	<bean id="xpath_system_metadata_100" class="java.util.ArrayList">
5
		<constructor-arg>
6
			<list>
7
				<bean class="org.dataone.cn.indexer.parser.SolrField">
8
					<constructor-arg name="name" value="id" />
9
					<constructor-arg name="xpath"
10
						value="/d100:systemMetadata/identifier/text()" />
11
				</bean>
12
				
13
				<bean class="org.dataone.cn.indexer.parser.SolrField">
14
					<constructor-arg name="name" value="formatId" />
15
					<constructor-arg name="xpath"
16
						value="/d100:systemMetadata/formatId/text()" />
17
				</bean>
18
				
19
				<bean class="org.dataone.cn.indexer.parser.SolrField">
20
					<constructor-arg name="name" value="formatType" />
21
					<constructor-arg name="xpath" value="/d100:systemMetadata/formatId/text()" />
22
					<property name="converter" ref="formatIdToFormatTypeConverter" />
23
				</bean>
24
				
25
				<bean class="org.dataone.cn.indexer.parser.SolrField">
26
					<constructor-arg name="name" value="size" />
27
					<constructor-arg name="xpath"
28
						value="/d100:systemMetadata/size/text()" />
29
				</bean>
30
				
31
				<bean class="org.dataone.cn.indexer.parser.SolrField">
32
					<constructor-arg name="name" value="checksum" />
33
					<constructor-arg name="xpath"
34
						value="/d100:systemMetadata/checksum/text()" />
35
				</bean>
36
				
37
				<bean class="org.dataone.cn.indexer.parser.SolrField">
38
					<constructor-arg name="name" value="submitter" />
39
					<constructor-arg name="xpath"
40
						value="/d100:systemMetadata/submitter/text()" />
41
				</bean>
42
				
43
				<bean class="org.dataone.cn.indexer.parser.SolrField">
44
					<constructor-arg name="name" value="checksumAlgorithm" />
45
					<constructor-arg name="xpath"
46
						value="/d100:systemMetadata/checksum/@algorithm" />
47
				</bean>
48
				
49
				<bean class="org.dataone.cn.indexer.parser.SolrField">
50
					<constructor-arg name="name" value="rightsHolder" />
51
					<constructor-arg name="xpath"
52
						value="/d100:systemMetadata/rightsHolder/text()" />
53
				</bean>
54

  
55
				<bean class="org.dataone.cn.indexer.parser.SolrField">
56
					<constructor-arg name="name" value="replicationAllowed" />
57
					<constructor-arg name="xpath"
58
						value="/d100:systemMetadata/replicationPolicy/@replicationAllowed" />
59
				</bean>
60
				
61
				<bean class="org.dataone.cn.indexer.parser.SolrField">
62
					<constructor-arg name="name" value="numberReplicas" />
63
					<constructor-arg name="xpath"
64
						value="/d100:systemMetadata/replicationPolicy/@numberReplicas" />
65
				</bean>
66

  
67
				<bean class="org.dataone.cn.indexer.parser.SolrField">
68
					<constructor-arg name="name" value="preferredReplicationMN" />
69
					<constructor-arg name="xpath"
70
						value="/d100:systemMetadata/replicationPolicy/preferredMemberNode/text()" />
71
					<property name="multivalue" value="true" />
72
				</bean>
73
				
74
				<bean class="org.dataone.cn.indexer.parser.SolrField">
75
					<constructor-arg name="name" value="blockedReplicationMN" />
76
					<constructor-arg name="xpath"
77
						value="/d100:systemMetadata/replicationPolicy/blockedMemberNode/text()" />
78
					<property name="multivalue" value="true" />
79
				</bean>
80
				
81
				<bean class="org.dataone.cn.indexer.parser.SolrField">
82
					<constructor-arg name="name" value="obsoletes" />
83
					<constructor-arg name="xpath"
84
						value="/d100:systemMetadata/obsoletes/text()" />
85
				</bean>
86

  
87
				<bean class="org.dataone.cn.indexer.parser.SolrField">
88
					<constructor-arg name="name" value="obsoletedBy" />
89
					<constructor-arg name="xpath"
90
						value="/d100:systemMetadata/obsoletedBy/text()" />
91
				</bean>
92

  
93
				<bean class="org.dataone.cn.indexer.parser.SolrField">
94
					<constructor-arg name="name" value="dateUploaded" />
95
					<constructor-arg name="xpath"
96
						value="/d100:systemMetadata/dateUploaded/text()" />
97
					<property name="converter" ref="dateConverter" />
98
				</bean>
99

  
100
				<bean class="org.dataone.cn.indexer.parser.SolrField">
101
					<constructor-arg name="name" value="dateModified" />
102
					<constructor-arg name="xpath"
103
						value="/d100:systemMetadata/dateSysMetadataModified/text()" />
104
					<property name="converter" ref="dateConverter" />
105
				</bean>
106
				
107
				<bean class="org.dataone.cn.indexer.parser.SolrField">
108
					<constructor-arg name="name" value="datasource" />
109
					<constructor-arg name="xpath"
110
						value="/d100:systemMetadata/originMemberNode/text()" />
111
				</bean>
112

  
113
				<bean class="org.dataone.cn.indexer.parser.SolrField">
114
					<constructor-arg name="name" value="authoritativeMN" />
115
					<constructor-arg name="xpath"
116
						value="/d100:systemMetadata/authoritativeMemberNode/text()" />
117
				</bean>
118

  
119
				<bean class="org.dataone.cn.indexer.parser.SolrField">
120
					<constructor-arg name="name" value="replicaMN" />
121
					<constructor-arg name="xpath"
122
						value="/d100:systemMetadata/replica/replicaMemberNode/text()" />
123
					<property name="multivalue" value="true" />
124
				</bean>
125
				
126
				<bean class="org.dataone.cn.indexer.parser.SolrField">
127
					<constructor-arg name="name" value="replicaVerifiedDate" />
128
					<constructor-arg name="xpath"
129
						value="/d100:systemMetadata/replica/replicaVerified/text()" />
130
					<property name="multivalue" value="true" />
131
					<property name="converter" ref="dateConverter" />
132
				</bean>
133
				
134
				<bean class="org.dataone.cn.indexer.parser.SolrField">
135
					<constructor-arg name="name" value="readPermission" />
136
					<constructor-arg name="xpath"
137
						value="/d100:systemMetadata/accessPolicy/allow[permission= 'read']/subject/text()" />
138
					<property name="multivalue" value="true" />
139
					<property name="dedupe" value="true" />
140
				</bean>
141

  
142
				<bean class="org.dataone.cn.indexer.parser.SolrField">
143
					<constructor-arg name="name" value="writePermission" />
144
					<constructor-arg name="xpath"
145
						value="/d100:systemMetadata/accessPolicy/allow[permission= 'write']/subject/text()" />
146
					<property name="multivalue" value="true" />
147
					<property name="dedupe" value="true" />
148
				</bean>
149
				
150
				<bean class="org.dataone.cn.indexer.parser.SolrField">
151
					<constructor-arg name="name" value="changePermission" />
152
					<constructor-arg name="xpath"
153
						value="/d100:systemMetadata/accessPolicy/allow[permission= 'changePermission']/subject/text()" />
154
					<property name="multivalue" value="true" />
155
					<property name="dedupe" value="true" />
156
				</bean>
157

  
158
				<bean class="org.dataone.cn.indexer.parser.SolrField">
159
					<constructor-arg name="name" value="isPublic" />
160
					<constructor-arg name="xpath"
161
						value="/d100:systemMetadata/accessPolicy/allow[permission= 'read']/subject[text()='public']/text()" />
162
					<property name="converter" ref="booleanPublicConverter" />
163
				</bean>
164

  
165
		        <bean class="org.dataone.cn.indexer.parser.ResolveSolrField">
166
					<constructor-arg name="name" value="dataUrl" />
167
		        </bean>
168
			</list>
169
		</constructor-arg>
170
	</bean>
171
</beans>
metacat-index/src/main/resources/index-processor-context.xml
1
<?xml version="1.0" encoding="UTF-8"?>
2
<beans xmlns="http://www.springframework.org/schema/beans"
3
 xmlns:p="http://www.springframework.org/schema/p"
4
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5
 xmlns:context="http://www.springframework.org/schema/context"
6
 xsi:schemaLocation="http://www.springframework.org/schema/beans 
7
 http://www.springframework.org/schema/beans/spring-beans.xsd
8
 http://www.springframework.org/schema/context  
9
 http://www.springframework.org/schema/context/spring-context-3.0.xsd">
10
    
11
    <import resource="application-context-eml-base.xml" />
12
    <import resource="application-context-eml200.xml" />
13
    <import resource="application-context-eml201.xml" />
14
    <import resource="application-context-eml210.xml" />
15
    <import resource="application-context-eml211.xml" />
16
    
17
    <import resource="application-context-fgdc-base.xml" />
18
    <import resource="application-context-fgdc-std-001-1998.xml" />
19
    <import resource="application-context-fgdc-std-0011-1999.xml" />
20
    <import resource="application-context-fgdc-std-0012-1999.xml" />
21
    <import resource="application-context-fgdc-esri-csdg-80.xml" />
22

  
23
    <import resource="application-context-dryad-base.xml" />
24
    <import resource="application-context-dryad30.xml" />
25
    <import resource="application-context-dryad31.xml" />
26
    
27
    <import resource="application-context-resourcemap.xml" />
28
    <import resource="application-context-systemmeta100.xml" />
29

  
30
 <bean id="dateConverter" class="org.dataone.cn.indexer.convert.SolrDateConverter" />
31
 <bean id="fgdcDateConverter" class="org.dataone.cn.indexer.convert.FgdcDateConverter"/>
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff