Project

General

Profile

« Previous | Next » 

Revision 50676

using commons-lang3, using lambdas

View differences:

MetadataCheckJob.java
57 57
	/**
58 58
	 * Job execution method.
59 59
	 *
60
	 * @throws MDStoreServiceException
60
	 * @throws MDStoreServiceException in case of ISLookUpException or DocumentException
61 61
	 */
62 62
	public void repairMetadata() throws MDStoreServiceException {
63 63
		MongoCollection<DBObject> metadata = ((MDStoreDaoImpl) getDao()).getDb().getCollection("metadata", DBObject.class);
......
68 68
		try {
69 69
			List<String> mdStores =
70 70
					serviceLocator.getService(ISLookUpService.class).quickSearchProfile(
71
							"//RESOURCE_PROFILE[" + ".//RESOURCE_TYPE/@value='MDStoreDSResourceType' and " + ".//RESOURCE_URI/@value='" + getServiceAddress()
72
							+ "']");
71
							"//RESOURCE_PROFILE[" +
72
									".//RESOURCE_TYPE/@value='MDStoreDSResourceType' and " +
73
									".//RESOURCE_URI/@value='" + getServiceAddress() + "']");
73 74

  
74 75
			log.debug("repairing mdstore metadata");
75 76

  
......
81 82
			}
82 83
			log.debug("FINISHED repairing mdstore metadata");
83 84

  
84
		} catch (ISLookUpException e) {
85
		} catch (ISLookUpException | DocumentException e) {
85 86
			throw new RuntimeException(e);
86
		} catch (DocumentException e) {
87
			throw new RuntimeException(e);
88 87
		}
89 88
	}
90 89

  
......
93 92
	 *
94 93
	 * @param MDStoreProfile as obtain from the IS
95 94
	 * @return a DBObject representing the metadata informations
96
	 * @throws DocumentException
95
	 * @throws DocumentException when parsing invalid xml
97 96
	 */
98 97
	private DBObject getMdInfo(final String MDStoreProfile) throws DocumentException {
99 98
		Document doc = new SAXReader().read(new StringReader(MDStoreProfile));

Also available in: Unified diff