|
1 | 1 | //============================================================================= |
2 | | -//=== Copyright (C) 2001-2024 Food and Agriculture Organization of the |
| 2 | +//=== Copyright (C) 2001-2025 Food and Agriculture Organization of the |
3 | 3 | //=== United Nations (FAO-UN), United Nations World Food Programme (WFP) |
4 | 4 | //=== and United Nations Environment Programme (UNEP) |
5 | 5 | //=== |
|
50 | 50 | //============================================================================= |
51 | 51 |
|
52 | 52 | interface RemoteRetriever { |
53 | | - public void init(AtomicBoolean cancelMonitor, Logger log, ServiceContext context, WebDavParams params); |
| 53 | + void init(AtomicBoolean cancelMonitor, Logger log, ServiceContext context, WebDavParams params); |
54 | 54 |
|
55 | | - public List<RemoteFile> retrieve() throws Exception; |
| 55 | + List<RemoteFile> retrieve() throws Exception; |
56 | 56 |
|
57 | | - public void destroy(); |
| 57 | + void destroy(); |
58 | 58 | } |
59 | 59 |
|
60 | 60 | //============================================================================= |
61 | 61 |
|
62 | 62 | interface RemoteFile { |
63 | | - public String getPath(); |
| 63 | + String getPath(); |
64 | 64 |
|
65 | | - public ISODate getChangeDate(); |
| 65 | + ISODate getChangeDate(); |
66 | 66 |
|
67 | | - public Element getMetadata(SchemaManager schemaMan) throws Exception; |
| 67 | + Element getMetadata(SchemaManager schemaMan) throws Exception; |
68 | 68 |
|
69 | | - public boolean isMoreRecentThan(String localDate); |
| 69 | + boolean isMoreRecentThan(String localDate); |
70 | 70 | } |
71 | 71 |
|
72 | 72 | //============================================================================= |
@@ -117,7 +117,7 @@ public HarvestResult harvest(Logger log) throws Exception { |
117 | 117 | this.log = log; |
118 | 118 | if (log.isDebugEnabled()) |
119 | 119 | log.debug("Retrieving remote metadata information for : " + params.getName()); |
120 | | - RemoteRetriever rr = null; |
| 120 | + RemoteRetriever rr; |
121 | 121 | if (params.subtype.equals("webdav")) { |
122 | 122 | rr = new WebDavRetriever(); |
123 | 123 | } else if (params.subtype.equals("waf")) { |
@@ -502,7 +502,7 @@ private void updateMetadata(RemoteFile rf, RecordInfo recordInfo, boolean force) |
502 | 502 | String language = context.getLanguage(); |
503 | 503 |
|
504 | 504 | final AbstractMetadata metadata = metadataManager.updateMetadata(context, recordInfo.id, md, validate, ufo, language, |
505 | | - date, false, IndexingMode.none); |
| 505 | + date, true, IndexingMode.none); |
506 | 506 |
|
507 | 507 | if(force) { |
508 | 508 | //change ownership of metadata to new harvester |
|
0 commit comments