Project

General

Profile

« Previous | Next » 

Revision 49960

1. Change storeRepository method
2. Update converter of repository interface with extra fields.

View differences:

Converter.java
203 203
        return jsonObject.toString();
204 204
    }
205 205

  
206
    public static String repositoryInterfaceObjectToJson(RepositoryInterface repositoryInterface) throws JSONException {
206
    public static String repositoryInterfaceObjectToJson(Repository repository,RepositoryInterface repositoryInterface) throws JSONException {
207 207

  
208 208
        JSONObject jsonObject = new JSONObject();
209 209

  
......
214 214
        jsonObject.put("protocol",repositoryInterface.getAccessProtocol());
215 215
        jsonObject.put("typology",repositoryInterface.getTypology());
216 216
        jsonObject.put("compatibility",repositoryInterface.getDesiredCompatibilityLevel());
217
        jsonObject.put("datasource",repository.getId());
218
        //jsonObject.put("lastAggregationDate");
219
        //jsonObject.put("lastAggregationMdid");
220
        //jsonObject.put("lastAggregationTotal");
221
        jsonObject.put("lastCollectionDate",repositoryInterface.getLastCollectionDate());
222
        //jsonObject.put("lastCollectionMdid",repositoryInterface);
223
        //jsonObject.put("lastCollectionTotal");
224
        //jsonObject.put("lastDownloadDate");
225
//        jsonObject.put("lastDownloadMdid");
226
//        jsonObject.put("lastDownloadTotal");
227
//        jsonObject.put("lastValidationJob");
228
        jsonObject.put("metadataIdentifierPath",repositoryInterface.getMetadataIdentifierPath());
229
        jsonObject.put("protocol",repositoryInterface.getAccessProtocol());
230
        jsonObject.put("typology",repositoryInterface.getTypology());
217 231
        //jsonObject.put("removable",repositoryInterface.getRemovable());
218 232
        //jsonObject.put("active",repositoryInterface.getActive());
219 233
        return jsonObject.toString();

Also available in: Unified diff