Project

General

Profile

« Previous | Next » 

Revision 8826

update to use v2 types for indexing

View differences:

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

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

  
5
import java.io.File;
6
import java.io.FileInputStream;
7
import java.io.IOException;
8
import java.io.InputStream;
9
import java.io.StringWriter;
10
import java.io.Writer;
11
import java.util.ArrayList;
12 3
import java.util.List;
13 4

  
14
import org.apache.solr.client.solrj.SolrServer;
15
import org.apache.solr.client.solrj.SolrServerException;
16
import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer;
17
import org.apache.solr.client.solrj.response.QueryResponse;
18
import org.apache.solr.common.params.SolrParams;
19
import org.apache.solr.core.CoreContainer;
20
import org.apache.solr.core.SolrCore;
21
import org.apache.solr.request.LocalSolrQueryRequest;
22
import org.apache.solr.response.SolrQueryResponse;
23
import org.apache.solr.response.XMLResponseWriter;
24
import org.apache.solr.servlet.SolrRequestParsers;
25
import org.dataone.service.types.v1.SystemMetadata;
26
import org.dataone.service.util.TypeMarshaller;
27
import org.junit.Before;
28 5
import org.junit.Test;
29 6

  
30 7
public class IndexGeneratorTimerTaskIT {
metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/event/IndexEventEntryListenerIT.java
1 1
package edu.ucsb.nceas.metacat.index.event;
2 2

  
3
import static org.junit.Assert.*;
3
import static org.junit.Assert.assertEquals;
4
import static org.junit.Assert.assertNotNull;
5
import static org.junit.Assert.assertNull;
6
import static org.junit.Assert.fail;
4 7

  
5 8
import java.util.Calendar;
6 9

  
7 10
import org.dataone.service.types.v1.Event;
8 11
import org.dataone.service.types.v1.Identifier;
9
import org.junit.Before;
10 12
import org.junit.Test;
11 13

  
12 14
import edu.ucsb.nceas.metacat.common.index.event.IndexEvent;
13
import edu.ucsb.nceas.metacat.index.ApplicationController;
14 15
import edu.ucsb.nceas.metacat.index.DistributedMapsFactory;
15 16

  
16 17
public class IndexEventEntryListenerIT {
metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/SolrMetacatIdsComparatorIT.java
11 11
import org.apache.solr.common.params.SolrParams;
12 12
import org.apache.solr.servlet.SolrRequestParsers;
13 13
import org.dataone.cn.indexer.solrhttp.SolrDoc;
14
import org.dataone.cn.indexer.solrhttp.SolrElementField;
15 14
import org.junit.Before;
16 15
import org.junit.Ignore;
17 16
import org.junit.Test;
metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/SolrIndexIT.java
22 22
import org.apache.solr.response.XMLResponseWriter;
23 23
import org.apache.solr.servlet.SolrRequestParsers;
24 24
import org.dataone.service.types.v1.Identifier;
25
import org.dataone.service.types.v1.SystemMetadata;
25
import org.dataone.service.types.v2.SystemMetadata;
26 26
import org.dataone.service.util.TypeMarshaller;
27 27
import org.junit.Before;
28 28
import org.junit.Test;
metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/resourcemap/ResourceMapSubprocessorIT.java
1 1
package edu.ucsb.nceas.metacat.index.resourcemap;
2 2

  
3
import static org.junit.Assert.*;
3
import static org.junit.Assert.assertTrue;
4 4

  
5 5
import java.io.File;
6 6
import java.io.FileInputStream;
......
15 15
import org.dataone.cn.indexer.parser.IDocumentSubprocessor;
16 16
import org.dataone.cn.indexer.solrhttp.SolrDoc;
17 17
import org.dataone.cn.indexer.solrhttp.SolrElementField;
18
import org.dataone.configuration.Settings;
19 18
import org.junit.Test;
20 19
import org.w3c.dom.Document;
21 20
import org.w3c.dom.Node;
metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/DistributedMapsFactoryIT.java
3 3
import static org.junit.Assert.assertTrue;
4 4

  
5 5
import org.dataone.service.types.v1.Identifier;
6
import org.dataone.service.types.v1.SystemMetadata;
6
import org.dataone.service.types.v2.SystemMetadata;
7 7
import org.junit.Test;
8 8

  
9 9
import com.hazelcast.core.IMap;
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/IndexGeneratorTimerTask.java
18 18
 */
19 19
package edu.ucsb.nceas.metacat.index;
20 20

  
21
import java.io.File;
22 21
import java.io.FileInputStream;
23 22
import java.io.FileNotFoundException;
24 23
import java.io.IOException;
25 24
import java.io.InputStream;
26
import java.text.SimpleDateFormat;
27 25
import java.util.ArrayList;
28
import java.util.Calendar;
29 26
import java.util.Collections;
30 27
import java.util.Date;
31 28
import java.util.List;
......
34 31
import javax.xml.parsers.ParserConfigurationException;
35 32
import javax.xml.xpath.XPathExpressionException;
36 33

  
37
import org.apache.commons.io.FileUtils;
38 34
import org.apache.commons.logging.Log;
39 35
import org.apache.commons.logging.LogFactory;
40 36
import org.apache.solr.client.solrj.SolrServerException;
......
46 42
import org.dataone.service.exceptions.NotImplemented;
47 43
import org.dataone.service.exceptions.ServiceFailure;
48 44
import org.dataone.service.exceptions.UnsupportedType;
49
import org.dataone.service.types.v1.Event;
50 45
import org.dataone.service.types.v1.Identifier;
51 46
import org.dataone.service.types.v1.ObjectFormatIdentifier;
52
import org.dataone.service.types.v1.SystemMetadata;
47
import org.dataone.service.types.v2.SystemMetadata;
53 48
import org.dspace.foresite.OREParserException;
54 49
import org.xml.sax.SAXException;
55 50

  
56 51
import com.hazelcast.core.IMap;
57 52
import com.hazelcast.core.ISet;
58 53

  
59
import edu.ucsb.nceas.metacat.common.SolrServerFactory;
60 54
import edu.ucsb.nceas.metacat.common.index.IndexTask;
61 55
import edu.ucsb.nceas.metacat.common.index.event.IndexEvent;
62 56
import edu.ucsb.nceas.metacat.index.event.EventlogFactory;
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SolrIndex.java
68 68
import org.dataone.service.exceptions.UnsupportedType;
69 69
import org.dataone.service.types.v1.Event;
70 70
import org.dataone.service.types.v1.Identifier;
71
import org.dataone.service.types.v1.SystemMetadata;
71
import org.dataone.service.types.v2.SystemMetadata;
72 72
import org.dataone.service.util.DateTimeMarshaller;
73 73
import org.dataone.service.util.TypeMarshaller;
74 74
import org.dspace.foresite.OREParserException;
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/DistributedMapsFactory.java
20 20
import java.io.FileInputStream;
21 21
import java.io.FileNotFoundException;
22 22
import java.io.InputStream;
23
import java.util.List;
24
import java.util.Map;
25 23

  
26 24
import org.apache.commons.logging.Log;
27 25
import org.apache.commons.logging.LogFactory;
28 26
import org.dataone.configuration.Settings;
29 27
import org.dataone.service.exceptions.ServiceFailure;
30 28
import org.dataone.service.types.v1.Identifier;
31
import org.dataone.service.types.v1.SystemMetadata;
29
import org.dataone.service.types.v2.SystemMetadata;
32 30

  
33 31
import com.hazelcast.client.ClientConfig;
34 32
import com.hazelcast.client.HazelcastClient;
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/MetacatIndexServlet.java
21 21

  
22 22
import java.io.File;
23 23
import java.io.IOException;
24
import java.net.URL;
25
import java.util.List;
26 24

  
27 25
import javax.servlet.ServletConfig;
28 26
import javax.servlet.ServletException;
......
30 28
import javax.servlet.http.HttpServletRequest;
31 29
import javax.servlet.http.HttpServletResponse;
32 30

  
33
import org.apache.commons.configuration.ConfigurationException;
34 31
import org.apache.commons.logging.Log;
35 32
import org.apache.commons.logging.LogFactory;
36
import org.dataone.configuration.Settings;
37 33

  
38
import edu.ucsb.nceas.metacat.common.query.EnabledQueryEngines;
39 34

  
40

  
41 35
/**
42 36
 * A servlet class for the Metadata Index module. This class only does one thing - initialize the ApplicationController class.
43 37
 * @author tao
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SystemMetadataEventListener.java
26 26
import org.apache.commons.logging.LogFactory;
27 27
import org.dataone.service.exceptions.ServiceFailure;
28 28
import org.dataone.service.types.v1.Identifier;
29
import org.dataone.service.types.v1.SystemMetadata;
29
import org.dataone.service.types.v2.SystemMetadata;
30 30

  
31 31
import com.hazelcast.core.EntryEvent;
32 32
import com.hazelcast.core.EntryListener;
metacat-index/src/main/resources/application-context-ao.xml
5 5

  
6 6
	<bean id="rdfXmlSubprocessor" class="edu.ucsb.nceas.metacat.index.annotation.RdfXmlSubprocessor">
7 7
		<property name="matchDocument"
8
			value="/d100:systemMetadata/formatId[text()='http://www.w3.org/TR/rdf-syntax-grammar']" />
8
			value="/d200:systemMetadata/formatId[text()='http://www.w3.org/TR/rdf-syntax-grammar']" />
9 9
		<property name="fieldList">
10 10
			<list>
11 11
				<ref bean="annotation.measurement" />
metacat-index/src/main/resources/application-context-eml200.xml
5 5
 <bean id="eml200Subprocessor"
6 6
  class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
7 7
  <property name="matchDocument"
8
   value="/d100:systemMetadata/formatId[text() = 'eml://ecoinformatics.org/eml-2.0.0']"></property>
8
   value="/d200:systemMetadata/formatId[text() = 'eml://ecoinformatics.org/eml-2.0.0']"></property>
9 9
  <property name="fieldList">
10 10
   <list>
11 11
    <ref bean="eml.abstract" />
metacat-index/src/main/resources/application-context-oa.xml
5 5

  
6 6
	<bean id="rdfXmlSubprocessor" class="edu.ucsb.nceas.metacat.index.annotation.RdfXmlSubprocessor">
7 7
		<property name="matchDocument"
8
			value="/d100:systemMetadata/formatId[text()='http://www.w3.org/TR/rdf-syntax-grammar'] | /d100:systemMetadata/formatId[text()='http://www.openarchives.org/ore/terms']" />
8
			value="/d200:systemMetadata/formatId[text()='http://www.w3.org/TR/rdf-syntax-grammar'] | /d200:systemMetadata/formatId[text()='http://www.openarchives.org/ore/terms']" />
9 9
		<property name="fieldList">
10 10
			<list>
11 11
				<ref bean="annotation.standard" />
metacat-index/src/main/resources/application-context-eml201.xml
5 5
 <bean id="eml201Subprocessor"
6 6
  class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
7 7
  <property name="matchDocument"
8
   value="/d100:systemMetadata/formatId[text() = 'eml://ecoinformatics.org/eml-2.0.1']"></property>
8
   value="/d200:systemMetadata/formatId[text() = 'eml://ecoinformatics.org/eml-2.0.1']"></property>
9 9
  <property name="fieldList">
10 10
   <list>
11 11
    <ref bean="eml.abstract" />
metacat-index/src/main/resources/application-context-eml210.xml
9 9
 <bean id="eml210Subprocessor"
10 10
  class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
11 11
  <property name="matchDocument"
12
   value="/d100:systemMetadata/formatId[text() = 'eml://ecoinformatics.org/eml-2.1.0']"></property>
12
   value="/d200:systemMetadata/formatId[text() = 'eml://ecoinformatics.org/eml-2.1.0']"></property>
13 13
  <property name="fieldList">
14 14
   <list>
15 15
    <ref bean="eml.abstract" />
metacat-index/src/main/resources/application-context-eml211.xml
5 5
 <bean id="eml211Subprocessor"
6 6
  class="org.dataone.cn.indexer.parser.ScienceMetadataDocumentSubprocessor">
7 7
  <property name="matchDocument"
8
   value="/d100:systemMetadata/formatId[text() = 'eml://ecoinformatics.org/eml-2.1.1']"></property>
8
   value="/d200:systemMetadata/formatId[text() = 'eml://ecoinformatics.org/eml-2.1.1']"></property>
9 9
  <property name="fieldList">
10 10
   <list>
11 11
    <ref bean="eml.abstract" />
metacat-index/src/main/resources/application-context-resource-map.xml
5 5

  
6 6
	<bean id="resourceMapSubprocessor" class="edu.ucsb.nceas.metacat.index.resourcemap.ResourceMapSubprocessor">
7 7
		<property name="matchDocument"
8
			value="/d100:systemMetadata/formatId[text()='http://www.openarchives.org/ore/terms']" />
8
			value="/d200:systemMetadata/formatId[text()='http://www.openarchives.org/ore/terms']" />
9 9
		<!-- <property name="httpService" ref="httpService"></property>
10 10
		<property name="solrQueryUri" value="${solr.query.uri}"></property> -->
11 11
	</bean>
metacat-index/src/main/resources/index-processor-context.xml
27 27
    <import resource="application-context-resource-map.xml" />
28 28
    <import resource="application-context-systemmeta100.xml" />
29 29
    
30
    <!--  
30 31
    <import resource="application-context-oa.xml" />
32
    -->
31 33
    
32 34
    <!-- <import resource="application-context-ao.xml" /> -->
33 35
    
......
98 100
       <ref bean="fgdcEsri80Subprocessor" />
99 101
       <ref bean="dryad30Subprocessor" />
100 102
       <ref bean="dryad31Subprocessor" />
103
       <!--  
101 104
       <ref bean="rdfXmlSubprocessor" />
105
       -->
102 106
      </list>
103 107
     </property>
104 108
    </bean>
......
109 113
 <bean id="xmlNamespaceConfig" class="org.dataone.cn.indexer.XMLNamespaceConfig">
110 114
  <constructor-arg name="namespaceList">
111 115
   <list>
116
    
112 117
    <bean class="org.dataone.cn.indexer.XMLNamespace">
113 118
     <constructor-arg name="namespace"
114
      value="http://ns.dataone.org/service/types/v1" />
115
     <constructor-arg name="prefix" value="d100" />
119
      value="http://ns.dataone.org/service/types/v2.0" />
120
     <constructor-arg name="prefix" value="d200" />
116 121
    </bean>
117 122
    <bean class="org.dataone.cn.indexer.XMLNamespace">
118 123
     <constructor-arg name="namespace"
metacat-index/src/main/resources/application-context-systemmeta100.xml
7 7
				<bean class="org.dataone.cn.indexer.parser.SolrField">
8 8
					<constructor-arg name="name" value="id" />
9 9
					<constructor-arg name="xpath"
10
						value="/d100:systemMetadata/identifier/text()" />
10
						value="/d200:systemMetadata/identifier/text()" />
11 11
				</bean>
12 12
				
13 13
				<bean class="org.dataone.cn.indexer.parser.SolrField">
14 14
					<constructor-arg name="name" value="formatId" />
15 15
					<constructor-arg name="xpath"
16
						value="/d100:systemMetadata/formatId/text()" />
16
						value="/d200:systemMetadata/formatId/text()" />
17 17
				</bean>
18 18
				
19 19
				<bean class="org.dataone.cn.indexer.parser.SolrField">
20 20
					<constructor-arg name="name" value="formatType" />
21
					<constructor-arg name="xpath" value="/d100:systemMetadata/formatId/text()" />
21
					<constructor-arg name="xpath" value="/d200:systemMetadata/formatId/text()" />
22 22
					<property name="converter" ref="formatIdToFormatTypeConverter" />
23 23
				</bean>
24 24
				
25 25
				<bean class="org.dataone.cn.indexer.parser.SolrField">
26 26
					<constructor-arg name="name" value="size" />
27 27
					<constructor-arg name="xpath"
28
						value="/d100:systemMetadata/size/text()" />
28
						value="/d200:systemMetadata/size/text()" />
29 29
				</bean>
30 30
				
31 31
				<bean class="org.dataone.cn.indexer.parser.SolrField">
32 32
					<constructor-arg name="name" value="checksum" />
33 33
					<constructor-arg name="xpath"
34
						value="/d100:systemMetadata/checksum/text()" />
34
						value="/d200:systemMetadata/checksum/text()" />
35 35
				</bean>
36 36
				
37 37
				<bean class="org.dataone.cn.indexer.parser.SolrField">
38 38
					<constructor-arg name="name" value="submitter" />
39 39
					<constructor-arg name="xpath"
40
						value="/d100:systemMetadata/submitter/text()" />
40
						value="/d200:systemMetadata/submitter/text()" />
41 41
				</bean>
42 42
				
43 43
				<bean class="org.dataone.cn.indexer.parser.SolrField">
44 44
					<constructor-arg name="name" value="checksumAlgorithm" />
45 45
					<constructor-arg name="xpath"
46
						value="/d100:systemMetadata/checksum/@algorithm" />
46
						value="/d200:systemMetadata/checksum/@algorithm" />
47 47
				</bean>
48 48
				
49 49
				<bean class="org.dataone.cn.indexer.parser.SolrField">
50 50
					<constructor-arg name="name" value="rightsHolder" />
51 51
					<constructor-arg name="xpath"
52
						value="/d100:systemMetadata/rightsHolder/text()" />
52
						value="/d200:systemMetadata/rightsHolder/text()" />
53 53
				</bean>
54 54

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

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

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

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

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

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

  
119 119
				<bean class="org.dataone.cn.indexer.parser.SolrField">
120 120
					<constructor-arg name="name" value="replicaMN" />
121 121
					<constructor-arg name="xpath"
122
						value="/d100:systemMetadata/replica/replicaMemberNode/text()" />
122
						value="/d200:systemMetadata/replica/replicaMemberNode/text()" />
123 123
					<property name="multivalue" value="true" />
124 124
				</bean>
125 125
				
126 126
				<bean class="org.dataone.cn.indexer.parser.SolrField">
127 127
					<constructor-arg name="name" value="replicaVerifiedDate" />
128 128
					<constructor-arg name="xpath"
129
						value="/d100:systemMetadata/replica/replicaVerified/text()" />
129
						value="/d200:systemMetadata/replica/replicaVerified/text()" />
130 130
					<property name="multivalue" value="true" />
131 131
					<property name="converter" ref="dateConverter" />
132 132
				</bean>
......
134 134
				<bean class="org.dataone.cn.indexer.parser.SolrField">
135 135
					<constructor-arg name="name" value="readPermission" />
136 136
					<constructor-arg name="xpath"
137
						value="/d100:systemMetadata/accessPolicy/allow[permission= 'read']/subject/text()" />
137
						value="/d200:systemMetadata/accessPolicy/allow[permission= 'read']/subject/text()" />
138 138
					<property name="multivalue" value="true" />
139 139
					<property name="dedupe" value="true" />
140 140
				</bean>
......
142 142
				<bean class="org.dataone.cn.indexer.parser.SolrField">
143 143
					<constructor-arg name="name" value="writePermission" />
144 144
					<constructor-arg name="xpath"
145
						value="/d100:systemMetadata/accessPolicy/allow[permission= 'write']/subject/text()" />
145
						value="/d200:systemMetadata/accessPolicy/allow[permission= 'write']/subject/text()" />
146 146
					<property name="multivalue" value="true" />
147 147
					<property name="dedupe" value="true" />
148 148
				</bean>
......
150 150
				<bean class="org.dataone.cn.indexer.parser.SolrField">
151 151
					<constructor-arg name="name" value="changePermission" />
152 152
					<constructor-arg name="xpath"
153
						value="/d100:systemMetadata/accessPolicy/allow[permission= 'changePermission']/subject/text()" />
153
						value="/d200:systemMetadata/accessPolicy/allow[permission= 'changePermission']/subject/text()" />
154 154
					<property name="multivalue" value="true" />
155 155
					<property name="dedupe" value="true" />
156 156
				</bean>
......
158 158
				<bean class="org.dataone.cn.indexer.parser.SolrField">
159 159
					<constructor-arg name="name" value="isPublic" />
160 160
					<constructor-arg name="xpath"
161
						value="/d100:systemMetadata/accessPolicy/allow[permission= 'read']/subject[text()='public']/text()" />
161
						value="/d200:systemMetadata/accessPolicy/allow[permission= 'read']/subject[text()='public']/text()" />
162 162
					<property name="converter" ref="booleanPublicConverter" />
163 163
				</bean>
164 164

  
src/edu/ucsb/nceas/metacat/dataone/D1NodeService.java
831 831
      
832 832
      // check the CN list
833 833
      if (!allowed) {
834
	      // are we allowed to do this? only CNs are allowed
835
	      CNode cn = D1Client.getCN();
836
	      List<Node> nodes = cn.listNodes().getNodeList();
837
	      
834
	      List<Node> nodes = null;
835

  
836
    	  try {
837
		      // are we allowed to do this? only CNs are allowed
838
		      CNode cn = D1Client.getCN();
839
		      nodes = cn.listNodes().getNodeList();
840
    	  }
841
	      catch (Throwable e) {
842
	    	  logMetacat.warn(e.getMessage());
843
	    	  return false;  
844
	      }
845
		      
838 846
	      if ( nodes == null ) {
839
	          throw new ServiceFailure("4852", "Couldn't get node list.");
840
	  
847
	    	  return false;
848
	          //throw new ServiceFailure("4852", "Couldn't get node list.");
841 849
	      }
842 850
	      
843 851
	      // find the node in the node list
src/edu/ucsb/nceas/metacat/index/MetacatSolrIndex.java
22 22
 */
23 23
package edu.ucsb.nceas.metacat.index;
24 24

  
25
import java.io.ByteArrayInputStream;
26 25
import java.io.ByteArrayOutputStream;
27 26
import java.io.IOException;
28 27
import java.io.InputStream;
......
51 50
import org.dataone.service.types.v1.Event;
52 51
import org.dataone.service.types.v1.Identifier;
53 52
import org.dataone.service.types.v1.Subject;
54
import org.dataone.service.types.v1.SystemMetadata;
53
import org.dataone.service.types.v2.SystemMetadata;
55 54
import org.xml.sax.SAXException;
56 55

  
57 56
import edu.ucsb.nceas.metacat.DBTransform;

Also available in: Unified diff