diff --git a/src/fr/devinsy/statoolinfos/core/Federation.java b/src/fr/devinsy/statoolinfos/core/Federation.java index 2dd31a7..c071616 100644 --- a/src/fr/devinsy/statoolinfos/core/Federation.java +++ b/src/fr/devinsy/statoolinfos/core/Federation.java @@ -122,6 +122,21 @@ public class Federation extends PathPropertyList return result; } + /** + * Gets the crawl date. + * + * @return the crawl date + */ + public LocalDateTime getCrawlDate() + { + LocalDateTime result; + + result = LocalDateTime.parse(get("crawl.datetime")); + + // + return result; + } + /** * Gets the crawled date. * @@ -133,6 +148,11 @@ public class Federation extends PathPropertyList result = LocalDateTime.parse(get("crawl.file.datetime")); + if (result.getYear() == 1970) + { + result = getCrawlDate(); + } + // return result; } diff --git a/src/fr/devinsy/statoolinfos/core/Organization.java b/src/fr/devinsy/statoolinfos/core/Organization.java index 9d3180c..9ccc376 100644 --- a/src/fr/devinsy/statoolinfos/core/Organization.java +++ b/src/fr/devinsy/statoolinfos/core/Organization.java @@ -130,6 +130,21 @@ public class Organization extends PathPropertyList return result; } + /** + * Gets the crawl date. + * + * @return the crawl date + */ + public LocalDateTime getCrawlDate() + { + LocalDateTime result; + + result = LocalDateTime.parse(get("crawl.datetime")); + + // + return result; + } + /** * Gets the crawled date. * @@ -141,6 +156,11 @@ public class Organization extends PathPropertyList result = LocalDateTime.parse(get("crawl.file.datetime")); + if (result.getYear() == 1970) + { + result = getCrawlDate(); + } + // return result; } diff --git a/src/fr/devinsy/statoolinfos/core/Service.java b/src/fr/devinsy/statoolinfos/core/Service.java index 13176f5..450e09d 100644 --- a/src/fr/devinsy/statoolinfos/core/Service.java +++ b/src/fr/devinsy/statoolinfos/core/Service.java @@ -188,6 +188,21 @@ public class Service extends PathPropertyList return result; } + /** + * Gets the crawl date. + * + * @return the crawl date + */ + public LocalDateTime getCrawlDate() + { + LocalDateTime result; + + result = LocalDateTime.parse(get("crawl.datetime")); + + // + return result; + } + /** * Gets the crawled date. * @@ -199,6 +214,11 @@ public class Service extends PathPropertyList result = LocalDateTime.parse(get("crawl.file.datetime")); + if (result.getYear() == 1970) + { + result = getCrawlDate(); + } + // return result; }