Project

General

Profile

« Previous | Next » 

Revision 49144

Added method to get an id of the submitted result

View differences:

modules/dnet-openaireplus-workflows/trunk/src/main/java/eu/dnetlib/msro/openaireplus/api/OpenaireResultSubmitter.java
123 123
		try {
124 124
			idxList = calculateCurrentIndexDsInfo();
125 125
			if (idxList == null || idxList.isEmpty()) {
126
				throw new MSROException("Cannot add result: " + pub + " : No public Search Service found");
126
				throw new MSROException("Cannot add result: " + pub.getAnyId() + " : No public Search Service found");
127 127
			}
128 128
			if (idxList.size() > 1) log.warn("Found more than 1 public search service");
129 129
			final String oafRecord = pub.asOafRecord(velocityEngine, serviceLocator.getService(ISLookUpService.class), oafSchemaLocation);
modules/dnet-openaireplus-workflows/trunk/src/main/java/eu/dnetlib/msro/openaireplus/api/objects/ResultEntry.java
321 321
	public String toString() {
322 322
		return new Gson().toJson(this);
323 323
	}
324

  
325
	public String getAnyId(){
326
		return StringUtils.isNotBlank(openaireId) ? openaireId : originalId;
327
	}
324 328
}

Also available in: Unified diff