Project

General

Profile

« Previous | Next » 

Revision 45455

Included changes about the CQL translation as in most recent version of cnr-cql-utils of DNet40 + refactoring of OAI parameters

View differences:

MongoPublisherStoreDAO.java
11 11
import com.mongodb.client.MongoCollection;
12 12
import com.mongodb.client.MongoDatabase;
13 13
import com.mongodb.client.model.Filters;
14
import eu.dnetlib.cql.CqlTranslator;
14 15
import eu.dnetlib.enabling.tools.DnetStreamSupport;
15 16
import eu.dnetlib.oai.PublisherStoreDAO;
16 17
import eu.dnetlib.oai.RecordChangeDetector;
17 18
import eu.dnetlib.oai.conf.OAIConfigurationReader;
18
import eu.dnetlib.oai.parser.MongoQueryParser;
19 19
import eu.dnetlib.oai.sets.MongoSetCollection;
20 20
import eu.dnetlib.rmi.provision.MDFInfo;
21 21
import eu.dnetlib.rmi.provision.OaiPublisherException;
......
44 44
	@Autowired
45 45
	private MetadataExtractor metadataExtractor;
46 46
	@Autowired
47
	private MongoQueryParser queryParser;
47
	private CqlTranslator cqlTranslator;
48 48
	@Resource(name = "oaiConfigurationExistReader")
49 49
	private OAIConfigurationReader configuration;
50 50
	@Autowired
......
196 196
			log.debug("Store retreived, cache miss,  alwaysNewRecord is" + this.alwaysNewRecord);
197 197
			log.fatal("Not using cache to create oaistore from dbObject: " + k);
198 198
			final MongoPublisherStore store = new MongoPublisherStore(storeId, mdFormat, mdInterpreation, mdLayout, db.getCollection(storeId, DBObject.class),
199
					this.configuration.getFields(mdFormat, mdInterpreation, mdLayout), this.queryParser, this.recordInfoGenerator,
199
					this.configuration.getFields(mdFormat, mdInterpreation, mdLayout), this.cqlTranslator, this.recordInfoGenerator,
200 200
					this.configuration.getIdScheme(),
201 201
					this.configuration.getIdNamespace(), this.metadataExtractor, this.recordChangeDetector, this.alwaysNewRecord, db);
202 202
			store.setMongoSetCollection(this.mongoSetCollection);
......
225 225
		this.metadataCollection = metadataCollection;
226 226
	}
227 227

  
228
	public MongoQueryParser getQueryParser() {
229
		return this.queryParser;
230
	}
231

  
232
	public void setQueryParser(final MongoQueryParser queryParser) {
233
		this.queryParser = queryParser;
234
	}
235

  
236 228
	public OAIConfigurationReader getConfiguration() {
237 229
		return this.configuration;
238 230
	}
......
299 291
		this.mongoOaistoreCacheByMdPrefix = mongoOaistoreCacheByMdPrefix;
300 292
	}
301 293

  
294
	public CqlTranslator getCqlTranslator() {
295
		return cqlTranslator;
296
	}
297

  
298
	public void setCqlTranslator(final CqlTranslator cqlTranslator) {
299
		this.cqlTranslator = cqlTranslator;
300
	}
301

  
302 302
}

Also available in: Unified diff